该接口对应一个斑点,提供斑点的属性计算、转换和绘制等功能 更多...
Public 成员函数 | |
| void | AttachImage (ILImage *image) |
| int | CountContour () |
| int | CountHole () |
| void | Draw (HDC hdc, LPVBlobDrawFlags drawFlags, double zoomX, double zoomY, double panX, double panY) |
| ILBlob * | Expand (int delta) |
| void | ExpandTo (int delta) |
| void | FromRegion (ILRegion *region, ILImage *image) |
| double | GetAngle (BOOL alwaysUp) |
| ILPoint * | GetCenter () |
| ILPolygon * | GetContour (int index) |
| double | GetContrast (LPVAggregation aggType, double percentage) |
| ILPolygon * | GetConvexHull () |
| double | GetFeature (LPVBlobFeatures feature) |
| ILPolygon * | GetHole (int index) |
| double | GetLuminance (LPVAggregation aggType, double percentage) |
| ILRect * | GetRect () |
| ILRect * | GetRotRect () |
| ILBlob * | Intersect (ILBlob *other) |
| void | IntersectTo (ILBlob *other) |
| ILBlob * | Shrink (int delta) |
| void | ShrinkTo (int delta) |
| ILBlob * | Subtract (ILBlob *other) |
| void | SubtractTo (ILBlob *other) |
| ILMaskRegion * | ToRegion () |
| ILBlob * | Union (ILBlob *other) |
| void | UnionTo (ILBlob *other) |
| ILBlob * | XOR (ILBlob *other) |
| void | XORTo (ILBlob *other) |
Public 成员函数 继承自 ILObject | |
| ILObject * | Copy () |
| LPVErrorCode | Load (LString filename) |
| void | Reset () |
| LPVErrorCode | Save (LString filename) |
| BOOL | Valid () |
额外继承的成员函数 | |
属性 继承自 ILObject | |
| LString | Name [get, set] |
| 对象的名称,默认为空。 大多数情况下,LPV 算法类并不使用这个名称。 若 ILDrawable::SetDrawName() 启用,该名称将被绘制在对象的附近 更多... | |
该接口对应一个斑点,提供斑点的属性计算、转换和绘制等功能
通常通过调用 ILBlobResults::Item() 得到该 LBlob 对象。 可以通过该接口计算感兴趣的斑点属性特征,访问斑点信息,绘制斑点到给定的图形设备等。
| void AttachImage | ( | ILImage * | image | ) |
绑定输入的图像到斑点,用于计算图像相关的属性特征,如亮度、对比度、清晰度等。
| [in] | image | 输入的图像 |
| int CountContour | ( | ) |
获取斑点的外轮廓个数
| int CountHole | ( | ) |
获取斑点的孔洞个数
| void Draw | ( | HDC | hdc, |
| LPVBlobDrawFlags | drawFlags, | ||
| double | zoomX, | ||
| double | zoomY, | ||
| double | panX, | ||
| double | panY | ||
| ) |
| ILBlob* Expand | ( | int | delta | ) |
将斑点的边向其外侧偏移,创建一个膨胀后的新的斑点对象。
| [in] | delta | 偏移像素距离 |
| newBlob | 输出一个新的斑点对象 |
| void ExpandTo | ( | int | delta | ) |
根据输入的区域对象,生成一个斑点对象
| [in] | region | 输入的区域对象 |
| [in] | image | 输入的图像,绑定到该斑点,用于计算图像相关的属性特征,如亮度、对比度、清晰度等。可为空。 |
| double GetAngle | ( | BOOL | alwaysUp | ) |
获取斑点的角度。
| [in] | alwaysUp | 默认值为 False,则为该斑点的包围旋转矩形长轴方向的角度,在 (-90, 90) 范围内。 若为 True,则总是返回包围旋转矩形朝上的轴的角度,无论是长轴还是短轴。在无法稳定区分斑点的长短轴时使用,如正方形或圆形斑点。 总是朝上的角度,取值范围在 (-135, -45)。 |
| val | 返回角度值 |
| ILPoint* GetCenter | ( | ) |
获取斑点的重心坐标
| ILPolygon* GetContour | ( | int | index | ) |
| double GetContrast | ( | LPVAggregation | aggType, |
| double | percentage | ||
| ) |
计算斑点中像素对比度的统计值。仅当有图像绑定到该斑点时,可以计算。
| [in] | aggType | 统计方式,查看 LPVAggregation |
| [in] | percentage | 设置统计像素在全部像素中的百分比(最高或最低)。正值表示统计数值最高的 X,负值表示统计数值最低的 X,0 表示统计所有像素。 |
| val | 返回对比度统计值 |
| ILPolygon* GetConvexHull | ( | ) |
计算斑点的包围凸多边形
| double GetFeature | ( | LPVBlobFeatures | feature | ) |
计算斑点的数值类型的属性特征
| [in] | feature | 指定特征的类型,查看 LPVBlobFeatures |
| val | 返回属性特征的值 |
| ILPolygon* GetHole | ( | int | index | ) |
| double GetLuminance | ( | LPVAggregation | aggType, |
| double | percentage | ||
| ) |
计算斑点中像素亮度的统计值。仅当有图像绑定到该斑点时,可以计算。
| [in] | aggType | 统计方式,查看 LPVAggregation |
| [in] | percentage | 设置统计像素在全部像素中的百分比(最高或最低)。正值表示统计数值最高的 X,负值表示统计数值最低的 X,0 表示统计所有像素。 |
| val | 返回亮度统计值 |
| ILRect* GetRect | ( | ) |
计算斑点的包围矩形
| ILRect* GetRotRect | ( | ) |
计算斑点的包围旋转矩形
将当前斑点与输入的斑点进行并操作,生成一个新的斑点, \( P' = P \cap other \) .
新的斑点仅包含两个斑点同时覆盖的部分。 一个空斑点与任何其他斑点求交,获得一个空斑点对象。
| [in] | other | 输入用于并操作的斑点对象 |
| newBlob | 输出一个新的斑点对象 |
| void IntersectTo | ( | ILBlob * | other | ) |
将当前斑点与输入的斑点进行并操作, \( P = P \cap other \) .
并操作后,当前斑点仅包含两个斑点同时覆盖的部分。 一个空斑点与任何其他斑点求交,当前斑点变为一个空斑点对象。
| [in] | other | 输入用于并操作的斑点对象 |
| ILBlob* Shrink | ( | int | delta | ) |
将斑点的边向其内侧偏移,创建一个收缩后的新的斑点对象。
| [in] | delta | 偏移像素距离 |
| newBlob | 输出一个新的斑点对象 |
| void ShrinkTo | ( | int | delta | ) |
从当前斑点中减去输入的斑点,生成一个新的斑点, \( P' = P - other \).
一个非空斑点减去空斑点,获得该斑点对象的拷贝。一个空斑点减去一个非空斑点,获得后者的取反斑点
| [in] | other | 输入用于减去的斑点 |
| newBlob | 输出一个新的斑点对象 |
| void SubtractTo | ( | ILBlob * | other | ) |
从当前斑点中减去输入的斑点, \( P = P - other \).
一个非空斑点减去空斑点,不发生任何改变。一个空斑点减去一个非空斑点,获得后者的取反斑点
| [in] | other | 输入用于减去的斑点 |
| ILMaskRegion* ToRegion | ( | ) |
根据该斑点的轮廓蒙版,生成一个蒙版区域对象
| region | 返回生成的蒙版区域对象 |
将当前斑点与输入的斑点进行与操作,生成一个新的斑点, \( P' = P \cup other \) .
新的斑点包含当前斑点和输入斑点中所包含的所有部分。 一个非空斑点与空斑点求与,获得该斑点对象的拷贝。
| [in] | other | 输入用于与操作的斑点 |
| newBlob | 输出一个新的斑点对象 |
| void UnionTo | ( | ILBlob * | other | ) |
将输入的斑点合入到当前斑点, \( P = P \cup other \) .
与 Add() 相同,合并后的斑点包含当前斑点和输入斑点中所包含的所有部分。 一个非空斑点与空斑点求与,不发生任何改变。
| [in] | other | 输入用于与操作的斑点 |
将当前斑点与输入的斑点进行异或操作,生成一个新的斑点, \( P' = P \oplus other \) .
新的斑点仅包含属于当前斑点但不属于输入斑点或属于输入斑点但不属于当前斑点的部分。 一个空斑点与任何其他斑点进行异或操作,获得一个空斑点对象。
| [in] | other | 输入用于异或操作的斑点对象 |
| newBlob | 输出一个新的斑点对象 |
| void XORTo | ( | ILBlob * | other | ) |
将当前斑点与输入的斑点进行异或操作,结果存储在当前斑点对象中, \( P = P \oplus other \) .
异或操作后,当前斑点仅包含属于当前斑点但不属于输入斑点或属于输入斑点但不属于当前斑点的部分。 一个空斑点与任何其他斑点进行异或操作,当前斑点变为一个空斑点对象。
| [in] | other | 输入用于异或操作的斑点对象 |