Patent ID: 8086020

Claim:
A computer-implemented method for analyzing impurities of an object using a computer that is electronically connected to an image measuring machine, the method comprising: (a) obtaining an image of the object by a charge coupled device of the image measuring machine, and selecting a region from the image of the object; (b) pre-treating the region by means of a mean filtering, a median filtering, an edge preserving filtering, and a Gaussian filtering, and calculating a threshold of the region; (c) performing a binary image processing on the region according to the threshold, performing an edge processing to extract and identify points in the region, and deleting the points from an outer layer of the region; (d) setting a starting point in the region and setting search directions to search all boundary points in the region, the search directions comprising a first direction before searching the first boundary point and a second direction after any boundary point has been searched; (e) determining whether a first boundary point has been searched; (f) upon the condition that a first boundary point has been searched, determining a point before the first boundary point as an origin of the region and searching the next boundary points along the search directions; (g) searching all the boundary points in the region by repeating block (f) until the last boundary point has been searched, and determining whether the last boundary point and the first boundary point coincide; (h) forming an impurity by all the boundary points upon the condition that the last boundary point coincides with the first boundary point; (i) seed filling the impurity and calculating an area value of the impurity; (j) comparing the area value with an allowable area value to determine whether the impurity complies with specified impurity specifications; and (k) generating an analysis result according to the comparison results, and storing the analysis result in a storage system of the computer.