Leaper Vision Toolkit
中文 / English 2.x
Public Member Functions | Properties
ILCircleDetector Interface Reference

This interface provide functionalities of circle detection. More...

Inheritance diagram for ILCircleDetector:
ILObject LCircleDetector

Public Member Functions

LPVErrorCode Detect (ILImage *img, ILAnnulusRegion *region, ILCircleResults **results)
 
- Public Member Functions inherited from ILObject
ILObjectCopy ()
 
LPVErrorCode Load (LString filename)
 
void Reset ()
 
LPVErrorCode Save (LString filename)
 
BOOL Valid ()
 

Properties

int AcceptScore [get, set]
 The accept score used in detection. It defines the minimum score for identifying the edge as a good circle. You may pick a proper score with help of circle score chart. More...
 
int EdgeWidth [get, set]
 The edge width of the circle used in detection, in 1 ~ 10. Edge width defines the count of pixels along the whole edge transition. Blurred edge indicates larger edge width value to find a stable result. Usually, it's fine to just use default setting (3).
 
LPVFindBy FindBy [get, set]
 The detection searching strategy. It defines how to select the result circles if there's more than expected circle candidates.
 
int MaxCount [get, set]
 The maximum of circles to find.
 
BOOL NormScore [get, set]
 Whether we should normalize the score based on maximum gradient in region.
 
LPVPolarity Polarity [get, set]
 The detection edge polarity.
Polarity defines the edge transition according to region's direction, black pixels are dark, white pixels are light. More...
 

Detailed Description

This interface provide functionalities of circle detection.

Circle detector is designed to locate a single or multiple circle edges in given image and inside the annulus region.
The algorithm is real-time and of sub-pixel accuracy, while the limitation is it could only detect concentric circles whose center is near the center of the annulus region. So, to use this detector, you should have a basic idea of the target circles' center and size.

To use this interface, you should create a LCircleDetector object.

Example Code

Member Function Documentation

◆ Detect()

LPVErrorCode Detect ( ILImage img,
ILAnnulusRegion region,
ILCircleResults **  results 
)

Detect circles using the circle detector.

Parameters
[in]img The input image.
[in]regionInput region, it should be a annulus region placed near the estimated circle center.
Pass in null to use the center of the image as the estimated circle center.
[out]resultsReturn the circle results.
Return values
errorReturn error code if anything is wrong.

Property Documentation

◆ AcceptScore

int AcceptScore
getset

The accept score used in detection. It defines the minimum score for identifying the edge as a good circle. You may pick a proper score with help of circle score chart.

See also
ILCircleResults::DrawScoreChart().

◆ Polarity

LPVPolarity Polarity
getset

The detection edge polarity.
Polarity defines the edge transition according to region's direction, black pixels are dark, white pixels are light.

See also
FindBy, EdgeWidth