Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

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

Active Publication Date: 2016-12-28
京北方信息技术股份有限公司
View PDF8 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] The purpose of the present invention is to propose an image compression method based on color classification and clustering to solve the problems of poor compression quality and slow compression speed when compressing a large number of images

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Image Compression Method Based on Color Classification and Clustering
  • Image Compression Method Based on Color Classification and Clustering
  • Image Compression Method Based on Color Classification and Clustering

Examples

Experimental program
Comparison scheme
Effect test

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).

...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses an image compression method based on color classification and clustering. The compression method includes: acquiring an original image and establishing a flag matrix for the original image; performing color classification on the original image; judging the color Whether the number of types of classification is more than the preset number of color types, if so, cluster the excess color types in the color classification; split the pixel data and logo of the original image according to the classification of the color Data; using a lossless compression algorithm to compress the mark data, using a lossy algorithm to compress the pixel data; writing each compressed data into a file according to a preset order to obtain a compressed image. The invention classifies and clusters the color information of the image, combines the lossless compression algorithm and the lossy compression algorithm, and realizes an image compression method with high quality, high speed and high compression ratio.

Description

technical field [0001] The invention relates to the technical field of image compression, in particular to an image compression method based on color classification and clustering. Background technique [0002] Image compression refers to the technique of expressing the original pixel matrix with less bits lossy or lossless, also known as image coding. The reason why image data can be compressed is because there is redundancy in the data. The redundancy of image data is mainly manifested as: spatial redundancy caused by the correlation between adjacent pixels in the image; temporal redundancy caused by the correlation between different frames in the image sequence; correlation caused by different color planes or spectral bands. spectrum redundancy. The purpose of data compression is to reduce the number of bits required to represent data by removing these data redundancies. [0003] The current mainstream image compression methods mainly include the JPEG (Joint Photograph...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): H04N19/136H04N19/146H04N19/186
Inventor 张修宝高昊江
Owner 京北方信息技术股份有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products