日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

halcon直线标定板对相机标定的效果评估(对比矫正前后、对比标定板矫正效果)

發(fā)布時(shí)間:2023/12/10 编程问答 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 halcon直线标定板对相机标定的效果评估(对比矫正前后、对比标定板矫正效果) 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

原圖




程序源碼

* gen_caltab (7, 7, 0.0025, 1/2.5, 'GB025標(biāo)定板.descr', 'GB025標(biāo)定板.ps') * Calibration 01: Code generated by Calibration 01 * CameraParameters := [0.048105,-44.0585,8.31518e-006,8.3e-006,641.37,588.269,1280,1024] * CameraPose := [-0.000849522,-0.00119001,0.155349,357.367,2.64825,174.694,0] * stop () * Calibration 01: Code generated by Calibration 01 CameraParameters := [0.0481151,56.7536,-739213,1.05534e+010,0.00643696,0.00896216,8.31503e-006,8.3e-006,636.538,582.388,1280,1024] CameraPose := [-0.000719502,-0.00103218,0.155376,357.307,2.70546,174.696,0] stop ()read_image (Image, '直線標(biāo)定板圖片/Left201113141949916.bmp') get_image_size (Image, Width, Height) dev_close_window () dev_open_window_fit_image (Image, 0, 0, -1, -1, WindowHandle) dev_display (Image) * Image Acquisition 01: Code generated by Image Acquisition 01 list_files ('直線標(biāo)定板圖片', ['files','follow_links'], ImageFiles) tuple_regexp_select (ImageFiles, ['\\.(tif|tiff|gif|bmp|jpg|jpeg|jp2|png|pcx|pgm|ppm|pbm|xwd|ima|hobj)$','ignore_case'], ImageFiles) gen_empty_obj (Edges) for Index := 0 to 20 - 1 by 1read_image (Image, ImageFiles[Index])edges_sub_pix (Image, ImageEdges, 'canny', 1, 10, 40)segment_contours_xld (ImageEdges, SplitEdges, 'lines_circles', 5, 4, 2)select_shape_xld (SplitEdges, SelectedEdges, 'contlength', 'and', 30, 100000)concat_obj (Edges, SelectedEdges, Edges)dev_display (Image)dev_set_colored (12)dev_display (SelectedEdges)wait_seconds (0.1) * stop () endforradial_distortion_self_calibration (Edges, CalibrationEdges, Width, Height, 0.08, 42, 'polynomial', 'variable', 0, CamParMultiImage) dev_clear_window () dev_set_colored (12) dev_display (CalibrationEdges)**********對(duì)比矯正后的圖片與矯正前的圖片 change_radial_distortion_cam_par ('fixed', CamParMultiImage, 0, CamParMultiImageRect) for Index := 0 to |ImageFiles| - 1 by 1read_image (Image, ImageFiles[Index])get_domain (Image, Domain)* Rectify the image, i.e., remove the radial distortions.change_radial_distortion_image (Image, Domain, ImageRectified, CamParMultiImage, CamParMultiImageRect)* Display the distorted and undistorted image to visualize the* differences between the images.dev_display (Image)sub_image (Image, ImageRectified, ImageSub3, 1, 0)stop ()disp_message (WindowHandle, 'Image with radial distortions', 'window', 0, 0, 'black', 'true')wait_seconds (0.5)dev_display (ImageRectified)disp_message (WindowHandle, 'Image without radial distortions', 'window', 0, 0, 'black', 'true')wait_seconds (0.5) endfor*標(biāo)定板畸變矯正準(zhǔn)備 change_radial_distortion_cam_par ('fixed', CameraParameters, [0,0,0,0,0], CamParVirtualFixed) * CamParVirtualFixed:=CameraParameters gen_radial_distortion_map(MapFixed,CameraParameters,CamParVirtualFixed,'bilinear') *直線畸變矯正準(zhǔn)備 change_radial_distortion_cam_par ('fixed', CamParMultiImage, [0,0,0,0,0], CamParMultiImageRect) get_domain (Image, Domain)for Index := 0 to |ImageFiles| - 1 by 1read_image (Image, ImageFiles[Index])* 直線標(biāo)定change_radial_distortion_image (Image, Domain, ImageRectified, CamParMultiImage, CamParMultiImageRect)* 標(biāo)定板標(biāo)定map_image(Image,MapFixed,ImageRectifiedFixed)*標(biāo)定板與直線標(biāo)定sub_image (ImageRectified, ImageRectifiedFixed, ImageSub, 1, 128)intensity (Domain, ImageSub, Mean, Deviation)sub_image (Image, ImageRectifiedFixed, ImageSub1, 1, 128)intensity (Domain, ImageSub1, Mean1, Deviation1)sub_image (Image, ImageRectified, ImageSub2, 1, 128)intensity (Domain, ImageSub2, Mean2, Deviation2)dev_display (Image)disp_message (WindowHandle, 'Image with radial distortions', 'window', 0, 0, 'black', 'true')wait_seconds (0.5)dev_display (ImageRectified)disp_message (WindowHandle, 'Image without radial distortions', 'window', 0, 0, 'black', 'true')wait_seconds (0.5) endfor

直線標(biāo)定板標(biāo)定前后對(duì)比:

直線標(biāo)定板矯正與標(biāo)定板差異

創(chuàng)作挑戰(zhàn)賽新人創(chuàng)作獎(jiǎng)勵(lì)來(lái)咯,堅(jiān)持創(chuàng)作打卡瓜分現(xiàn)金大獎(jiǎng)

總結(jié)

以上是生活随笔為你收集整理的halcon直线标定板对相机标定的效果评估(对比矫正前后、对比标定板矫正效果)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。