Method and system for detecting and correcting orientation of document images
Abstract
This disclosure relates to method and system for detecting orientation. The method includes detecting a plurality of regions in a document image, each region including text data, and determining positional information of each of the regions; for each of the plurality of regions, determining a region orientation to be one of first orientation or second orientation based on height and width of the region; determining a ratio of number of regions having first orientation and number of regions having second orientation; determining page orientation of the image as third orientation or second orientation, or rotating the image by 90 ° in counter-clockwise direction based on the ratio; determining first optical character recognition (OCR) data and second OCR data corresponding to the image and the image rotated by 180 ° , respectively; and determining number of correct words in first OCR data and second OCR data based on comparison with dictionary data.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 10 · Forward citations: 0.
Claims (8 — 2 Independent, 6 Dependent)
- Claim 1Independent Claim
A method of detecting orientation of a document image, comprising: detecting, by a computing device, a plurality of regions in the document image, each region comprising text data; determining, by the computing device, positional information of each of the regions, wherein the positional information comprises x and y coordinates of a top left corner and width and height of each of the plurality of regions; for each of the plurality of regions: determining, by the computing device, a region orientation to be one of: a first orientation if height of a region is greater than three times width of the region, wherein the first orientation is equal to 90 degrees, or a second orientation if the width of the region is greater than three times the height of the region, wherein the second orientation is equal to 180 degrees; determining, by the computing device, a ratio of a number of regions determined as having the second orientation to a number of regions determined as having the first orient
- Claim 2Depends on #1
The method of claim 1, wherein the region orientation is determined based on contour detection.
- Claim 3Depends on #1
The method of claim 1, wherein the dictionary data comprises data of one or more languages.
- Claim 4Depends on #1
The method of claim 1, wherein the pre-determined threshold is determined based on an AI-based contour detection model trained based on training data with respect to the first orientation, the second orientation and the third orientation.
- Claim 5Independent Claim
A system to detect and correct orientation of a document image, comprising: one or more processors; a memory communicatively coupled to the processors, wherein the memory stores a plurality of processor-executable instructions, which, upon execution, cause the processors to: detect a plurality of regions in the document image, each region comprising text data; determine positional information of each of the regions, wherein the positional information comprises x and y coordinates of a top left corner and width and height of each of the plurality of regions; for each of the plurality of regions: determine a region orientation to be one of: a first orientation if height of a region is greater than three times width of the region, wherein the first orientation is equal to 90 degrees, or a second orientation if the width of the region is greater than three times the height of the region, wherein the second orientation is equal to 180 degrees; determine a ratio of a number of regions determ
- Claim 6Depends on #5
The system of claim 5, wherein the region orientation is determined based on contour detection.
- Claim 7Depends on #5
The system of claim 5, wherein the dictionary data comprises data of one or more languages.
- Claim 8Depends on #5
The system of claim 5, wherein the pre-determined threshold is determined based on an AI-based contour detection model trained based on training data with respect to the first orientation, the second orientation and the third orientation.
Technical Overview & Description
TECHNICAL FIELD This disclosure relates generally to image processing, and more particularly to a system and a method for detecting orientation of a document image. BACKGROUND Documents may be scanned in any orientation and may comprise of text in various formats such as in tables, free text, drawings/figures, maps, logos, signatures, etc. In order to make the scanned documents searchable and editable, text is required to be recognized. Several Optical Character Recognition (OCR) algorithms are generally available to extract the text in a document and make the document image text recognizable and editable. However, the accuracy of the text extracted from the scanned documents or any documents depends greatly on the orientation of the text in the document. If the document image is provided in a rotated orientation (for example, one of 90 ° , 180 ° , or 270 ° degree orientations), the text in the image also appears in a rotated orientation and therefore, accuracy in OCR prediction of the document image is less in comparison to that of a document image with correct text orientation (i.e., 0 ° orientation). The conventional methods lack a mechanism to identify an orientation of text in a document image and to rectify the orientation of document image when it is incorrect. There is, therefore, a need in present state of art for techniques to identify and rectify the orientation of a page to allow accurate text data extraction from an input image. SUMMARY OF THE INVENTION In one embodiment, a method of detecting orientation of a document image using a computing device is provided. The method may include detection of a plurality of regions in the document image. In an embodiment, the plurality of regions may include text data. In an embodiment, positional information of each of the regions may be determined. In an embodiment, the positional information may comprise of x and y coordinates of a top left corner and width and height information of each of the plurality of regi
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (10)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 8,175,388 B1 | Recognizing text at multiple orientations | 2012 | 1 |
Non-Patent Literature (5)
- Wang, Yuxin, et al.
- “
- Contournet: Taking a further step toward accurate arbitrary-shaped scene text detection.
- ”
- IEEE, published 2020 (Year: 2020).