Patent ID: 8885946

Claim:
A computerized method of determining border points for measuring an image of an object, the method being executed by at least one processor of a computing device and comprising: (a) acquiring grayscale values of pixel points in the image being measured by the at least one processor; (b) computing definition values of the pixel points according to the grayscale values by the at least one processor; (c) constructing a line which intersects with the image being measured, and obtaining the definition values of the pixel point values in the lines by the at least one processor; (d) determining a location range of a border point of the image being measured using the definition values of the pixel point values in the line by the at least one processor; (e) determining the border point from the location range by the at least one processor; (f) repeating step (c) to (e) until all border points of the image being measured has been determined by the at least one processor; and (g) fitting a border line of the image being measured using the border points, and outputting the border line by the at least one processor, wherein step (e) comprises: obtaining the grayscale values of the pixel points in the line to form a fourth array by the at least one processor; computing a difference value of every two adjacent values in the fourth array to form a fifth array by the at least one processor; computing a mean difference value of every two adjacent difference values in the fifth array to form a sixth array by the at least one processor; and selecting a mean difference value from the sixth array, which is a maximum value in the location range, and determining that the pixel point corresponding to the selected mean difference value is the border point by the at least one processor.