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

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

halcon车刀崩边检测

發布時間:2023/12/10 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 halcon车刀崩边检测 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.


list_files ('新建文件夾', 'files', Files) read_image (Image, Files[0]) dev_close_window () get_image_size (Image, Width, Height) dev_open_window (0, 0, Width/1.5, Height/1.5, 'black', WindowHandle) dev_set_draw ('margin') dev_set_colored (12) for Index:=0 to |Files|-1 by 1read_image (Image, Files[Index]) edges_sub_pix (Image, Edges, 'canny', 1, 70, 100) select_contours_xld (Edges, SelectedContours, 'contour_length', 50, 2000, -0.5, 0.5) union_adjacent_contours_xld (SelectedContours, UnionContours, 10, 1, 'attr_keep') smooth_contours_xld (UnionContours, SmoothedContours, 5) smallest_rectangle2_xld (SmoothedContours, Row2, Column1, Phi, Length1, Length2) gen_rectangle2 (Rectangle, Row2, Column1, Phi, Length1, Length2) hom_mat2d_identity (HomMat2DIdentity) hom_mat2d_rotate (HomMat2DIdentity, -Phi, Row2, Column1, HomMat2DRotate) * hom_mat2d_scale (HomMat2DRotate, 1.5, 1.5, 256, 256, HomMat2DScale) affine_trans_contour_xld (SmoothedContours, ContoursAffinTrans, HomMat2DRotate)segment_contours_xld (SmoothedContours, ContoursSplit, 'lines_circles', 5, 4, 2) select_shape_xld (ContoursSplit, SelectedXLD, ['circularity','contlength'], 'or', [0.01,0], [1,50]) union_adjacent_contours_xld (SelectedXLD, CircleXld, 10, 1, 'attr_keep') select_shape_xld (CircleXld, SelectedXLD3, 'contlength', 'and', 0, 200) obj_diff (CircleXld, SelectedXLD3, CircleXld) obj_diff (ContoursSplit, SelectedXLD, LinesXld) concat_obj (LinesXld, SelectedXLD3, LinesXld) union_adjacent_contours_xld (LinesXld, LinesXld, 10, 1, 'attr_keep')gen_empty_obj (SelectedXLD2) gen_empty_obj (SelectedXLD1)fit_circle_contour_xld (CircleXld, 'geotukey', -1, 0, 0, 3, 2, Row, Column, Radius, StartPhi, EndPhi, PointOrder) if(|Row|>0) gen_circle_contour_xld (ContCircle, Row, Column, Radius, 0, 6.28318, 'positive', 1)distance_cc (ContCircle, CircleXld, 'point_to_segment', DistanceMin, DistanceMax) difference_closed_contours_xld (CircleXld, ContCircle, ContoursDifference) difference_closed_contours_xld (ContCircle, CircleXld, ContoursDifference1) select_shape_xld (ContoursDifference1, SelectedXLD2, ['rect2_len2','compactness'], 'and', [1,0], [50,50]) select_shape_xld (ContoursDifference, SelectedXLD1, ['rect2_len2','compactness'], 'and', [1,0], [50,50]) endiffit_line_contour_xld (LinesXld, 'tukey', -1, 0, 5, 2, RowBegin, ColBegin, RowEnd, ColEnd, Nr, Nc, Dist) segment_contours_xld (LinesXld, ContoursSplitLines, 'lines_circles', 5, 5, 1) select_shape_xld (ContoursSplitLines, SelectedXLDLines, ['circularity','contlength'], 'or', [0.015,0], [1,30])smallest_rectangle2_xld (SelectedXLDLines, Row3, Column2, Phi1, Length11, Length21) gen_region_contour_xld (SelectedXLDLines, Region, 'filled') dilation_circle (Region, RegionDilation, 3.5)dev_display (Image) dev_display (SelectedXLD2) dev_display (SelectedXLD1) dev_display (SelectedXLDLines) dev_display (RegionDilation) stop() endfor



總結

以上是生活随笔為你收集整理的halcon车刀崩边检测的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。