EdgePitch
Measures edge pitch
int EdgePitch(
const float *profile,
const int num,
const int type,
const double density,
const int edgeLevelIn,
const int edgeLevelOut,
const int noiseLevel,
const int noiseWidth,
const int maxPosNum,
int *edgeNum,
double *edgePos
)
Parameters
*profile
|
Edge profile data
|
num
|
Number of profile data
|
type
|
Profile type
|
density
|
Edge profile density
|
edgeLevelIn
|
Edge level IN (0 to 100: default is 50)
|
edgeLevelOut
|
Edge level OUT (0 to 100: default is 50)
|
noiseLevel
|
Noise level (0 to D_MAX: default is 0)
|
noiseWidth
|
Noise width (0 to 511: default is 0)
|
maxPosNum
|
Maximum stored number of edge position data
|
*edgeNum
|
Edge pitch (measurement result)
|
*edgePos
|
Edge detection position data (measurement result)
edgePos[N][0] the Nth detection position (IN)
edgePos[N][1] the Nth detection position (OUT)
|
Return Value
NORMAL(0): Successful completion
ERROR(-1): Unsuccessful completion
Description
Performs the edge pitch measurement of a straight line region. Edge pitch is the measurement of the number of edges in a color based on the color specified using a RGB value.
For edgePos, you need to allocate the space for storing the edge position data in advance. You need to specify the number of allocated data in maxPosNum. The library stores data items up to this max number. If you specify 0 in maxPosNum, the library does not store any data.
The edge detection mode is only enabled for the monochrome images.
There are two edge levels, "IN" and "OUT": "IN" indicates the level entering into the target color, and "OUT" indicates the level leaving from the target color.
In a profile, "IN" is displayed as an upward peak, and "OUT" is displayed as an downward peak.
The upper limit of the range (D_MAX) of the noise level is within one of the following ranges depending on the image type.
Color image: 0 to 442
Monochrome image: 0 to 255
Notes