摘要 |
Apparatus and methods useful to automate the task of locating a photograph or other image that is embedded within a larger image. An edge curve is found that approximates the perimeter of the embedded image and from the edge curve the rectangle of the embedded image, or a rectangle covering the embedded image. is calculated by processing density profiles of the edge curve taken along two axes. Both location and orientation of an embedded image can be calculated. The location of the four comers of a rectangular embedded image can be calculated, which enables automatic cropping and rotation of the embedded image, even if fewer than all four comers are visible. A rectangle covering the image can be calculated, including a rectangle aligned with the axes of a larger embedding image such as is created when scanning a small photograph on a flatbed scanner. The invention operates well on rectangular images, as well as on images having polygonal and other border shapes, such as circles and ellipses, including images with irregular shapes. <IMAGE> |