This interface provide functionalities of path detection. More...
Public Member Functions | |
LPVErrorCode | Detect (ILImage *img, ILRotRectRegion *region, ILPathResults **results) |
Public Member Functions inherited from ILObject | |
ILObject * | Copy () |
LPVErrorCode | Load (LString filename) |
void | Reset () |
LPVErrorCode | Save (LString filename) |
BOOL | Valid () |
Properties | |
int | AcceptRelativeScore [get, set] |
The relative accept score used in detection, which is useful for noise removal. The relative score is computed using the current and the next result candidate or background pixels as \( Abs(e - e') / Max(e, e') * 100% \). If the relative score is bigger than the threshold, than the candidate is accepted as the report result. It's in 0 ~ 100, by default set to 20. The smaller relative score indicates more sensitive detection and more path outputs. For low contrast between the path and the background, a larger relative score is preferred. Set to 0 to disable the relative threshold. If both the accept and relative score is defined, the result should meet either of the criteria. | |
int | AcceptScore [get, set] |
The accept score used in detection. It defines the minimum(LPVWhiteOnBlack ) or maximum(LPVBlackOnWhite ) score for identifying the result as a good path. It's in 0 ~ 255, by default, it's set to 0 which in fact does not work. . | |
int | MaxCount [get, set] |
The maximum of paths to find. | |
int | PathWidth [get, set] |
The width of the path used in detection. If two paths are closer than the width, they are treat as one and then merged. It's in 1 ~ 100, by default, it's set to 10 pix. | |
LPVPolarity | Polarity [get, set] |
The detection object polarity. It should be either LPVBlackOnWhite (the black path on the white background) or LPVWhiteOnBlack (the white path on the black background) | |
int | Straightness [get, set] |
The straightness controls the trend of the path. It's in 0 ~ 100, where 100 means a totally straight line, 0(default) means no punishment for steering. | |
This interface provide functionalities of path detection.
Path detector is designed to locate a single or multiple paths in given image and along the region's direction.
The algorithm searches the input image for the darkest(LPVBlackOnWhite ) or brightest(LPVWhiteOnBlack ) vertical paths. The paths grow towards the minimum/maximum overall energy, they are in most case straight, but steer to get around the obstacles(other foreground objects or noise).
To use this interface, you should create a LPathDetector object.
LPVErrorCode Detect | ( | ILImage * | img, |
ILRotRectRegion * | region, | ||
ILPathResults ** | results | ||
) |
Detect paths using the path detector.
[in] | img | The input image. |
[in] | region | The input region, it should be a rotated rectangle region with its direction well-defined. |
[out] | results | Return the path results. |
error | Return error code if anything is wrong. |