Patent ID: 7519236

Claim:
A method for retrieving an image from an image database, comprising: capturing a first image of a printed photograph against a background using an image input device; determining a boundary of the printed photograph from the background in the first image, using a processor, comprising: capturing a second image of the background without the printed photography using the image input device; determining differences between the first and the second images, the differences defining a region; determining a perimeter of the region; and determining boundary lines from the perimeter, the boundary lines defining the boundary of the printed photograph from the background in the first image, said determining boundary lines comprising: performing Hough Transformation to detect the boundary lines from the perimeter; invalidating a boundary line when the boundary line is too close to a corresponding edge of the first image, the boundary line is substantially parallel to the corresponding edge, and a confidence in the boundary line's subtense is high; and searching for another boundary line to replace the boundary line after said invalidating; cropping the printed photograph from the first image to form a third image of the printed photograph; and matching the third image with a fourth image in the image database.