Image Orientation Detection Using Foreground Pixel Histograms
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Scanned documents often contain pages that are upside down, which complicates image processing and optical character recognition, as existing methods rely on recognizing individual characters or words and cannot reliably determine the orientation of each page independently.
Innovation Solution
The method generates a histogram of foreground pixel values for lines of text, identifying peaks to determine if a line is inverted by comparing pixel counts in the 'head' and 'leg' portions, allowing for the orientation of pages to be corrected before character recognition.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If orientation determination relies on recognizing individual characters or words, then optical character recognition can be performed, but the orientation determination becomes unreliable and cannot proceed independently before character recognition
Solution Approach 1:
The patent segments the text line into distinct portions (head, body, leg) based on the histogram profile, and analyzes each segment independently. This segmentation allows orientation determination to be performed on structural characteristics without requiring full character or word recognition, resolving the contradiction by making orientation detection reliable and independent of OCR.
2Productivity
If all pages are scanned in a single operation, then scanning efficiency is improved, but pages with different orientations cannot be individually identified and corrected
Solution Approach 1:
The patent applies feedback by using the histogram analysis results of each page to determine its orientation, then using this orientation information to guide subsequent processing of individual pages. This feedback mechanism allows the system to maintain high scanning productivity while ensuring reliable orientation identification and correction for each page.
3Loss of time
If inverted pages are not corrected, then processing time is reduced, but inverted images become difficult to read and interfere with image processing techniques
Solution Approach 1:
The patent performs preliminary orientation determination and correction actions on each page before main processing operations. By identifying inverted pages through histogram analysis and correcting them in advance, the system minimizes subsequent processing time while ensuring all pages are in the correct orientation for reading and further image processing.
Data Source
AI summary
Methods and apparatus for processing one or more images, e.g., images representing pages including text, to detect and in some instances correct the orientation of the page. In some embodiments the methods and apparatus for processing image data comprise generating a histogram of foreground pixel counts corresponding to a current line of text of the image being processed with the foreground pixel counts corresponding to different rows of pixels corresponding to the current line of text and identifying based on statistical analysis of the generated histogram whether the current page of text is oriented in an inverted or non-inverted position. In some embodiments analysis is performed on multiple lines of text with cumulative statistics being used in to determine the orientation of the page. In some embodiments, a page whose orientation is determined to be upside down is re-oriented to be right-side up.


