CN101068352A - Network image compressing method and system - Google Patents

Network image compressing method and system Download PDF

Info

Publication number
CN101068352A
CN101068352A CNA2007101061712A CN200710106171A CN101068352A CN 101068352 A CN101068352 A CN 101068352A CN A2007101061712 A CNA2007101061712 A CN A2007101061712A CN 200710106171 A CN200710106171 A CN 200710106171A CN 101068352 A CN101068352 A CN 101068352A
Authority
CN
China
Prior art keywords
data
compression
filtering rule
carry
diminishes
Prior art date
Application number
CNA2007101061712A
Other languages
Chinese (zh)
Inventor
姜磊
郑平
魏国强
邓朝明
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to CNA2007101061712A priority Critical patent/CN101068352A/en
Publication of CN101068352A publication Critical patent/CN101068352A/en

Links

Abstract

A method for compressing network image includes preparing lossy filtering rule first and then carrying out filter on image data and compression of databank compression library/travel code according to prepared lossy filtering rule.

Description

A kind of compression method of network image and system

Technical field

The present invention relates to method for compressing image, relate in particular to a kind of method for compressing image and system of communication network.

Background technology

In telecommunicatioin network management, client is wanted the drawing image figure, the color model of the image of webmaster is the RGB pattern, be not YUV (YCrCb) model, RGB is exactly the RGB model, and YUV is exactly the YC model, Y represents to measure, U and V represent aberration, and promptly two chrominance components generally are blue red relative values.

Sometimes need the image of figure is sent to far-end by network, need compress the original graph image, consider and well to consider the compression ratio of image under the network low bandwidth situation, consider the machine performance problem, need again image is carried out compression and decompression fast.

In traditional compression method, selectable generally is PNG (portable network graphic) compression, JPEG (Joint Photographic Experts Group) compression and ZRLE (Zlib Run-length Encoding) compression, these three kinds of compress techniques all have advantage separately, but weak point is also arranged.

The PNG compression, the PNG coding of accepted standard, weak point is that the compression ratio of complicated image is not enough.

The JPEG compression, what adopt is the JPEG coding of standard, the JPEG coding of standard is divided into two kinds of basic compression coding technologies, promptly based on the lossy compression method coding of DCT (discrete surplus revolve conversion) with based on the lossless compression-encoding of DPCM (differential pulse coding modulation), latter's encoding compression is not considered than not enough.The characteristics of lossy coding are the compression ratio height, weak point has 2 points, the one, diminish, JPEG thinks that people's naked eyes are responsive to measuring to colourity, therefore can carry out lossy compression method to colourity, but, then be unknowable diminishing for our network management diagram picture, do not know that promptly the place that diminishes is our acceptable place, as webmaster icon etc.; The another one shortcoming is that JPEG compression meeting becomes the YUV model to the RGB model conversion earlier, and is therefore compressed and decompressed slower.

ZRLE (data compression library-run-length encoding) compression, use RLE (run-length encoding) and ZLIB (data compression library exactly, data compression library) compression combination, the RLE of elder generation compression, again the result is carried out the ZLIB compression, this mode compression ratio is pretty good, but not as JPEG, but compression efficiency and decompression speed are faster than JPEG, and are lossless compress.

In sum, current needs are a kind of can to carry out optimal compression to the figure of the client of webmaster, realizes that compression ratio is suitable relatively, again can Fast Compression and the method for decompression.

Summary of the invention

Technical problem to be solved by this invention provides a kind of compression method and system of network image, solved the problem of compression speed and compression ratio coexistence, can either carry out optimal compression to the figure of the client of webmaster, realize that compression ratio is suitable relatively, again can Fast Compression and decompression.

In order to address the above problem, the invention provides a kind of compression method of network image, may further comprise the steps,

A, formulation diminish filtering rule;

B, view data is filtered, carry out data compression library-run-length encoding compression according to the described filtering rule that diminishes.

Further, said method also can have following characteristics, comprise among the described step a,

O1, read palette data or the sampling file data, obtain the RGB sampled data;

O2, described RGB sampled data is carried out Fourier transform, obtain data profile;

O3, distribute, export the described filtering rule that diminishes according to described data.

Further, said method also can have following characteristics, and Fourier transform described in the described step o2 is the one-dimensional discrete Fourier transform.

Further, said method also can have following characteristics, comprise among the described step b,

S1, the RGB color separated of described RGB sampled data is become R, G, three arrays of B;

S2, described R, G, three arrays of B are filtered, carry out the run-length encoding compression according to the described filtering rule that diminishes;

S3, carry out data compression library compression.

Further, said method also can have following characteristics, and the described filtering rule that diminishes comprises that colourity is filtered into numerical value 0, colourity three arrays of described R, G, B between 240-255 in described R, G between the 0-5, three arrays of B and is filtered into numerical value 250.

Further, said method also can have following characteristics, and described step s2 comprises,

Judge whether numerical value is greater than 240 or less than 5 in described R, G, three arrays of B, if, described numerical value greater than 240 count 250, described numerical value less than 5 count 0, carry out run-length encoding compression; If not, carry out the run-length encoding compression.

Further, said method also can have following characteristics, also comprises the decompression mode, may further comprise the steps,

The data of t1, the described compressed images of input;

T2, carry out data compression library and decompress;

T3, carry out run-length encoding and decompress;

T4, R, G, three arrays of B are carried out assembly coding, form the view data of RGB.

The present invention also provides a kind of compressibility of network image, comprises filtering rule storehouse, sampler, filter, compressor reducer, wherein,

Described filtering rule storehouse is used to deposit and diminishes filtering rule;

Described sampler is used for according to sampling file data or palette data computed image sample;

Described filter is used for according to described image pattern, calculates the described filtering rule that diminishes by fourier transform, is input in the described filtering rule storehouse;

Described compressor reducer is used for diminishing the run-length encoding compression that filtering rule diminishes image earlier according to described, and then carries out the data compression library compression.

Further, above-mentioned compressibility also can have following characteristics, also comprises decompressor, is used for the view data after the described compressor compresses is decompressed by data compression library earlier, carries out run-length encoding again and decompresses, and goes back original digital image data.

Compared with prior art, because the present invention has adopted with diminishing the problem that the ZRLE compression solves compression speed and compression ratio coexistence, diminishing herein is incomplete identical with diminishing of JPEG, diminishing of JPEG is uncontrollable, and diminishing herein at telecommunicatioin network management, can filter according to the rule that diminishes that the user formulates, not influence visual effect, also not influence operation simultaneously.Use the present invention, JPEG higher relatively and that diminish is similar for compression ratio; Compression and decompression efficient is very high, than JPEG height; Do not influence the visual effect and the operating effect of webmaster; This method implements easily, and cost is low.

Description of drawings

Fig. 1 is the structure chart of compressibility of the network image of the specific embodiment of the invention;

Fig. 2 is the flow chart of compression method of a kind of network image of the specific embodiment of the invention;

Fig. 3 is the flow chart that the formulation of the specific embodiment of the invention diminishes the filtering rule process;

Fig. 4 be the specific embodiment of the invention image is carried out the flow chart of compression process;

Fig. 5 is the flow chart of the decompression process of the specific embodiment of the invention.

Embodiment

Below in conjunction with the drawings and specific embodiments the present invention is elaborated.

Basic design philosophy of the present invention is carried out the RLE compression earlier to the network management diagram picture exactly, between compression period insensitive data is diminished filtration, carries out the ZLIB compression then, can access higher compression ratio and compression speed like this.

As shown in Figure 1, the compressibility of the network image of the specific embodiment of the invention comprises: filtering rule storehouse, sampler, filter, compressor reducer, decompressor, wherein,

The filtering rule storehouse is used to deposit and diminishes filtering rule;

Sampler is used for according to sampling file data or palette data computed image sample;

Filter is used for according to image pattern, calculates by fourier transform and diminishes filtering rule, is input in the filtering rule storehouse;

Compressor reducer is used for according to diminishing filtering rule the RLE that image diminishes earlier being compressed, and then carries out the ZLIB compression;

Decompressor is used for the view data of compression is decompressed by ZLIB earlier, carries out RLE again and decompresses, and goes back original digital image data.

As shown in Figure 2, the compression method of the network image of the specific embodiment of the invention, specific as follows,

Step 110, formulation diminish filtering rule;

Calculate RGB sample information information according to palette or image sampling file, carry out the calculated data distributed intelligence then and draw and diminish filtering rule.

Step 120, image is compressed;

View data is split into three byte arrays, is respectively R, G, three byte arrays of B, diminishes the RLE compression then respectively, in the compression, diminishes filtration according to diminishing filtering rule, carries out the RLE coding then; Behind the RLE coding, carry out the ZLIB compression.

The specific embodiment of the invention also comprises the decompression of compressed file being carried out image, and process is as follows,

Carry out ZLIB earlier and decompress, and then carry out RLE and decompress.

The invention will be further described below in conjunction with instantiation.

Step a, formulation diminish filtering rule;

As shown in Figure 3, concrete steps are as follows,

Step 210, sampler read palette data or sampling file data, obtain the RGB sampled data;

Step 220, filter are carried out the one-dimensional discrete Fourier transform with what data were carried out standard;

Filter carries out the one-dimensional discrete Fourier transform of standard with data, obtains data profile.

Step 230, distribute according to data, output diminishes filtering rule.

Diminish filtering rule by intensity and calculate, as to diminish filtering rule be between the 0-5 and the colourity between the 240-255, all be filtered into 0 and 250 numerical value respectively; Result of calculation is imported the filtering rule storehouse.

Step b, image is compressed;

As shown in Figure 4, concrete steps are as follows,

Step 310, input image data;

Step 320, with the RGB color separated, be separated into R, G, three byte arrays of B;

Carry out the RGB color separated, the iconic model that obtains is carried out color separated, be divided into R, G, three byte arrays of B.

Step 330, read the filtering rule storehouse, obtain diminishing filtering rule;

Read the filtering rule storehouse, obtain the filtering rule that diminishes of user's formulation, in the colourity between the 0-5 and between the 240-255, all be filtered into 0 and 250 numerical value respectively as statistic.

Step 340, whether judge numerical value greater than 240 or less than 5, if, execution in step 350, otherwise, execution in step 360;

Step 350, count 0 or count 250, carry out the RLE compression greater than 240 numerical value less than 5 numerical value;

Step 360, carry out RLE compression;

Step 370, carry out ZLIB compression.

Have only the RLE compression, compression ratio is not enough, need carry out that the data after the RLE compression are carried out ZLIB and compress once more, and compression finishes.

As shown in Figure 5, compressed file is carried out the decompression process of image, concrete steps are as follows,

Step 410, input packed data;

Step 420, carry out ZLIB and decompress;

Step 430, carry out RLE and decompress;

Carry out RLE and decompress, carry out decompress(ion) this moment after diminishing data compression, so the data after decompressing are not initial initial data, some crosses low or too high rgb value all has been 0 or 250, but does not influence the visual effect of NM client.

Step 440, R, G, three byte arrays of B are carried out assembly coding, form the view data of RGB.

RLE reconfigures three byte arrays after decompressing, and forms the view data of RGB, finishes decompression.

The above; only for the preferable embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with the people of this technology in the disclosed technical scope of the present invention; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection range of claim.

Claims (9)

1, a kind of compression method of network image may further comprise the steps,
A, formulation diminish filtering rule;
B, view data is filtered, carry out data compression library-run-length encoding compression according to the described filtering rule that diminishes.
2, the method for claim 1 is characterized in that, comprises among the described step a,
O1, read palette data or the sampling file data, obtain the RGB sampled data;
O2, described RGB sampled data is carried out Fourier transform, obtain data profile;
O3, distribute, export the described filtering rule that diminishes according to described data.
3, the method for claim 1 is characterized in that, Fourier transform described in the described step o2 is the one-dimensional discrete Fourier transform.
4, method as claimed in claim 2 is characterized in that, comprise among the described step b,
S1, the RGB color separated of described RGB sampled data is become R, G, three arrays of B;
S2, described R, G, three arrays of B are filtered, carry out the run-length encoding compression according to the described filtering rule that diminishes;
S3, carry out data compression library compression.
5, method as claimed in claim 4 is characterized in that, the described filtering rule that diminishes comprises that colourity is filtered into numerical value 0, colourity three arrays of described R, G, B between 240-255 in described R, G between the 0-5, three arrays of B and is filtered into numerical value 250.
6, method as claimed in claim 5 is characterized in that, described step s2 comprises,
Judge whether numerical value is greater than 240 or less than 5 in described R, G, three arrays of B, if, described numerical value greater than 240 count 250, described numerical value less than 5 count 0, carry out run-length encoding compression; If not, carry out the run-length encoding compression.
7, the method for claim 1 is characterized in that, also comprises the decompression mode, may further comprise the steps,
The data of t1, the described compressed images of input;
T2, carry out data compression library and decompress;
T3, carry out run-length encoding and decompress;
T4, R, G, three arrays of B are carried out assembly coding, form the view data of RGB.
8, a kind of compressibility of network image is characterized in that, comprises filtering rule storehouse, sampler, filter, compressor reducer, wherein,
Described filtering rule storehouse is used to deposit and diminishes filtering rule;
Described sampler is used for according to sampling file data or palette data computed image sample;
Described filter is used for according to described image pattern, calculates the described filtering rule that diminishes by fourier transform, is input in the described filtering rule storehouse;
Described compressor reducer is used for diminishing the run-length encoding compression that filtering rule diminishes image earlier according to described, and then carries out the data compression library compression.
9, compressibility as claimed in claim 8 is characterized in that, also comprises decompressor, is used for the view data after the described compressor compresses is decompressed by data compression library earlier, carries out run-length encoding again and decompresses, and goes back original digital image data.
CNA2007101061712A 2007-06-08 2007-06-08 Network image compressing method and system CN101068352A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007101061712A CN101068352A (en) 2007-06-08 2007-06-08 Network image compressing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007101061712A CN101068352A (en) 2007-06-08 2007-06-08 Network image compressing method and system

Publications (1)

Publication Number Publication Date
CN101068352A true CN101068352A (en) 2007-11-07

Family

ID=38880761

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007101061712A CN101068352A (en) 2007-06-08 2007-06-08 Network image compressing method and system

Country Status (1)

Country Link
CN (1) CN101068352A (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102244786A (en) * 2011-07-12 2011-11-16 深圳市万兴软件有限公司 Method and device for compressing and decompressing video data and mobile terminal
CN101919254B (en) * 2008-01-21 2013-01-23 艾利森电话股份有限公司 Prediction-based image processing
WO2015090219A1 (en) * 2013-12-18 2015-06-25 Mediatek Inc. Method and apparatus for palette initialization and management
WO2016192053A1 (en) * 2015-06-03 2016-12-08 富士通株式会社 Copy information coding method and apparatus, and image processing device
CN106464884A (en) * 2014-05-22 2017-02-22 高通股份有限公司 Coding runs in palette-based video coding
CN108111858A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 A kind of picture compression method and device
US10182242B2 (en) 2013-12-27 2019-01-15 Mediatek Inc. Method and apparatus for palette coding with cross block prediction
US10477203B2 (en) 2013-12-18 2019-11-12 Hfi Innovation Inc. Method and apparatus for palette table prediction
US10484696B2 (en) 2014-01-07 2019-11-19 Mediatek Inc. Method and apparatus for color index prediction
CN110677156A (en) * 2019-09-19 2020-01-10 南京国电南自电网自动化有限公司 Compression algorithm and decompression method for black and white dot matrix data in power system protection device
US10542271B2 (en) 2013-12-27 2020-01-21 Hfi Innovation Inc. Method and apparatus for major color index map coding
US10743031B2 (en) 2013-12-27 2020-08-11 Hfi Innovation Inc. Method and apparatus for syntax redundancy removal in palette coding
US10750198B2 (en) 2014-05-22 2020-08-18 Qualcomm Incorporated Maximum palette parameters in palette-based video coding

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101919254B (en) * 2008-01-21 2013-01-23 艾利森电话股份有限公司 Prediction-based image processing
CN102244786A (en) * 2011-07-12 2011-11-16 深圳市万兴软件有限公司 Method and device for compressing and decompressing video data and mobile terminal
US10477203B2 (en) 2013-12-18 2019-11-12 Hfi Innovation Inc. Method and apparatus for palette table prediction
US10321141B2 (en) 2013-12-18 2019-06-11 Hfi Innovation Inc. Method and apparatus for palette initialization and management
WO2015090219A1 (en) * 2013-12-18 2015-06-25 Mediatek Inc. Method and apparatus for palette initialization and management
US10531119B2 (en) 2013-12-27 2020-01-07 Mediatek Inc. Method and apparatus for palette coding with cross block prediction
US10542271B2 (en) 2013-12-27 2020-01-21 Hfi Innovation Inc. Method and apparatus for major color index map coding
US10182242B2 (en) 2013-12-27 2019-01-15 Mediatek Inc. Method and apparatus for palette coding with cross block prediction
US10743031B2 (en) 2013-12-27 2020-08-11 Hfi Innovation Inc. Method and apparatus for syntax redundancy removal in palette coding
US10484696B2 (en) 2014-01-07 2019-11-19 Mediatek Inc. Method and apparatus for color index prediction
CN106464884A (en) * 2014-05-22 2017-02-22 高通股份有限公司 Coding runs in palette-based video coding
CN106464884B (en) * 2014-05-22 2019-07-19 高通股份有限公司 Decoding stroke in video coding based on palette
US10750198B2 (en) 2014-05-22 2020-08-18 Qualcomm Incorporated Maximum palette parameters in palette-based video coding
WO2016192053A1 (en) * 2015-06-03 2016-12-08 富士通株式会社 Copy information coding method and apparatus, and image processing device
CN108111858A (en) * 2016-11-24 2018-06-01 腾讯科技(深圳)有限公司 A kind of picture compression method and device
CN108111858B (en) * 2016-11-24 2020-06-05 腾讯科技(深圳)有限公司 Picture compression method and device
CN110677156A (en) * 2019-09-19 2020-01-10 南京国电南自电网自动化有限公司 Compression algorithm and decompression method for black and white dot matrix data in power system protection device

Similar Documents

Publication Publication Date Title
US20200221091A1 (en) Flexible quantization
US10038909B2 (en) Compression of light field images
US8615138B2 (en) Image compression using sub-resolution images
Taubman High performance scalable image compression with EBCOT
Askelöf et al. Region of interest coding in JPEG 2000
US6434253B1 (en) Data processing apparatus and method and storage medium
EP1009160B1 (en) A quad-tree embedded image compression and decompression method and apparatus
US9906764B2 (en) Resolution based formatting of compressed image data
US20140056531A1 (en) Signaling and uses of windowing information for images
US20190260901A1 (en) On-chip image sensor data compression
US6865291B1 (en) Method apparatus and system for compressing data that wavelet decomposes by color plane and then divides by magnitude range non-dc terms between a scalar quantizer and a vector quantizer
US7050642B2 (en) Method and apparatus for video compression using microwavelets
US8620071B2 (en) Adaptive compression of multi-level images
CN102523367B (en) Real time imaging based on many palettes compresses and method of reducing
EP0997034B1 (en) Image compression
US7565018B2 (en) Adaptive coding and decoding of wide-range coefficients
CN100576195C (en) With the system and method for lossless manner to digital picture and voice data decoding
TWI685245B (en) Data encoding and decoding
Tu et al. Context-based entropy coding of block transform coefficients for image compression
US6850649B1 (en) Image encoding using reordering and blocking of wavelet coefficients combined with adaptive encoding
US8126062B2 (en) Per multi-block partition breakpoint determining for hybrid variable length coding
CN1198466C (en) Method for producing qunantization matrix
JP2005236895A (en) Image encoding device and method, and image decoding device and method
US20070201751A1 (en) Block-Based Fast Image Compression
US7194128B1 (en) Data compression using principal components transformation

Legal Events

Date Code Title Description
PB01 Publication
C06 Publication
SE01 Entry into force of request for substantive examination
C10 Entry into substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20071107

C12 Rejection of a patent application after its publication