Patent Document ID: 7643668
Application ID: 11299847
Patent Status: 1

Claim One:
1. A workpiece inspection apparatus, comprising: a search unit configured to input a reference image and to search the input reference image for a first group of pixels containing therein a first pixel and a second group of pixels having grayscale values within a predetermined threshold; a memory that stores the reference image; a probability acquisition unit configured to receive an optical image of a workpiece being tested and said reference image, to calculate a sample value h of a chi-square distribution by using a grayscale value of said first pixel in said reference image and a grayscale value of a second pixel corresponding to said first pixel in the second pixel group searched, a grayscale value of a third pixel of said optical image corresponding to said first pixel in said reference image, and a grayscale value of a fourth pixel of said optical image corresponding to said second pixel in said second pixel group corresponding to said first pixel, and to acquire a probability value by using said sample value h of said chi-square distribution; and a determination unit configured to use said probability value to determine whether a defect is present at the third pixel of said optical image corresponding to said first pixel, wherein said sample value h of said chi-square distribution is calculated by solving a following equation using the grayscale value f(P s , P y ) of said first pixel, a grayscale value g(x, y) of said optical image at coordinates (x, y), a grayscale value f(x, y) of said reference image at coordinates (x, y), a string of dots {Ai}of coordinates of said first pixel and said second pixel in the second pixel group searched, and parameters a and b, h = ∑ ( x , y ) ⁢ ε ⁢ { A ⁢ ⁢ i } ⁢ { g ⁡ ( x , y ) - f ⁡ ( x , y ) } 2 { a · f ⁡ ( p x , p y ) + b } 2 .