Image Compression Method Based on Color Classification and Clustering
A technology of color classification and image compression, applied in image communication, digital video signal modification, electrical components, etc., can solve problems such as slow compression speed and poor compression quality, achieve high efficiency, high compression ratio, and reduce image information loss Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
no. 1 example
[0062] figure 1 is a flow chart of the method of the first embodiment of the present invention. Such as figure 1 As shown, the image compression method based on color classification and clustering in the embodiment of the present invention includes:
[0063] Step 11. Acquire the original image, and establish a marker matrix for the original image.
[0064] The acquisition of the original image, for a color image, is to acquire the R, G, and B values of each pixel; for a grayscale image, it is to acquire its gray value.
[0065] Step 12: Perform color classification on the original image, and classify pixels with similar colors into one color category.
[0066] Step 13. Determine whether the number of color classifications is more than the preset number of color types. If yes, execute step 14; otherwise, directly execute step 15.
[0067] The number of preset color types is generally set to any integer value from 8 to 10 for color images, and is generally set to 3 or 4 fo...
Embodiment 2
[0076] figure 2 It is a flowchart of a method for compressing a color image according to the second embodiment of the present invention. Such as figure 2 As shown, the method for compressing a color image in this embodiment includes:
[0077] Step 21. Acquire an original image, and establish a marker matrix for the original image.
[0078] The original image is a color image. At this time, the R, G, and B values of each pixel are obtained, and information such as the size and number of color bits of the original image is also obtained.
[0079] The flag matrix has the same size as the pixel matrix of the original image, and the initial value of the flag matrix is set to 0.
[0080] Step 22, performing color classification on the original image, and classifying pixels with similar colors into one color category, the color classification specifically includes the following sub-steps:
[0081] Step 221. Set the first element of the flag matrix to 1, and obtain the pixel...
Embodiment 3
[0145] Correspondingly, this embodiment provides a method to decompress the compressed file generated through Embodiment 2, such as Figure 4 As shown, the color image decompression method described in this embodiment includes:
[0146] Step 31, obtain the compressed image.
[0147] From the compressed image, read in the length, width, number of color bits of the original image, the length of each flag array, the length and data of the compressed flag array zip_flag, the original length of each type of array, the length after transformation, and the length of DWT transformation. Series and low frequency component data of y, u and v.
[0148] Step 32, encoding and decompressing the compressed flag array and image data, including two sub-steps:
[0149] Step 32A, use the compressed flag array zip_flag as input to perform arithmetic coding decompression, and obtain f according to the length of each flag array read 1 , f 2 ... f p-1 (where p is the number of color types).
...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com