Dot-Matrix Font Compression via Segmented Huffman Coding
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current lossless dot-matrix font data compression techniques, such as Huffman coding, are inefficient for Asian fonts with a large number of characters due to the large number of image patterns resulting in a voluminous Huffman tree, leading to poor compression results.
Innovation Solution
The method divides each dot-matrix font character into horizontal, vertical, and residual image patterns, applying Huffman coding to each set separately and sorting residual patterns into groups to create multiple Huffman tables, allowing for efficient compression and decompression by combining the coded patterns.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If Huffman coding is applied to each row of dot-matrix characters, then lossless compression is achieved, but the Huffman tree becomes voluminous due to the large number of image patterns, resulting in poor compression efficiency
Solution Approach 1:
The patent segments the dot-matrix character image into multiple components: horizontal line patterns, vertical line patterns, and residual patterns. Each segment is coded separately using Huffman coding, which reduces the number of patterns in each Huffman tree compared to coding all row patterns together, thereby improving compression efficiency while maintaining lossless compression
Solution Approach 2:
The patent extracts and separately codes the horizontal and vertical line patterns from the dot-matrix character image. By taking out these dominant pattern types and coding them separately, the remaining residual patterns become fewer and more compressible, solving the problem of voluminous Huffman trees while ensuring lossless reconstruction
2Reliability
If each Asian character is treated as an image pattern for entropy coding, then compression can be applied, but the large number of characters makes the approach impractical
Solution Approach 1:
Instead of treating each entire character as a single image pattern, the patent segments each character into multiple smaller patterns (horizontal lines, vertical lines, and residuals). This segmentation reduces the complexity per character while allowing entropy coding to be applied effectively to the smaller, more frequent pattern types
3Productivity
If the Huffman tree size is reduced by dividing characters into fewer patterns, then compression efficiency improves, but the ability to represent all character variations may be compromised
Solution Approach 1:
The patent segments characters into three types of patterns (horizontal, vertical, residual) rather than using fewer larger patterns. This segmentation strategy maintains representation accuracy by capturing all character variations through the residual patterns while keeping the Huffman trees for each pattern type manageable in size
Solution Approach 2:
The patent applies different coding strategies to different parts of the character image: horizontal line patterns are extracted and coded separately, vertical line patterns are extracted and coded separately, and residual patterns are coded separately. This local quality approach ensures that each pattern type is represented with appropriate detail while maintaining overall compression efficiency
Data Source
AI summary
A method and system are provided for compressing and/or decompressing a set of dot-matrix font characters. According to a compression method, each dot-matrix font character is divided into a horizontal image including horizontal (stroke) image pattern(s), a vertical image including vertical (stroke) image pattern(s), and a residual image including residual image pattern(s) obtained by removing the horizontal and vertical images from the original character. Then, the Huffman coding is applied to each of a set of the horizontal image patterns, a set of the vertical image patterns, and a set of the residual image patterns, respectively, to produce compressed horizontal codes for the horizontal image patterns in a horizontal Huffman table, compressed vertical codes for the vertical image patterns in a vertical Huffman table, and compressed residual codes for the residual image patterns in a residual Huffman table. The compressed horizontal, vertical, and residual codes are selectively combined into a bit string that represents a compressed form of each character.


