摘要 |
PROBLEM TO BE SOLVED: To automatically prepare a mask image capable of reliably masking a border line of a light-and-shade pattern, and to appropriately detect coating defect. SOLUTION: The concentration at predetermined points of the coating image which is illuminated and photographed by using the light-and-shade pattern is measured (S200), and the predetermined points are classified into white and black groups by using the average value (S202 and S204). The predetermined points arranged in the longitudinal or transverse direction are classified in groups in a range of a predetermined concentration by comparing the concentration with respect to one of the white and black groups for each column and each row (S206). The point number in grouping is divided by the minimum point number constituting the group for each column and each row to make the basic number of division, and the division pattern for dividing the coating image is selected with the minimum basic number of division for column and row as each number of division (S208 and S210). The center of gravity is calculated for each divided image to extract the intermediate concentration (S214-S218), which is defined as the mask image of the border of the light-and- shade pattern. |