Patent ID: 7542608

Claim:
A method for automatically cropping image objects, including: using a processor to perform an object contour detecting step, for detecting the contour of image objects to generate a binary image by using Modified Laplacian Contour Detector; an image dividing step, for dividing the binary image into a background region and a plurality of non-background regions by using Connected Components Algorithm (CCA); and an image merging step, for merging the closer non-background regions from large to small into a plurality of image groups, wherein the object contour detecting step comprises: for every pixel point, subtracting the grayscale value of 8 adjacent pixel points from the grayscale value of the pixel point to obtain the grayscale value differences between the pixel point and the 8 adjacent pixel points; adding up all the grayscale value differences that are positive to obtain the sum of positive differences, and adding up all the grayscale value differences that are negative to obtain the sum of negative differences; and adjusting the grayscale value of the pixel point, such that the sign of the adjusted grayscale value is the same as that of the one having a larger absolute value among the sum of positive differences and the sum of negative differences, and the magnitude of the adjusted grayscale value equals the sum of the absolute values of the sum of positive differences and the sum of negative differences.