CN110300304A - Compress the method and apparatus of image set - Google Patents

Compress the method and apparatus of image set Download PDF

Info

Publication number
CN110300304A
CN110300304A CN201910578700.1A CN201910578700A CN110300304A CN 110300304 A CN110300304 A CN 110300304A CN 201910578700 A CN201910578700 A CN 201910578700A CN 110300304 A CN110300304 A CN 110300304A
Authority
CN
China
Prior art keywords
image
quantization parameter
size
image set
collection
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
CN201910578700.1A
Other languages
Chinese (zh)
Other versions
CN110300304B (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.)
Guangdong Vimicro Corp
Original Assignee
Guangdong Vimicro 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 Guangdong Vimicro Corp filed Critical Guangdong Vimicro Corp
Priority to CN201910578700.1A priority Critical patent/CN110300304B/en
Publication of CN110300304A publication Critical patent/CN110300304A/en
Application granted granted Critical
Publication of CN110300304B publication Critical patent/CN110300304B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/124Quantisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The present invention provides a kind of method and apparatus for compressing image set, and this method includes that the range of quantization parameter is determined according to the compressed size requirements of the first image set;The first quantization parameter collection is determined according to maximum quantization parameter, and iteration executes following steps: the second quantization parameter collection is calculated according to the first quantization parameter collection;Determine the absolute value of the ratio between the difference and image size or the difference of image compression ratio of the image variance summation between each image and each image corresponding in third image set in the second image set;The image of the maximum absolute value of ratio in second image set is replaced with into third image set corresponding image to obtain replaced second image set;The second image set is exported when the size of the second image set is more than size requirements, to improve the Y-PSNR of compressed images collection.

Description

Compress the method and apparatus of image set
Technical field
The present invention relates to compression image set technical fields, and in particular to a kind of method and apparatus for compressing image set.
Background technique
In image set compression field, other than concentrating the total size of multiple images to have strict demand to compressed images, also The Y-PSNR (Peak Signal to Noise Ratio, PSNR) of plurality of pictures totality is needed to reach best.Currently, logical Often all pictures are compressed by setting single quantization parameter (Quantization Parameter, QP).However, When being compressed using single quantization parameter to all pictures, although can satisfy the total size requirement of multiple images, But the QP selection for being unable to fully also not can guarantee all images using total size is to optimize, thus can not make multiple figures The PSNR of piece totality can reach best.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of method and dress for compressing image set to solve above-mentioned technical problem It sets, makes full use of total size to realize, while can guarantee that the quantization parameter selection of all images is to optimize, improve compression The Y-PSNR of image set afterwards.
It is special in the embodiment of the present invention in a first aspect, the embodiment of the invention provides a kind of method for compressing image set Sign is, comprising: determines that the range of quantization parameter, range include maximum quantization according to the compressed size requirements of the first image set Parameter and minimum quantization parameter;The first quantization parameter collection is determined according to maximum quantization parameter, and iteration executes following steps: according to First quantization parameter collection calculates the second quantization parameter collection, wherein the quantization parameter of the second quantization parameter collection is based on the first quantization parameter It is obtained to minimum quantization parameter preset step-length of successively decreasing;The first image set is compressed to obtain according to using the first quantization parameter collection The second image set and the third image set that the first image element is compressed using the second quantization parameter collection, determine second The first image variance summation and second between each image and each image corresponding in the first image set in image set First image size of each image in image set, and determine third image set in each image with it is right in the first image set Second image size of the second image variance summation between each image answered and each image in third image set, really The difference of the image variance summation between each image and each image corresponding in third image set in fixed second image set The absolute value of ratio between image size or the difference of image compression ratio, wherein difference=the first of image variance summation Image variance summation the-the second image variance summation, difference=first image size the-the second image size of image size, image Difference=8* (first the-the second image of image size size) of compression ratio;By the maximum absolute value of ratio in the second image set Image replaces in third image set corresponding image to obtain replaced second image set, and by the first quantization parameter collection In quantization parameter corresponding with image replace with to minimum quantization parameter successively decrease preset step-length quantization parameter to form replacement after The first quantization parameter collection;When the size of replaced second image set exceeds size requirements, the second image set is exported.
In an embodiment of the present invention, the above-mentioned model that quantization parameter is determined according to the compressed size requirements of the first image set It encloses, comprising: determined according to the maximum value of size required after the first image set of compression and same quantization is used to the first image set Average quantisation parameter value K when parameter value is compressed;The range for determining quantization parameter value according to average quantisation parameter value K is [K-n, K+m], wherein K, n, m are positive integer.
In an embodiment of the present invention, m=n=k.
In an embodiment of the present invention, k=2 or 3.
In an embodiment of the present invention, ratio indicates are as follows: ratio=Δ SSE/ Δ bpp or ratio=Δ SSE/ Δ SIZE, Wherein, Δ SSE=SSEiQP[i]-SSEiQP[i]-1, Δ bpp=8* (SIZEiQP[i]-1-SIZEiQP[i]), Δ SIZE= SIZEiQP[i]-1-SIZEiQP[i], Δ SSE is the difference of image variance summation, and Δ bpp is the difference of image compression ratio, and i is image Serial number, QP [i] are corresponding first quantization parameter value of picture numbers, and QP [i] -1 is corresponding second quantization parameter of picture numbers Value, SIZEiQP[i]It is the corresponding image of picture numbers through compressed first size of the first quantization parameter value, SIZEiQP[i]-1For figure As the corresponding image of serial number is through compressed second size of the second quantization parameter value.
In an embodiment of the present invention, preset step-length includes 1 or 2.
In the second aspect of the embodiment of the present invention, the embodiment of the invention provides a kind of methods for compressing image set, comprising: Determine that the range of quantization parameter, range include maximum quantization parameter and minimum according to the compressed size requirements of the first image set Change parameter;The first quantization parameter collection is determined according to minimum quantization parameter, wherein the parameter that the first quantization parameter is concentrated is minimum Change parameter, and iteration executes following steps: the second quantization parameter collection is calculated according to the first quantization parameter collection, wherein the second quantization ginseng The quantization parameter of manifold is based on the first quantization parameter and obtains to the incremental preset step-length of the minimum quantization parameter;According to using first The second image set that quantization parameter collection compresses the first image set and using the second quantization parameter collection to the first image The third image set that element is compressed determines that each image in the second image set is corresponding with the first image set each First image size of the first image variance summation between image and each image in the second image set, and determine third The the second image variance summation and third between each image and each image corresponding in the first image set in image set Second image size of each image in image set determines that each image in the second image set is corresponding with third image set Each image between image variance summation difference and image size or the difference of image compression ratio between ratio it is exhausted To value, wherein the difference of image variance summation=first image variance summation the-the second image variance summation, the difference of image size It is worth=the first image size the-the second image size, (first the-the second image of image size is big by difference=8* of image compression ratio It is small);The smallest image of the absolute value of ratio in second image set is replaced with into third image set corresponding image to be replaced The second image set after changing, and concentrate quantization parameter corresponding with image to replace with to minimum quantization the first quantization parameter and join The quantization parameter of the incremental preset step-length of number is to form replaced first quantization parameter collection;In the big of replaced second image set When being less than size requirements, replaced second image set is exported.
In the third aspect of the embodiment of the present invention, the embodiment of the present invention provides a kind of device for compressing image set, comprising: the One determining module, for determining that the range of quantization parameter, range include maximum according to the compressed size requirements of the first image set Quantization parameter and minimum quantization parameter, and the first quantization parameter collection is determined according to maximum quantization parameter, wherein the first quantization parameter The parameter of concentration is maximum quantization parameter, and iteration executes following steps;First computing module, for according to the first quantization parameter Collection calculates the second quantization parameter collection, joins wherein the quantization parameter of the second quantization parameter collection is based on the first quantization parameter to minimum quantization Preset step-length of successively decreasing is counted to obtain;Second determining module, for pressing according to using the first quantization parameter collection the first image set Contract the second obtained image set and the third image set compressed using the second quantization parameter collection to the first image element, really The first image variance summation between each image and each image corresponding in the first image set in fixed second image set with And the first image size of second each image in image set, and determine each image and the first image in third image set Concentrate the second image of the second image variance summation between corresponding each image and each image in third image set Size determines the image variance between each image and corresponding each image in the third image set in the second image set The absolute value of ratio between the difference and image size or the difference of image compression ratio of summation, wherein image variance summation Difference=first image variance summation the-the second image variance summation, difference=first the-the second image of image size of image size Size, difference=8* (first the-the second image of image size size) of image compression ratio;First replacement module is used for second The image of the maximum absolute value of ratio replaces in third image set corresponding image to obtain replaced second in image set Image set, and by the first quantization parameter concentrate corresponding with image quantization parameter replace with successively decrease to minimum quantization parameter it is default The quantization parameter of step-length is to form replaced first quantization parameter collection;First output module, in replaced second figure When the size of image set exceeds size requirements, the second image set is exported.
In the fourth aspect of the embodiment of the present invention, the embodiment of the present invention provides a kind of device for compressing image set, feature It is, comprising: third determining module, for determining the range of quantization parameter according to the compressed size requirements of the first image set, Range includes maximum quantization parameter and minimum quantization parameter, and determines the first quantization parameter collection according to minimum quantization parameter, wherein The parameter that first quantization parameter is concentrated is minimum quantization parameter, and iteration executes following steps;Second computing module is used for basis First quantization parameter collection calculates the second quantization parameter collection, wherein the quantization parameter of the second quantization parameter collection is based on the first quantization parameter It is incremented by preset step-length to minimum quantization parameter to obtain;4th determining module is used for according to the first quantization parameter collection of use to first The second image set and the second quantization parameter collection is used to compress the first image element that image set is compressed Third image set determines the first figure between each image and each image corresponding in the first image set in the second image set First image size of each image in image space difference summation and the second image set, and determine each figure in third image set As with the second image variance summation between each image corresponding in the first image set and each figure in third image set Second image size of picture determines between each image and each image corresponding in third image set in the second image set The absolute value of ratio between the difference and image size or the difference of image compression ratio of image variance summation, wherein image side The difference of poor summation=first image variance summation the-the second image variance summation, difference=the first image size-of image size Second image size, difference=8* (first the-the second image of image size size) of image compression ratio;Second replacement module is used In the smallest image of the absolute value of ratio in the second image set is replaced in third image set corresponding image to be replaced The second image set afterwards, and concentrate quantization parameter corresponding with image to replace with to minimum quantization parameter the first quantization parameter It is incremented by the quantization parameter of preset step-length to form replaced first quantization parameter collection;Second output module, for after replacement The second image set size be less than size requirements when, output replacement after the second image set.
At the 5th aspect of the embodiment of the present invention, the embodiment of the present invention provides a kind of computer readable storage medium, thereon Computer executable instructions are stored with, are realized in the first aspect such as the embodiment of the present invention when executable instruction is executed by processor The method of described in any item compression image sets.
At the 6th aspect of the embodiment of the present invention, the embodiment of the present invention provides a kind of computer readable storage medium, thereon Computer executable instructions are stored with, are realized in the second aspect such as the embodiment of the present invention when executable instruction is executed by processor The method of the compression image set.
The technical solution provided according to embodiments of the present invention, by being determined according to the compressed size requirements of the first image set The range of quantization parameter, range include maximum quantization parameter and minimum quantization parameter;The first amount is determined according to maximum quantization parameter Change parameter set, wherein the parameter that the first quantization parameter is concentrated is maximum quantization parameter, and iteration executes following steps: according to first Quantization parameter collection calculates the second quantization parameter collection, wherein the quantization parameter of the second quantization parameter collection is based on the first quantization parameter to most Small quantization parameter preset step-length of successively decreasing obtains;According to the compressed using the first quantization parameter collection to the first image set Two image sets and the third image set compressed using the second quantization parameter collection to the first image element, determine the second image The the first image variance summation and the second image between each image and each image corresponding in the first image set concentrated First image size of each image concentrated, and determine that each image in third image set is corresponding with the first image set Second image size of the second image variance summation between each image and each image in third image set determines The difference and figure of the image variance summation between each image and each image corresponding in third image set in two image sets As the absolute value of the ratio between size or the difference of image compression ratio;By the figure of the maximum absolute value of ratio in the second image set As replacing in third image set corresponding image to obtain replaced second image set, and the first quantization parameter is concentrated Quantization parameter corresponding with image replace with to minimum quantization parameter successively decrease preset step-length quantization parameter it is replaced to be formed First quantization parameter collection;When the size of the second image set is more than size requirements after replacement, the second image set is exported, so that Compressed image set, which has gone out, to be met outside size requirements, and the quantization parameter selection of all sizes is also to optimize, and then improve The Y-PSNR of compressed images collection.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is a kind of flow diagram of the method for compression image set that one embodiment of the invention provides.
Fig. 2 be another embodiment of the present invention provides a kind of compression image set method flow diagram.
Fig. 3 is a kind of flow diagram of the method for compression image set that further embodiment of this invention provides.
Fig. 4 is a kind of structural schematic diagram of the device for compression image set that one embodiment of the invention provides.
Fig. 5 be another embodiment of the present invention provides a kind of compression image set device structural schematic diagram.
Fig. 6 is a kind of block diagram of the system for compression image set that one embodiment of the invention provides.
Fig. 7 be another embodiment of the present invention provides a kind of compression image set system block diagram.
Specific embodiment
Below in conjunction with attached drawing needed in the embodiment of the present invention, technical solution in the embodiment of the present invention into Row clearly and completely describes, it should be apparent that, drawings discussed below is only a part of the embodiment of the present invention, rather than all Embodiment.
It should be noted that based on the embodiments of the present invention, those of ordinary skill in the art are not making creativeness All related embodiments obtained, shall fall within the protection scope of the present invention under the premise of labour.
A kind of method and apparatus for compressing image set are provided in the embodiment of the present invention, are described in detail separately below.
Fig. 1 is a kind of flow diagram of the method for compression image set that one embodiment of the invention provides.This method can be with By server or processor etc. execute, using server as executing subject for, this approach includes the following steps.
S110: determine that the range of quantization parameter, range include maximum according to the compressed size requirements of the first image set Change parameter and minimum quantization parameter.
Specifically, when the first image set of compression, have to the compressed size of the first image set it is required, server according to The compressed size requirements of first image set determine the range of quantization parameter, such as require the compressed image set of the first image set Size be up to M, range includes maximum quantization parameter and minimum quantization parameter.In some embodiments, it is desirable that the first image The size for collecting compressed image set is up to M, and operator rule of thumb knows to need to be compressed to size when the first image set When being up to M, all images compress the size that can make compressed image set by average quantisation parameter in the first image set when K Near M and it is less than M, operator sets the range of quantization parameter as [K, K+n] or [K-n, K+m] etc. according to K, wherein m, n For positive integer, server receives operator to the setting of the range of quantization parameter and determines the range of the quantization parameter.Another In some embodiments, it is desirable that the size of the compressed image set of the first image set is up to M, and operator rule of thumb directly sets The range of quantitative para meter is [D, L], so that quantization parameter is used to be greater than M to the compressed size of the first image set for D, or is made It obtains and quantization parameter is used to be less than M to the compressed size of the first image set for L, server receives operator to quantization parameter The setting of range and the range for determining the quantization parameter.The embodiment of the present invention is to the specific value of the range of quantization parameter and such as The range of what setting quantization parameter does not do specific restriction.
S120: determining the first quantization parameter collection according to maximum quantization parameter, wherein the parameter that the first quantization parameter is concentrated is Maximum quantization parameter, and iteration executes following steps S130-S160.
For example, server is according to maximum quantization parameter when maximum quantization parameter is L, the first image is concentrated with N images Determine that the first quantization parameter collection is N number of L, i.e. the corresponding quantization parameter of every image is L in N image sets.
S130: the second quantization parameter collection is calculated according to the first quantization parameter collection, wherein the quantization of the second quantization parameter collection is joined Base is obtained in the first quantization parameter to minimum quantization parameter preset step-length of successively decreasing.
For example, it is assumed that first quantization parameter collection is N number of L, then server calculates the second quantization parameter when preset step-length is 1 Collection is N number of L-1, i.e. the corresponding quantization parameter of every image is L-1 in N image sets.For another example when preset step-length is 1, First quantization parameter collection is N number of L, then it is N number of L-1, i.e. every image in N image sets that server, which calculates the second quantization parameter collection, Corresponding quantization parameter is L-1.
Preset step-length can be 1, or 2, it can also be other positive integers such as 3,4 etc., the embodiment of the present invention is to pre- If the specific value of step-length is not specifically limited.
S140: according to the second image set and use compressed using the first quantization parameter collection to the first image set The third image set that second quantization parameter collection compresses the first image element determines each image in the second image set The first image variance summation between each image corresponding with the first image set and each image in the second image set The first image size, and determine third image set in each image and each image corresponding in the first image set between Second image size of each image in the second image variance summation and third image set, determines every in the second image set The difference and image size or image pressure of image variance summation between a image and each image corresponding in third image set The absolute value of ratio between the difference of shrinkage, wherein the difference of image variance summation=first the-the second figure of image variance summation Image space difference summation, difference=first image size the-the second image size of image size, difference=8* (of image compression ratio One the-the second image of image size size).
Specifically, server compresses the first image set to obtain the second image set using the first quantization parameter collection, The first image element is compressed to obtain third image set using the second quantization parameter collection, determines each figure in the second image set As between the first image and each image corresponding in the first image set such as the first image the first image variance summation and First image size of each image in the second image set, and determine third image set in each image such as the first image and In the second image variance summation and third image set in first image set between corresponding each image such as the first image Second image size of each image, and then determine that each image in the second image set is corresponding with third image set each The absolute value of ratio between the difference of the image variance summation of image and the difference of image size, or determine in the second image set Each image and the difference of the difference of the image variance summation of each image corresponding in third image set and image compression ratio Between ratio absolute value.
For example, determining the first figure in the first image and the first image set in the second image set by taking the first image as an example The first image variance summation as between is SSE1, and the first image size of the first image in the second image set is SIZE1, really Determining the second image variance summation between the first image in the first image and the first image set in third image set is SSE2, Second image size of the first image in third image set is SIZE2, then can determine the first figure determined in the second image set As exhausted with the ratio between the difference of the image variance summation of the first image in third image set and the difference of image size It is Δ SSE=to value | (SSE1-SSE2)/(SIZE1-SIZE2) |.Other images are similar with the first image, and details are not described herein again. The representation method of compression front and back image variance summation (the Sum of Squares due to Error, SSE) are as follows:
Wherein, R, G and B are the pixel RGB values of the original image of each picture, Rw, GwAnd BwIt is a certain picture using a certain The rgb value for damaging picture under quantization parameter compression.
Ratio can be the ratio between the difference of image variance summation and the difference of image compression ratio, or image Ratio between the difference of variance summation and the difference of image size, the embodiment of the present invention are not specifically limited in this embodiment.
S150: the image of the maximum absolute value of ratio in the second image set is replaced with into corresponding image in third image set To obtain replaced second image set, and quantization parameter corresponding with image is concentrated to replace with to minimum the first quantization parameter Quantization parameter successively decrease preset step-length quantization parameter to form replaced first quantization parameter collection.
Specifically, server replaces with the image of the maximum absolute value of ratio in the second image set in third image set First quantization parameter is concentrated quantization parameter corresponding with image to obtain replaced second image set by corresponding image Replace with to minimum quantization parameter successively decrease preset step-length quantization parameter to form replaced first quantization parameter collection.
After being compressed to image using different quantization parameters, the image variance summation of compression front and back image and Image size can change, and server determines corresponding each figure in each image and third image set in the second image set The absolute value of ratio between the difference and image size or the difference of image compression ratio of image variance summation as between, to obtain The value that the image variance summation superposition of all images under the premise of size requirements must be met is maximum, to make compressed image set Y-PSNR gain is maximum under the premise of meeting size requirements, then in compressed image set all images reducing degree Highest.
S160: when the size of replaced second image set is more than size requirements, the second image set is exported.
Specifically, server judges whether the size of replaced second image set exceeds size requirements, if replacement The size of the second image set afterwards exceeds size requirements, exports the second image set.
The technical solution provided according to embodiments of the present invention, from the maximum quantization parameter in the range of quantization parameter as The initial value of one quantization parameter collection carries out compression optimization to the first image set, will use the first quantization parameter collection by continuous iteration The image i of the maximum absolute value of ratio A replaces with third image in the second image set compressed to the first image set Concentrate corresponding image i to obtain replaced second image set, so that compressed image set is wanted in addition to meeting size Ask outer, the quantization parameter selection of all sizes is also to optimize, due to the superimposed number of image variance summation of all images Value is bigger, and the overall Y-PSNR of all images can be bigger, thus the image that the absolute value by constantly replacing ratio is optimal, And then improve the Y-PSNR of compressed images collection.
Fig. 2 be another embodiment of the present invention provides a kind of compression image set method.Fig. 2 embodiment is Fig. 1 embodiment Variant embodiment.Specifically, the S111-S112 in Fig. 2 embodiment is the modification step of S110 in Fig. 1 embodiment, and Fig. 2 is implemented Step S121, S131, S141, S151, S161 in example correspond respectively to step S120, S130 in Fig. 1 embodiment, S140, S150,S160.In addition, the QP in Fig. 2 embodiment represents quantization parameter, SSE representative image variance summation, SIZE representative image is big It is small, bpp representative image compression ratio.As shown in Fig. 2, this method comprises the following steps.
S111: it is determined to the first image set according to the maximum value M of size required after the first image set of compression using same Average quantisation parameter value K when one quantization parameter value is compressed.
S112: the range that QP is determined according to average quantisation parameter value K is [K-n, K+m], wherein K, m, n are positive integer, in advance If step-length is 1.Maximum quantization parameter is K+m, and minimum quantization parameter is K-n.
S121: determining the first quantization parameter collection QP1 [N]={ K+m ..., K+m ..., K+m } according to maximum quantization parameter, The parameter that wherein the first quantization parameter is concentrated is maximum quantization parameter, and iteration executes following steps.Wherein, in the first image set There are N images, it includes N number of K+m that the first quantization parameter, which is concentrated,.
S131: the second quantization parameter is calculated according to the first quantization parameter collection and is integrated as QP2 [N]=QP1 [N] -1={ K+m- 1,...,K+m-1,...,K+m-1}。
S141: according to the second image set and use compressed using the first quantization parameter collection to the first image set The third image set that second quantization parameter collection compresses the first image element determines each image in the second image set Each of first image variance summation SSE1 and the second image set between each image corresponding with the first image set First image size SIZE1 of image, and determine that each image in third image set is corresponding with the first image set each The second image size SIZE2 of the second image variance summation SSE2 between image and each image in third image set, Determine the Δ SSE and image size delta between each image and each image corresponding in third image set in the second image set The absolute value of ratio A between SIZE or Δ bpp.That is A=| Δ SSE/ Δ SIZE | or A=| Δ SSE/ Δ bpp |, wherein Δ SSE=SSE1-SSE2, Δ SIZE=SIZE1-SIZE2, Δ bpp=8* (SIZE1-SIZE2).
S151: the image i of the maximum absolute value of ratio A in the second image set is replaced with into corresponding figure in third image set As i to obtain replaced second image set, and the first quantization parameter collection QP1 [N]={ K+m ..., K+m ..., K+m } is replaced It is changed to QP1 [N]={ K+m ..., K+m-1 ..., K+m }, wherein the quantization parameter of replacement is the corresponding quantization parameter of image i.
S161: when the size of replaced second image set is more than size requirements M, the second image set is exported.
Specifically, output is using the first quantization ginseng when the size of replaced second image set is more than size requirements M Manifold be QP1 [N]=K+m ..., K+m ..., K+m } compressed second image set.
If using QP1 [N]={ K+ when the size of replaced second image set is less than size requirements M M ..., K+m-1 ..., K+m } replaced second image set of compression continues to execute step S131-S161, wherein according to the One quantization parameter collection calculate the second quantization parameter integrate as QP2 [N]=QP2 [N] -1=K+m-1 ..., K+m-2 ..., K+m- 1}。
The technical solution provided according to embodiments of the present invention, from the maximum quantization parameter in the range of quantization parameter as The initial value of one quantization parameter collection carries out compression optimization to the first image set, will use the first quantization parameter collection by continuous iteration The image i of the maximum absolute value of ratio A replaces with third image in the second image set compressed to the first image set Concentrate corresponding image i to obtain replaced second image set, so that joining to the first image set using different quantizations The compression of images summation of all images in compressed second image set of quantification can reach highest and meet size requirements, So that the Y-PSNR gain of the second image set is maximum, the reduction journey of all images in compressed second image set Spend highest.
S131-S161 in the embodiment of the present invention can be executed by following pseudocode:
In an embodiment of the present invention, m=n=k.
In the embodiment of the present invention, by setting m=n=k, select in the range of quantization parameter average quantisation parameter K in Between numerical value, to be conducive to the reducing degree highest of each image in compressed first image set, and compressed first The Y-PSNR gain of image set is maximum.
In an embodiment of the present invention, k=2 or 3.
K can also can be other numerical value such as 4,5 etc., the embodiment of the present invention pair with value with value for 3 with value for 2 This is not specifically limited.
In the embodiment of the present invention, by set k=2 or 3, can by the scope control of quantization parameter in a certain range, Prevent the number of iterations during by the optimal quantization parameter of each image selection in compressed first image set excessive And cause calculation amount excessive, user experience effect is influenced, while can also exist for each image in compressed first image set Optimal quantization parameter is selected in the range of quantization parameter, to improve the overall Y-PSNR of compressed first image set Gain improves the reducing degree of each image in compressed first image set.
In an embodiment of the present invention, ratio indicates are as follows: ratio A=Δ SSE/ Δ bpp or ratio A=Δ SSE/ Δ SIZE, wherein Δ SSE=SSEiQP[i]-SSEiQP[i]-1, Δ bpp=8* (SIZEiQP[i]-1-SIZEiQP[i]), Δ SIZE= SIZEiQP[i]-1-SIZEiQP[i], Δ SSE is the difference of image variance summation, and Δ bpp is the difference of image compression ratio, and i is image Serial number, QP [i] are corresponding first quantization parameter value of picture numbers, and QP [i] -1 is corresponding second quantization parameter of picture numbers Value, SIZEiQP[i]It is the corresponding image of picture numbers through compressed first size of the first quantization parameter value, SIZEiQP[i]-1For figure As the corresponding image of serial number is through compressed second size of the second quantization parameter value.
The change of the difference of compression of images variance summation when ratio A=Δ SSE/ Δ SIZE representative image increases unit-sized Change.The variation of the difference of compression of images variance summation when ratio A=Δ SSE/ Δ bpp representative image increases per bit number.
In an embodiment of the present invention, preset step-length includes 1 or 2.
Preset step-length can be 1, or 2, can also for other numerical value such as 3,4 etc., the embodiment of the present invention to this not It is specifically limited.
Fig. 3 is a kind of method for compression image set that further embodiment of this invention provides.As shown in figure 3, this method includes Following steps.
S311: it is determined to the first image set according to the maximum value M of size required after the first image set of compression using same Average quantisation parameter value K when one quantization parameter value is compressed.
S312: the range that QP is determined according to average quantisation parameter value K is [K-n, K+m], wherein K, m, n are positive integer, in advance If step-length is 2.Maximum quantization parameter is K+m, and minimum quantization parameter is K-n.
S320: according to minimum quantization parameter determine the first quantization parameter collection QP1 [N]=K-n, K-n ..., K-n ..., K-n }, wherein the parameter that the first quantization parameter is concentrated is minimum quantization parameter, and iteration executes following steps.Wherein, the first figure As being concentrated with N images, it includes N number of K-n that the first quantization parameter, which is concentrated,.
S330: according to the first quantization parameter collection calculate the second quantization parameter integrate as QP2 [N]=QP1 [N]+2=K-n+2, K-n+2,...,K-n+2,...,K-n+2}。
S340: according to the second image set and use compressed using the first quantization parameter collection to the first image set The third image set that second quantization parameter collection compresses the first image element determines each image in the second image set The first image variance summation between each image corresponding with the first image set and each image in the second image set The first image size, and determine third image set in each image and each image corresponding in the first image set between Second image size of each image in the second image variance summation and third image set, determines every in the second image set The ratio between Δ SSE and image size delta SIZE or Δ bpp between a image and each image corresponding in third image set The absolute value of value A.That is A=| Δ SSE/ Δ SIZE | or A=| Δ SSE/ Δ bpp |, wherein Δ SSE=SSE1-SSE2, Δ SIZE=SIZE1-SIZE2, Δ bpp=8* (SIZE1-SIZE2).
S350: the smallest image i of ratio in the second image set is replaced with into third image set corresponding image i to obtain Replaced second image set, and the first quantization parameter collection QP1 [N]={ K-n, K-n ..., K-n ..., K-n } is replaced with QP1 [N]={ K-n, K-n ..., K-n+2 ..., K-n }, wherein the quantization parameter of replacement is the corresponding quantization parameter of image i.
S360: when the size of replaced second image set is less than size requirements M, replaced second image is exported Collection.
Specifically, output is using the first quantization ginseng when the size of replaced second image set is less than size requirements M Manifold is compressed second image set of QP1 [N]={ K-n, K-n ..., K-n+2 ..., K-n }.
If using QP1 [N]={ K-n, K- when the size of replaced second image set is no less than size requirements M N ..., K-n+2 ..., K-n } replaced second image set of compression continues to execute step S132-S162, wherein according to the One quantization parameter collection calculate the second quantization parameter integrate as QP2 [N]=QP1 [N]+2=K-n+2, K-n+2 ..., K-n+4 ..., K-n+2}。
The technical solution provided according to embodiments of the present invention, by making from the minimum quantization parameter in the range of quantization parameter Compression optimization is carried out to the first image set for the initial value of the first quantization parameter collection, will be joined using the first quantization by continuous iteration The smallest image i of the absolute value of ratio A replaces with third in the second image set that manifold compresses the first image set Corresponding image i is in image set to obtain replaced second image set, so that using different amounts to the first image set The compression of images summation that change parameter quantifies all images in compressed second image set can reach highest and meet size It is required that so that the Y-PSNR gain of the second image set is maximum, all images in compressed second image set Reducing degree highest.
In an embodiment of the present invention, m=n=k.
In the embodiment of the present invention, by setting m=n=k, select in the range of quantization parameter average quantisation parameter K in Between numerical value, to be conducive to the reducing degree highest of each image in compressed first image set, and compressed first The Y-PSNR gain of image set is maximum.
In an embodiment of the present invention, k=2 or 3.
K can also can be other numerical value such as 4,5 etc., the embodiment of the present invention pair with value with value for 3 with value for 2 This is not specifically limited.
In the embodiment of the present invention, by set k=2 or 3, can by the scope control of quantization parameter in a certain range, Prevent the number of iterations during by the optimal quantization parameter of each image selection in compressed first image set excessive And cause calculation amount excessive, user experience effect is influenced, while can also exist for each image in compressed first image set Optimal quantization parameter is selected in the range of quantization parameter, to improve the overall Y-PSNR of compressed first image set Gain improves the reducing degree of each image in compressed first image set.
In an embodiment of the present invention, ratio indicates are as follows: ratio=Δ SSE/ Δ bpp or ratio=Δ SSE/ Δ SIZE, Wherein, Δ SSE=SSEiQP[i]–SSEiQP[i]- 1, Δ bpp=8* (SIZEiQP[i]-1-SIZEiQP[i]), Δ SIZE= SIZEiQP[i]-1-SIZEiQP[i], Δ SSE is the difference of image variance summation, and Δ bpp is the difference of image compression ratio, and i is image Serial number, QP [i] are corresponding first quantization parameter value of picture numbers, and QP [i] -1 is corresponding second quantization parameter of picture numbers Value, SIZEiQP[i]It is the corresponding image of picture numbers through compressed first size of the first quantization parameter value, SIZEiQP[i]-1For figure As the corresponding image of serial number is through compressed second size of the second quantization parameter value.
In an embodiment of the present invention, preset step-length includes 1 or 2.
Preset step-length can be 1, or 2, can also for other numerical value such as 3,4 etc., the embodiment of the present invention to this not It is specifically limited.
Fig. 4 is a kind of device 400 for compression image set that one embodiment of the invention provides.As shown in figure 4, the device packet It includes: the first determining module 410, for determining the range of quantization parameter, range according to the compressed size requirements of the first image set Including maximum quantization parameter and minimum quantization parameter, and for determining the first quantization parameter collection according to maximum quantization parameter, wherein The parameter that first quantization parameter is concentrated is maximum quantization parameter, and iteration executes following steps;First computing module 420, is used for The second quantization parameter collection is calculated according to the first quantization parameter collection, wherein the quantization parameter of the second quantization parameter collection is based on the first quantization Parameter is obtained to minimum quantization parameter preset step-length of successively decreasing;Second determining module 430, for according to using the first quantization parameter collection The second image set and the second quantization parameter collection of use compressed to the first image set compresses the first image element Obtained third image set determines between each image and each image corresponding in the first image set in the second image set First image size of each image in the first image variance summation and the second image set, and determine in third image set In the second image variance summation and third image set between each image and each image corresponding in the first image set Second image size of each image determines each image in the second image set and each image corresponding in third image set Between image variance summation difference and image size or the difference of image compression ratio between ratio absolute value, wherein The difference of image variance summation=first image variance summation the-the second image variance summation, difference=first figure of image size As the-the second image of size size, difference=8* (first the-the second image of image size size) of image compression ratio;First replacement Module 440, for the optimal image of the absolute value of ratio in the second image set to be replaced with corresponding image in third image set, And corresponding with image quantization parameter is concentrated to successively decrease preset step-length to minimum quantization parameter the first quantization parameter;First output Module 450 when exceeding size requirements for the size in the second image set, exports the second image set.
The technical solution provided according to embodiments of the present invention, by the way that the first determining module, the first computing module, second is arranged Determining module, the first replacement module and the first output module execute the different step in the method for compression image set respectively, thus So that compressed image set has gone out to meet outside size requirements, the quantization parameter selection of all sizes is also to optimize, in turn Improve the Y-PSNR of compressed images collection.
In an embodiment of the present invention, the first determining module 410 is also used to be wanted according to the size after the first image set of compression The average quantisation parameter value K determined when compressing to the first image set using same quantization parameter value is sought, and according to average magnitude Change parameter value K and determine that the range of quantization parameter value is [K-n, K+m], wherein K, n, m are positive integer.
In an embodiment of the present invention, m=n=k.
In an embodiment of the present invention, k=2 or 3.
In an embodiment of the present invention, ratio indicates are as follows: ratio=Δ SSE/ Δ bpp or ratio=Δ SSE/ Δ SIZE, Wherein, Δ SSE=SSEiQP[i]-SSEiQP[i]-1, Δ bpp=8* (SIZEiQP[i]-1-SIZEiQP[i]), Δ SIZE= SIZEiQP[i]-1-SIZEiQP[i], Δ SSE is the difference of image variance summation, and Δ bpp is the difference of image compression ratio, and i is image Serial number, QP [i] are corresponding first quantization parameter value of picture numbers, and QP [i] -1 is corresponding second quantization parameter of picture numbers Value, SIZEiQP[i]It is the corresponding image of picture numbers through compressed first size of the first quantization parameter value, SIZEiQP[i]-1For figure As the corresponding image of serial number is through compressed second size of the second quantization parameter value.
In an embodiment of the present invention, preset step-length includes 1 or 2.
Fig. 5 be another embodiment of the present invention provides a kind of compression image set device 500.As shown in figure 5, the device 500 include: third determining module 510, for determining the range of quantization parameter according to the compressed size requirements of the first image set, Range includes maximum quantization parameter and minimum quantization parameter, and determines the first quantization parameter collection according to minimum quantization parameter, wherein The parameter that first quantization parameter is concentrated is minimum quantization parameter, and iteration executes following steps;Second computing module 520, is used for The second quantization parameter collection is calculated according to the first quantization parameter collection, wherein the quantization parameter of the second quantization parameter collection is based on the first quantization Parameter is incremented by preset step-length to maximum quantization parameter and obtains;4th determining module 530, for according to using the first quantization parameter collection The second image set and the second quantization parameter collection of use compressed to the first image set compresses the first image element Obtained third image set determines between each image and each image corresponding in the first image set in the second image set First image size of each image in the first image variance summation and the second image set, and determine in third image set In the second image variance summation and third image set between each image and each image corresponding in the first image set Second image size of each image determines each image in the second image set and each image corresponding in third image set Between image variance summation difference and image size or the difference of image compression ratio between ratio absolute value;Second replaces Block 540 is changed the mold, for the optimal image of the absolute value of ratio in the second image set to be replaced with corresponding figure in third image set Picture, and concentrate quantization parameter corresponding with image to be incremented by preset step-length to maximum quantization parameter the first quantization parameter;Second Output module 550 when exceeding size requirements for the size in the second image set, exports the second image set.
The technical solution provided according to embodiments of the present invention, by the way that third determining module, the second computing module, the 4th is arranged Determining module, the second replacement module and the second output module execute the different step in the method for compression image set respectively, thus So that compressed image set has gone out to meet outside size requirements, the quantization parameter selection of all sizes is also to optimize, in turn Improve the Y-PSNR of compressed images collection.
In an embodiment of the present invention, third determining module 510 is also used to be wanted according to the size after the first image set of compression The average quantisation parameter value K determined when compressing to the first image set using same quantization parameter value is sought, and according to average magnitude Change parameter value K and determine that the range of quantization parameter value is [K-n, K+m], wherein K, n, m are positive integer.
In an embodiment of the present invention, m=n=k.
In an embodiment of the present invention, k=2 or 3.
In an embodiment of the present invention, ratio indicates are as follows: ratio=Δ SSE/ Δ bpp or ratio=Δ SSE/ Δ SIZE, Wherein, Δ SSE=SSEiQP[i]-SSEiQP[i]-1, Δ bpp=8* (SIZEiQP[i]-1-SIZEiQP[i]), Δ SIZE= SIZEiQP[i]-1-SIZEiQP[i], Δ SSE is the difference of image variance summation, and Δ bpp is the difference of image compression ratio, and i is image Serial number, QP [i] are corresponding first quantization parameter value of picture numbers, and QP [i] -1 is corresponding second quantization parameter of picture numbers Value, SIZEiQP[i]It is the corresponding image of picture numbers through compressed first size of the first quantization parameter value, SIZEiQP[i]-1For figure As the corresponding image of serial number is through compressed second size of the second quantization parameter value.
In an embodiment of the present invention, preset step-length includes 1 or 2.
Fig. 6 show a kind of block diagram of the system 600 of compression image set of one embodiment of the invention.
Referring to Fig. 6, it further comprises one or more processors, and by depositing that system 600, which includes processing component 610, Memory resource representated by reservoir 620, can be by the instruction of the execution of processing component 610, such as application program for storing.It deposits The application program stored in reservoir 620 may include it is one or more each correspond to one group of instruction module.This Outside, processing component 610 is configured as executing instruction, to execute the side for compressing image set in above-mentioned Fig. 1 embodiment or Fig. 2 embodiment Method.
System 600 can also include that a power supply module be configured as the power management of execution system 600, one it is wired or Radio network interface is configured as system 600 being connected to network and input and output (I/O) interface.System 600 can be grasped Make based on the operating system for being stored in memory 620, such as Windows ServerTM, Mac OS XTM, UnixTM,LinuxTM, FreeBSDTMOr it is similar.
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is by the processing of above system 600 When device executes, so that above system 600 is able to carry out a kind of compression image set method, including compressed according to the first image set Size requirements determine that the range of quantization parameter, range include maximum quantization parameter and minimum quantization parameter;Joined according to maximum quantization Number determines the first quantization parameter collection, wherein the parameter that the first quantization parameter is concentrated is maximum quantization parameter, and iteration execution is as follows Step: calculating the second quantization parameter collection according to the first quantization parameter collection, wherein the quantization parameter of the second quantization parameter collection is based on the One quantization parameter is obtained to minimum quantization parameter preset step-length of successively decreasing;According to using the first quantization parameter collection to the first image set into The second image set that row compression obtains and the third image that the first image element is compressed using the second quantization parameter collection Collection, determines that the first image variance between each image and each image corresponding in the first image set in the second image set is total With and the second image set in each image the first image size, and determine third image set in each image and first The second of the second image variance summation between corresponding each image and each image in third image set in image set Image size determines the image variance between each image and each image corresponding in third image set in the second image set The absolute value of ratio between the difference and image size or the difference of image compression ratio of summation, wherein image variance summation Difference=first image variance summation the-the second image variance summation, difference=first the-the second image of image size of image size Size, difference=8* (first the-the second image of image size size) of image compression ratio;By in the second image set ratio it is absolute It is worth maximum image and replaces in third image set corresponding image to obtain replaced second image set, and by the first amount Change parameter set in quantization parameter corresponding with image replace with to minimum quantization parameter successively decrease preset step-length quantization parameter with shape At replaced first quantization parameter collection;When the size of the second image set exceeds size requirements after replacement, the second image is exported Collection.
Fig. 7 show a kind of block diagram of the system 700 of compression image set of another embodiment of the present invention.
Referring to Fig. 7, it further comprises one or more processors, and by depositing that system 700, which includes processing component 710, Memory resource representated by reservoir 720, can be by the instruction of the execution of processing component 710, such as application program for storing.It deposits The application program stored in reservoir 720 may include it is one or more each correspond to one group of instruction module.This Outside, processing component 710 is configured as executing instruction, to execute the method for compressing image set in above-mentioned Fig. 3 embodiment.
System 700 can also include that a power supply module be configured as the power management of execution system 700, one it is wired or Radio network interface is configured as system 700 being connected to network and input and output (I/O) interface.System 700 can be grasped Make based on the operating system for being stored in memory 720, such as Windows ServerTM, Mac OS XTM, UnixTM,LinuxTM, FreeBSDTMOr it is similar.
A kind of non-transitorycomputer readable storage medium, when the instruction in storage medium is by the processing of above system 700 When device executes, so that above system 700 is able to carry out a kind of compression image set method, including compressed according to the first image set Size requirements determine that the range of quantization parameter, range include maximum quantization parameter and minimum quantization parameter;Joined according to minimum quantization Number determines the first quantization parameter collection, wherein the parameter that the first quantization parameter is concentrated is minimum quantization parameter, and iteration execution is as follows Step: calculating the second quantization parameter collection according to the first quantization parameter collection, wherein the quantization parameter of the second quantization parameter collection is based on the One quantization parameter is incremented by preset step-length to the minimum quantization parameter and obtains;According to the first quantization parameter collection of use to the first image The third for collecting the second image set compressed and the first image element being compressed using the second quantization parameter collection Image set determines the first image side between each image and each image corresponding in the first image set in the second image set First image size of each image in poor summation and the second image set, and determine third image set in each image with The second image variance summation between corresponding each image and each image in third image set in first image set Second image size determines the image between each image and each image corresponding in third image set in the second image set The absolute value of ratio between the difference and image size or the difference of image compression ratio of variance summation, wherein image variance is total The difference of sum=first image variance summation the-the second image variance summation, difference=first image size-the second of image size Image size, difference=8* (first the-the second image of image size size) of image compression ratio;By ratio in the second image set The smallest image of absolute value replaces in third image set corresponding image to obtain replaced second image set, and by One quantization parameter concentrates quantization parameter corresponding with image to replace with the quantization parameter for being incremented by preset step-length to minimum quantization parameter To form replaced first quantization parameter collection;When the size of replaced second image set is less than size requirements, output is replaced The second image set after changing.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description, The specific work process of equipment and unit, can refer to corresponding processes in the foregoing method embodiment, and no longer does excessively retouch herein It states.
In several embodiments provided herein, it should be understood that disclosed device, device and method, it can be with It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.And Storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory The various media that can store program ver-ify code such as device (Random Access Memory, RAM), magnetic or disk.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (11)

1. a kind of method for compressing image set characterized by comprising
Determine that the range of quantization parameter, the range include maximum quantization parameter according to the compressed size requirements of the first image set With minimum quantization parameter;
The first quantization parameter collection is determined according to the maximum quantization parameter, wherein the parameter that first quantization parameter is concentrated is institute Maximum quantization parameter is stated, and iteration executes following steps:
The second quantization parameter collection is calculated according to the first quantization parameter collection, wherein the quantization of the second quantization parameter collection Parameter is based on first quantization parameter and obtains to minimum quantization parameter preset step-length of successively decreasing;
According to the second image set and use compressed using the first quantization parameter collection to the first image collection The third image set that second quantization parameter collection compresses the first image element determines in second image set Each image concentrates the first image variance summation and second figure between corresponding each image with the first image First image size of each image in image set, and determine each image and the first image in the third image set Concentrate the second of the second image variance summation between corresponding each image and each image in the third image set Image size determines between each image and corresponding each image in the third image set in second image set The absolute value of ratio between the difference and image size or the difference of image compression ratio of image variance summation, wherein the figure The difference of image space difference summation=first image variance summation the-the second image variance summation, difference=the first of described image size Image size the-the second image size, difference=8* (first the-the second image of image size size) of described image compression ratio;
The image of the maximum absolute value of ratio described in second image set is replaced with corresponding in the third image set First quantization parameter is concentrated quantization corresponding to the image to join by image to obtain replaced second image set Number replace with to the minimum quantization parameter successively decrease the preset step-length quantization parameter with formed it is replaced first quantization ginseng Manifold;
When the size of replaced second image set exceeds the size requirements, second image set is exported.
2. the method as described in claim 1, which is characterized in that described to be determined according to the compressed size requirements of the first image set The range of quantization parameter, comprising:
It is determined to the first image collection according to the maximum value of size required after compression the first image collection using same Average quantisation parameter value K when quantization parameter value is compressed;
The range that the quantization parameter value is determined according to the average quantisation parameter value K is [K-n, K+m], wherein K, m, n are positive Integer.
3. method according to claim 2, which is characterized in that m=n=k.
4. method as claimed in claim 3, which is characterized in that k=2 or 3.
5. such as method of any of claims 1-4, which is characterized in that the ratio indicates are as follows:
Ratio=Δ SSE/ Δ bpp or ratio=Δ SSE/ Δ SIZE
Wherein, Δ SSE=SSEiQP[i]-SSEiQP[i]-1, Δ bpp=8* (SIZEiQP[i]-1-SIZEiQP[i]), Δ SIZE= SIZEiQP[i]-1-SIZEiQP[i], Δ SSE is the difference of described image variance summation, and Δ bpp is the difference of described image compression ratio, I is picture numbers, and QP [i] is corresponding first quantization parameter value of described image serial number, and QP [i] -1 is corresponding for described image serial number The second quantization parameter value, SIZEiQP[i]It is the corresponding image of described image serial number after first quantization parameter value compression The first size, SIZEiQP[i]-1It is the corresponding image of described image serial number through second quantization parameter value compressed second Size.
6. such as method of any of claims 1-4, which is characterized in that the preset step-length includes 1 or 2.
7. a kind of method for compressing image set characterized by comprising
Determine that the range of quantization parameter, the range include maximum quantization parameter according to the compressed size requirements of the first image set With minimum quantization parameter;
The first quantization parameter collection is determined according to the minimum quantization parameter, wherein the parameter that first quantization parameter is concentrated is institute Minimum quantization parameter is stated, and iteration executes following steps:
The second quantization parameter collection is calculated according to the first quantization parameter collection, wherein the quantization of the second quantization parameter collection Parameter is based on first quantization parameter and obtains to the incremental preset step-length of the maximum quantization parameter;
According to the second image set and use compressed using the first quantization parameter collection to the first image collection The third image set that second quantization parameter collection compresses the first image element determines in second image set Each image concentrates the first image variance summation and second figure between corresponding each image with the first image First image size of each image in image set, and determine each image and the first image in the third image set Concentrate the second of the second image variance summation between corresponding each image and each image in the third image set Image size determines between each image and corresponding each image in the third image set in second image set The absolute value of ratio between the difference and image size or the difference of image compression ratio of image variance summation, wherein the figure The difference of image space difference summation=first image variance summation the-the second image variance summation, difference=the first of described image size Image size the-the second image size, difference=8* (first the-the second image of image size size) of described image compression ratio;
The smallest image of absolute value of ratio described in second image set is replaced with corresponding in the third image set First quantization parameter is concentrated quantization corresponding to the image to join by image to obtain replaced second image set Number, which is replaced with, is incremented by the quantization parameter of the preset step-length to the maximum quantization parameter to form replaced first quantization ginseng Manifold;
When the size of replaced second image set is less than the size requirements, the second image after the replacement is exported Collection.
8. a kind of device for compressing image set characterized by comprising
First determining module, for determining the range of quantization parameter, the model according to the compressed size requirements of the first image set It encloses including maximum quantization parameter and minimum quantization parameter, and the first quantization parameter collection is determined according to the maximum quantization parameter, Described in the first quantization parameter concentrate parameter be the maximum quantization parameter, and iteration execute following steps;
First computing module, for calculating the second quantization parameter collection according to the first quantization parameter collection, wherein described the The quantization parameter of two quantization parameter collection is based on first quantization parameter and obtains to minimum quantization parameter preset step-length of successively decreasing;
Second determining module, for what is compressed according to use the first quantization parameter collection to the first image collection Second image set and the third image set compressed using the second quantization parameter collection to the first image element, determine institute The each image stated in the second image set concentrates the first image variance between corresponding each image total with the first image With and second image set in each image the first image size, and determine each figure in the third image set As being concentrated in the second image variance summation and the third image set between corresponding each image with the first image Each image the second image size, determine that each image in second image set is corresponding with the third image set Each image between image variance summation difference and image size or the difference of image compression ratio between ratio Absolute value, wherein the difference of described image variance summation=first image variance summation the-the second image variance summation, the figure As difference=first image size the-the second image size of size, (the first image is big by difference=8* of described image compression ratio Small-the second image size);
First replacement module, for the image of the maximum absolute value of ratio described in second image set to be replaced with described Corresponding image to be in three image sets to obtain replaced second image set, and by first quantization parameter concentrate with it is described The corresponding quantization parameter of image replace with to minimum quantization parameter successively decrease the preset step-length quantization parameter to form replacement after The first quantization parameter collection;
First output module when exceeding the size requirements for the size in replaced second image set, exports institute State the second image set.
9. a kind of device for compressing image set characterized by comprising
Third determining module, for determining the range of quantization parameter, the model according to the compressed size requirements of the first image set It encloses including maximum quantization parameter and minimum quantization parameter, and the first quantization parameter collection is determined according to the minimum quantization parameter, Described in the first quantization parameter concentrate parameter be the minimum quantization parameter, and iteration execute following steps;
Second computing module, for calculating the second quantization parameter collection according to the first quantization parameter collection, wherein described the The quantization parameter of two quantization parameter collection is based on first quantization parameter and obtains to the incremental preset step-length of the minimum quantization parameter;
4th determining module, for what is compressed according to use the first quantization parameter collection to the first image collection Second image set and the third image set compressed using the second quantization parameter collection to the first image element, determine institute The each image stated in the second image set concentrates the first image variance between corresponding each image total with the first image With and second image set in each image the first image size, and determine each figure in the third image set As being concentrated in the second image variance summation and the third image set between corresponding each image with the first image Each image the second image size, determine that each image in second image set is corresponding with the third image set Each image between image variance summation difference and image size or the difference of image compression ratio between ratio it is exhausted To value, wherein the difference of described image variance summation=first image variance summation the-the second image variance summation, described image The difference of size=first image size the-the second image size, difference=8* (the first image size-of described image compression ratio Second image size);
Second replacement module, for the smallest image of absolute value of ratio described in second image set to be replaced with described Corresponding image to be in three image sets to obtain replaced second image set, and by first quantization parameter concentrate with it is described The corresponding quantization parameter of image is replaced be incremented by the quantization parameter of the preset step-length to form replacement to maximum quantization parameter after The first quantization parameter collection;
Second output module when being less than the size requirements for the size in replaced second image set, exports institute State the second image set after replacing.
10. a kind of computer readable storage medium, is stored thereon with computer executable instructions, which is characterized in that described to hold The method such as compression image set of any of claims 1-6 is realized in row instruction when being executed by processor.
11. a kind of computer readable storage medium, is stored thereon with computer executable instructions, which is characterized in that described to hold Compression image set as claimed in claim 7 is realized in row instruction method when being executed by processor.
CN201910578700.1A 2019-06-28 2019-06-28 Method and apparatus for compressing image sets Active CN110300304B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910578700.1A CN110300304B (en) 2019-06-28 2019-06-28 Method and apparatus for compressing image sets

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910578700.1A CN110300304B (en) 2019-06-28 2019-06-28 Method and apparatus for compressing image sets

Publications (2)

Publication Number Publication Date
CN110300304A true CN110300304A (en) 2019-10-01
CN110300304B CN110300304B (en) 2022-04-12

Family

ID=68029361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910578700.1A Active CN110300304B (en) 2019-06-28 2019-06-28 Method and apparatus for compressing image sets

Country Status (1)

Country Link
CN (1) CN110300304B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070217514A1 (en) * 2002-07-14 2007-09-20 Roger Kumar Adaptive Motion Estimation
CN101416511A (en) * 2006-04-07 2009-04-22 微软公司 Quantization adjustments for DC shift artifacts
US20110200263A1 (en) * 2009-01-19 2011-08-18 Panasonic Corporation Image encoder and image decoder
US20120121197A1 (en) * 2009-04-28 2012-05-17 Thales Method for estimating the throughput and the distortion of encoded image data after encoding
CN102724510A (en) * 2012-06-21 2012-10-10 中科开元信息技术(北京)有限公司 Code rate control algorithm based on fullness degree of virtual encoding buffer area
CN105992001A (en) * 2015-03-02 2016-10-05 深圳市腾讯计算机系统有限公司 Method and device for carrying out quantification processing on picture

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070217514A1 (en) * 2002-07-14 2007-09-20 Roger Kumar Adaptive Motion Estimation
CN101416511A (en) * 2006-04-07 2009-04-22 微软公司 Quantization adjustments for DC shift artifacts
US20110200263A1 (en) * 2009-01-19 2011-08-18 Panasonic Corporation Image encoder and image decoder
CN102246503A (en) * 2009-01-19 2011-11-16 松下电器产业株式会社 Image encoding and decoding device
US20120121197A1 (en) * 2009-04-28 2012-05-17 Thales Method for estimating the throughput and the distortion of encoded image data after encoding
CN102724510A (en) * 2012-06-21 2012-10-10 中科开元信息技术(北京)有限公司 Code rate control algorithm based on fullness degree of virtual encoding buffer area
CN105992001A (en) * 2015-03-02 2016-10-05 深圳市腾讯计算机系统有限公司 Method and device for carrying out quantification processing on picture

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
潘榕: "基于局部DCT系数的图像压缩感知编码与重构", 《自动化学报》 *

Also Published As

Publication number Publication date
CN110300304B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
CN104683801B (en) Method for compressing image and device
CN100490494C (en) Decoding apparatus, dequantizing method, distribution determining method, and program thereof
CN109064428A (en) A kind of image denoising processing method, terminal device and computer readable storage medium
CN109902819A (en) Neural computing method, apparatus, mobile terminal and storage medium
CN107743235A (en) Image processing method, device and electronic equipment
CN110213327A (en) A kind of resource regulating method based on edge calculations, apparatus and system
CN109887456A (en) Data compression method and apparatus
Liu et al. Proximal alternating direction network: A globally converged deep unrolling framework
CN110047044A (en) A kind of construction method of image processing model, device and terminal device
CN112261120B (en) Cloud-side cooperative task unloading method and device for power distribution internet of things
CN110049250A (en) Image state switching method and device
CN109859124A (en) A kind of depth image noise reduction method and device
CN110300304A (en) Compress the method and apparatus of image set
WO2016101663A1 (en) Image compression method and device
CN108377372B (en) A kind of white balancing treatment method, device, terminal device and storage medium
CN109783481A (en) Data processing method and device
CN105844588A (en) Method and system for intelligent scalable compression of creative images
CN105447830A (en) Method and apparatus for strengthening clarity of dynamic video image
Etessami et al. Polynomial time algorithms for branching Markov decision processes and probabilistic min (max) polynomial Bellman equations
CN110362952B (en) Rapid calculation task shunting method
CA2465919A1 (en) Method, apparatus and software for lossy data compression and function estimation
WO2021000495A1 (en) Image processing method and device
CN104618680B (en) A kind of compression method of video resolution
CN108648136B (en) Method and device for compressing two-dimensional lookup table
CN104463790B (en) A kind of methods, devices and systems of image procossing

Legal Events

Date Code Title Description
PB01 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