CN101090497A - Data compression method and device - Google Patents
Data compression method and device Download PDFInfo
- Publication number
- CN101090497A CN101090497A CN 200710117947 CN200710117947A CN101090497A CN 101090497 A CN101090497 A CN 101090497A CN 200710117947 CN200710117947 CN 200710117947 CN 200710117947 A CN200710117947 A CN 200710117947A CN 101090497 A CN101090497 A CN 101090497A
- Authority
- CN
- China
- Prior art keywords
- data compression
- water level
- data
- compression ratio
- mark
- Prior art date
- Legal status (The legal status 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 status listed.)
- Pending
Links
- 238000013144 data compression Methods 0.000 title claims abstract description 134
- 238000000034 method Methods 0.000 title claims abstract description 49
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 102
- 238000007906 compression Methods 0.000 claims abstract description 27
- 230000006835 compression Effects 0.000 claims abstract description 26
- 230000003139 buffering effect Effects 0.000 claims description 22
- 230000008569 process Effects 0.000 claims description 14
- 230000005540 biological transmission Effects 0.000 abstract description 11
- 230000005574 cross-species transmission Effects 0.000 description 6
- 230000007246 mechanism Effects 0.000 description 4
- 238000011002 quantification Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000016776 visual perception Effects 0.000 description 1
Landscapes
- Compression, Expansion, Code Conversion, And Decoders (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
This invention discloses a data compressing method including: selecting data compression ratio suitable for current water level when testing that the compressed data water level in a transmission buffer region is changed then compressing the data according to the data compression ratio. This invention also discloses a data compression device including: a transmission buffer module and a JPEG compression module, in which, the transmission buffer module is used in testing change of the currently received compressed data level and informing the change information to the JPEG module, which is used in receiving information of water level change from the buffer module to select data compression ratio of the current level and compress data and transmit the compressed data to the buffer module.
Description
Technical field
The present invention relates to image processing techniques, particularly a kind of compression method of view data and device.
Background technology
Current, the image that photographs with video camera (PC camera) before transmitting, general all will be through the process of an image compression, the data after the compression will be sent in the transmit buffer and transmit.Because JPEG (joint photographic experts group) (JPEG) image compression mode has higher compression ratio, so, at present for realizing that image compression adopts the jpeg image compress mode more.
But in the current jpeg image compress mode, the data after the compression are not to transmit according to the constant bit rate.Sometimes, may export lot of data at short notice, thereby form a transmision peak.Like this, if the data speed of input transmit buffer will cause overflowing of transmit buffer greater than the data output speed of transmit buffer.And overflowing of transmit buffer will directly cause occurring in the observed video flowing of user bad frame, influence video quality.
Usually, the work of display of video streams is to be finished by known driver if handle also, can pre-determine out these bad frames according to prior information, and remove from video flowing.Like this, the video quality that receives of user side can not be affected basically.But, if driver is unknown, perhaps under increasing camera (VIDEO CLASS) background of current application, if the overflowing of transmit buffer, then bad frame will intactly be presented in face of the user, thereby reduces video quality greatly.
Overflow in order to suppress transmit buffer, must strengthen the compression ratio of JPEG.But for the image of complexity or scene fast moving extremely, common Bit-Rate Control Algorithm mechanism can not reduce the data volume in the present frame in a large number.Because Bit-Rate Control Algorithm mechanism is normally had an effect at the frame head of a frame, that is to say, when these frame data have been sent in the transmit buffer, and after having caused the overflowing of transmit buffer, Bit-Rate Control Algorithm mechanism just can be had an effect, rather than controls effectively before overflowing generation.And, in the prior art in case with the compression ratio of JPEG transfer big after, lack a kind of mechanism and recover compression ratio correspondingly to be turned down after normal, to realize making full use of existing bandwidth for transmission quality image as well as possible at transmit buffer.
Summary of the invention
In view of this, the invention provides a kind of data compression method, can improve the quality of transmission data effectively.
In data compression method of the present invention, comprising: when the packed data water level in detecting transmit buffer changes, select to be suitable for the data compression ratio of current water level; Carry out data compression according to selected data compression ratio.
This method further comprises: the peak level mark is set in described transmit buffer in advance;
When the packed data water level in detecting transmit buffer reaches the peak level mark, increase the current data compression ratio.
This method further comprises: time high water mark is set in described transmit buffer in advance;
When the packed data water level in detecting transmit buffer is reduced to time high water mark by the peak level mark, stop to adjust data compression ratio.
Described increase current data compression ratio is: increase the quantizing factor in the current data compression process.
This method further comprises: the lowest water level mark is set in described transmit buffer in advance;
When the packed data water level in detecting transmit buffer is lower than the lowest water level mark, reduce the current data compression ratio.
This method further comprises: time low water level mark is set in described transmit buffer in advance;
When the packed data water level in detecting transmit buffer rises to time low water level mark by the lowest water level mark, stop to adjust data compression ratio.
The described current data compression ratio that reduces is: reduce the quantizing factor in the current data compression process.
This method further comprises: the limiting water level mark is set in described transmit buffer in advance;
When the packed data water level in detecting transmit buffer reaches capacity watermark, increase the current data compression ratio.
Described increase current data compression ratio is: the mode according to the quantizing process medium-high frequency component data that directly abandons data compression increases data compression ratio.
The water level value that described lowest water level mark, inferior low water level mark, inferior high water mark, peak level mark and limiting water level mark are identified is respectively: 85%, 87%, 93%, 95% and 99%.
Described packed data is a compressing image data.
The present invention also provides a kind of data compression device, can improve the quality of transmission data effectively.
In data compression device of the present invention, comprising: transmit buffering module and JPEG (joint photographic experts group) JPEG compression module, wherein,
Described transmit buffering module detects the current packed data SEA LEVEL VARIATION that receives, and notifies described JPEG compression module with described SEA LEVEL VARIATION information;
Described JPEG compression module receives the SEA LEVEL VARIATION information from described transmit buffering module, the data compression ratio that is suitable for current water level according to described SEA LEVEL VARIATION Information Selection, carry out data compression according to selected data compression ratio, and the data after will compressing are sent to described transmit buffering module.
Further, described JPEG compression module specifically comprises: control unit and data compression unit, wherein,
Described control unit receives the SEA LEVEL VARIATION information from described transmit buffering module, be suitable for the data compression ratio of current water level according to described SEA LEVEL VARIATION Information Selection, and send the data compression control messages to described data compression unit according to selected data compression ratio;
Described data compression unit receives the data compression control messages from described control unit, carry out data compression according to described data compression control messages, and the data after will compressing is sent to described transmit buffering module.
As seen, adopt above-mentioned technical scheme, according to the packed data water level information that receives in the current transmit buffer, adjust data compression ratio in real time, promptly adjust the amount of compressed data of input block, thereby prevent the generation of transmit buffer spillover, guaranteed the quality of transmission data.For one embodiment of the present of invention, the data of being transmitted are compressing image data, adopt technical scheme of the present invention after, prevented the generation of transmit buffer spillover, thereby avoided the compressing image data transmission course bad frame to occur, guaranteed the picture quality that user side receives.
Description of drawings
Fig. 1 is the overview flow chart of data compression method of the present invention.
Fig. 2 is the data compression method flow chart of the embodiment of the invention.
Fig. 3 concerns schematic diagram for packed data water level of the present invention and data compression ratio adjustment.
Fig. 4 is the composition structural representation of the data compression device of the embodiment of the invention.
Embodiment
In the embodiment of the invention, when the packed data water level in detecting transmit buffer changes, select to be suitable for the data compression ratio of current water level, and carry out data compression according to selected data compression ratio.
For making purpose of the present invention, technical scheme and advantage clearer, below with reference to the accompanying drawing embodiment that develops simultaneously, the present invention is described in further detail.
Fig. 1 is the overview flow chart of data compression method of the present invention.As shown in Figure 1, data compression method may further comprise the steps:
Step 101: when the packed data water level in detecting transmit buffer changes, select to be suitable for the data compression ratio of current water level.
Before this step, watermark is set in transmit buffer in advance, such as, peak level mark and/or inferior high water mark and/or inferior low water level mark and/or lowest water level mark.In this step,, select to be suitable for the data compression ratio of current water level according to the packed data SEA LEVEL VARIATION in the current transmit buffer.
In order to prevent the buffering area spillover, when the packed data water level in detecting transmit buffer reaches the peak level mark, increase the current data compression ratio.Along with the increase of data compression ratio, generally, will cause the packed data decline of water table in the transmit buffer.Like this, when the packed data water level in detecting transmit buffer is reduced to time high water mark by the peak level mark, stop to adjust data compression ratio, make stable level as far as possible on high water mark last time.
But, if the packed data water level that detects in the transmit buffer is lower than the lowest water level mark, then need to reduce the current data compression ratio, so that make full use of transmission space, transmit data as much as possible.Along with reducing of data compression ratio, generally, will cause the packed data water level in the transmit buffer to rise.When the packed data water level in detecting transmit buffer rises to time low water level mark by the lowest water level mark, stop to adjust data compression ratio, make stable level as far as possible on inferior low water level mark.Inferior low water level mark and time high water mark can be set to same value, also can be set to different value.
In the said process, can increase or reduce the current data compression ratio by the mode of adjusting quantizing factor.That is, increase the current data compression ratio, reduce the current data compression ratio by the lower quantization factor by increasing quantizing factor.The technology that changes data compression ratio by the adjustment quantizing factor is a prior art, introduces no longer in detail herein.
If the packed data water level in the current transmit buffer reaches the peak level mark, and still can not stop the continuation of water level to be risen after increasing data compression ratio.So, when the packed data water level in detecting transmit buffer reaches capacity watermark, increase the current data compression ratio in the mode of sacrificing the packed data quality of transmitting.Such as, directly abandon the high frequency component data in the data compression quantification process.
Step 102: carry out data compression according to selected data compression ratio.
Fig. 2 is the data compression method flow chart of the embodiment of the invention.In the present embodiment, suppose that the packed data that receives in the transmit buffer is a compressing image data.As shown in Figure 2, this embodiment may further comprise the steps:
Step 201: watermark (water mark) m1, m2, m3, m4 and m5 are set in transmit buffer in advance.
In the present embodiment,, lowest water level mark, inferior low water level mark, inferior high water mark, peak level mark and limiting water level mark are represented with m1, m2, m3, m4 and m5 respectively for ease of describing.These five water level values that watermark identified are respectively 85%, 87%, 93%, 95% and 99%.
Step 202: when the packed data water level in the transmit buffer is lower than m1, reduce data compression ratio, and according to the data compression ratio packed data after reducing.
In this step, adopt the mode that reduces the quantizing factor in the data compression process to reduce data compression ratio, the picture quality before and after this mode can guarantee to compress can not occur significantly inconsistent.The technology of adjusting compression ratio by the adjustment quantizing factor is a prior art, is not described herein.
The purpose of this step is in order to make full use of bandwidth, to improve the quality of images as far as possible.Because certain distortion is arranged after all when reducing through the image after the overcompression, and the data volume after the compression is few more, the picture quality that restores is relatively just poor more, so, under the situation that bandwidth allows, still to reduce the Image Data Compression ratio as far as possible, transmit data as much as possible, to guarantee to restore image with better quality.
Step 203: when the packed data water level in the transmit buffer reaches m2, stop to adjust data compression ratio, and according to the data compression ratio packed data that stops to adjust eve.
Step 204: when the packed data water level in the transmit buffer reaches m4, increase data compression ratio, and according to the data compression ratio packed data after increasing.
If reach m2 at water level, after stopping data compression ratio and adjusting, the packed data water level continues to rise, until reaching water level m4.In order to prevent the phenomenon that buffering area overflows, need to increase data compression ratio, be input to amount of compressed data in the transmit buffer to reduce the unit interval, and strive making the packed data water level in the transmit buffer to be reduced to m3.
Can adopt the mode that increases the quantizing factor in the data compression process to increase data compression ratio in this step.
Step 205: when the packed data water level in the transmit buffer reaches m3, stop to adjust data compression ratio, and according to the data compression ratio packed data that stops to adjust eve.
When the packed data water level reaches m3, can think that this is the water level of a safety, the buffering area spillover can not take place, so, stop the adjustment of data compression ratio.
Step 206: when the packed data water level in the transmit buffer reaches m5, adopt the mode that directly abandons quantizing process medium-high frequency component data further to increase data compression ratio, and according to the data compression ratio packed data after increasing.
If the packed data water level in the transmit buffer surpasses m4, and compression ratio is before adjusted mode all can't reduce the packed data water level, so, when water level reaches m5, adopt the mode that directly abandons quantizing process medium-high frequency component data further to increase data compression ratio.
In the prior art, complete JPEG compression process generally includes several subprocess such as deblocking, discrete cosine transform, quantification, entropy coding and packed data.In this step, further strengthen data compression ratio by adopting the mode that directly abandons quantification subprocess medium-high frequency component data, thereby reduce the data volume that receives in the transmit buffer.
Adopt this mode to carry out the data compression meeting picture quality is produced considerable influence, but use for PCcamera, than bad frame, the poor slightly frame of these quality can't cause too big influence to user's visual perception in this step.
The packed data water level of being introduced in the present embodiment and the relation of data compression ratio can be referring to Fig. 3, and Fig. 3 is that packed data water level and data compression ratio adjustment concern schematic diagram.
In the subsequent process,, adjust data compression ratio, thereby prevent overflowing of buffering area by repeated execution of steps 201~206 according to the variation of current packed data water level.
Based on said method, Fig. 4 is that the data compression device of the embodiment of the invention is formed structural representation.As shown in Figure 4, this data compression device comprises transmit buffering module 401 and JPEG compression module 402.
Transmit buffering module 401 detects the current packed data SEA LEVEL VARIATION that receives, and with SEA LEVEL VARIATION information notice JPEG compression module 402; The SEA LEVEL VARIATION information that JPEG compression module 402 receives from transmit buffering module 401, the data compression ratio that is suitable for current water level according to the SEA LEVEL VARIATION Information Selection, carry out data compression according to selected data compression ratio, and the data after will compressing are sent to transmit buffering module 401.
Wherein, JPEG compression module 402 specifically comprises control unit 4021 and data compression unit 4022.
The SEA LEVEL VARIATION information that control unit 4021 receives from transmit buffering module 401, be suitable for the data compression ratio of current water level according to the SEA LEVEL VARIATION Information Selection, and send the data compression control messages to data compression unit 4022 according to selected data compression ratio; The data compression control messages that data compression unit 4022 receives from control unit 4021 carry out data compression according to the data compression control messages, and the data after will compressing is sent to transmit buffering module 401.
As seen, adopt the technical scheme of the embodiment of the invention, according to the packed data water level information that receives in the current transmit buffer, adjust data compression ratio in real time, promptly adjust the amount of compressed data of input block, thereby prevent the generation of transmit buffer spillover, guaranteed the quality of transmission data.For one embodiment of the present of invention, the data of being transmitted are compressing image data, adopt technical scheme of the present invention after, prevented the generation of transmit buffer spillover, thereby avoided the compressing image data transmission course bad frame to occur, guaranteed the picture quality that user side receives.And scheme of the present invention can be utilized bandwidth fully under the situation that bandwidth allows, improve picture quality effectively.
In sum, more than be preferred embodiment of the present invention only, be not to be used to limit protection scope of the present invention.Within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (13)
1, a kind of data compression method is characterized in that, this method may further comprise the steps:
When the packed data water level in detecting transmit buffer changes, select to be suitable for the data compression ratio of current water level; Carry out data compression according to selected data compression ratio.
2, method according to claim 1 is characterized in that, this method further comprises: the peak level mark is set in described transmit buffer in advance;
When described packed data water level in detecting transmit buffer changed, the data compression ratio of selecting to be suitable for current water level was: when the packed data water level in detecting transmit buffer reaches the peak level mark, increase the current data compression ratio.
3, method according to claim 2 is characterized in that, this method further comprises: time high water mark is set in described transmit buffer in advance;
When the packed data water level in detecting transmit buffer is reduced to time high water mark by the peak level mark, stop to adjust data compression ratio.
According to claim 2 or 3 described methods, it is characterized in that 4, described increase current data compression ratio is: increase the quantizing factor in the current data compression process.
5, according to claim 2 or 3 described methods, it is characterized in that this method further comprises: the lowest water level mark is set in advance in described transmit buffer;
When the packed data water level in detecting transmit buffer is lower than the lowest water level mark, reduce the current data compression ratio.
6, method according to claim 5 is characterized in that, this method further comprises: time low water level mark is set in described transmit buffer in advance;
When the packed data water level in detecting transmit buffer rises to time low water level mark by the lowest water level mark, stop to adjust data compression ratio.
7, method according to claim 5 is characterized in that, the described current data compression ratio that reduces is: reduce the quantizing factor in the current data compression process.
8, method according to claim 6 is characterized in that, this method further comprises: the limiting water level mark is set in described transmit buffer in advance;
When the packed data water level in detecting transmit buffer reaches capacity watermark, increase the current data compression ratio.
9, method according to claim 8 is characterized in that, described increase current data compression ratio is: the mode according to the quantizing process medium-high frequency component data that directly abandons data compression increases data compression ratio.
10, method according to claim 8, it is characterized in that the water level value that described lowest water level mark, inferior low water level mark, inferior high water mark, peak level mark and limiting water level mark are identified is respectively: 85%, 87%, 93%, 95% and 99%.
11, method according to claim 1 is characterized in that, described packed data is a compressing image data.
12, a kind of data compression device is characterized in that, this device comprises: transmit buffering module and JPEG (joint photographic experts group) JPEG compression module, wherein,
Described transmit buffering module detects the current packed data SEA LEVEL VARIATION that receives, and notifies described JPEG compression module with described SEA LEVEL VARIATION information;
Described JPEG compression module receives the SEA LEVEL VARIATION information from described transmit buffering module, the data compression ratio that is suitable for current water level according to described SEA LEVEL VARIATION Information Selection, carry out data compression according to selected data compression ratio, and the data after will compressing are sent to described transmit buffering module.
13, device according to claim 12 is characterized in that, described JPEG compression module specifically comprises: control unit and data compression unit, wherein,
Described control unit receives the SEA LEVEL VARIATION information from described transmit buffering module, be suitable for the data compression ratio of current water level according to described SEA LEVEL VARIATION Information Selection, and send the data compression control messages to described data compression unit according to selected data compression ratio;
Described data compression unit receives the data compression control messages from described control unit, carry out data compression according to described data compression control messages, and the data after will compressing is sent to described transmit buffering module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200710117947 CN101090497A (en) | 2007-06-26 | 2007-06-26 | Data compression method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200710117947 CN101090497A (en) | 2007-06-26 | 2007-06-26 | Data compression method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN101090497A true CN101090497A (en) | 2007-12-19 |
Family
ID=38943618
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200710117947 Pending CN101090497A (en) | 2007-06-26 | 2007-06-26 | Data compression method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101090497A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105657422A (en) * | 2016-01-21 | 2016-06-08 | 航天恒星科技有限公司 | Multi-scene image compression processing method and system |
CN107682452A (en) * | 2017-10-31 | 2018-02-09 | 沈阳东软医疗系统有限公司 | A kind of data processing method, apparatus and system |
WO2019075901A1 (en) * | 2017-10-19 | 2019-04-25 | 歌尔科技有限公司 | Method and device for transmitting image |
CN115205952A (en) * | 2022-09-16 | 2022-10-18 | 深圳市企鹅网络科技有限公司 | Online learning image acquisition method and system based on deep learning |
CN118075144A (en) * | 2024-02-18 | 2024-05-24 | 兴容(上海)信息技术股份有限公司 | High-frequency data compression management system and method based on artificial intelligence |
-
2007
- 2007-06-26 CN CN 200710117947 patent/CN101090497A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105657422A (en) * | 2016-01-21 | 2016-06-08 | 航天恒星科技有限公司 | Multi-scene image compression processing method and system |
WO2019075901A1 (en) * | 2017-10-19 | 2019-04-25 | 歌尔科技有限公司 | Method and device for transmitting image |
US11601527B2 (en) | 2017-10-19 | 2023-03-07 | Goertek Technology Co., Ltd. | Method and device for transmitting image |
CN107682452A (en) * | 2017-10-31 | 2018-02-09 | 沈阳东软医疗系统有限公司 | A kind of data processing method, apparatus and system |
CN115205952A (en) * | 2022-09-16 | 2022-10-18 | 深圳市企鹅网络科技有限公司 | Online learning image acquisition method and system based on deep learning |
CN118075144A (en) * | 2024-02-18 | 2024-05-24 | 兴容(上海)信息技术股份有限公司 | High-frequency data compression management system and method based on artificial intelligence |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9762917B2 (en) | Quantization method and apparatus in encoding/decoding | |
AU650219B2 (en) | Statistical multiplexer for a multichannel image compression system | |
US5473377A (en) | Method for quantizing intra-block DC transform coefficients using the human visual characteristics | |
CN101547349B (en) | Method for controlling code rate of secondary AVS encoding of video signal | |
CA2150729C (en) | Method of incorporating a variable rate auxiliary data stream with a variable rate primary data stream | |
US8355434B2 (en) | Digital video line-by-line dynamic rate adaptation | |
CN108574841B (en) | Coding method and device based on self-adaptive quantization parameter | |
CN102137258B (en) | Method for controlling three-dimensional video code rates | |
CN114071189A (en) | Video processing device and video streaming processing method | |
US20090310672A1 (en) | Method and System for Rate Control in a Video Encoder | |
CN100440975C (en) | Method and apparatus for improving the average image refresh rate in a compressed video bitstream | |
US20020154331A1 (en) | Image data transmission apparatus and image data receiving apparatus | |
CN101090497A (en) | Data compression method and device | |
CN101217615B (en) | An image compression bit rate control method and device | |
CN101159870A (en) | Emergent JPEG compression bit rate control device and method thereof | |
JP2007028598A (en) | Compression coding apparatus and compression coding method | |
JP6806466B2 (en) | Image coding device and its control method | |
CN101394561B (en) | Method of image compression and device thereof | |
CN102724507A (en) | GPU (graphic processing unit) accelerating encoder rate control method | |
EP1841237B1 (en) | Method and apparatus for video encoding | |
US20190253728A1 (en) | Method and device for video data compression | |
CN116506617B (en) | Image shallow compression code rate control method and device | |
US20240080452A1 (en) | Video encoder and video encoding method with real-time quality estimation | |
CN101835038A (en) | Image compressing method and related device thereof | |
JPH08256337A (en) | Moving image coder |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C12 | Rejection of a patent application after its publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20071219 |