Flattening and rectifying a curved image
First Claim
1. A method performed by a processor for flattening an image comprising:
- receiving, at the processor, an image comprising an object having a non-linear side;
identifying a plurality of corners of the object, the plurality of corners defining a region of the image to be flattened;
defining a gradient between corresponding pairs of each of the plurality of corners;
define a score for pixels between based on the gradient;
using the scores to identify an edge between each of the plurality of corners, one edge approximating the non-linear side;
responsive to identifying the edge between each of the plurality of corners, establishing dimensions of a flat representation;
mapping each pixel in the region of the image to a pixel in the flat representation; and
filling each pixel in the flat representation with the color of the corresponding pixel in the region of the image; and
outputting the image to a display.
1 Assignment
0 Petitions
Accused Products
Abstract
Representative embodiments disclose mechanisms to flatten an image comprising at least one curved or bent edge. An image is received from a capture device and a UI is presented that allows a user to define a general vicinity of an item in the image to be flattened. The system analyzes pixels in the general vicinity to identify the highest probability of a corner in each general vicinity. The gradient of pixels between the corners is calculated and pixels scores are calculated based on the gradient. The pixels with the lowest scores between each corner are used as an edge. Smoothing is applied to each edge. Dimensions of the flat representation are calculated and the system maps pixels bounded by the edges and corners to pixels in the flat representation and copies the mapped pixels to the flat representation.
-
Citations
18 Claims
-
1. A method performed by a processor for flattening an image comprising:
-
receiving, at the processor, an image comprising an object having a non-linear side; identifying a plurality of corners of the object, the plurality of corners defining a region of the image to be flattened; defining a gradient between corresponding pairs of each of the plurality of corners; define a score for pixels between based on the gradient; using the scores to identify an edge between each of the plurality of corners, one edge approximating the non-linear side; responsive to identifying the edge between each of the plurality of corners, establishing dimensions of a flat representation; mapping each pixel in the region of the image to a pixel in the flat representation; and filling each pixel in the flat representation with the color of the corresponding pixel in the region of the image; and outputting the image to a display. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A system for flattening an image comprising:
a processor and executable instructions accessible on a computer-storage medium that, when executed, cause the processor to perform operations comprising; receive an image comprising an object having a non-linear side; identify a plurality of corners of the object, the plurality of corners defining a region of the image to be flattened; define a gradient between corresponding pairs of each of the plurality of corners; define a score for pixels based on the gradient; use the scores to identify an edge between corresponding pairs of each of the plurality of corners, one edge approximating the non-linear side; establish the dimensions of a flat representation; map each pixel in the region of the image to a pixel in the flat representation; and fill each pixel in the flat representation with the color of the corresponding pixel in the region of the image. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
16. A computer storage medium comprising executable instructions that, when executed by a processor of a machine, cause the machine to perform operations comprising:
-
receive an image captured by a capture device, the image comprising an object having a non-linear side; identify a plurality of corners of the object, the plurality of corners defining a region of the image to be flattened; calculate a gradient value for pixels between each of the plurality of corners; assign a score to each of the pixels based on the gradient value; use the score to identify an edge between each of the plurality of corners, one edge approximating the non-linear side; establish dimensions of a flat representation; map each pixel in the region of the image to a pixel in the flat representation; and fill each pixel in the flat representation with the color of the corresponding pixel in the region of the image. - View Dependent Claims (17, 18)
-
Specification