Summary of the invention
The present invention proposes a kind of evaluating method and device of picture quality, according to human visual system's the loss of characteristic comprehensive evaluating spatial domain and frequency domain loss, has improved the consistency of objective evaluating and subjective evaluation result, has improved the accuracy of evaluation result.
Technical scheme of the present invention is achieved in that
A kind of evaluating method of picture quality comprises:
Calculating with respect to the loss of reference picture on spatial domain, is obtained described by the spatial domain loss result of altimetric image by altimetric image;
Calculate described by altimetric image with respect to the loss of described reference picture on frequency domain, obtain described by the frequency domain loss result of altimetric image;
Obtained described by the mass fraction of altimetric image according to described by the described spatial domain loss result of altimetric image and described frequency domain loss result.
Preferably, described calculating, is obtained described spatial domain loss result by altimetric image and comprises with respect to the loss of reference picture on spatial domain by altimetric image:
Calculate described by altimetric image with respect to the loss of described reference picture on luminance component, obtain described by the luminance loss result of altimetric image;
Calculate describedly by the edge penalty of altimetric image with respect to described reference picture, obtain described by the edge penalty result of altimetric image;
Obtained described by the spatial domain loss result of altimetric image according to described by the described luminance loss result of altimetric image and described edge penalty result.
Preferably, describedly obtained described spatial domain loss result by altimetric image by the described luminance loss result of altimetric image and described edge penalty result and comprise according to described:
Give described by the described luminance loss result of altimetric image and the described edge penalty result ratio that assigns weight;
Obtained described by the spatial domain loss result of altimetric image according to described by the described luminance loss result of altimetric image and weight ratio thereof and described edge penalty result and weight ratio thereof.
Preferably, described luminance loss result's weight ratio is greater than described edge penalty result's weight ratio.
Preferably, according to the PSNR method calculate described by altimetric image with respect to the loss of described reference picture on luminance component, obtain described by the luminance loss result of altimetric image.
Preferably, described calculating described by altimetric image with respect to the loss of described reference picture on frequency domain, obtain described frequency domain loss result by altimetric image and comprise:
With described reference picture with describedly changed to frequency domain by altimetric image from transform of spatial domain;
Calculate describedly by the loss of contrast of altimetric image with respect to described reference picture, obtain described by the loss of contrast result of altimetric image;
Obtain described by the frequency domain loss result of altimetric image according to described loss of contrast result.
Preferably, described by the edge penalty of altimetric image with respect to described reference picture in described calculating, obtain describedly also to be comprised before the edge penalty result of altimetric image:
Carried out rim detection to described by altimetric image and described reference picture.
Preferably, in described calculating by altimetric image with respect to the loss of reference picture on spatial domain, obtain describedly also to be comprised before the spatial domain loss result of altimetric image:
Judge described by altimetric image and described reference picture YUV color gamut whether, if yes then enter next step;
Otherwise be transformed into the YUV color gamut with described by altimetric image and described reference picture, and then enter next step.
Preferably, according to the dct transform method with described reference picture with describedly changed to frequency domain by altimetric image from transform of spatial domain.
Preferably, describedly obtained described mass fraction by altimetric image by the described spatial domain loss result of altimetric image and described frequency domain loss result and comprise according to described:
Give described by the described spatial domain loss result of altimetric image and the described frequency domain loss result ratio that assigns weight;
Obtained described by the mass fraction of altimetric image according to described by the described spatial domain loss result of altimetric image and weight ratio thereof and described frequency domain loss result and weight ratio thereof.
A kind of evaluating apparatus of picture quality comprises:
The first processing unit be used for to calculate by altimetric image with respect to the loss of reference picture on spatial domain, obtains described by the spatial domain loss result of altimetric image;
The second processing unit, be used for calculating described by altimetric image with respect to the loss of described reference picture on frequency domain, obtain described by the frequency domain loss result of altimetric image;
The 3rd processing unit is used for being obtained described by the mass fraction of altimetric image according to described by the described spatial domain loss result of altimetric image and described frequency domain loss result.
Preferably, described the first processing unit comprises:
The manages the unit everywhere, be used for calculating described by altimetric image with respect to the loss of described reference picture on luminance component, obtain described by the luminance loss result of altimetric image;
The 5th processing unit, described by the edge penalty of altimetric image with respect to described reference picture for calculating, obtain described by the edge penalty result of altimetric image;
The 6th processing unit is used for being obtained described by the spatial domain loss result of altimetric image according to described by the described luminance loss result of altimetric image and described edge penalty result.
Preferably, described the first processing unit also comprises:
The first weight allocation unit is used for to described by the described luminance loss result of altimetric image and the described edge penalty result ratio that assigns weight;
Described the 6th processing unit is obtained described by the spatial domain loss result of altimetric image according to described by the described luminance loss result of altimetric image and weight ratio thereof and described edge penalty result and weight ratio thereof.
Preferably, described luminance loss result's weight ratio is greater than described edge penalty result's weight ratio.
Preferably, described the 5th processing unit also comprises:
Edge detection unit is used for being carried out rim detection to described by altimetric image and described reference picture.
Preferably, described the second processing unit comprises:
The first converting unit is used for described reference picture and is describedly changed to frequency domain by altimetric image from transform of spatial domain;
The 7th processing unit, described by the loss of contrast of altimetric image with respect to described reference picture for calculating, obtain described by the loss of contrast result of altimetric image;
The 8th processing unit is used for obtaining according to described loss of contrast result described by the frequency domain loss result of altimetric image.
Preferably, described image quality evaluating device also comprises:
The second converting unit is used for when not being the YUV color gamut by altimetric image and described reference picture, being transformed into the YUV color gamut with described by altimetric image and described reference picture when described.
Preferably, described image quality evaluating device also comprises:
The second weight allocation unit is used for to described by the described spatial domain loss result of altimetric image and the described frequency domain loss result ratio that assigns weight;
Described the 3rd processing unit is obtained described by the mass fraction of altimetric image according to described by the described spatial domain loss result of altimetric image and weight ratio thereof and described frequency domain loss result and weight ratio thereof.
Technical solution of the present invention is according to human visual system's characteristic, comprehensive evaluating picture quality is in the loss on the spatial domain and the loss on the frequency domain, quality according to spatial domain loss and frequency domain loss comprehensive evaluating image, thereby obtain the evaluation result of more close subjective evaluation and test, improve the consistency of objective evaluating and subjective evaluation result, improved the accuracy of evaluation result.
Embodiment
For making the purpose, technical solutions and advantages of the present invention express clearlyer, the present invention is further described in more detail below in conjunction with drawings and the specific embodiments.
With reference to Fig. 1, show the flow chart of a kind of image quality evaluating method the first embodiment of the present invention, comprise step:
Step 110, calculating with respect to the loss of reference picture on spatial domain, are obtained described by the spatial domain loss result of altimetric image by altimetric image.
Step 120, calculate described by altimetric image with respect to the loss of described reference picture on frequency domain, obtain described by the frequency domain loss result of altimetric image.
Step 130, obtained described by the mass fraction of altimetric image according to described by the described spatial domain loss result of altimetric image and described frequency domain loss result.
Described mass fraction can be the concrete numerical value of a reflection picture quality, also can be the evaluation of a picture quality.
Wherein, with reference to Fig. 2, described step 110 preferably includes following steps:
Step 210, calculate described by altimetric image with respect to the loss of described reference picture on luminance component, obtain described by the luminance loss result of altimetric image.
Human visual system (HVS, Human Visual System) is more responsive to the sensation comparison color of brightness.
Calculating is had much by the method for altimetric image with respect to the loss of reference picture on luminance component, the embodiment of the invention preferably according to the PSNR method calculate described by altimetric image with respect to the loss of described reference picture on luminance component, obtain described by the luminance loss result of altimetric image.Described PSNR method can be expressed as:
Wherein, the pixel quantity of M * N presentation video, the i.e. size of image, o
M, nPixel value for the point (m, n) in the reference picture; r
M, nFor by the pixel value of the point (m, n) in the altimetric image, A is o
M, nIn maximum, usually get 255.
Step 220, calculate describedly by the edge penalty of altimetric image with respect to described reference picture, obtain described by the edge penalty result of altimetric image.
The loss of human visual system's edge is also very sensitive, often can add the edge and strengthen in image processing process, increases the stereovision of image; The present invention can utilize first edge detecting technology to detect the edge of image, calculates by the edge penalty of altimetric image with respect to described reference picture, obtains described by the edge penalty result of altimetric image.Calculating is also had much by the method for altimetric image with respect to the reference picture edge penalty, such as PSNR method etc.
In this step, can utilize first the evaluate parameters such as Sobel operator, Canny operator, Prewitt operator, carry out edge extracting to reference picture with by altimetric image, then compare both edges, the comparative result that obtains quantizing.
Step 230, obtained described by the spatial domain loss result of altimetric image according to described by the described luminance loss result of altimetric image and described edge penalty result.
The embodiment of the invention is preferably described by the spatial domain loss result of altimetric image according to luminance loss result and the comprehensive acquisition of edge penalty result, it will be appreciated by those skilled in the art that, the factor that other calculate described tested image space territory loss result be can also increase, and described luminance loss and edge penalty not only only limited.
The embodiment of the invention is preferably: give describedly by the described luminance loss result of altimetric image and the described edge penalty result ratio that assigns weight, obtained described by the spatial domain loss result of altimetric image according to described by the described luminance loss result of altimetric image and weight ratio thereof and described edge penalty result and weight ratio thereof.
In order more to meet human visual system's characteristic, the embodiment of the invention preferably: described luminance loss result's weight ratio is greater than described edge penalty result's weight ratio.
Wherein, with reference to Fig. 3, described step 120 preferably includes following steps:
Step 310, with described reference picture with describedly changed to frequency domain by altimetric image from transform of spatial domain.
Described reference picture and the described method of being changed to frequency domain from transform of spatial domain by altimetric image are had a lot, such as fourier transform method, dct transform method etc., the embodiment of the invention is the dct transform method preferably.
Step 320, calculate describedly by the loss of contrast of altimetric image with respect to described reference picture, obtain described by the loss of contrast result of altimetric image.
In the embodiment of the invention, with the factor of the loss of contrast as the territory loss of the described tested picture frequency of measurement, it will be appreciated by those skilled in the art that, can also be with other factors as the factor of weighing the loss of described tested picture frequency territory, it is described by the loss of the frequency domain of altimetric image also can to increase other combined factors evaluation and tests, and the present invention does not limit this.
Step 330, obtain according to described loss of contrast result described by the frequency domain loss result of altimetric image.
When only having this factor of contrast, then described loss of contrast result is described by the frequency domain loss result of altimetric image, when a plurality of factor is arranged, as as described in contrast factor and the evaluation and test of other combined factors during by the frequency domain loss result of image, then obtain described by the frequency domain loss result of altimetric image according to described loss of contrast result and other factor.
Objective evaluating of the prior art is is normally evaluated and tested at luminance component, and the evaluation and test factor is single, and therefore inconsistent with the subjectivity evaluation and test, evaluation result is inaccurate.The embodiment of the invention is according to human visual system's characteristic, comprehensive evaluating picture quality is in the loss on the spatial domain and the loss on the frequency domain, quality according to spatial domain loss and frequency domain loss comprehensive evaluating image, thereby obtain the evaluation result of more close subjective evaluation and test, improve the consistency of objective evaluating and subjective evaluation result, improved the accuracy of evaluation result.
Further, the spatial domain evaluation and test comprises again evaluation and test and the edge evaluation and test on the luminance component, the frequency domain evaluation and test comprises again the contrast evaluation and test, from multifactor comprehensive evaluating picture quality, thereby obtain the evaluation result of more close subjective evaluation and test, improve the consistency of objective evaluating and subjective evaluation result, improved the accuracy of evaluation result.
With reference to Fig. 4, show the method flow diagram of a kind of image quality evaluating method the second embodiment of the present invention, comprise step:
Step 410, will be transformed into the YUV color gamut from other color gamut by altimetric image and reference picture.
In the shades of colour territory of image, YUV (YCrCb, a kind of colour coding method that is adopted by the eurovision system) color gamut is the color gamut that relatively meets human visual system's characteristic, so the embodiment of the invention is preferably carried out the evaluation and test of picture quality at the YUV color gamut.
At first judge by altimetric image and reference picture YUV color gamut whether, if not, then will be transformed into the YUV color gamut from other color gamut by altimetric image and reference picture, other color gamut comprises RGB (red, green, blue, Red Green Blue) color gamut etc.
Below to describe to the YUV color gamut as example from the RGB color conversion:
Y is brightness (Luminance/Luma) component of image, uses following formula to calculate, and is the weighted average of R, G, B component:
Y=kr?R+kg?G+kb?B
Wherein k is weight factor.
Top formula has calculated monochrome information, also has colouring information in the YUV color gamut, uses aberration (Color difference/Chrominance or Chroma) expression, and wherein each color difference components is the difference of R, G, B value and brightness Y:
Cb=B-Y
Cr=R-Y
Cg=G-Y
Wherein, Cb+Cr+Cg is a constant (being that an expression about Y is shown in fact).Suggestion is when calculating Y, and weight is chosen as kr=0.299, kg=0.587, kb=0.114.So conversion formula is as follows:
Y=0.299R+0.587G+0.114B
Cb=0.564(B-Y)
Cr=0.713(R-Y)
R=Y+1.402Cr
G=Y-0.344Cb-0.714Cr
B=Y+1.772Cb
By above formula, image can be transformed into the YUV color gamut from the RGB color gamut.For other color gamut, corresponding conversion method is arranged in the prior art, do not repeat them here.
Step 420, calculating with respect to the loss of reference picture on spatial domain, are obtained described by the spatial domain loss result of altimetric image by altimetric image.
Described calculating, is obtained described concrete steps and the principle that is comprised by the spatial domain loss result of altimetric image and describes in detail in embodiment one with respect to the loss of reference picture on spatial domain by altimetric image, does not repeat them here.
Step 430, calculate described by altimetric image with respect to the loss of described reference picture on frequency domain, obtain described by the frequency domain loss result of altimetric image.
Described calculating described by altimetric image with respect to the loss of described reference picture on frequency domain, obtain described concrete steps and the principle that is comprised by the frequency domain loss result of altimetric image and in embodiment one, describe in detail, do not repeat them here.
Step 440, give described by the described spatial domain loss result of altimetric image and the described frequency domain loss result ratio that assigns weight.
Step 450, obtained described by the mass fraction of altimetric image according to described by the described spatial domain loss result of altimetric image and weight ratio thereof and described frequency domain loss result and weight ratio thereof.
Described mass fraction can be the concrete numerical value of a reflection picture quality, also can be the evaluation of a picture quality.
Objective evaluating of the prior art is is normally evaluated and tested in the evaluation and test of RGB color gamut or luminance component, and the evaluation and test factor is single, and therefore inconsistent with the subjectivity evaluation and test, evaluation result is inaccurate.The embodiment of the invention is according to human visual system's characteristic, comprehensive evaluating picture quality is in the loss on the spatial domain and the loss on the frequency domain on more near the YUV color gamut of human visual system's characteristic, quality according to spatial domain loss and frequency domain loss comprehensive evaluating image, thereby obtain the evaluation result of more close subjective evaluation and test, improve the consistency of objective evaluating and subjective evaluation result, improved the accuracy of evaluation result.
Further, the spatial domain evaluation and test comprises again evaluation and test and the edge evaluation and test on the luminance component, the frequency domain evaluation and test comprises again the contrast evaluation and test, from multifactor comprehensive evaluating picture quality, thereby obtain the evaluation result of more close subjective evaluation and test, improve the consistency of objective evaluating and subjective evaluation result, improved the accuracy of evaluation result.
With reference to Fig. 5, show the composition structure chart of a kind of image quality evaluating device the first embodiment of the present invention, described image quality evaluating device 500 comprises:
The first processing unit 510, be used for to calculate by altimetric image with respect to the loss of reference picture on spatial domain, obtain described by the spatial domain loss result of altimetric image.
The second processing unit 520, be used for calculating described by altimetric image with respect to the loss of described reference picture on frequency domain, obtain described by the frequency domain loss result of altimetric image.
The 3rd processing unit 530, be used for being obtained described by the mass fraction of altimetric image according to described by the described spatial domain loss result of altimetric image and described frequency domain loss result.
Wherein, with reference to Fig. 6, described the first processing unit 510 comprises:
The manage unit 511 everywhere, be used for calculating described by altimetric image with respect to the loss of described reference picture on luminance component, obtain described by the luminance loss result of altimetric image.
Human visual system (HVS, Human Visual System) is more responsive to the sensation comparison color of brightness.
Described the manages unit 511 everywhere calculates and is had much by the method for altimetric image with respect to the loss of reference picture on luminance component, the embodiment of the invention preferably according to the PSNR method calculate described by altimetric image with respect to the loss of described reference picture on luminance component, obtain described by the luminance loss result of altimetric image.
The 5th processing unit 512, described by the edge penalty of altimetric image with respect to described reference picture for calculating obtains described by the edge penalty result of altimetric image.
The loss of human visual system's edge is also very sensitive, often can add the edge and strengthen in image processing process, increases the stereovision of image.Therefore, the 5th processing unit 512 also comprises described in the embodiment of the invention: edge detection unit is used for being carried out rim detection to described by altimetric image and described reference picture.The present invention can utilize first edge detecting technology to detect the edge of image, calculates by the edge penalty of altimetric image with respect to described reference picture, obtains described by the edge penalty result of altimetric image.Described the 5th processing unit 512 calculates also to be had much by the method for altimetric image with respect to the reference picture edge penalty, such as the PSNR method etc.
The 6th processing unit 513, be used for being obtained described by the spatial domain loss result of altimetric image according to described by the described luminance loss result of altimetric image and described edge penalty result.
Further, described the first processing unit 510 also comprises:
The first weight allocation unit 514, be used for to described by the described luminance loss result of altimetric image and the described edge penalty result ratio that assigns weight;
Described the 6th processing unit 513 is obtained described by the spatial domain loss result of altimetric image according to described by the described luminance loss result of altimetric image and weight ratio thereof and described edge penalty result and weight ratio thereof.
Near human visual system's feature, described luminance loss result's weight ratio is greater than described edge penalty result's weight ratio for more.
Wherein, with reference to Fig. 7, described the second processing unit 520 comprises:
The first converting unit 521, be used for described reference picture and describedly changed to frequency domain by altimetric image from transform of spatial domain.
Described the first converting unit 521 has described reference picture and the described method of being changed to frequency domain from transform of spatial domain by altimetric image a lot, such as fourier transform method, and dct transform method etc., the embodiment of the invention is the dct transform method preferably.
The 7th processing unit 522, described by the loss of contrast of altimetric image with respect to described reference picture for calculating obtains described by the loss of contrast result of altimetric image.
In the embodiment of the invention, with the factor of the loss of contrast as the territory loss of the described tested picture frequency of measurement, it will be appreciated by those skilled in the art that, can also be with other factors as the factor of weighing the loss of described tested picture frequency territory, it is described by the loss of the frequency domain of altimetric image also can to increase other combined factors evaluation and tests, and the present invention does not limit this.
The 8th processing unit 523, described by the frequency domain loss result of altimetric image for obtaining according to described loss of contrast result.
When only having this factor of contrast, then described loss of contrast result is described by the frequency domain loss result of altimetric image, when a plurality of factor is arranged, as as described in contrast factor and the evaluation and test of other combined factors during by the frequency domain loss result of image, then obtain described by the frequency domain loss result of altimetric image according to described loss of contrast result and other factor.
Further, described image quality evaluating device 500 also comprises:
The second converting unit 540, be used for when not being the YUV color gamut by altimetric image and described reference picture, being transformed into the YUV color gamut with described by altimetric image and described reference picture when described.
In the shades of colour territory of image, YUV (YCrCb, a kind of colour coding method that is adopted by the eurovision system) color gamut is the color gamut that relatively meets human visual system's characteristic, so the embodiment of the invention is preferably carried out the evaluation and test of picture quality at the YUV color gamut.
The second weight allocation unit 550, be used for to described by the described spatial domain loss result of altimetric image and the described frequency domain loss result ratio that assigns weight.
Described the 3rd processing unit 530 is obtained described by the mass fraction of altimetric image according to described by the described spatial domain loss result of altimetric image and weight ratio thereof and described frequency domain loss result and weight ratio thereof.
Objective evaluating of the prior art is is normally evaluated and tested in the evaluation and test of RGB color gamut or luminance component, and the evaluation and test factor is single, and therefore inconsistent with the subjectivity evaluation and test, evaluation result is inaccurate.The embodiment of the invention is according to human visual system's characteristic, comprehensive evaluating picture quality is in the loss on the spatial domain and the loss on the frequency domain on more near the YUV color gamut of human visual system's characteristic, quality according to spatial domain loss and frequency domain loss comprehensive evaluating image, thereby obtain the evaluation result of more close subjective evaluation and test, improve the consistency of objective evaluating and subjective evaluation result, improved the accuracy of evaluation result.
Further, the spatial domain evaluation and test comprises again evaluation and test and the edge evaluation and test on the luminance component, the frequency domain evaluation and test comprises again the contrast evaluation and test, from multifactor comprehensive evaluating picture quality, thereby obtain the evaluation result of more close subjective evaluation and test, improve the consistency of objective evaluating and subjective evaluation result, improved the accuracy of evaluation result.
Described device embodiment is corresponding with described embodiment of the method, and therefore, the description of appropriate section gets final product in the part reference method embodiment that device embodiment part is not described in detail.
One of ordinary skill in the art will appreciate that, realize that all or part of step in above-described embodiment method is to come the relevant hardware of instruction to finish by program, described program can be stored in the computer read/write memory medium, this program is when carrying out, comprise the step such as above-mentioned embodiment of the method, described storage medium, as: ROM/RAM, magnetic disc, CD etc.In the inventive method embodiment, the priority sequence number of described step can not be used for limiting the sequencing of each step.Each step can be carried out simultaneously or also can carry out with other order.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of doing, is equal to replacement, improvement etc., all should be included within protection scope of the present invention.