CN105791849B - Picture compression method and device - Google Patents

Picture compression method and device Download PDF

Info

Publication number
CN105791849B
CN105791849B CN201410828573.3A CN201410828573A CN105791849B CN 105791849 B CN105791849 B CN 105791849B CN 201410828573 A CN201410828573 A CN 201410828573A CN 105791849 B CN105791849 B CN 105791849B
Authority
CN
China
Prior art keywords
quality
input picture
factor
picture
compression
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.)
Active
Application number
CN201410828573.3A
Other languages
Chinese (zh)
Other versions
CN105791849A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201410828573.3A priority Critical patent/CN105791849B/en
Priority to PCT/CN2015/090040 priority patent/WO2016101663A1/en
Publication of CN105791849A publication Critical patent/CN105791849A/en
Application granted granted Critical
Publication of CN105791849B publication Critical patent/CN105791849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/41Bandwidth or redundancy reduction

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The invention discloses picture compression method and devices, wherein using the initial mass factor for obtaining input picture;According to the initial mass factor and the default minimum quality factor, the evaluating objective quality score of the input picture after weight compression processing is calculated;The quality factor of the input picture is according to the evaluating objective quality score default picture evaluating objective quality score corresponding with the input picture type, it is adaptively adjusted according to preset rules, stop compression process when the evaluating objective quality score of compression of images meets preset threshold range, the first quality factor is calculated;According to the subjective picture quality factor priori knowledge based on mass data Knowledge Acquirement, the first quality factor is finely adjusted, determines the second quality factor;Compression processing is carried out to the input picture according to first quality factor, the second quality factor.It solves the problems, such as that visual quality effect is not high when image compression ratio is higher, improves the visual quality effect of compression of images.

Description

Picture compression method and device
Technical field
The present invention relates to the communications fields, in particular to a kind of picture compression method and device.
Background technique
With the development of net torpedo technology, each terminal applies such as computer, mobile phone are constantly enriched and development, so that The use ratio that still image occupies in such applications constantly increases.Consequent is more and more frequent Image Communication Utilization, a large amount of image information while bringing better experience for user, also increase to network transmission bandwidth load The challenge of ability.Simultaneously because also having on different screen to the viewing experience of picture different using gradually being promoted to multi-screen It is required that need to consider the multiresolution storage of picture, display and the problems such as Efficient Compression.Another aspect people are for the clear of image The requirements such as clear degree and high quality are also constantly being promoted, this is sharply increasing the data volume of image itself also.Network The rapid growth and image resolution ratio of piece quantity, which are continuously increased, occupies the media information of huge network bandwidth resources and magnanimity Memory space.In order to solve network congestion caused by image transmitting, the Efficient Compression of image will become the pass of future image communication Key technology, wherein lossy compression then can obtain very high compression ratio on the basis of losing information to a certain degree.Due to big Most applications, which is finally remained through eye-observation, to be carried out, thus guarantee while lossy compression in visual perception with Original image is consistent, can achieve the compression effectiveness of virtually lossless.This visually lossless near lossless compression method, both guaranteed Picture quality does not influence the sensory experience of user, but enable information transmit in image compression ratio have greatly improved, Decline the storage of image greatly with transmission cost.
In the related art, the Image Compression of user oriented experience be intended to make compressed image as close as Original map quality in visual perception, Image Compression in this respect have had more research.But these methods are adopted Image quality evaluating method does not consider human-eye visual characteristic, the pixel qualities and figure of real image after compression of images The visual quality effect of picture is inconsistent.
For in the related technology, visual quality effect not high problem when image compression ratio is higher is not proposed also effective Solution.
Summary of the invention
The present invention provides a kind of picture compression method and devices, at least the above problems.
According to an aspect of the invention, there is provided a kind of picture compression method, comprising: obtain the first prothyl of input picture Measure the factor;According to the initial mass factor and the default minimum quality factor, weight compression processing, meter are carried out to the input picture The evaluating objective quality score of the input picture after calculation weight compression processing;The quality factor of the input picture is according to the visitor Appearance quality evaluation score and the corresponding default picture evaluating objective quality score of the input picture type, according to preset rules into The adaptive adjustment of row, and picture compression is carried out to the input picture again according to quality factor adjusted, until described defeated Enter when the evaluating objective quality score of the compression of images of image meets preset threshold range and stop compression process, is calculated first Quality factor;The first quality factor is carried out according to the subjective picture quality factor priori knowledge based on mass data Knowledge Acquirement Adjustment, determines the second quality factor;The input picture is pressed according to first quality factor and the second quality factor Contracting processing.
Further, according to the initial mass factor and the default minimum quality factor, weight is carried out to the input picture Compression processing calculates the evaluating objective quality score of the input picture after weight compression processing;The quality of the input picture because Son is pressed according to the evaluating objective quality score and the corresponding default picture evaluating objective quality score of the input picture type It is adaptively adjusted according to preset rules, and picture pressure is carried out to the input picture again according to quality factor adjusted Contracting, stops compressed when the evaluating objective quality score of the compression of images of the input picture meets preset threshold range Journey, be calculated the first quality factor include: according to quality factor and objective quality score statistical relationship, determine initial mass because Son is adjusted, and is chosen the quality factor adjusted and is carried out first-time compression to the input picture;By calling quality to comment Valence method compares the image after the first-time compression with original image, to calculate the objective quality of compressed images Evaluation score;The evaluating objective quality score reduces quality factor when being greater than the default picture evaluating objective quality score, The evaluating objective quality score improves quality factor when being less than the default picture evaluating objective quality score, and according to adjustment Quality factor afterwards carries out picture compression to the input picture again, until the objective matter of the compression of images of the input picture Amount evaluation score stops compression process, first quality factor after output calculating when meeting preset threshold range.
Further, the initial mass factor for obtaining input picture includes: before small in the input picture storage size In the case where preset threshold, the input picture is not compressed, direct copying image.
It further, further include at least one of before obtaining the initial mass factor of input picture: described initial In the case that quality factor is less than the minimum quality factor threshold, the input picture is not compressed, direct copying image;It obtains The quantization table for taking the input picture, at a distance from the quantization table is between benchmark table or variance is more than or equal to preset threshold In the case where, the input picture is saved according to the quantization table.
Further obtain according to the input picture subjective picture quality factor priori knowledge determine the second mass because Son includes but is not limited to: being finely adjusted according to the input picture shading value got to the first quality factor, determines the second mass The factor;The first quality factor is finely adjusted according to the input picture type got, determines the second quality factor.
According to another aspect of the present invention, a kind of picture compression device is additionally provided, comprising: first obtains module, uses In the initial mass factor for obtaining input picture;Weight compression module, according to the initial mass factor and default minimum quality because Son carries out weight compression processing to the input picture, calculates the evaluating objective quality point of the input picture after weight compression processing Number;Module is adjusted, the quality factor of the input picture is according to the evaluating objective quality score and the input picture type Corresponding default picture evaluating objective quality score, is adaptively adjusted according to preset rules, and according to quality adjusted The factor carries out picture compression to the input picture again, until the evaluating objective quality point of the compression of images of the input picture Number stops compression process when meeting preset threshold range, and the first quality factor is calculated;Second obtains module, for according to base The first quality factor is adjusted in the subjective picture quality factor priori knowledge of mass data Knowledge Acquirement, determines the second matter Measure the factor;Compressing processing module, for being carried out according to first quality factor and the second quality factor to the input picture Compression processing.
Further, comprising: the heavy compression module, for being selected according to quality factor and objective quality score statistical relationship Select quality factor when first-time compression, choose the input picture the initial mass factor and the default minimum quality because Intermediate value between sub- threshold value carries out first-time compression to the input picture;By calling quality evaluating method to the first-time compression Image and original image afterwards compares, to calculate the evaluating objective quality score of compressed images;The adjustment mould Block reduces quality factor when being greater than the default picture evaluating objective quality score for the evaluating objective quality score, institute Improve quality factor when stating evaluating objective quality score less than the default picture evaluating objective quality score, and according to adjustment after Quality factor again to the input picture carry out picture compression, until the objective quality of the compression of images of the input picture Evaluation score stops compression process, first quality factor after output calculating when meeting preset threshold range.
Further, comprising: the first copy module, for being less than the feelings of preset threshold in the input picture storage size Under condition, the input picture is not compressed, direct copying image.
Further, comprising: the second copy module, for being less than the minimum quality factor in the initial mass factor In the case where threshold value, the input picture is not compressed, direct copying image;Preserving module, for obtaining the input picture Quantization table, at a distance from the quantization table is between benchmark table or variance be more than or equal to preset threshold in the case where, by institute Input picture is stated to be saved according to the quantization table.
Further, the second acquisition module includes: the first fine-adjusting unit, for according to the input picture shading value got First quality factor is finely adjusted, determines the second quality factor;Second fine-adjusting unit, for according to the input picture got Type is finely adjusted the first quality factor, determines the second quality factor.
Through the invention, using the initial mass factor for obtaining input picture;According to the initial mass factor and preset most Low quality factors carry out weight compression processing to the input picture, and the objective quality of the input picture is commented after calculating weight compression processing Valence score;The quality factor of the input picture is according to the evaluating objective quality score default figure corresponding with the input picture type Piece evaluating objective quality score is adaptively adjusted according to preset rules, and according to quality factor adjusted again to this Input picture carries out picture compression, until the evaluating objective quality score of the compression of images of the input picture meets preset threshold model Stop compression process when enclosing, the first quality factor is calculated;According to the subjective picture quality based on mass data Knowledge Acquirement Factor priori knowledge, the first quality factor is finely adjusted, determines the second quality factor;According to first quality factor, second Quality factor carries out compression processing to the input picture.Solve image compression ratio it is higher when visual quality effect is not high asks Topic, improves the visual quality effect of compression of images.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present invention, constitutes part of this application, this hair Bright illustrative embodiments and their description are used to explain the present invention, and are not constituted improper limitations of the present invention.In the accompanying drawings:
Fig. 1 is a kind of flow chart of picture compression method according to an embodiment of the present invention;
Fig. 2 is a kind of structural block diagram of picture compression device according to an embodiment of the present invention;
Fig. 3 is the flow chart that image vision lossless compression according to the preferred embodiment of the invention is realized;
Fig. 4 is a kind of customized type mass picture compress technique of user oriented experience according to the preferred embodiment of the invention Flow chart;
Fig. 5 is a kind of customized type mass picture compress technique of user oriented experience according to the preferred embodiment of the invention Schematic diagram.
Specific embodiment
Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and in combination with Examples.It should be noted that not conflicting In the case of, the features in the embodiments and the embodiments of the present application can be combined with each other.
A kind of online testing management method is provided in the present embodiment, and Fig. 1 is a kind of figure according to an embodiment of the present invention The flow chart of piece compression method, as shown in Figure 1, the process includes the following steps:
Step S102 obtains the initial mass factor of input picture;
Step S104 carries out weight contracting to the input picture according to the initial mass factor and the default minimum quality factor Processing calculates the evaluating objective quality score of the input picture after weight compression processing;
Step S106, the quality factor of the input picture is according to the evaluating objective quality score and the input picture type pair The default picture evaluating objective quality score answered, is adaptively adjusted according to preset rules, and according to quality adjusted because Son carries out picture compression to the input picture again, until the evaluating objective quality score of the compression of images of the input picture meets Stop compression process when preset threshold range, the first quality factor is calculated;
Step S108, according to the subjective picture quality factor priori knowledge based on mass data Knowledge Acquirement to the first mass The factor is adjusted, and determines the second quality factor;
Step S110 carries out compression processing to the input picture according to the first quality factor and the second quality factor.
Through the above steps, the initial mass factor of input picture is obtained;According to the initial mass factor and preset minimum Quality factor carries out weight compression processing to the input picture, calculates the evaluating objective quality of the input picture after weight compression processing Score;The quality factor of the input picture is according to the evaluating objective quality score default picture corresponding with the input picture type Evaluating objective quality score is adaptively adjusted according to preset rules, and again defeated to this according to quality factor adjusted Enter image and carry out picture compression, until the evaluating objective quality score of the compression of images of the input picture meets preset threshold range When stop compression process, the first quality factor is calculated;According to the subjective picture quality based on mass data Knowledge Acquirement because Sub- priori knowledge, the first quality factor is finely adjusted, determines the second quality factor;According to first quality factor, the second matter It measures the factor pair input picture and carries out compression processing.Solve the problems, such as that visual quality effect is not high when image compression ratio is higher, Improve the visual quality effect of compression of images.
In above-described embodiment, above-mentioned steps S104 may include: according to quality factor and objective quality score statistical relationship, It determines that the initial mass factor is adjusted, chooses the quality factor adjusted and first-time compression is carried out to the input picture, or Can also select quality factor when first-time compression in binary chop method, choose the input picture the initial mass factor and Intermediate value between the default minimum quality factor threshold;
By calling quality evaluating method to compare the image after the first-time compression with original image, to calculate compression Evaluating objective quality score of image afterwards.
In above-described embodiment, above-mentioned steps S106 may include: that the evaluating objective quality score is greater than the default picture visitor Quality factor is reduced when appearance quality evaluation score, which is less than the default picture evaluating objective quality score Shi Tigao quality factor, and picture compression is carried out to the input picture again according to quality factor adjusted, until the input The evaluating objective quality score of the compression of images of image stops compression process, being somebody's turn to do after output calculating when meeting preset threshold range First quality factor.
In the present embodiment, may include: before obtaining the initial mass factor of input picture
In the case where the input picture storage size is less than preset threshold, which is not compressed, direct copying Image.
In the case where the initial mass factor is less than the minimum quality factor threshold, which is not compressed, directly Connect copy image.
The quantization table for obtaining the input picture, at a distance from the quantization table is between benchmark table or variance is more than or equal in advance If in the case where threshold value, which is saved according to the quantization table.
In the present embodiment, the second mass determined according to the input picture subjective picture quality factor priori knowledge is obtained The factor can be the database for pre-establishing the input picture subjective picture quality factor, attribute of the input user's subjectivity to picture Determining quality factor generates the database after the picture progress subjective picture quality factor to magnanimity is evaluated, below Illustrate how to determine the second mass, for example, can according to the input picture shading value got to the first quality factor into Row fine tuning, determines the second quality factor;The first quality factor can also be finely adjusted according to the input picture type got, Determine the second quality factor.
A kind of picture compression device is additionally provided in the present embodiment, and the device is real for realizing above-described embodiment and preferably Mode is applied, the descriptions that have already been made will not be repeated.As used below, the soft of predetermined function may be implemented in term " module " The combination of part and/or hardware.Although device described in following embodiment is preferably realized with software, hardware, or The realization of the combination of software and hardware is also that may and be contemplated.
Fig. 2 is a kind of structural block diagram of picture compression device according to an embodiment of the present invention, as shown in Fig. 2, the device packet It includes:
First obtains module 202, for obtaining the initial mass factor of input picture;
Weight compression module 204 carries out weight to the input picture according to the initial mass factor and the default minimum quality factor Compression processing calculates the evaluating objective quality score of the input picture after weight compression processing;
Module 206 is adjusted, the quality factor of the input picture is according to the evaluating objective quality score and the input picture class The corresponding default picture evaluating objective quality score of type, is adaptively adjusted according to preset rules, and according to matter adjusted It measures the factor and picture compression is carried out to the input picture again, until the evaluating objective quality score of the compression of images of the input picture Stop compression process when meeting preset threshold range, the first quality factor is calculated;
Second obtains module 208, for being known according to the subjective picture quality factor priori based on mass data Knowledge Acquirement Knowledge is adjusted the first quality factor, determines the second quality factor;
Compressing processing module 210, for being carried out according to first quality factor and the second quality factor to the input picture Compression processing.
Through the above steps, using the initial mass factor for obtaining input picture;According to the initial mass factor and preset The minimum quality factor carries out weight compression processing to the input picture, calculates the objective quality of the input picture after weight compression processing Evaluation score;The quality factor of the input picture is corresponding with the input picture type default according to the evaluating objective quality score Picture evaluating objective quality score is adaptively adjusted according to preset rules, and again right according to quality factor adjusted The input picture carries out picture compression, until the evaluating objective quality score of the compression of images of the input picture meets preset threshold Stop compression process when range, the first quality factor is calculated;According to the subjective picture matter based on mass data Knowledge Acquirement Factor priori knowledge is measured, the first quality factor is finely adjusted, determines the second quality factor;According to first quality factor, Two quality factors carry out compression processing to the input picture.Solve image compression ratio it is higher when visual quality effect is not high asks Topic, improves the visual quality effect of compression of images.
In the present embodiment, the heavy compression module 204 can be used for closing according to quality factor and objective quality score statistics Quality factor when system's selection first-time compression, the initial mass factor pair input picture for choosing the input picture carry out for the first time Compression;It can be used for selecting quality factor when first-time compression according to binary chop method, choose being somebody's turn to do for the input picture Intermediate value between the initial mass factor and the default minimum quality factor threshold carries out first-time compression to the input picture;Pass through tune The image after the first-time compression is compared with original image with quality evaluating method, so that this for calculating compressed images is objective Quality evaluation score;
The adjustment module 206, when being greater than the default picture evaluating objective quality score for the evaluating objective quality score Quality factor is reduced, which improves quality factor when being less than the default picture evaluating objective quality score, And picture compression is carried out to the input picture again according to quality factor adjusted, until the compression of images of the input picture Evaluating objective quality score stops compression process, first quality factor after output calculating when meeting preset threshold range.
In the present embodiment, the device further include:
First copy module, is used in the case where the input picture storage size is less than preset threshold, to the input figure As not compressing, direct copying image.
Second copy module, is used in the case where the initial mass factor is less than the minimum quality factor threshold, to this Input picture does not compress, direct copying image;
Preserving module, for obtaining the quantization table of the input picture, at a distance from the quantization table is between benchmark table or In the case that variance is more than or equal to preset threshold, which is saved according to the quantization table.
In the present embodiment, the second acquisition module 208 includes: the first fine-adjusting unit, for according to the input figure got As shading value is finely adjusted the first quality factor, the second quality factor is determined;Second fine-adjusting unit is got for basis Input picture type is finely adjusted the first quality factor, determines the second quality factor.
Below with reference to preferred embodiment and implement scene, the present invention is described in detail.
This preferred embodiment proposes a kind of customized type mass picture compress technique of user oriented experience, comprehensively considers picture The light and shade contrast of quality and image after compression, and the relationship between picture type, enable to image to have higher compression Guarantee the perceived quality of image while rate, the method for this visually approximate lossless compression both ensure that the perception body of user Test and effectively slow down the pressure of image storage and transmission.
In view of Joint Photographic Experts Group (Joint Photographic Experts Group, referred to as JPEG) base Wire compression algorithm is the characteristic based on 8*8 splits' positions, this algorithm frame uses the number quality for block encoding image (Block Based Coding Quality, referred to as BBCQ) quality evaluating method, the algorithm by three measurement factors compositions, Error, blocky effect and texture are distorted these three distortions between having respectively corresponded the pixel that image can generate during block coding Factor.
In real image compression experiment, discovery picture type, picture light and shade can generate one to image subjective quality assessment Fixing is rung.The quality factor that the quality factor and eye-observation directly obtained using BBCQ quality evaluating method is obtained exists certain Difference, certain images are under identical image quality evaluation, and the picture quality that human eye perceives seems lower, and some is then Obviously compressed output image can further be compressed.So using the same of method for evaluating objective quality BBCQ When, by the introduction of image intensities, picture quality can be made to be more nearly the received visual image quality of human visual system, Not the shortcomings that BBCQ evaluation method does not account for human-eye visual characteristic before improving, for picture different type and shading value pair The quality factor of image is finely adjusted.
This preferred embodiment discloses a kind of customized type mass picture compress technique of user oriented experience, can effectively drop Low image meets requirement of the user to image superior quality clarity in transmission and cost when storage.
Fig. 3 is the flow chart that image vision lossless compression according to the preferred embodiment of the invention is realized, the realization of this algorithm Step are as follows:
Step S302 obtains the initial mass factor of input picture first;
Step S304 selects quality factor when first-time compression according to binary chop method, chooses input picture here The initial mass factor and minimum quality factor threshold between intermediate value;
Step S306 contracts input picture weight with JPEG baseline algorithm according to the intermediate value of selection;
Step S308, by calling quality evaluating method to compare the compressed image and original image, to calculate The quality evaluation score of compressed images out;
Step S310 carries out adaptive adjustment with the evaluation score, comments when evaluation score is greater than ideal picture quality Reduce quality factor when valence score, less than when then improve quality factor, reenter image weight compression section, until compression of images Evaluation score stop compression process when meeting ideal range, output calculate after quality factor;
Step S312 carries out appropriate adjustment to the quality factor of output according to the type of picture and light and shade contrast, obtains The objective image quality factor, the heavy compressed image of finally output.
This preferred embodiment additionally provides a kind of customized type mass picture compress technique of user oriented experience,
Fig. 4 is a kind of customized type mass picture compress technique of user oriented experience according to the preferred embodiment of the invention Flow chart one, method includes the following steps:
Step S402 first judges the image of input, if image abnormity or very small, does not compress directly Copy image;
Step S404, the quantization table t and original quality factor origQ for obtaining image do not compress if origQ≤60 Direct copying image;
Step S406 judges whether the quantization table t of image is criterion and quantity table, that is, judges the quantization table t and benchmark of image Change the distance between table stdBase (or variance) Var, if Var >=10 if image saved according to quantization table;Otherwise Go to step S408;
Step S408 between the range scope=[60, origQ] of binary chop, takes scope's using binary chop Intermediate value is as the quality factor q0 for calculating beginning.
Step S410 compresses image using initial q0, calculates BBCQ score s and exports if s meets threshold condition Image;Otherwise turn S412;
Step S412, binary chop method: setting the number of iterations upper limit iter=3 enables initial left=60, right Then=q0, q=(left+right)/2 compress image with JPEG baseline algorithm.By calling BBCQ quality evaluating method It compares to the compressed image with original image, to calculate the evaluation score of BBCQ.With the evaluation score to quality Factor adjustment, the left=q+1 when evaluation score is less than ideal image quality evaluation score, right=q-1 when being greater than, weight Newly enter image recompression part and compression processing is carried out to input picture.Until the evaluation score of compression of images meets ideal range When stop iterative process or until the number of iterations terminates, export the quality factor q of calculating at this time.
Step S414 needs the value of adjustment q appropriate (according to reality according to the q that step S412 is calculated according to picture type The value of experimental observation adjustment q), i.e. q=q+deltaQ1;
Step S416 directly operates the quality factor of compression image according to image intensities, if the big Mr. Yu of image intensities When one threshold value, then the quality factor of algorithm generation is reduced;If image intensities are less than a certain threshold value, increase quality factor, i.e. q =q+deltaQ2;
Step S418, final picture quality factor q=q+deltaQ1+deltaQ2 are compressed with the quality factor and are exported Image.
Judge described in the step S406 image quantization table t and benchmark quantization the distance between table stdBase (or Person's variance) Var, calculation formula is as follows:
In formula, 64 be the element number for quantifying table, and t is the quantization table of image, the luminance quantization table on the basis of stdBase, Its matrix element be stdBase [64]=
16, 11, 10, 16, 24, 40, 51, 61,
12, 12, 14, 19, 26, 58, 60, 55,
14, 13, 16, 24, 40, 57, 69, 56,
14, 17, 22, 29, 51, 87, 80, 62,
18, 22, 37, 56, 68,109,103, 77,
24, 35, 55, 64, 81,104,113, 92,
49, 64, 78, 87,103,121,120,101,
72, 92, 95, 98,112,100,103, 99
};
This preferred embodiment can be made picture quality be more nearly human visual system and be connect by the introduction of image intensities The shortcomings that visual image quality of receipts, quality evaluating method does not account for human-eye visual characteristic before improving.
This preferred embodiment is adjusted final compression quality, that is, quality factor by the introducing of picture type, can Preferably to reflect the pixel qualities of the real image of compressed images, to be promoted to the adjustment of image compression ratio and most The visual quality effect of the compression image exported eventually.
In the particular embodiment, in terms of image compression ratio, original picture size 229KB, picture size after compression For 89.5KB, compression ratio is about 39%.In terms of picture quality, although picture compression is very much, compression after picture and Original image there is no any difference, achieve the effect that virtually lossless compresses.It can be seen that comprehensively consider picture type and After these factors of picture light and shade contrast, algorithm can be carried out picture reconnaissance with shading value difference according to the type of picture Individually processing.However size rises there is no apparent after compression of images, has still reached high compression compared to original image Effect.It can be seen that picture type and shading value are capable of the adjustment of further aid progress image compression ratio really, make image full It is further compressed under the premise of sufficient virtually lossless.Compared to image quality evaluation algorithm before, improved algorithm More highlight the consistency of picture quality and visual perception.
Fig. 5 is a kind of customized type mass picture compress technique of user oriented experience according to the preferred embodiment of the invention Schematic diagram, as shown in Figure 5.
Basic procedure is described as follows
(1) predominantly the corresponding objective picture quality evaluation of BBCQ is arranged for different type image data in initiation parameter The some parameters being related to are evaluated with subjective picture quality;
(2) picture of input is judged, if picture is abnormal or very small, does not compress direct copying picture.
(3) the quantization table and quality factor origQ for obtaining picture do not compress direct copying figure if origQ≤60 Piece;
(4) whether the quantization table for judging picture is criterion and quantity table, i.e. judgement quantization table variance var, if var >=10 Then picture is saved according to quantization table;Otherwise turn (5);
(5) quality factor is initialized, the average value of 60 Yu origQ is taken, for the quality factor of initial JPEG picture weight contracting;
(6) initial quality factor compressed picture is used, BBCQ score s is calculated and is transferred to if s meets threshold condition (8);Otherwise turn (7);
(7) quality factor is adaptively adjusted according to certain rules, re-starts the contracting of JPEG picture weight;
(8) the optimum quality factor exported according to step BBCQ evaluating objective quality, according to what is be arranged in initiation parameter Different type and different shading value quality factors finely tune parameter, are finely adjusted to quality factor, obtaining final picture compression is made Quality factor;
(9) JPEG picture weight contracts, and exports virtually lossless picture.
BBCQ in above-described embodiment can be picture evaluating objective quality.
Obviously, those skilled in the art should be understood that each module of the above invention or each step can be with general Computing device realize that they can be concentrated on a single computing device, or be distributed in multiple computing devices and formed Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored It is performed by computing device in the storage device, and in some cases, it can be to be different from shown in sequence execution herein Out or description the step of, perhaps they are fabricated to each integrated circuit modules or by them multiple modules or Step is fabricated to single integrated circuit module to realize.In this way, the present invention is not limited to any specific hardware and softwares to combine.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, made any to repair Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.

Claims (8)

1. a kind of picture compression method characterized by comprising
Obtain the initial mass factor of input picture;
According to the initial mass factor and the default minimum quality factor, weight compression processing is carried out to the input picture, is calculated The evaluating objective quality score of the input picture after weight compression processing;
The quality factor of the input picture is corresponding pre- according to the evaluating objective quality score and the input picture type If picture evaluating objective quality score is adaptively adjusted according to preset rules, and again according to quality factor adjusted Picture compression is carried out to the input picture, until the evaluating objective quality score of the compression of images of the input picture meets in advance If stopping compression process when threshold range, the first quality factor is calculated;
The first quality factor is adjusted according to the subjective picture quality factor priori knowledge based on mass data Knowledge Acquirement, Determine the second quality factor;
Compression processing is carried out to the input picture according to first quality factor and the second quality factor, wherein obtain root Include but is not limited to according to the second quality factor that the input picture subjective picture quality factor priori knowledge determines:
The first quality factor is finely adjusted according to the input picture shading value got, determines the second quality factor;
The first quality factor is finely adjusted according to the input picture type got, determines the second quality factor.
2. the method according to claim 1, wherein according to the initial mass factor and default minimum quality because Son carries out weight compression processing to the input picture, calculates the evaluating objective quality point of the input picture after weight compression processing Number;The quality factor of the input picture is corresponding default according to the evaluating objective quality score and the input picture type Picture evaluating objective quality score is adaptively adjusted according to preset rules, and again right according to quality factor adjusted The input picture carries out picture compression, presets until the evaluating objective quality score of the compression of images of the input picture meets Stop compression process when threshold range, the first quality factor, which is calculated, includes:
According to quality factor and objective quality score statistical relationship, determines that the initial mass factor is adjusted, choose the adjustment Quality factor afterwards carries out first-time compression to the input picture;
By calling quality evaluating method to compare the image after the first-time compression with original image, thus after calculating compression The evaluating objective quality score of image;
The evaluating objective quality score reduces quality factor, the visitor when being greater than the default picture evaluating objective quality score Appearance quality evaluation score improves quality factor when being less than the default picture evaluating objective quality score, and according to matter adjusted It measures the factor and picture compression is carried out to the input picture again, until the evaluating objective quality of the compression of images of the input picture Score stops compression process, first quality factor after output calculating when meeting preset threshold range.
3. the method according to claim 1, wherein the initial mass factor for obtaining input picture includes: before
In the case where the input picture storage size is less than preset threshold, the input picture is not compressed, direct copying Image.
4. the method according to claim 1, wherein the initial mass factor for obtaining input picture further includes before At least one of:
In the case where the initial mass factor is less than minimum quality factor threshold, the input picture is not compressed, directly Copy image;
The quantization table for obtaining the input picture, at a distance from the quantization table is between benchmark table or variance is more than or equal in advance If in the case where threshold value, the input picture is saved according to the quantization table.
5. a kind of picture compression device characterized by comprising
First obtains module, for obtaining the initial mass factor of input picture;
Weight compression module carries out weight to the input picture according to the initial mass factor and the default minimum quality factor Contracting processing calculates the evaluating objective quality score of the input picture after weight compression processing;
Module is adjusted, the quality factor of the input picture is according to the evaluating objective quality score and the input picture type Corresponding default picture evaluating objective quality score, is adaptively adjusted according to preset rules, and according to quality adjusted The factor carries out picture compression to the input picture again, until the evaluating objective quality point of the compression of images of the input picture Number stops compression process when meeting preset threshold range, and the first quality factor is calculated;
Second obtains module, for subjective picture quality factor priori knowledge of the basis based on mass data Knowledge Acquirement to first Quality factor is adjusted, and determines the second quality factor;
Compressing processing module, for being compressed according to first quality factor and the second quality factor to the input picture Processing, wherein second, which obtains module, includes:
First fine-adjusting unit determines for being finely adjusted according to the input picture shading value that gets to the first quality factor Two quality factors;
Second fine-adjusting unit determines second for being finely adjusted according to the input picture type got to the first quality factor Quality factor.
6. device according to claim 5 characterized by comprising
The heavy compression module, quality when for according to quality factor and objective quality score statistical relationship selection first-time compression The factor chooses input picture described in the initial mass factor pair of the input picture and carries out first-time compression;By calling matter It measures evaluation method to compare the image after the first-time compression with original image, to calculate the described objective of compressed images Quality evaluation score;
The adjustment module drops when being greater than the default picture evaluating objective quality score for the evaluating objective quality score Low quality factors, the evaluating objective quality score be less than the default picture evaluating objective quality score when improve quality because Son, and picture compression is carried out to the input picture again according to quality factor adjusted, until the figure of the input picture Stop compression process, first matter after output calculating when meeting preset threshold range as the evaluating objective quality score of compression Measure the factor.
7. device according to claim 5 characterized by comprising
First copy module, for being schemed to the input in the case where the input picture storage size is less than preset threshold As not compressing, direct copying image.
8. device according to claim 5 characterized by comprising
Second copy module, is used in the case where the initial mass factor is less than minimum quality factor threshold, to described defeated Enter image not compress, direct copying image;
Preserving module, for obtaining the quantization table of the input picture, at a distance from the quantization table is between benchmark table or In the case that variance is more than or equal to preset threshold, the input picture is saved according to the quantization table.
CN201410828573.3A 2014-12-25 2014-12-25 Picture compression method and device Active CN105791849B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410828573.3A CN105791849B (en) 2014-12-25 2014-12-25 Picture compression method and device
PCT/CN2015/090040 WO2016101663A1 (en) 2014-12-25 2015-09-18 Image compression method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410828573.3A CN105791849B (en) 2014-12-25 2014-12-25 Picture compression method and device

Publications (2)

Publication Number Publication Date
CN105791849A CN105791849A (en) 2016-07-20
CN105791849B true CN105791849B (en) 2019-08-06

Family

ID=56149184

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410828573.3A Active CN105791849B (en) 2014-12-25 2014-12-25 Picture compression method and device

Country Status (2)

Country Link
CN (1) CN105791849B (en)
WO (1) WO2016101663A1 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791846B (en) * 2016-12-09 2019-12-13 浙江宇视科技有限公司 Method and device for adjusting image coding quality factor
CN106683141A (en) * 2016-12-12 2017-05-17 中国航空工业集团公司西安航空计算技术研究所 Configurable quick texture compressing method
CN108805943B (en) 2017-04-27 2022-12-09 腾讯科技(深圳)有限公司 Image transcoding method and device
CN110298895A (en) * 2019-05-08 2019-10-01 平安科技(深圳)有限公司 Picture compression method, apparatus, equipment and storage medium based on artificial intelligence
CN113037697B (en) * 2019-12-25 2023-07-14 深信服科技股份有限公司 Video frame processing method and device, electronic equipment and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968419A (en) * 2005-11-16 2007-05-23 三星电子株式会社 Image encoding method and apparatus and image decoding method and apparatus using characteristics of the human visual system
CN102036098A (en) * 2010-12-01 2011-04-27 北京航空航天大学 Full-reference type image quality evaluation method based on visual information amount difference
CN102333233A (en) * 2011-09-23 2012-01-25 宁波大学 Stereo image quality objective evaluation method based on visual perception
CN102917157A (en) * 2012-10-19 2013-02-06 北京快联科技有限公司 Image compression system and method based on human visual system
CN103810694A (en) * 2012-11-15 2014-05-21 腾讯科技(深圳)有限公司 Quality factor obtaining method and device in image compression

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007028598A (en) * 2005-06-16 2007-02-01 Oki Electric Ind Co Ltd Compression coding apparatus and compression coding method
US8121417B2 (en) * 2007-03-19 2012-02-21 General Electric Company Processing of content-based compressed images
CN102868847B (en) * 2012-10-19 2014-12-10 北京奇虎科技有限公司 Image type based processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1968419A (en) * 2005-11-16 2007-05-23 三星电子株式会社 Image encoding method and apparatus and image decoding method and apparatus using characteristics of the human visual system
CN102036098A (en) * 2010-12-01 2011-04-27 北京航空航天大学 Full-reference type image quality evaluation method based on visual information amount difference
CN102333233A (en) * 2011-09-23 2012-01-25 宁波大学 Stereo image quality objective evaluation method based on visual perception
CN102917157A (en) * 2012-10-19 2013-02-06 北京快联科技有限公司 Image compression system and method based on human visual system
CN103810694A (en) * 2012-11-15 2014-05-21 腾讯科技(深圳)有限公司 Quality factor obtaining method and device in image compression

Also Published As

Publication number Publication date
CN105791849A (en) 2016-07-20
WO2016101663A1 (en) 2016-06-30

Similar Documents

Publication Publication Date Title
CN105791849B (en) Picture compression method and device
Narwaria et al. HDR-VQM: An objective quality measure for high dynamic range video
CN107371028B (en) A kind of high-quality video coding method adapting to bandwidth
Zhou et al. Subjective quality analyses of stereoscopic images in 3DTV system
CN104378636B (en) A kind of video encoding method and device
Papadopoulos et al. A video texture database for perceptual compression and quality assessment
CN104469386B (en) A kind of perception method for encoding stereo video of the proper appreciable error model based on DOF
CN102708567B (en) Visual perception-based three-dimensional image quality objective evaluation method
CN110136057B (en) Image super-resolution reconstruction method and device and electronic equipment
CN103051901A (en) Video data coding device and video data encoding method
CN108574841A (en) A kind of coding method and device based on adaptive quantizing parameter
CN102843572B (en) Phase-based stereo image quality objective evaluation method
CN106131670A (en) A kind of adaptive video coding method and terminal
CN105049838A (en) Objective evaluation method for compressing stereoscopic video quality
CN111724316B (en) Method and apparatus for processing high dynamic range image
CN108810530A (en) A kind of AVC bit rate control methods based on human visual system
CN104994382A (en) Optimization method for sensing rate distortion
CN103338379A (en) Stereoscopic video objective quality evaluation method based on machine learning
CN111656781A (en) System and method for image signal processor tuning using reference images
Barkowsky et al. On the perceptual similarity of realistic looking tone mapped high dynamic range images
Zhang et al. Entropy of primitive: A top-down methodology for evaluating the perceptual visual information
Sazzad et al. Spatial features based no reference image quality assessment for JPEG2000
CN102999911A (en) Three-dimensional image quality objective evaluation method based on energy diagrams
CN103200420A (en) Three-dimensional picture quality objective evaluation method based on three-dimensional visual attention
Ponomarenko et al. Statistical evaluation of no-reference image visual quality metrics

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