Histogram-Based Initial Color Table Generation for Screen Content
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for generating initial color tables in screen content coding, such as K-means clustering, can result in average color drift and incorrect representation of sub-groups, leading to inefficiencies in color compression and transmission.
Innovation Solution
An initial color table generation method that involves generating a histogram for a coding unit, seeking color values based on pixel counts, and adjusting thresholds to determine which colors are included in the initial color table, thereby stabilizing the color representation and improving compression efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If K-means clustering is used to generate the initial color table, then the color groups are formed based on iterative optimization, but the average color drifts away from the initial color and sub-groups cannot be correctly represented
Solution Approach 1:
The patent applies preliminary action by pre-defining the initial color table using a histogram-based method before applying K-means clustering. The initial color table is constructed by identifying peak frequencies in the color histogram and selecting corresponding color values, which provides a stable foundation that prevents drift during subsequent clustering iterations.
Solution Approach 2:
The patent introduces an intermediary mechanism by using the histogram-based initial color table as a mediator between the raw pixel data and the K-means clustering process. This intermediary structure ensures that the clustering algorithm starts with meaningful color representatives that accurately reflect the actual color distribution in the image, thereby preventing average color drift and maintaining proper sub-group representation.
2Reliability
If the initial color table is generated without proper threshold adjustment, then the color groups may be incorrectly formed, but adjusting thresholds increases computational complexity
Solution Approach 1:
The patent applies self-service by enabling the histogram-based method to automatically determine optimal thresholds through the natural peak detection process. The algorithm identifies significant color groups by detecting peaks in the histogram and automatically selecting thresholds that separate meaningful color clusters, eliminating the need for manual or complex adaptive threshold adjustment while ensuring reliable color group formation.
3Loss of substance
If more colors are included in the initial color table, then the compression ratio improves, but the encoding time increases
Solution Approach 1:
The patent applies parameter changes by dynamically adjusting the number of colors in the initial color table based on the specific characteristics of each image. The histogram-based method analyzes the color distribution and automatically determines the optimal number of significant color groups, allowing the system to include only the necessary number of colors that actually appear in the image, thereby avoiding unnecessary encoding overhead while maintaining compression efficiency.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
In an embodiment, an encoding method includes generating a histogram corresponding to all pixels in a coding unit. The encoding method further includes seeking a first color value according to the histogram, wherein a first number of pixels of the first color value in the histogram is greater than or equals to a first threshold. The encoding method further includes seeking a second color value in a first range of the first color value according to the histogram. The encoding method further includes removing one or more pixels of the first color value from the histogram when a second number of pixels of the second color value is greater than or equals to a second threshold. The encoding method further includes adding the first color value into an initial color table when the second number of pixels is less than the second threshold. An encoder is also provided in the disclosure.