28:HALCON常用算子总结

HALCON 算子函数——Chapter 7 : Image

7.1 Access

1. get_grayval

功能:获取一个图像目标的灰度值。

2. get_image_pointer1

功能:获取一个通道的指针。

3. get_image_pointer1_rect

功能:获取图像数据指针和输入图像区域内最小矩形内部的图像数据。

4. get_image_pointer3

功能:获取一个彩色图像的指针。

5. get_image_time

功能:查找图像被创建的时间。

7.4 Creation

1. copy_image

功能:复制一个图像并为它分配新内存。

2. gen_image1

功能:从像素的一个指针创建一个图像。

3. gen_image1_extern

功能:从带存储管理的像素的一个指针创建一个图像。

4. gen_image1_rect

功能:从像素(带存储管理)的指针创建一个矩形区域的图像。

5. gen_image3

功能:从像素(红、绿、蓝)的三个指针创建一个图像。

6. gen_image_const

功能:创建一个固定灰度值的图像。

7. gen_image_gray_ramp

功能:创建一个灰度值阶梯。

8. gen_image_interleaved

功能:从交叉像素的一个指针创建一个三通道图像。

9. gen_image_proto

功能:创建一个指定的固定灰度值的图像。

10. gen_image_surface_first_order

功能:创建一阶多项式的一个弯曲灰度表面。

11. gen_image_surface_second_order

功能:创建二阶多项式的一个弯曲灰度表面。

12. region_to_bin

功能:把一个区域转变为一个二进制字节图像。

13. region_to_label

功能:把区域转变为一个标签图像。

14. region_to_mean

功能:用它们的平均灰度值绘制区域。

7.5 Domain

1. add_channels

功能:把两个灰度值添加到区域中。

2. change_domain

功能:改变一个图像的定义区间。

3. full_domain

功能:把一个图像的区域扩大到最大值。

4. get_domain

功能:获取一个图像的区域。

5. rectangle1_domain

功能:把一个图像的区域缩小到一个矩形。

6. reduce_domain

功能:缩小一个图像的区域。

7.6 Features

1. area_center_gray

功能:计算一个灰度值图像的区域面积和重心。

2. cooc_feature_image

功能:计算一个同时出现的矩阵并得出相关灰度值特征。

3. cooc_feature_matrix

功能:从一个同时出现的矩阵计算灰度值特征。

4. elliptic_axis_gray

功能:在一个灰度值图像中计算一个区域的方位和主轴。

5. entropy_gray

功能:确定一个图像的熵和各向异性。

6. estimate_noise

功能:从一个单一图像估计图像噪声。

7. fit_surface_first_order

功能:通过一个一阶表面(平面)计算灰度值力矩和近似值。

8. fit_surface_second_order

功能:通过一个二阶表面(平面)计算灰度值力矩和近似值。

9. fuzzy_entropy

功能:确定区域的模糊熵。

10. fuzzy_perimeter

功能:计算一个区域的模糊周长。

11. gen_cooc_matrix

功能:在一个图像中计算一个区域中同时出现的矩阵。

12. gray_histo

功能:计算灰度值分布。

13. gray_histo_abs

功能:计算灰度值分布。

14. gray_projections

功能:计算水平和垂直灰度值预测。

15. histo_2dim

功能:计算两通道灰度值图像的直方图。

16. intensity

功能:计算灰度值的平均值和偏差。

17. min_max_gray

功能:计算区域内的最大和最小灰度值。

18. moments_gray_plane

功能:通过一个平面计算灰度值力矩和近似值。

19. plane_deviation

功能:从近似像平面计算灰度值的偏差。

20. select_gray

功能:选择基于灰度值特征的区域。

21. shape_histo_all

功能:用极限值确定特征的一个直方图。

22. shape_histo_point

功能:用极限值确定特征的一个直方图。

7.7 Format

1. change_format

功能:改变图像大小。

2. crop_domain

功能:去掉确定的灰度值。

3. crop_domain_rel

功能:去掉和定义域有关的图像区域。

4. crop_part

功能:去掉一个矩形图像区域。

5. crop_rectangle1

功能:去掉一个矩形图像区域。

6. tile_channels

功能:把多重图像拼成一个大图像。

7. tile_images

功能:把多重图像目标拼成一个大图像。

8. tile_images_offset

功能:把多重图像目标拼成一个有确定的位置信息的大图像。

7.8 Manipulation

1. overpaint_gray

功能:重新绘制一个图像的灰度值。

2. overpaint_region

功能:重新绘制一个图像的区域。

3. paint_gray

功能:把一个图像的灰度值画在另一个图像上。

4. paint_region

功能:把区域画在一个图像中。

5. paint_xld

功能:把XLD目标画在一个图像中。

6.set_grayval

功能:在一个图像中设置单灰度值。

7.9 Type-Conversion

1. complex_to_real

功能:把一个复杂图像转变为两个实际图像。

2. convert_image_type

功能:转变一个图像的类型。

3. real_to_complex

功能:把两个实际图像转变为一个复杂图像。

4. real_to_vector_field

功能:把两个实值图像转变为一个矢量域图像。

5. vector_field_to_real

功能:把一个矢量域图像转变为两个实值图像。

当我们想要提取Region时,图像处理后,往往存在几个类似的Region,此时,需要根据Region的一些特殊特征,来选择指定的Region。

求Region指定特征值:region_features(Regions : : Features : Value)

根据特征值选择区域:select_shape(Regions : SelectedRegions : Features, Operation, Min, Max : )


Region特征一览:

特征

备注

area

Area of the object

对象的面积

row

Row index of the center

中心点的行坐标

column

Column index of the center

中心点的列坐标

width

Width of the region

区域的宽度

height

Height of the region

区域的高度

row1

Row index of upper left corner

左上角行坐标

column1

Column index of upper left corner

左上角列坐标

row2

Row index of lower right corner

右下角行坐标

column2

Column index of lower right corner

右下角列坐标

circularity

Circularity

圆度

0~1

compactness

Compactness

紧密度

0~1

contlength

Total length of contour

轮廓线总长

convexity

Convexity

凸性

rectangularity

Rectangularity

矩形度

0~1

ra

Main radius of the equivalent ellipse

等效椭圆长轴半径长度

rb

Secondary radius of the equivalent ellipse

等效椭圆短轴半径长度

phi

Orientation of the equivalent ellipse

等效椭圆方向

anisometry

Anisometry

椭圆参数,Ra/Rb长轴与短轴的比值

bulkiness

Bulkiness

椭圆参数,蓬松度π*Ra*Rb/A

struct_factor

Structur Factor 

椭圆参数,Anisometry*Bulkiness-1

outer_radius

Radius of smallest surrounding circle

最小外接圆半径

inner_radius

Radius of largest inner circle

最大内接圆半径

inner_width

Width of the largest axis-parallel rectangle that fits into the region

最大内接矩形宽度

inner_height

Height of the largest axis-parallel rectangle that fits into the region

最大内接矩形高度

dist_mean

Mean distance from the region border to the center

区域边界到中心的平均距离

dist_deviation

Deviation of the distance from the region border from the center

区域边界到中心距离的偏差

roundness

Roundness

圆度,与circularity计算方法不同

num_sides

Number of polygon sides

多边形边数

connect_num

Number of connection components

连通数

holes_num

Number of holes

区域内洞数

area_holes

Area of the holes of the object

所有洞的面积

max_diameter

Maximum diameter of the region

最大直径

orientation

Orientation of the region

区域方向

euler_number

Euler number

欧拉数,即连通数和洞数的差

rect2_phi

Orientation of the smallest surrounding rectangle

最小外接矩形的方向

rect2_len1

Half the length of the smallest surrounding rectangle

最小外接矩形长度的一半??

smallest_rectangle2

rect2_len2

Half the width of the smallest surrounding rectangle

最小外接矩形宽度的一半

moments_m11

Geometric moments of the region

几何矩

moments_m20

Geometric moments of the region

几何矩

moments_m02

Geometric moments of the region

几何矩

moments_ia

Geometric moments of the region

几何矩

moments_ib

Geometric moments of the region

几何矩

moments_m11_invar

Geometric moments of the region

几何矩

moments_m20_invar

Geometric moments of the region

几何矩

moments_m02_invar

Geometric moments of the region

几何矩

moments_phi1

Geometric moments of the region

几何矩

moments_phi2

Geometric moments of the region

几何矩

moments_m21

Geometric moments of the region

几何矩

moments_m12

Geometric moments of the region

几何矩

moments_m03

Geometric moments of the region

几何矩

moments_m30

Geometric moments of the region

几何矩

moments_m21_invar

Geometric moments of the region

几何矩

moments_m12_invar

Geometric moments of the region

几何矩

moments_m03_invar

Geometric moments of the region

几何矩

moments_m30_invar

Geometric moments of the region

几何矩

moments_i1

Geometric moments of the region

几何矩

moments_i2

Geometric moments of the region

几何矩

moments_i3

Geometric moments of the region

几何矩

moments_i4

Geometric moments of the region

几何矩

moments_psi1

Geometric moments of the region

几何矩

moments_psi2

Geometric moments of the region

几何矩

moments_psi3

Geometric moments of the region

几何矩

moments_psi4

Geometric moments of the region

几何矩



当我们想要提取Region时,图像处理后,往往存在几个类似的Region,此时,需要根据Region的一些特殊特征,来选择指定的Region。

求Region指定特征值:region_features(Regions : : Features : Value)

根据特征值选择区域:select_shape(Regions : SelectedRegions : Features, Operation, Min, Max : )


Region特征一览:

特征

备注

area

Area of the object

对象的面积

row

Row index of the center

中心点的行坐标

column

Column index of the center

中心点的列坐标

width

Width of the region

区域的宽度

height

Height of the region

区域的高度

row1

Row index of upper left corner

左上角行坐标

column1

Column index of upper left corner

左上角列坐标

row2

Row index of lower right corner

右下角行坐标

column2

Column index of lower right corner

右下角列坐标

circularity

Circularity

圆度

0~1

compactness

Compactness

紧密度

0~1

contlength

Total length of contour

轮廓线总长

convexity

Convexity

凸性

rectangularity

Rectangularity

矩形度

0~1

ra

Main radius of the equivalent ellipse

等效椭圆长轴半径长度

rb

Secondary radius of the equivalent ellipse

等效椭圆短轴半径长度

phi

Orientation of the equivalent ellipse

等效椭圆方向

anisometry

Anisometry

椭圆参数,Ra/Rb长轴与短轴的比值

bulkiness

Bulkiness

椭圆参数,蓬松度π*Ra*Rb/A

struct_factor

Structur Factor 

椭圆参数,Anisometry*Bulkiness-1

outer_radius

Radius of smallest surrounding circle

最小外接圆半径

inner_radius

Radius of largest inner circle

最大内接圆半径

inner_width

Width of the largest axis-parallel rectangle that fits into the region

最大内接矩形宽度

inner_height

Height of the largest axis-parallel rectangle that fits into the region

最大内接矩形高度

dist_mean

Mean distance from the region border to the center

区域边界到中心的平均距离

dist_deviation

Deviation of the distance from the region border from the center

区域边界到中心距离的偏差

roundness

Roundness

圆度,与circularity计算方法不同

num_sides

Number of polygon sides

多边形边数

connect_num

Number of connection components

连通数

holes_num

Number of holes

区域内洞数

area_holes

Area of the holes of the object

所有洞的面积

max_diameter

Maximum diameter of the region

最大直径

orientation

Orientation of the region

区域方向

euler_number

Euler number

欧拉数,即连通数和洞数的差

rect2_phi

Orientation of the smallest surrounding rectangle

最小外接矩形的方向

rect2_len1

Half the length of the smallest surrounding rectangle

最小外接矩形长度的一半??

smallest_rectangle2

rect2_len2

Half the width of the smallest surrounding rectangle

最小外接矩形宽度的一半

moments_m11

Geometric moments of the region

几何矩

moments_m20

Geometric moments of the region

几何矩

moments_m02

Geometric moments of the region

几何矩

moments_ia

Geometric moments of the region

几何矩

moments_ib

Geometric moments of the region

几何矩

moments_m11_invar

Geometric moments of the region

几何矩

moments_m20_invar

Geometric moments of the region

几何矩

moments_m02_invar

Geometric moments of the region

几何矩

moments_phi1

Geometric moments of the region

几何矩

moments_phi2

Geometric moments of the region

几何矩

moments_m21

Geometric moments of the region

几何矩

moments_m12

Geometric moments of the region

几何矩

moments_m03

Geometric moments of the region

几何矩

moments_m30

Geometric moments of the region

几何矩

moments_m21_invar

Geometric moments of the region

几何矩

moments_m12_invar

Geometric moments of the region

几何矩

moments_m03_invar

Geometric moments of the region

几何矩

moments_m30_invar

Geometric moments of the region

几何矩

moments_i1

Geometric moments of the region

几何矩

moments_i2

Geometric moments of the region

几何矩

moments_i3

Geometric moments of the region

几何矩

moments_i4

Geometric moments of the region

几何矩

moments_psi1

Geometric moments of the region

几何矩

moments_psi2

Geometric moments of the region

几何矩

moments_psi3

Geometric moments of the region

几何矩

moments_psi4

Geometric moments of the region

几何矩

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值