CN105992001A - Method and device for carrying out quantification processing on picture - Google Patents

Method and device for carrying out quantification processing on picture Download PDF

Info

Publication number
CN105992001A
CN105992001A CN201510093071.5A CN201510093071A CN105992001A CN 105992001 A CN105992001 A CN 105992001A CN 201510093071 A CN201510093071 A CN 201510093071A CN 105992001 A CN105992001 A CN 105992001A
Authority
CN
China
Prior art keywords
macro
image macro
residual error
error data
described image
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.)
Granted
Application number
CN201510093071.5A
Other languages
Chinese (zh)
Other versions
CN105992001B (en
Inventor
冯守强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tencent Computer Systems Co Ltd
Original Assignee
Shenzhen Tencent Computer Systems Co Ltd
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 Shenzhen Tencent Computer Systems Co Ltd filed Critical Shenzhen Tencent Computer Systems Co Ltd
Priority to CN201510093071.5A priority Critical patent/CN105992001B/en
Publication of CN105992001A publication Critical patent/CN105992001A/en
Application granted granted Critical
Publication of CN105992001B publication Critical patent/CN105992001B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and a device for carrying out quantification processing on a picture, and the method and device belong to the field of image coding. The method comprises the steps of: partitioning the picture to obtain an image macro block of the picture; carrying out prediction processing on the image macro block to obtain residual data of each pixel point of the image macro block; calculating a quantization step size of the image macro block according to the residual data of each pixel point of the image macro block; and carrying out quantification processing on the image macro block according to the quantization step size and the residual data of each pixel point of the image macro block. The device comprises a partitioning module, a predicting module, a calculating module and a quantizing module. The method and the device can reduce the quantization granularity and increase the picture compression ratio.

Description

A kind of method and device that picture is carried out quantification treatment
Technical field
The present invention relates to image code domain, particularly to a kind of method and device that picture is carried out quantification treatment.
Background technology
The terminals such as mobile phone all have camera function, and user is frequently used camera function shooting picture, and user wants this picture is shared with other people sometimes, and then this picture is uploaded to network side and downloads and browse for other people by user.This picture, when receiving this picture, is predicted, converts, quantifies and entropy code etc. processes this picture is converted into the picture of different resolution size, with satisfied different download demands by network side.
The process processed picture at present is: this picture being predicted process and obtains residual error picture, the residual error data of each pixel that this residual error picture is included by this picture forms;According to default tile location information, this residual error picture is divided into four image blocks;For any one image block, according to the residual error data of each pixel that quantization step and this image block of this default image block include, this image block is carried out quantification treatment and obtains the quantized value of each pixel that this image block includes;According to the quantized value of the pixel that each image block includes, this picture is carried out the image code stream after entropy code is compressed.
During realizing the present invention, inventor finds that prior art at least there is problems in that
Owing to the quantization step of each image block is to preset in advance, can only be divided into four continuous print image blocks, granularity of division is big, causes quantization granularities big, reduces picture compression ratio.
Summary of the invention
For lower quantization granularity and raising picture compression ratio, the invention provides a kind of method and device that picture is carried out quantification treatment.Described technical scheme is as follows:
A kind of method that picture is carried out quantification treatment, described method includes:
Picture is divided, obtains the image macro that described picture includes;
It is predicted described image macro processing, obtains the residual error data of each pixel that described image macro includes;
The residual error data of each pixel included according to described image macro calculates the quantization step of described image macro;
According to the residual error data of each pixel that described quantization step and described image macro include, described image macro is carried out quantification treatment.
A kind of device that picture is carried out quantification treatment, described device includes:
Divide module, for picture is divided, obtain the image macro that described picture includes;
Prediction module, for described image macro is predicted process, obtains the residual error data of each pixel that described image macro includes;
Computing module, the residual error data of each pixel for including according to described image macro calculates the quantization step of described image macro;
Quantization modules, the residual error data of each pixel for including according to described quantization step and described image macro, described image macro is carried out quantification treatment.
In embodiments of the present invention, owing to can calculate the quantization step of this image macro according to the residual error data of each pixel that this image macro includes, it is possible to picture to be marked off more image macro, picture is carried out refinement, improve compression ratio.
Accompanying drawing explanation
Figure 1It it is a kind of method flow that picture is carried out quantification treatment of the embodiment of the present invention 1 offerFigure
Figure 2-1 is a kind of method flow that picture carries out quantification treatment that the embodiment of the present invention 2 providesFigure
Figure 2-2 is a kind of interface signal dividing picture that the embodiment of the present invention 2 providesFigure
Figure 2-3 is the pixel number Nogata that the embodiment of the present invention 2 providesFigure
Figure 2-4 is a kind of circuit structure signal that the embodiment of the present invention 2 providesFigure
Figure 3-1 is a kind of method flow that picture carries out quantification treatment that the embodiment of the present invention 3 providesFigure
Figure 3-2 is that a kind of of the embodiment of the present invention 3 offer utilizes multiple predictive mode that picture is carried out the flow process of quantification treatmentFigure
Figure 4It it is a kind of apparatus structure signal that picture is carried out quantification treatment that the embodiment of the present invention 4 providesFigure
Figure 5It is that a kind of terminal structure that the embodiment of the present invention 5 provides is illustratedFigure
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction withAccompanying drawingEmbodiment of the present invention is described further in detail.
Embodiment 1
SeeFigure 1, embodiments provide a kind of method that picture is carried out quantification treatment, including:
Step 101: divide picture, obtains the image macro that this picture includes.
Step 102: be predicted this image macro processing, obtain the residual error data of each pixel that this image macro includes.
Step 103: the residual error data of each pixel included according to this image macro calculates the quantization step of this image macro.
Step 104: according to the residual error data of each pixel that this quantization step and this image macro include, this image macro is carried out quantification treatment.
In embodiments of the present invention, owing to can calculate the quantization step of this image macro according to the residual error data of each pixel that this image macro includes, it is possible to picture to be marked off more image macro, picture is carried out refinement, improve compression ratio.
Embodiment 2
SeeFigure 2-1, embodiments provide a kind of method that picture is carried out quantification treatment, including:
Step 201: divide picture, obtains the image macro that this picture includes.
Specifically, according to default macroblock size, picture is divided and obtains multiple image macro that this picture includes.The image block of the sizes such as the multiple image macro divided are all.
The macroblock size preset can be 16 × 16,8 × 8 or 4 × 4 etc., if the macroblock size of certain image macro is 16 × 16, then representing that this image macro is made up of 256 pixels, in like manner the image macro of 8 × 8 is made up of 64 pixels, and the image macro of 4 × 4 is made up of 16 pixels.
Wherein, the macroblock size preset is less, and picture can be divided into multiple image macro, and each image macro, considerably beyond four, is quantified in subsequent step by the number of the image macro of division respectively, such that it is able to picture is carried out refinement.
For example, with reference toFigure 2-2, it is assumed that the macroblock size preset is 4 × 4, for the picture of 40 × 40 sizes, can be according to this macroblock size 4 × 4, it is the image macro of 4 × 4 that this pictures is divided into 100 sizes, the number of image macro is considerably beyond four, and each image macro includes 16 pixels.
For any image macro block marked off, can use subsequent step that this image macro is quantified, including:
Step 202: for any one image macro, is predicted this image macro processing, obtains the residual error data of each pixel that this image macro includes.
Presently, there are multiple predictive mode, every kind of corresponding tile size of predictive mode.Such as presently, there are 16 × 16 predictive modes, 8 × 8 predictive modes and 4 × 4 predictive modes, the tile size that 16 × 16 predictive modes are corresponding is 16 × 16, the tile size that 8 × 8 predictive modes are corresponding be the tile size that 8 × 8,4 × 4 predictive modes are corresponding be 4 × 4.
This step can be: selects a kind of predictive mode, and tile size corresponding to this predictive mode is less than or equal to the size of this image macro, according to this predictive mode, this image macro is predicted, obtains the residual error data of each pixel that this image macro includes.
Such as, for dividing the image macro that size is 4 × 4 out, select the corresponding tile size predictive mode less than or equal to 4 × 4, the predictive mode selected is 4 × 4 predictive modes, according to 4 × 4 predictive modes, this image macro is predicted, obtain including the residual error data of 16 pixels to this image macro, it is assumed that the residual error data of these 16 pixels is respectively 0.3,0.5,0.7,1.5,1.4,0.7,1.2,1.2,1.4,1.5,0.7,0.7,0.5,1.2,1.2 and 0.7.
Wherein, it was predicted that the residual error data of each pixel obtained is time domain data, the residual error data of each pixel can be converted to frequency domain data, perform following steps 203 the most again.
Step 203: according to the residual error data of each pixel that this image macro includes, calculate the macro block characteristics value of this image macro.
Specifically, this step can include (1) and (2) two steps as follows, is respectively as follows:
(1): the residual error data of each pixel included from this image macro counts the pixel number that each residual error data in default residual error data set is corresponding.
Preset residual error data set and include that all residual error data occur at present.
Such as, the residual error data of 16 pixels for obtaining in step 202, the residual error data of these 16 pixels is respectively 0.3,0.5,0.7,1.5,1.4,0.7,1.2,1.2,1.4,1.5,0.7,0.7,0.5,1.2,1.2 and 0.7;It is assumed that preset residual error data set to include 0.3,0.5,0.7,1.2,1.4,1.5,1.6,1.7.The pixel number counting residual error data 0.3 correspondence from the residual error data of these 16 pixels is 1, the pixel number of 0.5 correspondence is 3, the pixel number of 0.7 correspondence is 5, the pixel number of 1.2 correspondences is 4, the pixel number of 1.4 correspondences is 2, the pixel number of 1.5 correspondences be the pixel number of 1,1.6 correspondences be the pixel number of 0,1.7 correspondences be 0.
(2): according to the pixel number that each residual error data in default residual error data set is corresponding, calculate the macro block characteristics value of this image macro.
Specifically, according to the pixel number that each residual error data in default residual error data set is corresponding, draw pixel number NogataFigure, this pixel number is according to NogataFigureAbscissa be to preset the residual error data in residual error data set, and vertical coordinate is pixel number, from this pixel NogataIn figureThe pixel number finding out last correspondence is not the residual error data of 0, obtain this residual error data found out position on the horizontal scale, the pixel number of maximum is selected from the pixel number that each residual error data is corresponding, if the pixel number of maximum is more than 1, then calculate the business between pixel number and the position of acquisition of maximum and using the business that calculates as the macro block characteristics value of this image macro, if the pixel number of maximum is less than or equal to 1, it is determined that the macro block characteristics value of this image macro is 0.
Such as, according to the pixel number that each residual error data in default residual error data set is corresponding, drawSuch as figure 2Pixel number Nogata shown in-3Figure, from this pixel NogataIn figureFind out the pixel number of last correspondence be not 0 residual error data be 1.5, obtaining this residual error data 1.5 position on the horizontal scale is 6, the pixel number selecting maximum from the pixel number that each residual error data is corresponding is 5, maximum pixel number is more than 1, then calculating the business between the pixel number 5 of maximum and the position 6 obtained is 0.83 and using the business 0.83 that calculates as the macro block characteristics value of this image macro.
Step 204: determine the range of characteristic values at this macro block characteristics value place, obtains quantization step corresponding to this feature value scope quantization step as this image macro.
Before performing this step, mark off multiple macro block characteristics value scope in advance, and define the quantization step that each macro block characteristics value scope is corresponding, quantization step corresponding with each macro block characteristics value scope for each macro block characteristics value scope divided is stored in the macro block characteristics value scope corresponding relation with quantization step.
Such as, dividing four macro block characteristics value scopes in advance, be respectively less than 1, more than or equal to 1 and less than or equal to 2, more than 2 and less than or equal to 4, more than 4, and the quantization step defining these four macro block characteristics value scopes respectively corresponding respectively is 1,2,3,4;Then, quantization step corresponding with each macro block characteristics value scope for each macro block characteristics value scope divided is stored inSuch as table 1In the corresponding relation of shown macro block characteristics value scope and quantization step.
Table 1
Macro block characteristics value scope Quantization areas
Less than 1 1
More than or equal to 1 and less than or equal to 2 2
More than 2 and less than or equal to 4 3
More than 4 4
This step can be: determines the range of characteristic values at the macro block characteristics value place of this image macro, according to this feature value scope, from macro block characteristics value scope with the corresponding relation of quantization step obtains the corresponding quantization step quantization step as this image macro.
Such as, the macro block characteristics value obtained in step 203 is 0.83, determine the range of characteristic values at macro block characteristics value place of this image macro for " less than 1 ", according to this feature value scope " more than 1 ", fromSuch as table 1Shown macro block characteristics value scope with the corresponding relation of quantization step obtains the corresponding quantization step 1 quantization step as this image macro.
Step 205: according to this quantization step and the residual error data of each pixel, this image macro is carried out quantification treatment.
Specifically, the residual error data of each pixel this image macro included is respectively divided by the quantization step of this image macro, obtains the business of each pixel, and the business of each pixel rounds the quantized value obtaining each pixel.
By the step of above-mentioned steps 202 to 205, other each image macro are processed, obtain the quantized value of each pixel that this picture includes, it is achieved this picture is quantified.
Such as, the residual error data of 16 pixels for obtaining in step 202., and to obtain quantization step in step 204 be 1.2, the residual error data of these 16 pixels being divided by with this quantization step 1.2 respectively, to obtain business corresponding to these 16 pixels be 0.3,0.5,0.7,1.5,1.4,0.7,1.2,1.2,1.4,1.5,0.7,0.7,0.5,1.2,1.2 and 0.7, business to these 16 pixels rounds the quantized value obtaining these 16 pixels the most respectively, and respectively 0,0,0,1,1,0,1,1,1,1,0,0,0,1,1,0.
The method that the present embodiment provides can be applied on FPGA (Field-Programmable Gate Array, i.e. field programmable gate array), seesFigure 2FPGA circuitry shown in-4FigurePicture is carried out infra-frame prediction and obtains the residual error data of each pixel that image macro includes, by the residual error data of each pixel from time domain to frequency domain transform, calculate quantization step the most again, residual error data according to each pixel after this quantization step and conversion carries out quantification treatment, obtain the quantized value of each pixel, the quantized value of each pixel is carried out entropy code and obtains picture code stream.
In embodiments of the present invention, owing to can calculate the quantization step of this image macro according to the residual error data of each pixel that this image macro includes, it is possible to picture to be marked off more image macro, picture is carried out refinement, improve compression ratio.
Embodiment 3
SeeFigure 3-1, embodiments provide a kind of method that picture is carried out quantification treatment, including:
Step 301: divide picture, obtains the image macro that this picture includes.
Specifically, according to default macroblock size, picture is divided and obtains multiple image macro that this picture includes.The image block of the sizes such as the multiple image macro divided are all.
The macroblock size preset can be 16 × 16,8 × 8 or 4 × 4 etc., if the macroblock size of certain image macro is 16 × 16, then representing that this image macro is made up of 256 pixels, in like manner the image macro of 8 × 8 is made up of 64 pixels, and the image macro of 4 × 4 is made up of 16 pixels.
Wherein, the macroblock size preset is less, and picture can be divided into multiple image macro, and each image macro, considerably beyond four, is quantified in subsequent step by the number of the image macro of division respectively, such that it is able to picture is carried out refinement.
Such as, assume, the macroblock size preset is 16 × 16, picture for 160 × 160 sizes, can be according to this macroblock size 16 × 16, it is the image macro of 16 × 16 that this pictures is divided into 100 sizes, and the number of image macro is considerably beyond four, and each image macro includes 256 pixels.
For any image macro block marked off, can use subsequent step that this image macro is quantified, including:
Step 302: for any one image macro, uses multiple predictive mode to be predicted this image macro processing, obtains the residual error data of each pixel that this image macro under every kind of predictive mode includes.
Presently, there are multiple predictive mode, every kind of corresponding tile size of predictive mode.Such as presently, there are 16 × 16 predictive modes, 8 × 8 predictive modes and 4 × 4 predictive modes, the tile size that 16 × 16 predictive modes are corresponding is 16 × 16, the tile size that 8 × 8 predictive modes are corresponding be the tile size that 8 × 8,4 × 4 predictive modes are corresponding be 4 × 4.
This step can be: selects tile size one or more predictive modes of size less than or equal to this image macro of correspondence from default multiple predictive mode, this image macro is predicted by every kind of predictive mode according to selecting, and obtains the residual error data of each pixel that this image macro includes under the every kind of predictive mode selected.
For example, with reference toFigure 3-2, for dividing the image macro that size is 16 × 16 out, select the corresponding tile size predictive mode less than or equal to 16 × 16, the predictive mode of selection includes 16 × 16 predictive modes, 8 × 8 predictive modes and 4 × 4 predictive modes;According to 16 × 16 predictive modes, this image macro is predicted, obtains this image macro under 16 × 16 predictive modes and include the residual error data of 256 pixels;According to 8 × 8 predictive modes, this image macro is predicted, obtains this image macro under 8 × 8 predictive modes and include the residual error data of 256 pixels;According to 4 × 4 predictive modes, this image macro is predicted, obtains this image macro under 4 × 4 predictive modes and include the residual error data of 256 pixels.
Wherein, it was predicted that under the every kind of predictive mode obtained, the residual error data of each pixel that this image macro includes is time domain data, the residual error data of each pixel can be converted to frequency domain data, perform following steps 303 the most again.
Step 303: according to the residual error data of each pixel that this image macro under every kind of predictive mode includes, calculate the macro block characteristics value of this image macro under every kind of predictive mode respectively.
Specifically, this step can include (1) and (2) two steps as follows, is respectively as follows:
(1): for every kind of predictive mode, the residual error data of each pixel that this image macro includes counts from this predictive mode the pixel number that each residual error data in default residual error data set is corresponding.
(2): according to the pixel number that each residual error data in default residual error data set is corresponding, calculate the macro block characteristics value of this image macro under this kind of pattern.
For example, with reference toFigure 3-2, for 16 × 16 predictive modes, 8 × 8 predictive modes and 4 × 4 predictive modes, the residual error data of each pixel that this image macro includes counts from 16 × 16 predictive modes the pixel number that each residual error data in default residual error data set is corresponding, according to the pixel number that each residual error data in default residual error data set is corresponding, calculate the macro block characteristics value of this image macro under 16 × 16 predictive modes, it is assumed that be 1.6.The residual error data of each pixel that this image macro includes counts from 8 × 8 predictive modes the pixel number that each residual error data in default residual error data set is corresponding, according to the pixel number that each residual error data in default residual error data set is corresponding, calculate the macro block characteristics value of this image macro under 8 × 8 predictive modes, it is assumed that be 1.2.The residual error data of each pixel that this image macro includes counts from 4 × 4 predictive modes the pixel number that each residual error data in default residual error data set is corresponding, according to the pixel number that each residual error data in default residual error data set is corresponding, calculate the macro block characteristics value of this image macro under 4 × 4 predictive modes, it is assumed that be 1.4.
Step 304: select the macro block characteristics value of maximum from every kind of predictive mode in the macro block characteristics value of this image macro.
Such as, the macro block characteristics value obtaining this image macro under 16 × 16 predictive modes in step 303 is 1.6, under under 8 × 8 predictive modes, the macro block characteristics value of this image macro is 1.2,4 × 4 predictive modes, the macro block characteristics value of this image macro is 1.4, selects maximum macro block characteristics value 1.6.
Step 305: determine the range of characteristic values at the macro block characteristics value place of maximum, obtains quantization step corresponding to this feature value scope quantization step as this image macro.
Before performing this step, mark off multiple macro block characteristics value scope in advance, and define the quantization step that each macro block characteristics value scope is corresponding, quantization step corresponding with each macro block characteristics value scope for each macro block characteristics value scope divided is stored in the macro block characteristics value scope corresponding relation with quantization step.
Such as, dividing four macro block characteristics value scopes in advance, be respectively less than 1, more than or equal to 1 and less than or equal to 2, more than 2 and less than or equal to 4, more than 4, and the quantization step defining these four macro block characteristics value scopes respectively corresponding respectively is 1,2,3,4;Then, quantization step corresponding with each macro block characteristics value scope for each macro block characteristics value scope divided is stored inSuch as table 2In the corresponding relation of shown macro block characteristics value scope and quantization step.
Table 2
Macro block characteristics value scope Quantization step
Less than 1 1
More than or equal to 1 and less than or equal to 2 2
More than 2 and less than or equal to 4 3
More than 4 4
This step can be: determines the range of characteristic values at macro block characteristics value place of maximum, according to this feature value scope, from macro block characteristics value scope with the corresponding relation of quantization step obtains the corresponding quantization step quantization step as this image macro.
Such as, determine that the range of characteristic values at the macro block characteristics value place of maximum is " more than or equal to 1 and less than or equal to 2 ", according to this feature value scope " more than or equal to 1 and less than or equal to 2 ", fromSuch as table 2Shown macro block characteristics value scope with the corresponding relation of quantization step obtains the corresponding quantization step 2 quantization step as this image macro.
Step 306: obtain the predictive mode that maximum macro block characteristics value is corresponding, according to this quantization step and under this predictive mode the residual error data of each pixel, this image macro is carried out quantification treatment.
Specifically, obtain the predictive mode that maximum macro block characteristics value is corresponding, the residual error data of each pixel this image macro under this predictive mode included is respectively divided by the quantization step of this image macro, obtain the business of each pixel, the business of each pixel is rounded the quantized value obtaining each pixel.
Such as, obtain 16 × 16 predictive modes of maximum macro block characteristics value 1.6 correspondence, the residual error data of each pixel this image macro under 16 × 16 predictive modes included is respectively divided by the quantization step 1.2 of this image macro, obtain the business of each pixel, the business of each pixel is rounded the quantized value obtaining each pixel.
By the step of above-mentioned steps 302 to 306, other each image macro are processed, obtain the quantized value of each pixel that this picture includes, it is achieved this picture is quantified.
In embodiments of the present invention, owing to can calculate the quantization step of this image macro according to the residual error data of each pixel that this image macro includes, it is possible to picture to be marked off more image macro, picture is carried out refinement, improve compression ratio.It addition, in embodiments of the present invention, processing image macro also by multiple predictive mode, then select a kind of predictive mode of optimum, picture is quantified by the predictive mode according to selecting, and improves quantification effect.
Embodiment 4
SeeFigure 4, embodiments provide a kind of device that picture is carried out quantification treatment, including:
Divide module 401, for picture is divided, obtain the image macro that described picture includes;
Prediction module 402, for described image macro is predicted process, obtains the residual error data of each pixel that described image macro includes;
Computing module 403, the residual error data of each pixel for including according to described image macro calculates the quantization step of described image macro;
Quantization modules 404, the residual error data of each pixel for including according to described quantization step and described image macro, described image macro is carried out quantification treatment.
Optionally, described computing module 403 includes:
First computing unit, the residual error data of each pixel for including according to described image macro, calculate the macro block characteristics value of described image macro;
First determines unit, for determining the range of characteristic values at described macro block characteristics value place;
First acquiring unit, for obtaining quantization step corresponding to the described range of characteristic values quantization step as described image macro.
Optionally, described first computing unit includes:
Statistics subelement, counts the pixel number that each residual error data that default residual error data set includes is corresponding for the residual error data of each pixel included from described image macro;
Computation subunit, the pixel number that each residual error data for including according to described default residual error data set is corresponding, calculate the macro block characteristics value of described image macro.
Optionally, described prediction module 402, process specifically for using multiple predictive mode respectively described image macro to be predicted, obtain the residual error data of each pixel that described image macro under every kind of predictive mode includes.
Optionally, described computing module 403 includes:
Second computing unit, the residual error data of each pixel for including according to described image macro under described every kind of predictive mode, calculate the macro block characteristics value of described image macro under described every kind of predictive mode respectively;
Select unit, for the macro block characteristics value of described image macro selects from described every kind of predictive mode the macro block characteristics value of maximum;
Second determines unit, for determining the range of characteristic values at the macro block characteristics value place of described maximum;
Second acquisition unit, for obtaining quantization step corresponding to the described range of characteristic values quantization step as described image macro.
Optionally, described quantization modules 404 includes:
3rd acquiring unit, for obtaining the predictive mode that the macro block characteristics value of described maximum is corresponding;
Quantifying unit, under the predictive mode according to described quantization step and described acquisition, the residual error data of each pixel that described image macro includes, carries out quantification treatment to described image macro.
In embodiments of the present invention, owing to can calculate the quantization step of this image macro according to the residual error data of each pixel that this image macro includes, it is possible to picture to be marked off more image macro, picture is carried out refinement, improve compression ratio.
Embodiment 5
Refer toFigure 5, it illustrates the terminal structure signal involved by the embodiment of the present inventionFigure, this terminal can be above-mentioned wearable device, for the method implementing the poster information showing video provided in above-described embodiment.Specifically:
Terminal 900 can include RF (Radio Frequency, radio frequency) circuit 110, include the memorizer 120 of one or more computer-readable recording mediums, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (wireless fidelity, Wireless Fidelity) module 170, include one or more than one processes the parts such as the processor 180 of core and power supply 190.It will be understood by those skilled in the art thatFigure 5Shown in terminal structure be not intended that the restriction to terminal, can include ratioDiagramMore or less of parts, or combine some parts, or different parts are arranged.Wherein:
RF circuit 110 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after the downlink information of base station being received, transfers to one or more than one processor 180 processes;It addition, be sent to base station by relating to up data.Generally, RF circuit 110 includes but not limited to antenna, at least one amplifier, tuner, one or more agitator, subscriber identity module (SIM) card, transceiver, bonder, LNA (Low Noise Amplifier, low-noise amplifier), duplexer etc..Additionally, RF circuit 110 can also be communicated with network and other equipment by radio communication.nullDescribed radio communication can use arbitrary communication standard or agreement,Include but not limited to GSM (Global System of Mobile communication,Global system for mobile communications)、GPRS(General Packet Radio Service,General packet radio service)、CDMA(Code Division Multiple Access,CDMA)、WCDMA(Wideband Code Division Multiple Access,WCDMA)、LTE(Long Term Evolution,Long Term Evolution)、Email、SMS(Short Messaging Service,Short Message Service) etc..
Memorizer 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of memorizer 120 by operation, thus performs the application of various function and data process.Memorizer 120 can mainly include storing program area and storage data field, and wherein, storage program area can store the application program (such as sound-playing function, image player function etc.) etc. needed for operating system, at least one function;Storage data field can store the data (such as voice data, phone directory etc.) etc. that the use according to terminal 900 is created.Additionally, memorizer 120 can include high-speed random access memory, it is also possible to include nonvolatile memory, for example, at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memorizer 120 can also include Memory Controller, to provide processor 180 and the input block 130 access to memorizer 120.
Input block 130 can be used for receiving numeral or the character information of input, and produces keyboard, mouse, action bars, optics or the trace ball signal input relevant with user setup and function control.Specifically, input block 130 can include Touch sensitive surface 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touches display screen or Trackpad, can collect user thereon or neighbouring touch operation (such as user use any applicable object such as finger, stylus orAdnexaOperation on Touch sensitive surface 131 or near Touch sensitive surface 131), and drive corresponding attachment means according to formula set in advance.Optionally, Touch sensitive surface 131 can include touch detecting apparatus and two parts of touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect the signal that touch operation brings, transmit a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 180, and can receive order that processor 180 sends and be performed.Furthermore, it is possible to use the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave to realize Touch sensitive surface 131.Except Touch sensitive surface 131, input block 130 can also include other input equipments 132.Specifically, one or more during other input equipments 132 can include but not limited to physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc..
Display unit 140 can be used for the information that inputted by user of display or the information being supplied to user and the various graphical user interface of terminal 900, these graphical user interface can by figure, text,FigureMark, video and its combination in any are constituted.Display unit 140 can include display floater 141, optionally, the form such as LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) can be used to configure display floater 141.Further, Touch sensitive surface 131 can cover display floater 141, when Touch sensitive surface 131 detects thereon or after neighbouring touch operation, send processor 180 to determine the type of touch event, on display floater 141, provide corresponding visual output with preprocessor 180 according to the type of touch event.AlthoughFigure 5In, Touch sensitive surface 131 and display floater 141 are as twoIndependentParts realize input and input function, but in some embodiments it is possible to by integrated to Touch sensitive surface 131 and display floater 141 and realize inputting and output function.
Terminal 900 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensors.Specifically, optical sensor can include ambient light sensor and proximity transducer, and wherein, ambient light sensor can regulate the brightness of display floater 141 according to the light and shade of ambient light, proximity transducer can cut out display floater 141 and/or backlight when terminal 900 moves in one's ear.One as motion sensor, Gravity accelerometer can detect the size of (generally three axles) acceleration in all directions, can detect that size and the direction of gravity time static, can be used for identifying the application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile phone attitude, Vibration identification correlation function (such as pedometer, percussion) etc.;Other sensors such as the gyroscope that can also configure as terminal 900, barometer, drimeter, thermometer, infrared ray sensor, do not repeat them here.
Voicefrequency circuit 160, speaker 161, microphone 162 can provide the audio interface between user and terminal 900.The signal of telecommunication after the voice data conversion that voicefrequency circuit 160 can will receive, is transferred to speaker 161, speaker 161 is converted to acoustical signal output;On the other hand, the acoustical signal of collection is converted to the signal of telecommunication by microphone 162, voice data is converted to after being received by voicefrequency circuit 160, after again voice data output processor 180 being processed, through RF circuit 110 to be sent to such as another terminal, or voice data is exported to memorizer 120 to process further.Voicefrequency circuit 160 is also possible that earphone jack, to provide the communication of peripheral hardware earphone and terminal 900.
WiFi belongs to short range wireless transmission technology, and terminal 900 can help user to send and receive e-mail by WiFi module 170, browse webpage and access streaming video etc., and it has provided the user wireless broadband internet and has accessed.AlthoughFigure 5Show WiFi module 170, but it is understood that, it is also not belonging to must be configured into of terminal 900, can omit in not changing the scope of essence of invention as required completely.
Processor 180 is the control centre of terminal 900, utilize various interface and the various piece of the whole mobile phone of connection, it is stored in the software program in memorizer 120 and/or module by running or performing, and call the data being stored in memorizer 120, perform the various functions of terminal 900 and process data, thus mobile phone is carried out integral monitoring.Optionally, processor 180 can include one or more process core;Preferably, processor 180 can integrated application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.It is understood that above-mentioned modem processor can not also be integrated in processor 180.
Terminal 900 also includes the power supply 190 (such as battery) powered to all parts, preferably, power supply can be logically contiguous with processor 180 by power-supply management system, thus realized the functions such as management charging, electric discharge and power managed by power-supply management system.Power supply 190 can also include one or more direct current or alternating current power supply, recharging system, power failure detection circuit, power supply changeover device or the random component such as inverter, power supply status indicator.
Although not shown, terminal 900 can also include photographic head, bluetooth module etc., does not repeats them here.The most in the present embodiment, the display unit of terminal 900 is touch-screen display, terminal 900 also includes memorizer, and one or more than one program, one of them or more than one program is stored in memorizer, and is configured to be performed to state one by one or more than one processor or more than one program comprises the instruction for carrying out following operation:
Picture is divided, obtains the image macro that described picture includes;
It is predicted described image macro processing, obtains the residual error data of each pixel that described image macro includes;
The residual error data of each pixel included according to described image macro calculates the quantization step of described image macro;
According to the residual error data of each pixel that described quantization step and described image macro include, described image macro is carried out quantification treatment.
Optionally, the residual error data of the described each pixel included according to described image macro calculates the quantization step of described image macro, including:
According to the residual error data of each pixel that described image macro includes, calculate the macro block characteristics value of described image macro;
Determine the range of characteristic values at described macro block characteristics value place;
Obtain quantization step corresponding to the described range of characteristic values quantization step as described image macro.
Optionally, the residual error data of the described each pixel included according to described image macro, calculate the macro block characteristics value of described image macro, including:
The residual error data of each pixel included from described image macro counts the pixel number that each residual error data that default residual error data set includes is corresponding;
The pixel number that each residual error data of including according to described default residual error data set is corresponding, calculates the macro block characteristics value of described image macro.
Optionally, described be predicted described image macro processes, and obtains the residual error data of each pixel that described image macro includes, including:
Use multiple predictive mode to be predicted described image macro respectively processing, obtain the residual error data of each pixel that described image macro under every kind of predictive mode includes.
Optionally, the residual error data of the described each pixel included according to described image macro calculates the quantization step of described image macro, including:
According to the residual error data of each pixel that described image macro under described every kind of predictive mode includes, calculate the macro block characteristics value of described image macro under described every kind of predictive mode respectively;
The macro block characteristics value of described image macro selects from described every kind of predictive mode the macro block characteristics value of maximum;
Determine the range of characteristic values at the macro block characteristics value place of described maximum;
Obtain quantization step corresponding to the described range of characteristic values quantization step as described image macro.
Optionally, the residual error data of the described each pixel included according to described quantization step and described image macro, described image macro is carried out quantification treatment, including:
Obtain the predictive mode that the macro block characteristics value of described maximum is corresponding;
Under predictive mode according to described quantization step and described acquisition, the residual error data of each pixel that described image macro includes, carries out quantification treatment to described image macro.
In embodiments of the present invention, owing to can calculate the quantization step of this image macro according to the residual error data of each pixel that this image macro includes, it is possible to picture to be marked off more image macro, picture is carried out refinement, improve compression ratio.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can be completed by hardware, relevant hardware can also be instructed by program to complete, described program can be stored in a kind of computer-readable recording medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.

Claims (12)

1. the method that picture is carried out quantification treatment, it is characterised in that described method includes:
Picture is divided, obtains the image macro that described picture includes;
It is predicted described image macro processing, obtains the residual of each pixel that described image macro includes Difference data;
The residual error data of each pixel included according to described image macro calculates the quantization of described image macro Step-length;
According to the residual error data of each pixel that described quantization step and described image macro include, to described Image macro carries out quantification treatment.
2. the method for claim 1, it is characterised in that described include according to described image macro The residual error data of each pixel calculates the quantization step of described image macro, including:
According to the residual error data of each pixel that described image macro includes, calculate described image macro Macro block characteristics value;
Determine the range of characteristic values at described macro block characteristics value place;
Obtain quantization step corresponding to the described range of characteristic values quantization step as described image macro.
3. method as claimed in claim 2, it is characterised in that described include according to described image macro The residual error data of each pixel, calculates the macro block characteristics value of described image macro, including:
The residual error data of each pixel included from described image macro counts default residual error data set The pixel number that each residual error data of including is corresponding;
The pixel number that each residual error data of including according to described default residual error data set is corresponding, meter Calculate the macro block characteristics value of described image macro.
4. the method for claim 1, it is characterised in that described described image macro is predicted Process, obtain the residual error data of each pixel that described image macro includes, including:
Use multiple predictive mode to be predicted described image macro respectively processing, obtain every kind of predictive mode Under the residual error data of each pixel that includes of described image macro.
5. method as claimed in claim 4, it is characterised in that described include according to described image macro The residual error data of each pixel calculates the quantization step of described image macro, including:
According to the residual error data of each pixel that described image macro under described every kind of predictive mode includes, point Do not calculate the macro block characteristics value of described image macro under described every kind of predictive mode;
The macro block characteristics value of described image macro selects from described every kind of predictive mode the macro block characteristics of maximum Value;
Determine the range of characteristic values at the macro block characteristics value place of described maximum;
Obtain quantization step corresponding to the described range of characteristic values quantization step as described image macro.
6. method as claimed in claim 5, it is characterised in that described according to described quantization step with described The residual error data of each pixel that image macro includes, carries out quantification treatment to described image macro, including:
Obtain the predictive mode that the macro block characteristics value of described maximum is corresponding;
Each pixel that under predictive mode according to described quantization step and described acquisition, described image macro includes The residual error data of point, carries out quantification treatment to described image macro.
7. the device that picture is carried out quantification treatment, it is characterised in that described device includes:
Divide module, for picture is divided, obtain the image macro that described picture includes;
Prediction module, for described image macro is predicted process, obtains what described image macro included The residual error data of each pixel;
Computing module, the residual error data of each pixel for including according to described image macro calculates described The quantization step of image macro;
Quantization modules, residual for each pixel of including according to described quantization step and described image macro Difference data, carries out quantification treatment to described image macro.
8. device as claimed in claim 7, it is characterised in that described computing module includes:
First computing unit, the residual error data of each pixel for including according to described image macro, meter Calculate the macro block characteristics value of described image macro;
First determines unit, for determining the range of characteristic values at described macro block characteristics value place;
First acquiring unit, grand as described image for obtaining quantization step corresponding to described range of characteristic values The quantization step of block.
9. device as claimed in claim 8, it is characterised in that described first computing unit includes:
Statistics subelement, counts for the residual error data of each pixel included from described image macro Preset the pixel number that each residual error data of including of residual error data set is corresponding;
Computation subunit, corresponding for each residual error data included according to described default residual error data set Pixel number, calculate the macro block characteristics value of described image macro.
10. device as claimed in claim 7, it is characterised in that
Described prediction module, specifically for using multiple predictive mode to be predicted described image macro respectively Process, obtain the residual error data of each pixel that described image macro under every kind of predictive mode includes.
11. devices as claimed in claim 10, it is characterised in that described computing module includes:
Second computing unit, for each picture included according to described image macro under described every kind of predictive mode The residual error data of vegetarian refreshments, calculates the macro block characteristics value of described image macro under described every kind of predictive mode respectively;
Select unit, for the macro block characteristics value of described image macro selecting from described every kind of predictive mode Maximum macro block characteristics value;
Second determines unit, for determining the range of characteristic values at the macro block characteristics value place of described maximum;
Second acquisition unit, grand as described image for obtaining quantization step corresponding to described range of characteristic values The quantization step of block.
12. methods as claimed in claim 11, it is characterised in that described quantization modules includes:
3rd acquiring unit, for obtaining the predictive mode that the macro block characteristics value of described maximum is corresponding;
Quantifying unit, described image macro under the predictive mode according to described quantization step and described acquisition Including the residual error data of each pixel, described image macro is carried out quantification treatment.
CN201510093071.5A 2015-03-02 2015-03-02 A kind of pair of picture carries out the method and device of quantification treatment Active CN105992001B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510093071.5A CN105992001B (en) 2015-03-02 2015-03-02 A kind of pair of picture carries out the method and device of quantification treatment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510093071.5A CN105992001B (en) 2015-03-02 2015-03-02 A kind of pair of picture carries out the method and device of quantification treatment

Publications (2)

Publication Number Publication Date
CN105992001A true CN105992001A (en) 2016-10-05
CN105992001B CN105992001B (en) 2019-09-20

Family

ID=57039329

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510093071.5A Active CN105992001B (en) 2015-03-02 2015-03-02 A kind of pair of picture carries out the method and device of quantification treatment

Country Status (1)

Country Link
CN (1) CN105992001B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108156457A (en) * 2017-12-27 2018-06-12 郑州云海信息技术有限公司 A kind of JPEG turns the method for encoding images and device of WebP
CN109738008A (en) * 2019-01-15 2019-05-10 朱桂湘 Live resolution analysis platform
CN110300304A (en) * 2019-06-28 2019-10-01 广东中星微电子有限公司 Compress the method and apparatus of image set
CN111923599A (en) * 2020-09-18 2020-11-13 季华实验室 Method and equipment for calculating step length of spray head module, storage medium and ink-jet printer
CN117037226A (en) * 2023-10-09 2023-11-10 深圳市聚诚智能有限公司 Optical fingerprint module and fingerprint identification display device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0884844A2 (en) * 1997-06-11 1998-12-16 Nec Corporation Adaptive filter, step size control method thereof, and record medium therefor
CN102413353A (en) * 2011-12-28 2012-04-11 清华大学 Method for allocating code rates of multi-view video and depth graph in stereo video encoding process
CN103843338A (en) * 2011-10-04 2014-06-04 汤姆逊许可公司 Adaptive quantization of intra-encoding image blocks
CN103957410A (en) * 2013-12-30 2014-07-30 南京邮电大学 I-frame code rate control method based on residual frequency domain complexity
CN104954792A (en) * 2014-03-24 2015-09-30 兴唐通信科技有限公司 Method and device for carrying out subjective video quality optimization coding on P-frame sequence

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0884844A2 (en) * 1997-06-11 1998-12-16 Nec Corporation Adaptive filter, step size control method thereof, and record medium therefor
CN103843338A (en) * 2011-10-04 2014-06-04 汤姆逊许可公司 Adaptive quantization of intra-encoding image blocks
CN102413353A (en) * 2011-12-28 2012-04-11 清华大学 Method for allocating code rates of multi-view video and depth graph in stereo video encoding process
CN103957410A (en) * 2013-12-30 2014-07-30 南京邮电大学 I-frame code rate control method based on residual frequency domain complexity
CN104954792A (en) * 2014-03-24 2015-09-30 兴唐通信科技有限公司 Method and device for carrying out subjective video quality optimization coding on P-frame sequence

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108156457A (en) * 2017-12-27 2018-06-12 郑州云海信息技术有限公司 A kind of JPEG turns the method for encoding images and device of WebP
CN108156457B (en) * 2017-12-27 2021-10-15 郑州云海信息技术有限公司 Image coding method and device for converting JPEG (Joint photographic experts group) into WebP (Web WebP)
CN109738008A (en) * 2019-01-15 2019-05-10 朱桂湘 Live resolution analysis platform
CN110300304A (en) * 2019-06-28 2019-10-01 广东中星微电子有限公司 Compress the method and apparatus of image set
CN110300304B (en) * 2019-06-28 2022-04-12 广东中星微电子有限公司 Method and apparatus for compressing image sets
CN111923599A (en) * 2020-09-18 2020-11-13 季华实验室 Method and equipment for calculating step length of spray head module, storage medium and ink-jet printer
CN117037226A (en) * 2023-10-09 2023-11-10 深圳市聚诚智能有限公司 Optical fingerprint module and fingerprint identification display device
CN117037226B (en) * 2023-10-09 2024-02-27 深圳市聚诚智能有限公司 Optical fingerprint module and fingerprint identification display device

Also Published As

Publication number Publication date
CN105992001B (en) 2019-09-20

Similar Documents

Publication Publication Date Title
CN105243638B (en) A kind of method and apparatus uploading image
CN109120926B (en) Predicting mode selecting method, device and medium
CN104834529A (en) Method and device for optimizing performance of application
CN106604314B (en) WiFi roaming network access method and terminal equipment
CN106911848B (en) Method for outputting prompt message and terminal equipment
CN106991034A (en) A kind of method and apparatus and mobile terminal for monitoring interim card
CN105992001A (en) Method and device for carrying out quantification processing on picture
CN104837042A (en) Digital multimedia data encoding method and apparatus
CN108337533B (en) Video compression method and device
CN104935955A (en) Live video stream transmission method, device and system
WO2018145477A1 (en) Network access method and terminal
CN104519269A (en) Finder frame display method and finder frame display device of photographic equipment
CN103177217A (en) File scan method, file scan system, client-side and server
CN107330867B (en) Image synthesis method, image synthesis device, computer-readable storage medium and computer equipment
CN107977261A (en) Method, equipment, mobile terminal and the computer-readable storage medium of limiting process
CN104915625A (en) Face identification method and apparatus
CN106851784B (en) network scanning method and terminal equipment
CN109062643A (en) A kind of display interface method of adjustment, device and terminal
CN106023088A (en) Method and device for adjusting image brightness
CN104918130A (en) Methods for transmitting and playing multimedia information, devices and system
CN103079047B (en) A kind of method of parameter adjustment and terminal
CN105187831B (en) A kind of method and apparatus that image is compressed
CN108924357A (en) A kind of method, apparatus and terminal that adjustment terminal desktop is shown
CN106815077B (en) Data processing method based on intelligent device architecture and intelligent device
CN108737619A (en) A kind of call control method of terminal, device and terminal

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant