Image Text Color Extraction for Seamless Translation Overlay
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current character recognition technologies struggle to effectively translate and overlay text from images in languages unknown to the user, leading to a disjointed translation result that does not match the original image's color and style, causing a sense of disparity.
Innovation Solution
An electronic device and method that detect text in images using OCR, extract representative text and background colors through histogram analysis and the K-mean algorithm, and apply these colors to a translation result area to minimize visual disparity by matching the color and style of the original image.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If general character recognition technology is used to translate text in images, then text detection and translation functionality is provided, but the translation result area does not match the original image's color and style, causing visual disparity
Solution Approach 1:
The patent extracts representative text color and background color from the original image before generating the translation result. By pre-extracting these color parameters using histogram analysis and K-mean clustering, the system ensures that the translation result area will match the original image's color scheme, eliminating visual disparity before the translation is even displayed.
Solution Approach 2:
The patent changes the color parameters of the translation result area to match the original image by applying the extracted representative text color and background color. This parameter transformation ensures that the translated text and its background adapt to the original image's color characteristics, resolving the visual mismatch issue.
2Loss of information
If color extraction is performed on the entire image, then comprehensive color information is obtained, but the processing time and computational complexity increase
Solution Approach 1:
The patent segments the image processing task by first detecting a text area using OCR, then extracting colors only from within that specific text region rather than the entire image. This segmentation approach maintains color information completeness for the relevant text while significantly reducing processing time and computational complexity by limiting the analysis scope.
Solution Approach 2:
The patent extracts only the necessary color information from the text area by identifying and removing irrelevant regions. By using OCR to locate text boundaries and then extracting colors only from within those boundaries, the system obtains complete color information for the text while discarding unnecessary processing of the rest of the image.
3Measurement precision
If K-mean algorithm is used for color clustering, then accurate representative colors are extracted, but the computational complexity increases
Solution Approach 1:
The patent applies the K-mean algorithm with a limited number of clusters (typically 2-3 colors) rather than exhaustive clustering. By using partial action with a small, predefined number of clusters focused only on the text area, the system achieves sufficient color representation accuracy while keeping computational complexity manageable and avoiding excessive processing.
Data Source
AI summary
A method for extracting and providing a text color and background color in an image, includes detecting a first area that includes a text in a given image; extracting, from the first area, a representative text color that represents the text and a representative background color that represents a background of the first area; and overlaying a second area that includes a translation result of the text on the given image and applying the representative text color and the representative background color to a text color and a background color of the second area.


