Patent ID: 9646224
Date: 2017-05-09
CPC Classifications: G06K,G06T

Claim:
1. An image processing method for used in an automated optical inspection process, including: an inspection area determining step, executed by an image processing device, for determining a rectangular inspection area in an inspected image; a definition threshold determining step, executed by the image processing device, for calculating an image definition threshold according to the gray values of pixels of the plurality of sample images in the inspection area; a product image definition determining step, executed by the image processing device, for calculating a product image definition according to the gray values of pixels of the product image in the inspection area; and a comparison step, executed by the image processing device, for comparing the product image definition with the image definition threshold, wherein when the product image definition is greater than the image definition threshold, a product image selecting step for selecting the current product image as an image to be inspected is executed, and when the product image definition is smaller than the image definition threshold, the product image definition determining step is executed; wherein the definition threshold determining step includes: a sample scanning step, executed by the image processing device, for scanning one and the same inspection sample for multiple times to acquire a plurality of sample images matched with a standard image; and a threshold calculating step, executed by the image processing device, for acquiring the gray values of pixels of the plurality of sample images in the inspection area respectively and calculating the image definition threshold; wherein the threshold calculating step includes: acquiring, by the image processing device, the gray values of pixels of each sample image in the inspection area; calculating, by the image processing device, the absolute value of a difference between the gray values of adjacent pixels of each row of each sample image in the inspection area respectively, selecting the maximum absolute value as a sample image row gray difference, and selecting the maximum sample image row gray difference as the sample definition of the current sample image; and selecting, by the image processing device, the minimum of all sample definitions as the image definition threshold.