自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(447)
  • 资源 (1)
  • 收藏
  • 关注

原创 dev_set_preferences

4)endifendwhile。

2024-05-28 16:54:50 310

原创 get_mbutton

等到按下鼠标按钮并获取亚像素鼠标位置。等到按下鼠标按钮并返回点击坐标。

2024-05-28 10:11:36 279

原创 calib

endfor。

2024-05-25 17:21:01 422

原创 【无标题】

HWindow m_windowHandle= hWindowControl1.HalconWindow;get_contour_xld (SelectedContours1, lowArcRow, lowArcCol)tuple_median (lowArcRow, lowArcRow_Mid)tuple_median (lowArcCol, lowArcCol_Mid)gen_cross_contour_xld (lowArc_Mid, lowArcRow_Mid, lowArcCol_Mid,

2024-05-24 16:52:46 124

原创 difference

threshold (GrayImage, Regions, 1, 150)smallest_rectangle2 (Regions, Row, Column, Phi, Length1, Length2)gen_rectangle2 (Rectangle, Row, Column, Phi, Length1, Length2)difference (Rectangle, Regions, RegionDifference)opening_circle (RegionDifference, Regi

2024-05-22 17:07:13 340

原创 学习学习学习

read_image (Image, '标定20/' + index + '.png')

2024-05-20 16:57:19 175

原创 【无标题】

mean_image (Image, ImageMean1, 3, 3)mean_image (Image, ImageMean2, 50, 50)dyn_threshold (ImageMean1, ImageMean2, RegionDynThresh, 35, 'light')connection (RegionDynThresh, ConnectedRegions)select_shape (ConnectedRegions, SelectedRegions, ['width','heigh

2024-05-18 12:52:22 146

原创 gaussdyn

mean_image (GrayImage, ImageMean, 10,1)dyn_threshold (GrayImage, ImageMean, RegionDynThresh,2, 'light')derivate_gauss (ImageReduced, DerivGauss, 1, 'x')threshold (DerivGauss, Regions, 0.25, 50)connection (Regions, ConnectedRegions1)

2024-05-14 09:43:30 83

原创 HSmartWindowControl

/设置后mask将显示为透明的红色,第四个参数控制透明度,范围:0~255 hWindow.DispRegion(mask);

2024-05-11 17:01:12 250

原创 gen_contour_polygon_xld

gen_contour_polygon_xld (Contour, [695.740,705.871,1139.414,1126.851,695.740], [1064.921,1781.932,1774.198,1057.216,1064.921])smallest_rectangle2_xld (Contour, Row, Column, Phi, Length1, Length2)

2024-05-10 16:12:41 98

原创 union2

rgb1_to_gray (Image, GrayImage)threshold (GrayImage, Regions, 1, 150)smallest_rectangle2 (Regions, Row, Column, Phi, Length1, Length2)gen_rectangle2 (Rectangle, Row, Column, Phi, Length1, Length2)difference (Rectangle, Regions, RegionDifference)openin

2024-05-08 16:40:30 280

原创 ModelID

从模板匹配函数的结果进行目标仿射变换,把参考图像变为当前图像。*利用模板进行模板匹配,输出坐标角度匹配分数等参数。*从点和角度计算刚性仿射变换,找出模板和卡尺工具的对应关系。

2024-05-08 08:06:55 203

原创 【无标题】

角度计算方式:将直线看作向量(有方向性),以直线与水平轴的交点为起点(旋转中心)。如果终点在水平轴上方,则夹角为逆时针旋转水平轴到向量的角度(带正号)。如果终点在水平轴下方,则夹角为顺时针旋转水平轴到向量的角度(带负号)。结果取决于定义线条的两点的顺序。角度表示方式:弧度,-π<=Angle<π。

2024-05-05 10:12:36 99

原创 metrology_object_param

rgb1_to_gray (Image, GrayImage)gray_range_rect (GrayImage, ImageResult, 20, 5)binary_threshold (ImageResult, Region, 'max_separability', 'dark', UsedThreshold)connection (Region, ConnectedRegions)select_shape_std (ConnectedRegions, SelectedRegions, 'ma

2024-05-03 10:36:00 263

原创 ocr_class

mean_image (Image, ImageMean1, 3, 3)mean_image (Image, ImageMean2, 50, 50)dyn_threshold (ImageMean1, ImageMean2, RegionDynThresh, 35, 'light')connection (RegionDynThresh, ConnectedRegions)select_shape (ConnectedRegions, SelectedRegions, ['width','heigh

2024-05-02 17:41:03 686

原创 bar_code_model

create_bar_code_model ([], [], BarCodeHandle)set_bar_code_param (BarCodeHandle, 'meas_thresh', 0.2)find_bar_code (Image, SymbolRegions, BarCodeHandle, 'auto', DecodedDataStrings)dev_display (Image)dev_display (SymbolRegions)disp_message (WindowHandle,

2024-04-30 17:07:36 79

原创 【无标题】

计算从点和角度计算刚性仿射变换。原始行、列、角度 仿射变换后(模板)的行、列、角度 原始裁剪图像跟当前匹配到的模板之间的关系。*拿已经定义好的要查找对象的圆形坐标代入到刚得到的仿射变换的关系当中。*拿到这个新图像匹配到的跟原始匹配到的进行计算得到新的仿射变换关系。*①、已知模板一的轮廓信息以及要对应要查找的圆心信息,****现计算模板二的查找的圆信息。*③、模板一根模板二之间的关系。*②、模板二的轮廓信息。

2024-04-29 11:26:15 125

原创 derivate_gauss

dev_close_window ()dev_open_window (0, 0, Width, Height, 'black', WindowHandle)dev_display (Image)rgb1_to_gray (Image, GrayImage)mean_image (GrayImage, ImageMean, 10,1)dyn_threshold (GrayImage, ImageMean, RegionDynThresh,2, 'light')connection (Region

2024-04-28 11:25:21 189 1

原创 试图加载格式不正确的程序。 (异常来自 HRESULT:0x8007000B)

编译版本64xhalcon。

2024-04-24 17:03:39 530

原创 line_

else。

2024-04-24 08:07:20 171

原创 distance

根据计算出的角度与宽度,生成对应的矩形。*每次生成的矩形对象放入对象数组中。

2024-04-22 18:38:54 264

原创 正则string

5.景深(Depth of Field,DOF) 景深是指在被摄物体聚焦清楚后,在物体前后一定距离内,其影像仍然清晰的范围。光圈越大,景深越小;光圈越小、景深越大。焦距越长,景深越小;距离拍摄体越远时,景深越大。常用的包括C、CS、F、V、T2、Leica、M42x1、M75x0.75等。焦距的大小决定着视角的大小,焦距数值小,视角大,所观察的范围也大;焦距数值大,视角小,观察范围小。2.光圈(Iris) 用F表示,以镜头焦距f和通光孔径D的比值来衡量。F值越小,光圈越大,F值越大,光圈越小。

2024-04-19 17:05:25 144

原创 shape

mean_image (image, ImageMean, 15, 15)dyn_threshold (image, ImageMean, RegionDynThresh, 5, 'dark')connection (RegionDynThresh, ConnectedRegions)select_shape (ConnectedRegions, SelectedRegions, ['area','width','height'], 'and', [9000, 200, 200], [20000, 3

2024-04-19 08:58:34 342

原创 fft_generic

fft_generic (ImageResult, ImageFFT1, 'from_freq', 1, 'sqrt', 'dc_center', 'byte')median_image (ImageFFT1, ImageMedian, 'circle', 8, 'mirrored')threshold (ImageMedian, Regions, 0, 0)erosion_circle (Regions, RegionErosion, 3.5)connection (RegionErosion,

2024-04-17 17:11:53 271

原创 gray_erosion

get_image_pointer1 (Image1018784Eedced875353e8d, Pointer, Type, Width, Height)decompose3 (Image1018784Eedced875353e8d, Image11, Image21, Image31)gray_erosion_rect (Image21, ImageMin, 22, 22)gray_erosion_rect (Image11, ImageMin, 22, 22)gray_dilation_rec

2024-04-16 17:02:55 187

原创 using

/ 中间处理逻辑ms.Flush();

2024-04-16 08:05:22 231

原创 IntPtr

"")else= "")else。

2024-04-14 12:49:49 289

原创 metrology

list_files ('D:/图像文件/7.10/Two', 'files', Files)*从点和角度计算刚性仿射变换,找出模板和卡尺工具的对应关系。*将有值的区域以最小外界正矩形的方式返回。*创建卡尺工具,设置参数。*创建一个初始化矩阵。

2024-04-13 08:05:40 295

原创 shape

0.5 MaxOverlap 当找到的模板存在重叠时,且重叠大于该值时选择一个好的输出。*Column_Modle1 Column 输出匹配位置的列。*Angle_Modle1 Angle 输出匹配位置的角度。*1 NumMatches 定义要输出的匹配的最大个数。*-0.39 AngleStart 搜索时的起始角度。*0.79 AngleExtent 搜索时的角度范围。*Row_Modle1 Row 输出匹配位置的行。*Score Score 输出匹配位置的分数。*显示基于形状的匹配结果。

2024-04-12 08:09:21 214

原创 【无标题】

* sort_contours_xld (, SortedContours, 'upper_left', 'true', 'row')sort_pairs (, , '1', Sorted1, Sorted2)sort_region (, SortedRegions, 'first_point', 'true', 'row')* select_shape_xld (, SelectedXLD, 'area', 'and', 150, 99999)* select_xld_point (, DestX

2024-04-11 08:58:28 192

原创 circle

dilation_circle (RegionFillUp, RegionDilation, 14.5)erosion_circle (RegionFillUp, RegionErosion, 7.5)difference (RegionDilation, RegionErosion, RegionDifference)reduce_domain (Image20240123135334, RegionDifference, ImageReduced)edges_sub_pix (ImageRedu

2024-04-09 17:12:33 172

原创 points_sojka

points_sojka (ImageResult, 9, 2.5, 0.75, 30, 90, 0.5, 'true', RowSojka, ColSojka)gen_cross_contour_xld (CrossSojka, RowSojka, ColSojka, Size, Angle)dev_display (ImageResult)dev_display (CrossSojka)

2024-04-08 17:05:49 114

原创 sort_pairs

描述Example:returns:

2024-04-07 09:45:46 130

原创 sort_contours_xld

endforstop ()endfor。

2024-04-02 17:07:30 277

原创 inner_rectangle1

elsebreakendifendwhile。

2024-04-02 08:18:11 210

原创 hom_mat2d_reflect

L := 0.75 * max([Width,Height]) Mr := Height / 2.0 Mc := Width / 2.0 Pr := Mr + L * sin(rad(A)) Pc := Mc - L * cos(rad(A)) Qr := Mr - L * sin(rad(A)) Qc := Mc + L * cos(rad(A)) hom_mat2d_identity (HomMat2DIdentity) hom_mat2d_reflect (HomMat

2024-03-30 17:00:48 138

原创 polygons

gen_contour_region_xld (Region, Contours, 'border')gen_polygons_xld (Contours, Polygons, 'ramer', 2)get_polygon_xld (Polygons, Row, Col, Length, Phi)gen_cross_contour_xld (Cross, Row, Col, 60, 0.785398)

2024-03-29 17:09:49 107

原创 gen_contour_region_xld

mean_image (image, ImageMean, 15, 15)dyn_threshold (image, ImageMean, RegionDynThresh, 5, 'dark')connection (RegionDynThresh, ConnectedRegions)select_shape (ConnectedRegions, SelectedRegions, ['area','width','height'], 'and', [9000, 200, 200], [20000, 3

2024-03-29 08:08:55 360

原创 domain

read_image (Image1, 'D:/图像文件/图片/图片/基板/20230609-103004-0.bmp')

2024-03-26 15:14:56 294

原创 rectangle2

stop ()stop ()endfor。

2024-03-26 08:04:27 491

prism demo

prism的自己写的小例子,入门理解各种概念。testModule就是另一个项目中的类,该类用于加载相应的view,这样就把两个项目里面不同的模块连在了一起

2019-04-22

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除