| CPC G06T 3/608 (2013.01) [G06T 7/13 (2017.01); G06T 7/70 (2017.01); G06V 10/761 (2022.01); G06V 2201/07 (2022.01)] | 8 Claims |

|
1. An image correction method, which is applicable to an image to be corrected, comprising:
generating, by a processor, a first extrapolation line segment and a second extrapolation line segment correspondingly based on a first straight line segment and a second straight line segment in the image to be corrected;
determining, by the processor, whether a slope value of the first extrapolation line segment and a slope value of the second extrapolation line segment are the same;
when determining the slope value of the first extrapolation line segment and the slope value of the second extrapolation line segment are different, rotating, by the processor, the image to be corrected by a rotation angle to obtain a preliminary corrected image, wherein the first extrapolation line segment and the second extrapolation line segment of the preliminary corrected image have the same slope value; and
when determining the first extrapolation line segment and the second extrapolation line segment have the same slope value or obtaining the preliminary corrected image, performing, by the processor, a keystone correction process to generate a corrected image;
wherein the image to be corrected has a first boundary and a second boundary that are opposite of and parallel with each other, and generating, by the processor, the first extrapolation line segment and the second extrapolation line segment comprises:
extending the first straight line segment and the second straight line segment to generate a first extending straight line segment and a second extending straight line segment, wherein both the first extending straight line segment and the second extending straight line intersect the first boundary and the second boundary; and
performing an extrapolation process to obtain the first extrapolation line segment and the second extrapolation line segment according to a plurality of intersection points of both the first extending straight line segment and the second extending straight line segment intersecting the first boundary and the second boundary, a first center point of the first boundary, a second center point of the second boundary and a half side length of the first boundary, wherein the half side length is a length between the first center point and an end of the first boundary, and the first extrapolation line segment and the second extrapolation line segment passes the end and another end of the first boundary, respectively.
|