摘要 |
PROBLEM TO BE SOLVED: To provide an image processor and an image processing method for determining a further stable and appropriate binarization threshold, and for acquiring appropriate binarized image data. SOLUTION: The image of a work to be measured or inspected is picked up by an image pickup means 11, and binarization processing for separating the work from a background by a processing means 12 based on obtained image data. The "number of small pixels" is calculated based on the distribution status of a density histogram, and the "number of small pixels" is subtracted from the number of pixels in each density value. In a supersaturation state, the number of pixels of the maximum density value is distributed to the other density values of the density histogram. The number of pixels of each density value is successively accumulated from the maximum density value so that the cumulative number of pixel histogram can be prepared. The density value for dividing the cumulative number of pixel histogram is set, and the density value for minimizing the sum of errors by a moment method in each of the divided density regions is determined as a binarization threshold. COPYRIGHT: (C)2007,JPO&INPIT
|