Spatial String Alignment for Consistent OCR Layout Comparison
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing optical character recognition (OCR) techniques struggle with inconsistent layout alignment of output strings across different OCR tools or versions, leading to difficulties in comparing and evaluating their performance accurately.
Innovation Solution
A spatial alignment system that uses a weighted Euclidean distance calculation to align output strings from different OCR tools based on a reference point, ensuring consistent alignment and representation of the original document layout, regardless of the OCR tool or version used.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If different OCR tools or versions are used for text recognition, then text extraction capability is improved, but layout alignment consistency deteriorates
Solution Approach 1:
The patent introduces an intermediary alignment system that receives output from multiple OCR tools and re-aligns their results to a common reference layout. This mediator layer decouples the variability of different OCR tools from the final output consistency, allowing each tool to maintain its text extraction strengths while the alignment system ensures uniform positioning and formatting across all tools' outputs.
Solution Approach 2:
The system changes the parameters of output string presentation by adjusting positioning coordinates, bounding box dimensions, and spatial relationships to match a reference document layout. By transforming these geometric parameters, the system maintains consistency in layout alignment while preserving the text recognition capabilities of different OCR tools.
2Measurement precision
If Levenshtein distance algorithm is used for post-processing optimization, then text accuracy is improved, but processing time increases
Solution Approach 1:
The system performs preliminary alignment of output strings to the reference document layout before applying the Levenshtein distance algorithm. By pre-organizing the text elements in their correct spatial positions and associations, the subsequent accuracy optimization requires fewer computational iterations and operates more efficiently on already-structured data rather than unaligned raw output.
Solution Approach 2:
The patent segments the processing into distinct phases: first aligning individual text elements to their reference positions, then applying Levenshtein distance optimization within each segmented region. This division reduces the overall computational complexity compared to applying the algorithm to the entire document at once, thereby reducing processing time while maintaining accuracy.
3Adaptability or versatility
If bounding box configurations vary between OCR tools, then tool adaptability is improved, but output string alignment deteriorates
Solution Approach 1:
The alignment system serves as a universal interface that accepts output from multiple different OCR tools with varying bounding box configurations. It normalizes these diverse inputs by mapping them to a standardized reference layout, enabling the system to handle multiple tool types while producing consistent, aligned output regardless of the source tool's specific configuration.
Solution Approach 2:
The system employs asymmetric transformation where each OCR tool's output is individually adjusted according to its specific bounding box characteristics, but all are transformed to match the same reference layout. This asymmetric approach allows customization for each tool's unique output format while achieving symmetric consistency in the final aligned result.
Data Source
AI summary
A spatial alignment computer system for string alignment within a document processed using an optical character recognition (OCR) tool is provided. The computer system includes a processor in communication with a memory, wherein the processor is programmed to receive a plurality of bounding boxes of a document scanned using an OCR tool, identify a centroid of each bounding box of the plurality of bounding boxes, calculate coordinates for each centroid of each bounding box of the plurality of bounding boxes using a weighted Euclidean distance approach, sort the weighted Euclidean distance of the centroid of each bounding box in ascending order to obtain a sorting index, and based upon the sorting index, align one or more output strings associated with each bounding box of the plurality of bounding boxes.


