子像素 Blob - 与 Blob 对比的参数精度

<< 点击显示目录 >>

主页  mappVision帮助助手 > 机器视觉帮助 > mapp Vision  > 用例 >

子像素 Blob - 与 Blob 对比的参数精度

使用Blob 时,所有参数的结果值都具有像素精度。使用子像素 Blob 功能时,参数的结果值通常具有子像素精度。

下表概述了两种不同 Blob 功能的视觉功能块输出。表中比较了各个参数的精度(像素和亚像素精度)以及 Blob 中洞的影响。

孔洞是圆球内的孤立区域,不属于圆球的一部分,尤其与圆球外的区域(环境)没有任何联系。

pixelgrenze und pixelzentrum

参数

描述--球体与子像素球体

子像素球参数的精度

将 Blob 中的孔考虑在内

位置 X(n)

位置 Y(n)

Blob:根据相关 Blob 中所有像素坐标的平均值计算出的 Blob 中心点。

子像素 Blob:子像素 Blob 外轮廓所包围(填充)区域的几何中心。

不考虑 Blob 内的孔,因此它们对结果没有影响。

子像素精度

方向(n)

球体:与 Blob 区域具有相同方向和长宽比的等效椭圆的方向角。但是,也要确定边缘上与区域几何中心距离最大的点。如果该点在旋转系统(椭圆主轴)中的柱坐标小于几何中心的柱坐标,则角度将增加 180°。

子像素 Blob:等效椭圆的方向角,其方向和长宽比与 Blob 的外轮廓(多边形)相同。不过,也要确定轮廓上与几何中心距离最大的点。如果该点在旋转系统(椭圆主轴)中的柱坐标小于几何中心的柱坐标,则将其添加到角度中。

球体内部的孔洞不会考虑在内,因此对结果没有影响。

子像素精度

根据子像素精确轮廓进行计算

面积(n)

圆块:Blob 区域的面积。相当于属于 Blob 的像素数。

子像素 Blob:由 Blob 外轮廓线围成的 Blob 区域的面积。

子像素精度

平均灰度值(n)

图块:Blob 所有像素的平均灰度值。

子像素 Blob:Blob 中所有像素的平均灰度值。值得注意的是,轮廓点的坐标会四舍五入为最接近的整数值。这涉及到 Blob 的外轮廓以及孔的轮廓(多边形)。在最终计算中心时,相应孔洞的灰度值会被去除。

像素精确

基于像素精确区域或底层灰度值。

长度(n)

Blob:Blob 外轮廓最小包围矩形的长度。需要注意的是,这里使用像素边界作为外轮廓。

子像素 Blob:Blob 外轮廓(多边形)最小包围矩形的长度。

子像素精确度(基于 Blob 的外轮廓)

无关

宽度(n)

圆块:Blob 外轮廓最小包围矩形的宽度。需要注意的是,这里使用像素边界作为外轮廓。

子像素 Blob:Blob 外轮廓(多边形)最小包围矩形的宽度。

子像素精确度(基于 Blob 的外轮廓)

无关

剪切(n)

圆块:标记(0/1)表示 Blob 像素与当前 ROI 边缘像素的接触。

子像素 Blob:标记 (0/1),表示 Blob 像素与当前 ROI 的边缘像素相接触。需要注意的是,计算是基于外轮廓点(多边形)的精确像素坐标,通过将坐标四舍五入到最接近 的像素坐标值来创建的。

-

不相关

圆度(n)

圆块:Blob 区域与圆的相似度。

子像素 Blob:Blob 外轮廓(多边形)与圆的相似度。

不考虑 Blob 内部的孔,因此它们对结果没有影响。

子像素精度

根据子像素精确轮廓进行计算

矩形度(n)

Blob根据 Blob 区域的一阶矩和二阶矩计算 Blob 区域与矩形的相似度。

子像素 Blob:根据 Blob 外轮廓(多边形)的一阶矩和二阶矩计算 Blob 外轮廓与矩形的相似度。

Blob 内部的孔洞不会考虑在内,因此对结果没有影响。

子像素精度

根据子像素精确轮廓进行计算

反差测量(n)

Blob形状属性定义为 Ra/Rb 之比。Ra 和 Rb 表示与 Blob 区域具有相同方向和长宽比的椭圆的椭圆半径。

子像素 Blob:形状属性定义为 Ra/Rb 的比率。Ra 和 Rb 表示椭圆的椭圆半径,其方向和长宽比与 Blob 的外轮廓(多边形)相同。

球体内部的孔洞不计算在内,因此对结果没有影响。

子像素精度

根据子像素精确轮廓进行计算

Xmin(n)、Xmax(n)、Ymin(n)、Ymax(n)

Blob:Blob 的包围矩形(平行于坐标轴)坐标的最小值和最大值。值得注意的是,这里使用像素边界作为外轮廓。

子像素 Blob:Blob 外轮廓(多边形)包围矩形(与坐标轴平行)坐标的最小值和最大值。

子像素精度(基于 Blob 的外轮廓)

无关

内圆位置 X(n)

InnerCirclePositionY(n)

InnerCircleRadius(n)

Blob:Blob 的最大内圆参数。这是完全适合输入区域的最大离散圆形区域。

子像素 Blob:Blob 的最大内圆参数。这是与输入区域完全吻合的最大离散圆形区域。需要注意的是,计算是基于外轮廓和孔的轮廓(所有多边形)得出的像素精确区域。因此,由于球体的外轮廓和孔的精度达到了亚像素级,内圆的结果往往会比理论上可能的结果略小。

像素精确

然而,相关区域的计算是基于亚像素精度的轮廓,因此有可能偏离圆点。


使用Blob 时,所有参数的结果值都具有像素精度。使用亚像素 Blob 时,参数的结果值通常具有亚像素精度。

下表概述了两种不同 Blob 功能的视觉功能块输出。表中比较了各个参数的精度(像素和亚像素精度)以及 Blob 中洞的影响。

孔洞是圆球内的孤立区域,不属于圆球的一部分,尤其与圆球外的区域(环境)没有任何联系。

pixelgrenze und pixelzentrum

参数

描述--球体与子像素球体

子像素球参数的精度

将 Blob 中的孔考虑在内

位置 X(n)

位置 Y(n)

Blob:根据相关 Blob 中所有像素坐标的平均值计算出的 Blob 中心点。

子像素 Blob:子像素 Blob 外轮廓所包围(填充)区域的几何中心。

不考虑 Blob 内的孔,因此它们对结果没有影响。

子像素精度

方向(n)

球体:与 Blob 区域具有相同方向和长宽比的等效椭圆的方向角。但是,也要确定边缘上与区域几何中心距离最大的点。如果该点在旋转系统(椭圆主轴)中的柱坐标小于几何中心的柱坐标,则角度将增加 180°。

子像素 Blob:等效椭圆的方向角,其方向和长宽比与 Blob 的外轮廓(多边形)相同。不过,也要确定轮廓上与几何中心距离最大的点。如果该点在旋转系统(椭圆主轴)中的柱坐标小于几何中心的柱坐标,则将其添加到角度中。

球体内部的孔洞不会考虑在内,因此对结果没有影响。

子像素精度

根据子像素精确轮廓进行计算

面积(n)

圆块:Blob 区域的面积。相当于属于 Blob 的像素数。

子像素 Blob:由 Blob 外轮廓线围成的 Blob 区域的面积。

子像素精度

平均灰度值(n)

图块:Blob 所有像素的平均灰度值。

子像素 Blob:Blob 中所有像素的平均灰度值。值得注意的是,轮廓点的坐标会四舍五入为最接近的整数值。这涉及到 Blob 的外轮廓以及孔的轮廓(多边形)。在最终计算中心时,相应孔洞的灰度值会被去除。

像素精确

基于像素精确区域或底层灰度值。

长度(n)

Blob:Blob 外轮廓最小包围矩形的长度。需要注意的是,这里使用像素边界作为外轮廓。

子像素 Blob:Blob 外轮廓(多边形)最小包围矩形的长度。

子像素精确度(基于 Blob 的外轮廓)

无关

宽度(n)

圆块:Blob 外轮廓最小包围矩形的宽度。需要注意的是,这里使用像素边界作为外轮廓。

子像素 Blob:Blob 外轮廓(多边形)最小包围矩形的宽度。

子像素精确度(基于 Blob 的外轮廓)

无关

剪切(n)

圆块:标记(0/1)表示 Blob 像素与当前 ROI 边缘像素的接触。

子像素 Blob:标记 (0/1),表示 Blob 像素与当前 ROI 的边缘像素相接触。需要注意的是,计算是基于外轮廓点(多边形)的精确像素坐标,通过将坐标四舍五入到最接近 的像素坐标值来创建的。

-

不相关

圆度(n)

圆块:Blob 区域与圆的相似度。

子像素 Blob:Blob 外轮廓(多边形)与圆的相似度。

不考虑 Blob 内部的孔,因此它们对结果没有影响。

子像素精度

根据子像素精确轮廓进行计算

矩形度(n)

Blob根据 Blob 区域的一阶矩和二阶矩计算 Blob 区域与矩形的相似度。

子像素 Blob:根据 Blob 外轮廓(多边形)的一阶矩和二阶矩计算 Blob 外轮廓与矩形的相似度。

Blob 内部的孔洞不会考虑在内,因此对结果没有影响。

子像素精度

根据子像素精确轮廓进行计算

反差测量(n)

Blob形状属性定义为 Ra/Rb 之比。Ra 和 Rb 表示与 Blob 区域具有相同方向和长宽比的椭圆的椭圆半径。

子像素 Blob:形状属性定义为 Ra/Rb 的比率。Ra 和 Rb 表示椭圆的椭圆半径,其方向和长宽比与 Blob 的外轮廓(多边形)相同。

球体内部的孔洞不计算在内,因此对结果没有影响。

子像素精度

根据子像素精确轮廓进行计算

Xmin(n)、Xmax(n)、Ymin(n)、Ymax(n)

Blob:Blob 的包围矩形(平行于坐标轴)坐标的最小值和最大值。值得注意的是,这里使用像素边界作为外轮廓。

子像素 Blob:Blob 外轮廓(多边形)包围矩形(与坐标轴平行)坐标的最小值和最大值。

子像素精度(基于 Blob 的外轮廓)

无关

内圆位置 X(n)

InnerCirclePositionY(n)

InnerCircleRadius(n)

Blob:Blob 的最大内圆参数。这是完全适合输入区域的最大离散圆形区域。

子像素 Blob:Blob 的最大内圆参数。这是与输入区域完全吻合的最大离散圆形区域。需要注意的是,计算是基于外轮廓和孔的轮廓(所有多边形)得出的像素精确区域。因此,由于球体的外轮廓和孔的精度达到了亚像素级,内圆的结果往往会比理论上可能的结果略小。

像素精确

然而,相关区域的计算是基于亚像素精度的轮廓,因此有可能偏离圆点。


With Blob, all result values of the parameters have pixel accuracy. With Subpixel Blob, the result values of the parameters usually have subpixel accuracy.

The following table provides an overview of the outputs of the vision function blocks for the two different blob functions. The accuracy of the individual parameters (pixel and subpixel accuracy) and the influence of holes in the blob are compared.

Holes are isolated areas inside the blob, which are not part of the blob and in particular have no connection to the area outside the blob (environment).

pixelgrenze und pixelzentrum

Parameters

Description - Blob versus Subpixel Blob

Accuracy of the parameter for Subpixel Blob

Taking holes in the blob into account

PositionX(n)

PositionY(n)

Blob: Center of the blob that is calculated from the average of the pixel coordinates of all pixels in the associated blob.

Subpixel Blob: Geometric center of the area enclosed (filled in) by the outer contour of the subpixel blob.

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

No

Orientation(n)

Blob: Orientation angle of the equivalent ellipse with the same orientation and aspect ratio as the region of the blob. However, the point on the edge with maximum distance from the geometric center of the region is also determined. If its column coordinate in the rotated system (of the ellipse main axes) is less than the column coordinate of the geometric center, 180° is added to the angle.

Subpixel Blob: Orientation angle of the equivalent ellipse with the same orientation and aspect ratio as the outer contour (polygon) of the blob. However, the point on the contour with maximum distance from the geometric center is also determined. If its column coordinate in the rotated system (of the ellipse main axes) is less than the column coordinate of the geometric center, it is added to the angle.

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

Calculation based on the subpixel accurate contour

No

Area(n)

Blob: Area of the region of the blob. Corresponds to the number of pixels that belong to the blob.

Subpixel Blob: Area of the region of the blob enclosed by the outer contour of the blob.

Subpixel accuracy

Yes

MeanGrayValue(n)

Blob: Average grayscale value of all pixels of the blob.

Subpixel Blob: Average grayscale value of all pixels of the blob. It is important to note that the coordinates of the contour points are rounded to the nearest integer value. This concerns the outer contour of the blob, as well as the contours (polygons) of the holes. The grayscale values of the corresponding holes are removed for the final calculation of the center.

Pixel accurate

Based on the pixel-accurate area or the underlying grayscale values.

Yes

Length(n)

Blob: Length of the smallest enclosing rectangle of the outer contour of the blob. It is important to note that here the pixel boundaries are used as the outer contour.

Subpixel Blob: Length of the smallest enclosing rectangle of the outer contour (polygon) of the blob.

Subpixel accurate (based on the outer contour of the blob)

Not relevant

Width(n)

Blob: Width of the smallest enclosing rectangle of the outer contour of the blob. It is important to note that here the pixel boundaries are used as the outer contour.

Subpixel Blob: Width of the smallest enclosing rectangle of the outer contour (polygon) of the blob.

Subpixel accurate (based on the outer contour of the blob)

Not relevant

Clipped(n)

Blob: Mark (0/1) indicating contact of blob pixels with edge pixels of the current ROI.

Subpixel Blob: Mark (0/1) indicating contact of blob pixels with edge pixels of the current ROI. It is important to note that the calculation is based on pixel-exact coordinates of the outer contour points (polygon), which are created by rounding the coordinates to the nearest value of the pixel coordinates.

-

Not relevant

Circularity(n)

Blob: Similarity of the blob region to a circle.

Subpixel Blob: Similarity of the blob outer contour (polygon) with a circle.

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

Calculation based on the subpixel accurate contour

No

Rectangularity(n)

Blob: Similarity of the blob region to a rectangle based on the first and second order moments of the blob region.

Subpixel Blob: Similarity of the blob outer contour to a rectangle based on the first and second order moments of the blob outer contour (polygon).

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

Calculation based on the subpixel accurate contour

No

Anisometry(n)

Blob: Shape property defined as the ratio Ra/Rb. Ra and Rb denote the ellipse radii of the ellipse with the same orientation and aspect ratio as the region of the blob.

Subpixel Blob: Shape property defined as the ratio Ra/Rb. Ra and Rb denote the ellipse radii of the ellipse with the same orientation and aspect ratio as the outer contour (polygon) of the blob.

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

Calculation based on the subpixel accurate contour

No

Xmin(n), Xmax(n), Ymin(n), Ymax(n)

Blob: Minimum and maximum of the coordinates of the enclosing rectangle (parallel to the coordinate axes) of the blob. It is important to note that here the pixel boundaries are used as the outer contour.

Subpixel Blob: Minimum and maximum of the coordinates of the enclosing rectangle (parallel to the coordinate axes) of the outer contour (polygon) of the blob.

Subpixel accurate (based on the outer contour of the blob)

Not relevant

InnerCirclePositionX(n)

InnerCirclePositionY(n)

InnerCircleRadius(n)

Blob: Parameter of the largest inner circle of the blob. This is the largest discrete circular region that fits entirely within the input region.

Subpixel Blob: Parameter of the largest inner circle of the blob. This is the largest discrete circular region that fits entirely within the input region. It is important to note that the calculation is based on the pixel-accurate regions derived from the outer contour and the contours of the holes (all polygons). Therefore, the result of the inner circle tends to be slightly smaller than theoretically possible due to the subpixel accurate outer contour and holes of the blob.

Pixel accurate

The calculation of the relevant area is, however, based on the subpixel-accurate contours, so deviations from the blob are possible.

Yes


With Blob, all result values of the parameters have pixel accuracy. With Subpixel Blob, the result values of the parameters usually have subpixel accuracy.

The following table provides an overview of the outputs of the vision function blocks for the two different blob functions. The accuracy of the individual parameters (pixel and subpixel accuracy) and the influence of holes in the blob are compared.

Holes are isolated areas inside the blob, which are not part of the blob and in particular have no connection to the area outside the blob (environment).

pixelgrenze und pixelzentrum

Parameters

Description - Blob versus Subpixel Blob

Accuracy of the parameter for Subpixel Blob

Taking holes in the blob into account

PositionX(n)

PositionY(n)

Blob: Center of the blob that is calculated from the average of the pixel coordinates of all pixels in the associated blob.

Subpixel Blob: Geometric center of the area enclosed (filled in) by the outer contour of the subpixel blob.

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

No

Orientation(n)

Blob: Orientation angle of the equivalent ellipse with the same orientation and aspect ratio as the region of the blob. However, the point on the edge with maximum distance from the geometric center of the region is also determined. If its column coordinate in the rotated system (of the ellipse main axes) is less than the column coordinate of the geometric center, 180° is added to the angle.

Subpixel Blob: Orientation angle of the equivalent ellipse with the same orientation and aspect ratio as the outer contour (polygon) of the blob. However, the point on the contour with maximum distance from the geometric center is also determined. If its column coordinate in the rotated system (of the ellipse main axes) is less than the column coordinate of the geometric center, it is added to the angle.

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

Calculation based on the subpixel accurate contour

No

Area(n)

Blob: Area of the region of the blob. Corresponds to the number of pixels that belong to the blob.

Subpixel Blob: Area of the region of the blob enclosed by the outer contour of the blob.

Subpixel accuracy

Yes

MeanGrayValue(n)

Blob: Average grayscale value of all pixels of the blob.

Subpixel Blob: Average grayscale value of all pixels of the blob. It is important to note that the coordinates of the contour points are rounded to the nearest integer value. This concerns the outer contour of the blob, as well as the contours (polygons) of the holes. The grayscale values of the corresponding holes are removed for the final calculation of the center.

Pixel accurate

Based on the pixel-accurate area or the underlying grayscale values.

Yes

Length(n)

Blob: Length of the smallest enclosing rectangle of the outer contour of the blob. It is important to note that here the pixel boundaries are used as the outer contour.

Subpixel Blob: Length of the smallest enclosing rectangle of the outer contour (polygon) of the blob.

Subpixel accurate (based on the outer contour of the blob)

Not relevant

Width(n)

Blob: Width of the smallest enclosing rectangle of the outer contour of the blob. It is important to note that here the pixel boundaries are used as the outer contour.

Subpixel Blob: Width of the smallest enclosing rectangle of the outer contour (polygon) of the blob.

Subpixel accurate (based on the outer contour of the blob)

Not relevant

Clipped(n)

Blob: Mark (0/1) indicating contact of blob pixels with edge pixels of the current ROI.

Subpixel Blob: Mark (0/1) indicating contact of blob pixels with edge pixels of the current ROI. It is important to note that the calculation is based on pixel-exact coordinates of the outer contour points (polygon), which are created by rounding the coordinates to the nearest value of the pixel coordinates.

-

Not relevant

Circularity(n)

Blob: Similarity of the blob region to a circle.

Subpixel Blob: Similarity of the blob outer contour (polygon) with a circle.

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

Calculation based on the subpixel accurate contour

No

Rectangularity(n)

Blob: Similarity of the blob region to a rectangle based on the first and second order moments of the blob region.

Subpixel Blob: Similarity of the blob outer contour to a rectangle based on the first and second order moments of the blob outer contour (polygon).

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

Calculation based on the subpixel accurate contour

No

Anisometry(n)

Blob: Shape property defined as the ratio Ra/Rb. Ra and Rb denote the ellipse radii of the ellipse with the same orientation and aspect ratio as the region of the blob.

Subpixel Blob: Shape property defined as the ratio Ra/Rb. Ra and Rb denote the ellipse radii of the ellipse with the same orientation and aspect ratio as the outer contour (polygon) of the blob.

Holes inside the blob are not taken into account, so they have no influence on the result.

Subpixel accuracy

Calculation based on the subpixel accurate contour

No

Xmin(n), Xmax(n), Ymin(n), Ymax(n)

Blob: Minimum and maximum of the coordinates of the enclosing rectangle (parallel to the coordinate axes) of the blob. It is important to note that here the pixel boundaries are used as the outer contour.

Subpixel Blob: Minimum and maximum of the coordinates of the enclosing rectangle (parallel to the coordinate axes) of the outer contour (polygon) of the blob.

Subpixel accurate (based on the outer contour of the blob)

Not relevant

InnerCirclePositionX(n)

InnerCirclePositionY(n)

InnerCircleRadius(n)

Blob: Parameter of the largest inner circle of the blob. This is the largest discrete circular region that fits entirely within the input region.

Subpixel Blob: Parameter of the largest inner circle of the blob. This is the largest discrete circular region that fits entirely within the input region. It is important to note that the calculation is based on the pixel-accurate regions derived from the outer contour and the contours of the holes (all polygons). Therefore, the result of the inner circle tends to be slightly smaller than theoretically possible due to the subpixel accurate outer contour and holes of the blob.

Pixel accurate

The calculation of the relevant area is, however, based on the subpixel-accurate contours, so deviations from the blob are possible.

Yes