Text image correction method and apparatus
AssigneeCienet Technologies (Beijing) Co., Ltd.
InventorYuance Deng
Life of this patent
Estimating the term…
Abstract
A text image correction method and a corresponding text image correction apparatus. Frequency information of a row-direction cumulative curve used by the method is sensitive to an error between a compensation angle for a tilt angle and a real tilt angle, and the method thus has good robustness. The method can accurately estimate the compensation angle for a tilt angle and correct a tilted text image. The method and apparatus can be applied to scenarios such as image pre-processing, automatic compensation for angles of scanned text images, automatic compensation for tilt angles of mobile phone photos.
Claims10
A text image correction method, comprising the following steps:
- preprocessing to-be-corrected images into binary images;
- sequentially rotating the binary images in the same direction with a predetermined step size, recording a cumulative rotation angle upon each rotation and calculating a row cumulant of a current binary image until the current binary image is rotated to a threshold angle;
- extracting a frequency satisfying preset conditions for the row cumulant of each binary image;
- and
- correcting the to-be-corrected images by using the cumulative rotation angle corresponding to the maximum frequency among the frequencies of the binary images satisfying the preset conditions as a compensation angle.
A text image correction apparatus, comprising:
- a processor and a memory, wherein the processor reads a computer program in the memory to perform the following operations:
- preprocessing to-be-corrected images into binary images;
- sequentially rotating the binary images in the same direction with a predetermined step size, recording a cumulative rotation angle upon each rotation, and calculating a row cumulant of a current binary image until the current binary image is rotated to a threshold angle;
- extracting a frequency satisfying preset conditions for the row cumulant of each binary image;
- and
- correcting the to-be-corrected images by using the cumulative rotation angle corresponding to the maximum frequency among the frequencies of the binary images satisfying the preset conditions as a compensation angle.
Dependencies are inferred from the claim text.