Patent ID: 8290302

Claim:
In a computer system, a method for detecting skew of an image using connected components analysis performed by at least one processor, the method comprising: identifying groups of pixels in said image as blobs based on pixel connectivity; determining boundary points of said blobs; sorting said blobs based on their location on said image; grouping said blobs into data lines having at least two blobs in each data line; and using said boundary points of said blobs, determining a skew angle of said image in at least one data line, comprising: identifying coordinates of said boundary points for a first blob in said at least one data line; identifying coordinates of said boundary points for a second blob in said at least one data line; determining a line formed by said boundary points for said first blob and said boundary points for said second blob using said coordinates; and calculating an angle between said line formed by said boundary points and a line perpendicular to said image.