Patent ID: 6956587

Claim:
A computerized method for processing an image obtained by scanning, said image being a substantially rectangular shape having four corners and including at least a plurality of pixels, said pixels each having a value representative of an optical characteristic of a scanned object, said method comprising: identifying a plurality of pixels along at least one edge portion of the image as a function of the pixel values, said identifying the pixels along the edge portion of the image including processing the image as a function of pixel values to identify corners of the image, said processing the image to identify corners including: defining a plurality of at least substantially diagonal processing lines relative to the target orientation, each processing line having a first position tangentially aligned to a different corner of the image; repositioning each of the processing lines a predetermined distance towards a center of the target orientation until each of the processing lines intersects one of the pixels having a pixel value substantially different than previously processed pixels; and recording a location of each of the intersected pixels; defining one or more edges of the image from the identified pixels; determining an orientation of the image relative to a target orientation as a function of the defined edges; and adjusting the orientation of the image portion to correspond to the target orientation.