Image boundary detection for a scanned image
First Claim
1. A method for generating a bounding box for a scanned image comprising the following steps:
- (a) detecting a vertical edge of the scanned image, including the following substep;
(a.1) for each scan row, performing the following substeps for a subset of pixels in the scan row;
(a.1.1) detecting when a first pixel in the substep of pixels has a grey value which differs from a grey value of a pixel immediately to the right of the first pixel by at least a first predetermined constant, and(a.1.2) when in substep (a.1.1), the first pixel in the substep of pixels has a grey value which differs from the grey value of the pixel immediately to the right of the first pixel by at least the first predetermined constant, performing the followings substeps;
(a.1.2.1) detecting any edge from a previous row which is continued by the first pixel,(a.1.2.2) storing, for a longest edge in any row continued by the first pixel, a length of the longest edge,(a.1.2.3) storing an indication of a rightmost pixel of any edge continued by the first pixel, and(a.1.2.4) when the length of the longest edge continued by the first pixel exceeds a second predetermined constant, storing an x-coordinate of the rightmost pixel of any edge continued by the first pixel as a current rightmost edge;
(b) detecting a horizontal edge of the scanned image;
(c) using the vertical edge as a rightmost edge of the bounding box; and
,(d) using the horizontal edge as a bottom edge of the bounding box.
3 Assignments
0 Petitions
Accused Products
Abstract
A bounding box is generated for a scanned image. A vertical edge of the scanned image is detected. A horizontal edge of the scanned image is also detected. The vertical edge is used as a rightmost edge of the bounding box. The horizontal edge is used as a bottom edge of the bounding box. The vertical edge is detected by, for each scan row, detecting when a first pixel in a substep of pixels of the scan row has a grey value which differs from a grey value of a pixel immediately to the right of the first pixel by at least a first predetermined constant. When such a first pixel is found, any edge from a previous row which is continued by the first pixel is detected. A longest edge in any row continued by the first pixel a length of the longest edge is stored. Also stored is an indication of a rightmost pixel of any edge continued by the first pixel. When the length of the longest edge continued by the first pixel exceeds a second predetermined constant, an x-coordinate of the rightmost pixel of any edge continued by the first pixel is stored as a current rightmost edge.
-
Citations
27 Claims
-
1. A method for generating a bounding box for a scanned image comprising the following steps:
-
(a) detecting a vertical edge of the scanned image, including the following substep; (a.1) for each scan row, performing the following substeps for a subset of pixels in the scan row; (a.1.1) detecting when a first pixel in the substep of pixels has a grey value which differs from a grey value of a pixel immediately to the right of the first pixel by at least a first predetermined constant, and (a.1.2) when in substep (a.1.1), the first pixel in the substep of pixels has a grey value which differs from the grey value of the pixel immediately to the right of the first pixel by at least the first predetermined constant, performing the followings substeps; (a.1.2.1) detecting any edge from a previous row which is continued by the first pixel, (a.1.2.2) storing, for a longest edge in any row continued by the first pixel, a length of the longest edge, (a.1.2.3) storing an indication of a rightmost pixel of any edge continued by the first pixel, and (a.1.2.4) when the length of the longest edge continued by the first pixel exceeds a second predetermined constant, storing an x-coordinate of the rightmost pixel of any edge continued by the first pixel as a current rightmost edge; (b) detecting a horizontal edge of the scanned image; (c) using the vertical edge as a rightmost edge of the bounding box; and
,(d) using the horizontal edge as a bottom edge of the bounding box. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method for generating a bounding box for a scanned image comprising the following steps:
-
(a) detecting a vertical edge of the scanned image; (b) detecting a horizontal edge of the scanned image, including the following substep; (b.1) for each scan row, performing the following substeps for a horizontal subset of pixels in the scan row; (b.1.1) detecting when a first pixel in the substep of pixels has a grey value which differs from a grey value of a pixel immediately above the first pixel by at least a first predetermined constant, and (b.1.2) when in substep (b.1.1), the first pixel in the substep of pixels has the grey value which differs from the grey value of the pixel immediately above the first pixel by at least the first predetermined constant, performing the followings substeps; (b.1.2.1) detecting a longest horizontal edge which includes the first pixel, and (b.1.2.2) when a total length of the longest horizontal edge exceeds a second predetermined constant, storing a y-coordinate of the first pixel as a current bottom edge; (c) using the vertical edge as a rightmost edge of the bounding box; and
,(d) using the horizontal edge as a bottom edge of the bounding box. - View Dependent Claims (9, 10, 11)
-
-
12. A method for detecting a vertical edge of a scanned image comprising the following step:
(a) for each scan row, performing the following substeps for a subset of pixels in the scan row; (a.1) detecting when a first pixel in the substep of pixels has a grey value which differs from a grey value of a pixel immediately to the right of the first pixel by at least a first predetermined constant, and (a.2) when in substep (a.1), the first pixel in the substep of pixels has a grey value which differs from the grey value of the pixel immediately to the right of the first pixel by at least the first predetermined constant, performing the followings substeps; (a.2.1) detecting any edge from a previous row which is continued by the first pixel, (a.2.2) storing, for a longest edge in any row continued by the first pixel, a length of the longest edge, (a.2.3) storing an indication of a rightmost pixel of any edge continued by the first pixel, and (a.2.4) when the length of the longest edge continued by the first pixel exceeds a second predetermined constant, storing an x-coordinate of the rightmost pixel of any edge continued by the first pixel as a current rightmost edge. - View Dependent Claims (13, 14, 15, 16)
-
17. A method for detecting a horizontal edge of a scanned image comprising the following step:
(a) for each scan row, performing the following substeps for a subset of pixels in the scan row; (a.1) detecting when a first pixel in the substep of pixels has a grey value which differs from a grey value of a pixel immediately above the first pixel by at least a first predetermined constant, and (a.2) when in substep (a.1), the first pixel in the substep of pixels has the grey value which differs from the grey value of the pixel immediately above the first pixel by at least the first predetermined constant, performing the followings substeps; (a.2.1) detecting a longest horizontal edge which includes the first pixel, and (a.2.2) when a total length of the longest horizontal edge exceeds a second predetermined constant, storing a y-coordinate of the first pixel as a current bottom edge. - View Dependent Claims (18, 19, 20)
-
21. A processing system for determining in a matrix array having fixed minimum and maximum x coordinate values and fixed minimum and maximum y coordinate values a minimal rectangular boundary box within which a replica image of an original scanned document is defined, comprising:
-
a processor having; a horizontal edge arrangement for determining a variable right edge x coordinate value for helping to define a bottom right corner of said boundary box; and a vertical edge arrangement for determining a variable bottom edge y coordinate value for further helping to define said bottom right corner of said boundary box, wherein said vertical edge arrangement includes; a portion of a buffer memory for temporarily storing image data indicative of the replica image, said image data being defined by a plurality of gray scale pixel values arranged in rows and columns to facilitate image processing purposes; a pixel processor for determining row by row and pixel by pixel whether the gray scale pixel value of a current pixel in a given row differs from the gray scale value of an adjacent pixel in the same row by at least a predetermined constant vertical value and for determining whether the current pixel in said given row extends a line segment having a given length exceeding another predetermined constant vertical value; and
,a portion of a scratch memory for storing an x coordinate value of the right most pixel in said line segment extended by said current pixel when said line segment has a given length exceeding said another predetermined constant vertical value; wherein said x coordinate value of the right most pixel in said line segment being defined as said variable right edge x coordinate value when the current pixel is the last pixel in said image data. - View Dependent Claims (22, 23)
-
-
24. A method for determining in a matrix array having
fixed minimum and maximum x coordinate values and fixed minimum and maximum y coordinate values a minimal rectangular boundary box within which a replica image of an original scanned document is defined, comprising: -
determining a variable right edge x coordinate value for helping to define a bottom right corner of said boundary box; and determining a variable bottom edge y coordinate value for further helping to define said bottom right corner of said boundary box; wherein said step of determining a variable right edge x coordinate value includes; temporarily storing image data indicative of the replica image, said image data being defined by a plurality of gray scale pixel values arranged in rows and columns to facilitate image processing purposes; determining row by row and pixel by pixel whether the gray scale pixel value of a current pixel in a given row differs from the gray scale value of an adjacent pixel in the same row by at least a predetermined constant value and for determining whether the current pixel in said given row extends a line segment having a given length exceeding another predetermined constant value; and storing an x coordinate value of the right most pixel in said line segment extended by said current pixel when said line segment has a given length exceeding said another predetermined constant; said x coordinate value of the rightmost pixel in said line segment being defined as said variable right edge x coordinate value when the current pixel is the last pixel in said image data. - View Dependent Claims (25)
-
-
26. A method for generating a bounding box for an image comprising the following steps:
-
(a) performing a scan of an original of the image to produce a scanned image; (b) processing the scanned image one row at a time, including the following substeps; (b.1) using limited statistics computed from previous rows to define vertical edges and horizontal edges in the scanned image, and (b.2) performing the following substeps for every scan row processed; (b.2.1) attempting to extend previously identified edge segments, and (b.2.2) keeping track of columns through which vertical edges have passed and rows through which horizontal edges have passed; (c) using a rightmost column through which an edge segment of at least a first minimal length has passed as a vertical edge of the bounding box; and
,(d) using a bottommost row through which an edge segment of at least a second minimal length has passed as a bottom edge of the bounding box; wherein in step (b) edge segments can be continued along 45 degree angles.
-
-
27. A method for generating a bounding box for an image comprising the following steps:
-
(a) performing a scan of an original of the image to produce a scanned image, wherein the scan is an 8-bits per pixel prescan; (b) processing the scanned image one row at a time, including the following substeps; (b.1) using limited statistics computed from previous rows to define vertical edges and horizontal edges in the scanned image, and (b.2) performing the following substeps for every scan row processed;
-(b.2.1) attempting to extend previously identified edge segments, and(b.2.2) keeping track of columns through which vertical edges have passed and rows through which horizontal edges have passed; (c) using a rightmost column through which an edge segment of at least a first minimal length has passed as a vertical edge of the bounding box; and
,(d) using a bottommost row through which an edge segment of at least a second minimal length has passed as a bottom edge of the bounding box.
-
Specification