DensityAverage

average/deviation

int DensityAverage(
        const IMAGE     *image,
        const BYTE      *model,
        double  *average,
        double  *diviation
)

Parameters
*image
Image data structure address
*model
Model data
*average
Average value (measurement result)
*diviation
Deviation value (measurement result)

Return Value
NORMAL(0): Successful completion
ERROR(-1): Unsuccessful completion

Description
Performs the density average/deviation measurement of an arbitrary area with the specified parameters.
For the RGB color images, you need to allocate space for double x 3 and pass them to the addresses specified in average and diviation.
For gray
average[0]
Density average value
diviation[0]
Density deviation value
For RGB color
average[0]
R density average value
average[1]
G density average value
average[2]
B density average value
diviation[0]
R density deviation value
diviation[1]
G density deviation value
diviation[2]
B density deviation value

Notes
For the monochrome images, the measurement values can be obtained by calling this library.
For the color images, the color difference and color deviation can be obtained by calling this library and then passing the measurement result as an argument of "refGetColorDiff RGB color difference retrieval".