CN105554487A - Method and apparatus for format conversion of digital image - Google Patents

Method and apparatus for format conversion of digital image Download PDF

Info

Publication number
CN105554487A
CN105554487A CN201410609040.6A CN201410609040A CN105554487A CN 105554487 A CN105554487 A CN 105554487A CN 201410609040 A CN201410609040 A CN 201410609040A CN 105554487 A CN105554487 A CN 105554487A
Authority
CN
China
Prior art keywords
location point
class
class location
luminance component
point
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
CN201410609040.6A
Other languages
Chinese (zh)
Other versions
CN105554487B (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.)
Actions Technology Co Ltd
Original Assignee
Juxin (zhuhai) Science & Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Juxin (zhuhai) Science & Technology Co Ltd filed Critical Juxin (zhuhai) Science & Technology Co Ltd
Priority to CN201410609040.6A priority Critical patent/CN105554487B/en
Publication of CN105554487A publication Critical patent/CN105554487A/en
Application granted granted Critical
Publication of CN105554487B publication Critical patent/CN105554487B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method and apparatus for format conversion of a digital image. With the method and apparatus, a problem that phenomena of edge blurring and color diffusion occur and thus the image quality is reduced after the image format is converted from YUV420 to YUV444 in the prior art can be solved. According to the embodiment of the invention, the method comprises: a position, in a converted image, of a chrominance component of each point of an original image and positions of chrominance components of a second kind of position point, a third kind of position point, and a fourth kind of position point in the converted image are determined, wherein the second kind of position point, the third kind of position point, and the fourth kind of position point need interpolation; a chrominance component value of the second kind of position point is determined according to the adjacent first kind of position point; a chrominance component value of the third kind of position point is determined according to an adjacent point; and according to an adjacent point, a chrominance component value of the fourth kind of position point is determined. Because the chrominance component values of the second kind of position point, the third kind of position point, and the fourth kind of position point are determined by selecting points at the small luminance component correlation measure value direction, phenomena of edge blurring and color diffusion in the converted image can be prevented, so that the image quality can be improved.

Description

A kind of method of digital image format conversion and device
Technical field
The present invention relates to digital image processing techniques field, particularly a kind of method changed of digital image format and device.
Background technology
In digital image processing techniques field, the picture format of digital picture has a variety of, such as: RGB (Red, Green, Blue, red, green, blue) 888, RGB565, YUV (Luminance, Chrominance, colourity, brightness) 420, YUV444 etc.Wherein, in Video (video) and Camera (video camera) field, the digital picture application of YUV420 form widely.Usually, video file is after decoding, the DID stream of YUV420 form can be generated, then the digital picture of YUV420 form is converted to the digital picture of YUV444 form, then the digital picture of YUV444 form is transferred to the digital picture of rgb format, finally the digital picture of rgb format is shown.
As shown in Figure 1a, the digital picture of YUV420 form is made up of Y, U, V tri-components, and chromatic component U (or V) quantity is in the horizontal and vertical directions all 1/2nd of luminance component Y.As shown in Figure 1 b, carrying out the digital picture of YUV420 form when converting the digital picture of YUV444 form to, luminance component Y remains unchanged, and chromatic component U (or V) quantity in the horizontal and vertical directions expands twice.
In the prior art, carrying out the digital picture of YUV420 form when converting the digital picture of YUV444 form to, luminance component Y remains unchanged, chromatic component U (or V) adopts the mode of direct copying usually, namely U (or V) direct copying of 1*1 is 2*2's, as illustrated in figure 1 c, 4 chromatic component points M, N, O and P of chromatic component U (or V), each chromatic component point direct copying obtains new chromatic component U (or V) for 3 times.Or adopt bilinear interpolation to realize expanding twice to chromatic component U (or V) quantity in the horizontal and vertical directions.
But, the digital picture of the YUV444 form that image format conversion generates later is carried out by above-mentioned two kinds of modes, the edge of its chromatic component (U and V) can cause fuzzy, when the laggard row Digital Image Display of the digital picture digital picture of YUV444 form being converted to rgb format, the marginal zone of coloury digital picture there will be color diffusion.If when showing after digital picture being carried out many times of amplifications, the phenomenon of this edge blurry, color diffusion can be more obvious, reduce the quality of digital picture again.
Summary of the invention
The invention provides method and the device of the conversion of a kind of digital image format, in order to solve after the digital image format existed in prior art becomes YUV444 form by YUV420 format conversion, digital picture can produce the phenomenon of edge blurry, color diffusion, reduces the problem of the quality of digital picture.
A kind of method that the embodiment of the present invention provides digital image format to change, comprising:
The position of the chromatic component determining each point in original image after conversion in image, and using the chromatic component of the chromatic component of point each in described original image as the first kind location point in converted images, and determine to need to carry out in image after conversion the position of chromatic component of the Equations of The Second Kind location point of interpolation calculation, the 3rd class location point and the 4th class location point;
For the chromatic component of an Equations of The Second Kind location point, the chromatic component value of described Equations of The Second Kind location point is determined, the central point in the region that wherein said Equations of The Second Kind location point surrounds for the first kind location point adjacent with described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point;
For the chromatic component of a 3rd class location point, determine the chromatic component value of described 3rd class location point according to the chromatic component value of the point adjacent with described 3rd class location point, wherein said 3rd class location point is point adjacent with first kind location point and adjacent with Equations of The Second Kind location point in vertical direction in horizontal direction;
For the chromatic component of a 4th class location point, determine the chromatic component value of described 4th class location point according to the chromatic component value of the point adjacent with described 4th class location point, wherein said 4th class location point is point adjacent with Equations of The Second Kind location point and adjacent with first kind location point in vertical direction in horizontal direction.
Using the chromatic component of point each in original image after the chromatic component of the first kind location point in converted images, be convenient to the chromatic component value calculating Equations of The Second Kind location point, the 3rd class location point and the 4th class location point due to the position of the embodiment of the present invention in the chromatic component determining each point in original image after conversion image.
Preferably, determine the chromatic component value of described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point, specifically comprise:
Determine the luminance component of each point in four described first kind location points;
Determine the luminance component relativity measurement value of the Equations of The Second Kind location point in the region that four first kind location points surround on every bar diagonal;
From the region that four first kind location points surround, two first kind location points on the diagonal selecting the luminance component relativity measurement value of Equations of The Second Kind location point minimum;
The chromatic component value of described Equations of The Second Kind location point is determined according to the chromatic component value of two first kind location points selected.
The embodiment of the present invention selects the chromatic component value of two points on the less direction of luminance component relativity measurement value to determine the chromatic component value of Equations of The Second Kind location point.Because luminance component relativity measurement value is less, correlation between the point that expression is corresponding is larger, so the local edge of chromatic component can be retained like this, thus make the phenomenon that the image after changing there will not be edge blurry, color to spread, and then improve the quality of converted images.
Preferably, if described Equations of The Second Kind location point is non-edge point, then the luminance component relativity measurement value of described Equations of The Second Kind location point meets following formula:
e 1=|2Y(i,j)-Y(i-2n+1,j-2n+1)-Y(i+2n-1,j+2n-1)|;
e 2=|2Y(i,j)-Y(i+2n-1,j-2n+1)-Y(i-2n+1,j+2n-1)|;
Wherein, e 1represent the luminance component relativity measurement value of Equations of The Second Kind location point on left diagonal, e 2represent the luminance component relativity measurement value of Equations of The Second Kind location point on right diagonal, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of Equations of The Second Kind location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is not more than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula formula:
Chroma(i,j)=[Chroma(i-2n+1,j-2n+1)+Chroma(i+2n-1,j+2n-1)]/2;
If the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is greater than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j-2n+1)+Chroma(i-2n+1,j+2n-1)]/2;
Wherein, i, j represent abscissa and the ordinate of Equations of The Second Kind location point respectively, and n represents preset value, and are natural number, and Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Preferably, according to the chromatic component value of the point adjacent with described 3rd class location point, determine the chromatic component value of described 3rd class location point, specifically comprise:
Determine the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point;
According to the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in horizontal direction, and according to the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in vertical direction,
If the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point;
If the luminance component relativity measurement value of the 3rd class location point in horizontal direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point.
The embodiment of the present invention selects the chromatic component value of two points on the less direction of luminance component relativity measurement value to determine the chromatic component value of the 3rd class location point.Because luminance component relativity measurement value is less, correlation between the point that expression is corresponding is larger, so the local edge of chromatic component can be retained like this, thus make the phenomenon that the image after changing there will not be edge blurry, color to spread, and then improve the quality of converted images.
Preferably, if described 3rd class location point is non-edge point, then the luminance component relativity measurement value of described 3rd class location point meets following formula:
e 3=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 4=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 3represent the luminance component relativity measurement value of the 3rd class location point in horizontal direction, e 4represent the luminance component relativity measurement value of the 3rd class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 3rd class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 3rd class location point in vertical direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, i, j represent abscissa and the ordinate of the 3rd class location point respectively, and n represents preset value, and are natural number, and Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Preferably, according to the chromatic component value of the point adjacent with described 4th class location point, determine the chromatic component value of described 4th class location point, specifically comprise:
Determine the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point;
According to the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in horizontal direction, and according to the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in vertical direction,
If the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, determine the chromatic component value of described 4th class location point;
If the luminance component relativity measurement value of the 4th class location point in horizontal direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, determine the chromatic component value of described 4th class location point.
The embodiment of the present invention selects the chromatic component value of two points on the less direction of luminance component relativity measurement value to determine the chromatic component value of the 4th class location point.Because luminance component relativity measurement value is less, correlation between the point that expression is corresponding is larger, so the local edge of chromatic component can be retained like this, thus make the phenomenon that the image after changing there will not be edge blurry, color to spread, and then improve the quality of converted images.
Preferably, if described 4th class location point is non-edge point, then the luminance component relativity measurement value of described 4th class location point meets following formula:
e 5=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 6=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 5represent the luminance component relativity measurement value of the 4th class location point in horizontal direction, e 6represent the luminance component relativity measurement value of the 4th class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 4th class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 4th class location point in vertical direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, i, j represent abscissa and the ordinate of the 4th class location point respectively, and n represents preset value, and are natural number, and Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
The device that the embodiment of the present invention provides a kind of digital image format to change, comprising:
Point position determination unit, for the position of chromatic component after conversion in image determining each point in original image, and using the chromatic component of the chromatic component of point each in described original image as the first kind location point in converted images, and determine to need to carry out in image after conversion the position of chromatic component of the Equations of The Second Kind location point of interpolation calculation, the 3rd class location point and the 4th class location point;
Equations of The Second Kind location point chromatic component value determining unit, for the chromatic component for an Equations of The Second Kind location point, the chromatic component value of described Equations of The Second Kind location point is determined, the central point in the region that wherein said Equations of The Second Kind location point surrounds for the first kind location point adjacent with described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point;
3rd class location point chromatic component value determining unit, for the chromatic component for a 3rd class location point, determine the chromatic component value of described 3rd class location point according to the chromatic component value of the point adjacent with described 3rd class location point, wherein said 3rd class location point is point adjacent with first kind location point and adjacent with Equations of The Second Kind location point in vertical direction in horizontal direction;
4th class location point chromatic component value determining unit, for the chromatic component for a 4th class location point, determine the chromatic component value of described 4th class location point according to the chromatic component value of the point adjacent with described 4th class location point, wherein said 4th class location point is point adjacent with Equations of The Second Kind location point and adjacent with first kind location point in vertical direction in horizontal direction.
Preferably, described Equations of The Second Kind location point chromatic component value determining unit specifically for:
Determine the luminance component of each point in four described first kind location points; Determine the luminance component relativity measurement value of the Equations of The Second Kind location point in the region that four first kind location points surround on every bar diagonal; From the region that four first kind location points surround, two first kind location points on the diagonal selecting the luminance component relativity measurement value of Equations of The Second Kind location point minimum; The chromatic component value of described Equations of The Second Kind location point is determined according to the chromatic component value of two first kind location points selected.
Preferably, if described Equations of The Second Kind location point is non-edge point, then the luminance component relativity measurement value of described Equations of The Second Kind location point meets following formula:
e 1=|2Y(i,j)-Y(i-2n+1,j-2n+1)-Y(i+2n-1,j+2n-1)|;
e 2=|2Y(i,j)-Y(i+2n-1,j-2n+1)-Y(i-2n+1,j+2n-1)|;
Wherein, e 1represent the luminance component relativity measurement value of Equations of The Second Kind location point on left diagonal, e 2represent the luminance component relativity measurement value of Equations of The Second Kind location point on right diagonal, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of Equations of The Second Kind location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is not more than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i-2n+1,j-2n+1)+Chroma(i+2n-1,j+2n-1)]/2;
If the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is greater than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j-2n+1)+Chroma(i-2n+1,j+2n-1)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Preferably, described 3rd class location point chromatic component value determining unit specifically for:
Determine the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point, according to the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in horizontal direction, and according to the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in vertical direction, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point.
Preferably, if described 3rd class location point is non-edge point, then the luminance component relativity measurement value of described 3rd class location point meets following formula:
e 3=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 4=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 3represent the luminance component relativity measurement value of the 3rd class location point in horizontal direction, e 4represent the luminance component relativity measurement value of the 3rd class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 3rd class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 3rd class location point in vertical direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Preferably, described 4th class location point chromatic component value determining unit specifically for:
Determine the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, according to the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in horizontal direction, and according to the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in vertical direction, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, determine the chromatic component value of described 4th class location point, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, determine the chromatic component value of described 4th class location point.
Preferably, if described 4th class location point is non-edge point, then the luminance component relativity measurement value of described 4th class location point meets following formula:
e 5=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 6=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 5represent the luminance component relativity measurement value of the 4th class location point in horizontal direction, e 6represent the luminance component relativity measurement value of the 4th class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 4th class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 4th class location point in vertical direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
The embodiment of the present invention determining the chromatic component of original image mid point, need to carry out in the chromatic component of the Equations of The Second Kind location point of interpolation calculation, the 3rd class location point and the 4th class location point image after conversion position after, select the chromatic component value of two points on the less direction of luminance component relativity measurement value to determine the chromatic component value of Equations of The Second Kind location point, the 3rd class location point and the 4th class location point.Because luminance component relativity measurement value is less, correlation between the point that expression is corresponding is larger, so the local edge of chromatic component can be retained like this, thus make the phenomenon that the image after changing there will not be edge blurry, color to spread, and then improve the quality of converted images.
Accompanying drawing explanation
Fig. 1 a is the digital picture schematic diagram of YUV420 form in background technology;
Fig. 1 b is the schematic diagram that the digital picture of YUV420 form in background technology converts the digital picture of YUV444 form to;
Fig. 1 c is the schematic diagram adopting the mode of direct copying to realize chromatic component (U or V) interpolation in background technology;
Fig. 2 a is the method flow schematic diagram of the embodiment of the present invention one image format conversion;
Fig. 2 b is the embodiment of the present invention two chromatic component (U or V) interpolation schematic diagram;
Fig. 2 c is the new chromatic component position view after the embodiment of the present invention three chromatic component (U or V) interpolation;
Fig. 2 d is chromatic component (U or the V) schematic diagram of Equations of The Second Kind location point in the embodiment of the present invention four Fig. 2 c;
Fig. 2 e is that the chromatic component (U or V) of the 3rd class location point in the embodiment of the present invention five Fig. 2 c puts schematic diagram;
Fig. 2 f is that the chromatic component (U or V) of the 4th class location point in the embodiment of the present invention six Fig. 2 c puts schematic diagram;
Fig. 3 is the device schematic flow sheet of the embodiment of the present invention seven image format conversion.
Embodiment
The position of the chromatic component of each point after conversion in image in embodiment of the present invention determination original image, and using the chromatic component of the chromatic component of point each in described original image as the first kind location point in converted images, and determine to need to carry out in image after conversion the position of chromatic component of the Equations of The Second Kind location point of interpolation calculation, the 3rd class location point and the 4th class location point; For the chromatic component of an Equations of The Second Kind location point, the chromatic component value of described Equations of The Second Kind location point is determined, the central point in the region that wherein said Equations of The Second Kind location point surrounds for the first kind location point adjacent with described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point; For the chromatic component of a 3rd class location point, determine the chromatic component value of described 3rd class location point according to the chromatic component value of the point adjacent with described 3rd class location point, wherein said 3rd class location point is point adjacent with first kind location point and adjacent with Equations of The Second Kind location point in vertical direction in horizontal direction; For the chromatic component of a 4th class location point, determine the chromatic component value of described 4th class location point according to the chromatic component value of the point adjacent with described 4th class location point, wherein said 4th class location point is point adjacent with Equations of The Second Kind location point and adjacent with first kind location point in vertical direction in horizontal direction.The embodiment of the present invention, when carrying out image format conversion, selects the chromatic component value of two points on the less direction of luminance component relativity measurement value to determine the chromatic component value of Equations of The Second Kind location point, the 3rd class location point and the 4th class location point.Because luminance component relativity measurement value is less, correlation between the point that expression is corresponding is larger, so the local edge of chromatic component can be retained like this, thus make the phenomenon that the image after changing there will not be edge blurry, color to spread, and then improve the quality of converted images.
Wherein, the chromatic component of the embodiment of the present invention can be: U (colourity) component, V (colourity) component.That is, the scheme of the embodiment of the present invention is suitable for U component, is also suitable for V component.
Below in conjunction with Figure of description, the embodiment of the present invention is described in further detail.
As shown in Figure 2 a, the method for the embodiment of the present invention one image format conversion comprises:
Step 200, the position of chromatic component after conversion in image determining each point in original image, and using the chromatic component of the chromatic component of point each in described original image as the first kind location point in converted images, and determine to need to carry out in image after conversion the position of chromatic component of the Equations of The Second Kind location point of interpolation calculation, the 3rd class location point and the 4th class location point;
Step 201, chromatic component for an Equations of The Second Kind location point, the chromatic component value of described Equations of The Second Kind location point is determined, the central point in the region that wherein said Equations of The Second Kind location point surrounds for the first kind location point adjacent with described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point;
Step 202, chromatic component for a 3rd class location point, determine the chromatic component value of described 3rd class location point according to the chromatic component value of the point adjacent with described 3rd class location point, wherein said 3rd class location point is point adjacent with first kind location point and adjacent with Equations of The Second Kind location point in vertical direction in horizontal direction;
Step 203, chromatic component for a 4th class location point, determine the chromatic component value of described 4th class location point according to the chromatic component value of the point adjacent with described 4th class location point, wherein said 4th class location point is point adjacent with Equations of The Second Kind location point and adjacent with first kind location point in vertical direction in horizontal direction.
For the embodiment of the present invention, wide W is equaled 4 as shown in Figure 2 b, the original chrominance components that high H equals 4 is by the schematic diagram of interpolation operation wide and high expansion twice by it, be the new chromatic component after interpolation as shown in Figure 2 c, wherein, the wide W of new chromatic component becomes 8, high H becomes 8, and chromatic component now has 8 row 8 to arrange a chromatic component point.In figure 2 c, coordinate counting from the 0th row the 0th arranges of point, solid black round dot represents first kind location point, and all first kind location points are in even number line, the even column of new chromatic component; White hollow square represents Equations of The Second Kind location point, and all Equations of The Second Kind location points are in odd-numbered line, the odd column of new chromatic component; White hollow round dot represents the 3rd class location point, and the 3rd all class location points is in even number line, the odd column of new chromatic component; Grey black circle represents the 4th class location point, all the 4th class location point odd-numbered line, even column.
The point that the embodiment of the present invention is adjacent with Equations of The Second Kind location point refers to: as in figure 2 c, with Equations of The Second Kind location point (1,1) adjacent point is first kind location point (0,0), the 3rd class location point (0,1), first kind location point (0,2), the 4th class location point (1,0), the 4th class location point (1,2), first kind location point (2,0), the 3rd class location point (2,1) and first kind location point (2,2).
The point that the embodiment of the present invention is adjacent with the 3rd class location point refers to: as in figure 2 c, with the 3rd class location point (2,1) adjacent point is the 4th class location point (1,0), Equations of The Second Kind location point (1,1), the 4th class location point (1,2), first kind location point (2,0), first kind location point (2,2), the 4th class location point (3,0), Equations of The Second Kind location point (3,1) the and four class location point (3,2).
The point that the embodiment of the present invention is adjacent with the 4th class location point refers to: as in figure 2 c, with the 4th class location point (1,2) adjacent point is the 3rd class location point (0,1), first kind location point (0,2), the 3rd class location point (0,3), Equations of The Second Kind location point (1,1), Equations of The Second Kind location point (1,3), the 3rd class location point (2,1), first kind location point (2,2) the and three class location point (2,3).
Introduce the concrete mode of the chromatic component value of lower embodiment of the present invention determination Equations of The Second Kind location point below:
Preferably, in step 201, determine the chromatic component value of described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point, specifically comprise:
Determine the chromatic component value of described Equations of The Second Kind location point according to the chromatic component value of two first kind location points adjacent with described Equations of The Second Kind location point, in the region that the chromatic component of two first kind location points that wherein said and described Equations of The Second Kind location point is adjacent surrounds for four described first kind location points, be in the chromatic component of two first kind location points on diagonal.
As shown in Figure 2 d for the embodiment of the present invention has the chromatic component that 2 row 2 arrange a chromatic component point, the coordinate of figure mid point is counting from the 0th row the 0th arranges, and wherein the 0th in Fig. 2 d walks to the 2nd row, the 0th row to the chromatic component point one_to_one corresponding of the 2nd row the 0th walks to the 2nd row, the 0th row to the chromatic component point of the 2nd row in Fig. 2 c.
Such as: the chromatic component value using the chromatic component value of the first kind location point that the 0th row the 0th arranges in Fig. 2 d and the first kind location point of the 2nd row the 2nd row, calculates the chromatic component value of the Equations of The Second Kind location point that the 1st row the 1st arranges.
Again such as: the chromatic component value using the chromatic component value of the first kind location point that the 0th row the 2nd arranges in Fig. 2 d and the first kind location point of the 2nd row the 0th row, calculates the chromatic component value of the Equations of The Second Kind location point that the 1st row the 1st arranges.
Preferably determine that the mode of the chromatic component value of described Equations of The Second Kind location point is according to the chromatic component value of two first kind location points adjacent with described Equations of The Second Kind location point: the luminance component relativity measurement value of the Equations of The Second Kind location point determined according to luminance component selects two first kind location points to carry out calculating a chromatic component value for Equations of The Second Kind location point, specifically comprises:
Determine the luminance component of each point in four described first kind location points;
Determine the luminance component relativity measurement value of the Equations of The Second Kind location point in the region that four first kind location points surround on every bar diagonal;
From the region that four first kind location points surround, two first kind location points on the diagonal selecting the luminance component relativity measurement value of Equations of The Second Kind location point minimum;
The chromatic component value of described Equations of The Second Kind location point is determined according to the chromatic component value of two first kind location points selected.
The luminance component relativity measurement value of embodiment of the present invention Equations of The Second Kind location point is less show a little between correlation larger.
The embodiment of the present invention, left diagonal refers to: the left upper apex in the region (i.e. rectangular area) that the point adjacent with Equations of The Second Kind location point surrounds is connected with bottom right vertex formed diagonal, and wherein, Equations of The Second Kind location point is the central point in this region; Right diagonal refers to: the right vertices in the region (i.e. rectangular area) that the point adjacent with Equations of The Second Kind location point surrounds is connected with bottom left vertex formed diagonal, and wherein, Equations of The Second Kind location point is the central point in this region.
Such as: in calculating chart 2c the 1st row the 1st arrange the chromatic component value of Equations of The Second Kind location point time, first the luminance component (0 of first kind location point on left diagonal in the region that the luminance component of four first kind location points surrounds is determined, 0), (1, 1), (2, 2) luminance component (0 of first kind location point on the luminance component relativity measurement value of the Equations of The Second Kind location point between three points and right diagonal, 2), (1, 1), (2, 0) the luminance component relativity measurement value of the Equations of The Second Kind location point between three points, the luminance component relativity measurement value of the Equations of The Second Kind location point now on left diagonal is not more than the luminance component relativity measurement value of the Equations of The Second Kind location point on right diagonal, the chromatic component value of the chromatic component value of the first kind location point using the 0th row the 0th on left diagonal to arrange and the first kind location point of the 2nd row the 2nd row calculates the chromatic component value of the Equations of The Second Kind location point that the 1st row the 1st arranges.
Again such as: in calculating chart 2c the 1st row the 1st arrange the chromatic component value of Equations of The Second Kind location point time, first the luminance component (0 of first kind location point on left diagonal in the region that the luminance component of four first kind location points surrounds is determined, 0), (1, 1), (2, 2) luminance component (0 of first kind location point on the luminance component relativity measurement value of the Equations of The Second Kind location point between three points and right diagonal, 2), (1, 1), (2, 0) the luminance component relativity measurement value of the Equations of The Second Kind location point between three points, the luminance component relativity measurement value of the Equations of The Second Kind location point now on left diagonal is greater than the luminance component relativity measurement value of the Equations of The Second Kind location point on right diagonal, the chromatic component value of the chromatic component value of the first kind location point using the 0th row the 2nd on right diagonal to arrange and the first kind location point of the 2nd row the 0th row calculates the chromatic component value of the Equations of The Second Kind location point that the 1st row the 1st arranges.
Preferably, if described Equations of The Second Kind location point is non-edge point, then the luminance component relativity measurement value of described Equations of The Second Kind location point meets following formula:
E 1=| 2Y (i, j)-Y (i-2n+1, j-2n+1)-Y (i+2n-1, j+2n-1) | ... formula one;
E 2=| 2Y (i, j)-Y (i+2n-1, j-2n+1)-Y (i-2n+1, j+2n-1) | ... formula two;
Wherein, e 1represent the luminance component relativity measurement value of Equations of The Second Kind location point on left diagonal, e 2represent the luminance component relativity measurement value of Equations of The Second Kind location point on right diagonal, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of Equations of The Second Kind location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
The embodiment of the present invention takes the mode of direct copying to obtain the marginal point of converted images, and such as in figure 2 c, the marginal point of image refers to: the 0th row, the 7th row, the 0th row and the upper all points of the 7th row in image.
Such as: in calculating chart 2c, coordinate is (1,1) during the chromatic component value of Equations of The Second Kind location point, known Equations of The Second Kind location point (1,1) i=1, j=1, n=0 in, by the luminance component relativity measurement value that i=1, j=1, n=0 substitution formula one obtains Equations of The Second Kind location point on left diagonal be:
e 1=|2Y(1,1)-Y(1-2*0+1,1-2*0+1)-Y(1+2*0-1,1+2*0-1)|;
By the luminance component relativity measurement value that i=1, j=1, n=0 substitution formula two obtains Equations of The Second Kind location point on right diagonal be:
e 2=|2Y(1,1)-Y(1+2*0-1,1-2*0+1)-Y(1-2*0+1,1+2*0-1)|。
Preferably, if the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is not more than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula formula:
Chroma (i, j)=[Chroma (i-2n+1, j-2n+1)+Chroma (i+2n-1, j+2n-1)]/2 ... formula three;
If the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is greater than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma (i, j)=[Chroma (i+2n-1, j-2n+1)+Chroma (i-2n+1, j+2n-1)]/2 ... formula four;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Such as: in calculating chart 2c, coordinate is (1,1) during the chromatic component value of Equations of The Second Kind location point, i=1, j=1, n=0 in known Equations of The Second Kind location point (1,1), by the chromatic component value that i=1, j=1, n=0 substitution formula three obtains Equations of The Second Kind location point be:
Chroma(1,1)=[Chroma(1-2*0+1,1-2*0+1)+Chroma(1+2*0-1,1+2*0-1)]/2。
Again such as: in calculating chart 2c, coordinate is (1,1) during the chromatic component value of Equations of The Second Kind location point, i=1, j=1, n=0 in known Equations of The Second Kind location point (1,1), by the chromatic component value that i=1, j=1, n=0 substitution formula four obtains Equations of The Second Kind location point be:
Chroma(1,1)=[Chroma(1+2*0-1,1-2*0+1)+Chroma(1-2*0+1,1+2*0-1)]/2。
The embodiment of the present invention can according to through the 3rd class location point level or vertical on the chromatic component value of two points adjacent with the 3rd class location point calculate the chromatic component value of the 3rd class location point, also can calculate the chromatic component value of the 3rd class location point according to the chromatic component value of two points adjacent with the 3rd class location point on the left diagonal or right diagonal of the 3rd class location point.
The embodiment of the present invention, left diagonal refers to: the left upper apex in the region (i.e. rectangular area) that the point adjacent with the 3rd class location point surrounds is connected with bottom right vertex formed diagonal, and wherein, the 3rd class location point is the central point in this region; Right diagonal refers to: the right vertices in the region (i.e. rectangular area) that the point adjacent with the 3rd class location point surrounds is connected with bottom left vertex formed diagonal, and wherein, the 3rd class location point is the central point in this region.
A kind of mode preferably determining the chromatic component value of the 3rd class location point:
Preferably, in step 202, the chromatic component value of the point that described basis is adjacent with described 3rd class location point is determined specifically to comprise the chromatic component value of described 3rd class location point:
According to the chromatic component value of two points adjacent with described 3rd class location point, determine the chromatic component value of described 3rd class location point, two points that wherein said and described 3rd class location point is adjacent are point adjacent in the horizontal or vertical direction of described 3rd class location point.
As shown in Figure 2 e for the embodiment of the present invention has the chromatic component that 2 row 2 arrange a chromatic component point, the coordinate of figure mid point is counting from the 0th row the 0th arranges, and wherein the 0th in Fig. 2 e walks to the 2nd row, the 0th row to the chromatic component point one_to_one corresponding of the 2nd row the 1st walks to the 3rd row, the 0th row to the chromatic component point of the 2nd row in Fig. 2 c.
Such as: the chromatic component value using the chromatic component value of the first kind location point that the 1st row the 0th arranges in Fig. 2 e and the first kind location point of the 1st row the 2nd row, calculates the chromatic component value of the 3rd class location point that the 1st row the 1st arranges.
Again such as: the chromatic component value using the chromatic component value of the Equations of The Second Kind location point that the 0th row the 1st arranges in Fig. 2 e and the Equations of The Second Kind location point of the 2nd row the 1st row, calculates the chromatic component value of the 3rd class location point that the 1st row the 1st arranges.
A kind of preferably according to the chromatic component value of two points adjacent with described 3rd class location point, determine that the mode of the chromatic component value of described 3rd class location point is: the luminance component relativity measurement value of the 3rd class location point determined according to luminance component selects two points to carry out calculating the chromatic component value of the 3rd class location point, specifically comprises
Determine the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point;
According to the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in horizontal direction, and according to the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in vertical direction,
If the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point;
If the luminance component relativity measurement value of the 3rd class location point in horizontal direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point.
The luminance component relativity measurement value of the embodiment of the present invention the 3rd class location point is less show a little between correlation larger.
Such as: in calculating chart 2c the 2nd row the 1st arrange the chromatic component value of the 3rd class location point time, first the luminance component (2 of three points in the level of the 3rd class location point is determined, 0), (2, 1) (2, 2) the luminance component relativity measurement value of the 3rd class location point between with through the 3rd class location point vertical on the luminance component (1 of three points, 1), (2, 1), (3, 1) the luminance component relativity measurement value of the 3rd class location point between, the luminance component relativity measurement value of the 3rd class location point now in level is not more than the luminance component relativity measurement value of the 3rd class location point vertically, coordinate in usage level is the chromatic component value that the chromatic component value of the chromatic component value of the first kind location point that the 2nd row the 0th arranges and the first kind location point of the 2nd row the 2nd row calculates the 3rd class location point of the 2nd row the 1st row.
Again such as: in calculating chart 2c the 2nd row the 1st arrange the chromatic component value of the 3rd class location point time, first the luminance component (2 of three points in the level of the 3rd class location point is determined, 0), (2, 1) (2, 2) the luminance component relativity measurement value of the 3rd class location point between with through the 3rd class location point vertical on the luminance component (1 of three points, 1), (2, 1), (3, 1) the luminance component relativity measurement value of the 3rd class location point between, the luminance component relativity measurement value of the 3rd class location point now in level is greater than the luminance component relativity measurement value of the 3rd class location point vertically, use vertical on coordinate be the chromatic component value that the chromatic component value of the chromatic component value of the Equations of The Second Kind location point that the 1st row the 1st arranges and the Equations of The Second Kind location point of the 3rd row the 1st row calculates the 3rd class location point that the 2nd row the 1st arranges.
Preferably, if described 3rd class location point is non-edge point, then the luminance component relativity measurement value of described 3rd class location point meets following formula:
E 3=| 2Y (i, j)-Y (i, j-2n+1)-Y (i, j+2n-1) | ... formula five;
E 4=| 2Y (i, j)-Y (i+2n-1, j)-Y (i-2n+1, j) | ... formula six;
Wherein, e 3represent the luminance component relativity measurement value of the 3rd class location point in horizontal direction, e 4represent the luminance component relativity measurement value of the 3rd class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 3rd class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
The embodiment of the present invention takes the mode of direct copying to obtain the marginal point of converted images, and such as in figure 2 c, the marginal point of image refers to: the 0th row, the 7th row, the 0th row and the upper all points of the 7th row in image.
Such as: in calculating chart 2c, coordinate is (2,1) during the chromatic component value of the 3rd class location point, known Equations of The Second Kind location point (2,1) i=2, j=1, n=0 in, by the luminance component relativity measurement value that i=2, j=1, n=0 substitution formula five obtains the 3rd class location point in level be:
e 3=|2Y(2,1)-Y(2,1-2*0+1)-Y(2,1+2*0-1)|;
By the luminance component relativity measurement value that i=2, j=1, n=0 substitution formula six obtains vertical upper 3rd class location point be:
e 4=|2Y(2,1)-Y(2+2*0-1,1)-Y(2-2*0+1,1)|。
Preferably, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma (i, j)=[Chroma (i, j-2n+1)+Chroma (i, j+2n-1)]/2 ... formula seven;
If the luminance component relativity measurement value of the 3rd class location point in vertical direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma (i, j)=[Chroma (i+2n-1, j)+Chroma (i-2n+1, j)]/2 ... formula eight;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Such as: in calculating chart 2c, coordinate is (2,1) during the chromatic component value of the 3rd class location point, i=2, j=1, n=0 in known Equations of The Second Kind location point (2,1), by the chromatic component value that i=2, j=1, n=0 substitution formula seven obtains the 3rd class location point be:
Chroma(2,1)=[Chroma(2,1-2*0+1)+Chroma(2,1+2*0-1)]/2。
Again such as: in calculating chart 2c, coordinate is (2,1) during the chromatic component value of the 3rd class location point, i=2, j=1, n=0 in known Equations of The Second Kind location point (2,1), by the chromatic component value that i=2, j=1, n=0 substitution formula eight obtains the 3rd class location point be:
Chroma(2,1)=[Chroma(2+2*0-1,1)+Chroma(2-2*0+1,1)]/2。
The embodiment of the present invention can according to through the 4th class location point level or vertical on the chromatic component value of two points adjacent with the 4th class location point calculate the chromatic component value of the 4th class location point, also can calculate the chromatic component value of the 4th class location point according to the chromatic component value of two points adjacent with the 4th class location point on the left diagonal or right diagonal of the 4th class location point.
The embodiment of the present invention, left diagonal refers to: the left upper apex in the region (i.e. rectangular area) that the point adjacent with the 4th class location point surrounds is connected with bottom right vertex formed diagonal, and wherein, the 4th class location point is the central point in this region; Right diagonal refers to: the right vertices in the region (i.e. rectangular area) that the point adjacent with the 4th class location point surrounds is connected with bottom left vertex formed diagonal, and wherein, the 4th class location point is the central point in this region.
A kind of mode preferably determining the chromatic component value of the 4th class location point:
Preferably, in step 203, the chromatic component value of the point that described basis is adjacent with described 4th class location point is determined specifically to comprise the chromatic component value of described 4th class location point:
According to the chromatic component value of two points adjacent with described 4th class location point, determine the chromatic component value of described 4th class location point, two points that wherein said and described 4th class location point is adjacent are point adjacent in the horizontal or vertical direction of described 4th class location point.
As shown in figure 2f for the embodiment of the present invention has the chromatic component that 2 row 2 arrange a chromatic component point, the coordinate of figure mid point is counting from the 0th row the 0th arranges, and wherein the 0th in Fig. 2 f walks to the 2nd row, the 0th row to the chromatic component point one_to_one corresponding of the 2nd row the 0th walks to the 2nd row, the 1st row to the chromatic component point of the 3rd row in Fig. 2 c.
Such as: the chromatic component value using the chromatic component value of the Equations of The Second Kind location point that the 1st row the 0th arranges in Fig. 2 f and the Equations of The Second Kind location point of the 1st row the 2nd row, calculates the chromatic component value of the 4th class location point that the 1st row the 1st arranges.
Again such as: the chromatic component value using the chromatic component value of the first kind location point that the 0th row the 1st arranges in Fig. 2 f and the first kind location point of the 2nd row the 1st row, calculates the chromatic component value of the 4th class location point that the 1st row the 1st arranges.
A kind of preferably according to the chromatic component value of two points adjacent with described 4th class location point, determine that the mode of the chromatic component value of described 4th class location point is: the luminance component relativity measurement value of the 4th class location point determined according to luminance component selects two points to carry out calculating the chromatic component value of the 4th class location point, comprises
According to the chromatic component value of two points adjacent with described 4th class location point, determine the chromatic component value of described 4th class location point, specifically comprise:
Determine the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point;
According to the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in horizontal direction, and according to the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in vertical direction,
If the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, determine the chromatic component value of described 4th class location point;
If the luminance component relativity measurement value of the 4th class location point in horizontal direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, determine the chromatic component value of described 4th class location point.
The luminance component relativity measurement value of the embodiment of the present invention the 4th class location point is less show a little between correlation larger.
Again such as: in calculating chart 2c the 1st row the 2nd arrange the chromatic component value of the 4th class location point time, first the luminance component (1 of three points in the level of the 4th class location point is determined, 1), (1, 2) (1, 3) the luminance component relativity measurement value of the 4th class location point between with through the 4th class location point vertical on the luminance component (0 of three points, 2), (1, 2), (2, 2) the luminance component relativity measurement value of the 4th class location point between, the luminance component relativity measurement value of the 4th class location point now in level is not more than the luminance component relativity measurement value of the 4th class location point vertically, coordinate in usage level is the chromatic component value that the chromatic component value of the chromatic component value of the Equations of The Second Kind location point that the 1st row the 1st arranges and the Equations of The Second Kind location point of the 1st row the 3rd row calculates the 4th class location point of the 1st row the 2nd row.
Again such as: in calculating chart 2c the 1st row the 2nd arrange the chromatic component value of the 4th class location point time, first three luminance components (1 in the level of the 4th class location point are determined, 1), (1, 2) (1, 3) the luminance component relativity measurement value of the 4th class location point between with through the 4th class location point vertical on three luminance components (0, 2), (1, 2), (2, 2) the luminance component relativity measurement value of the 4th class location point between, the luminance component relativity measurement value of the 4th class location point now in level is greater than the luminance component relativity measurement value of the 4th class location point vertically, use vertical on coordinate be the chromatic component value that the chromatic component value of the chromatic component value of the first kind location point that the 0th row the 2nd arranges and the first kind location point of the 2nd row the 2nd row calculates the 4th class location point that the 1st row the 2nd arranges.
Preferably, if described 4th class location point is non-edge point, then the luminance component relativity measurement value of described 4th class location point meets following formula:
E 5=| 2Y (i, j)-Y (i, j-2n+1)-Y (i, j+2n-1) | ... formula nine;
E 6=| 2Y (i, j)-Y (i+2n-1, j)-Y (i-2n+1, j) | ... formula ten;
Wherein, e 5represent the luminance component relativity measurement value of the 4th class location point in horizontal direction, e 6represent the luminance component relativity measurement value of the 4th class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 4th class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
The embodiment of the present invention takes the mode of direct copying to obtain the marginal point of converted images, and such as in figure 2 c, the marginal point of image refers to: the 0th row, the 7th row, the 0th row and the upper all points of the 7th row in image.
Such as: in calculating chart 2c, coordinate is (1,2) during the chromatic component value of the 4th class location point, known Equations of The Second Kind location point (1,2) i=1, j=2, n=0 in, by the luminance component relativity measurement value that i=1, j=2, n=0 substitution formula nine obtains the 4th class location point in level be:
e 5=|2Y(1,2)-Y(1,2-2*0+1)-Y(1,2+2*0-1)|,
By the luminance component relativity measurement value that i=1, j=2, n=0 substitution formula ten obtains vertical upper 4th class location point be:
e 6=|2Y(1,2)-Y(1+2*0-1,2)-Y(1-2*0+1,2)|。
Preferably, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma (i, j)=[Chroma (i, j-2n+1)+Chroma (i, j+2n-1)]/2 ... formula 11;
If the luminance component relativity measurement value of the 4th class location point in vertical direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma (i, j)=[Chroma (i+2n-1, j)+Chroma (i-2n+1, j)]/2 ... formula 12;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Such as: in calculating chart 2c, coordinate is (1,2) during the chromatic component value of the 4th class location point, i=1, j=2, n=0 in known Equations of The Second Kind location point (1,2), by the chromatic component value that i=1, j=2, n=0 substitution formula 11 obtains the 4th class location point be:
Chroma(1,2)=[Chroma(1,2-2*0+1)+Chroma(1,2+2*0-1)]/2。
Again such as: in calculating chart 2c, coordinate is (1,2) during the chromatic component value of the 4th class location point, known Equations of The Second Kind location point (1,2) i=1, j=2, n=0 in, by the chromatic component value that i=1, j=2, n=0 substitution formula 12 obtains the 4th class location point be:
Chroma(1,2)=[Chroma(1+2*0-1,2)+Chroma(1-2*0+1,2)]/2。
Based on same inventive concept, a kind of device of image format conversion is additionally provided in the embodiment of the present invention, due to the method that method that the device of the image format conversion of Fig. 3 is corresponding is a kind of image format conversion of the embodiment of the present invention, therefore the enforcement of embodiment of the present invention device see the enforcement of system, can repeat part and repeats no more.
As shown in Figure 3, the device of the embodiment of the present invention seven image format conversion comprises:
Point position determination unit 300, the position of chromatic component after conversion in image determining each point in original image, and using the chromatic component of the chromatic component of point each in described original image as the first kind location point in converted images, and determine to need to carry out in image after conversion the position of chromatic component of the Equations of The Second Kind location point of interpolation calculation, the 3rd class location point and the 4th class location point;
Equations of The Second Kind location point chromatic component value determining unit 301, for the chromatic component for an Equations of The Second Kind location point, the chromatic component value of described Equations of The Second Kind location point is determined, the central point in the region that wherein said Equations of The Second Kind location point surrounds for the first kind location point adjacent with described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point;
3rd class location point chromatic component value determining unit 302, for the chromatic component for a 3rd class location point, determine the chromatic component value of described 3rd class location point according to the chromatic component value of the point adjacent with described 3rd class location point, wherein said 3rd class location point is point adjacent with first kind location point and adjacent with Equations of The Second Kind location point in vertical direction in horizontal direction;
4th class location point chromatic component value determining unit 303, for the chromatic component for a 4th class location point, determine the chromatic component value of described 4th class location point according to the chromatic component value of the point adjacent with described 4th class location point, wherein said 4th class location point is point adjacent with Equations of The Second Kind location point and adjacent with first kind location point in vertical direction in horizontal direction.
Preferably, described Equations of The Second Kind location point chromatic component value determining unit 301 specifically for:
Determine the chromatic component value of described Equations of The Second Kind location point according to the chromatic component value of two first kind location points adjacent with described Equations of The Second Kind location point, in the region that the chromatic component of two first kind location points that wherein said and described Equations of The Second Kind location point is adjacent surrounds for four described first kind location points, be in the chromatic component of two first kind location points on diagonal.
Preferably, described Equations of The Second Kind location point chromatic component value determining unit 301 specifically for:
Determine the luminance component of each point in four described first kind location points; Determine the luminance component relativity measurement value of the Equations of The Second Kind location point in the region that four first kind location points surround on every bar diagonal; From the region that four first kind location points surround, two first kind location points on the diagonal selecting the luminance component relativity measurement value of Equations of The Second Kind location point minimum; The chromatic component value of described Equations of The Second Kind location point is determined according to the chromatic component value of two first kind location points selected.
Preferably, if described Equations of The Second Kind location point is non-edge point, then the luminance component relativity measurement value of described Equations of The Second Kind location point meets following formula:
e 1=|2Y(i,j)-Y(i-2n+1,j-2n+1)-Y(i+2n-1,j+2n-1)|;
e 2=|2Y(i,j)-Y(i+2n-1,j-2n+1)-Y(i-2n+1,j+2n-1)|;
Wherein, e 1represent the luminance component relativity measurement value of Equations of The Second Kind location point on left diagonal, e 2represent the luminance component relativity measurement value of Equations of The Second Kind location point on right diagonal, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of Equations of The Second Kind location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is not more than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i-2n+1,j-2n+1)+Chroma(i+2n-1,j+2n-1)]/2;
If the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is greater than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j-2n+1)+Chroma(i-2n+1,j+2n-1)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Preferably, described 3rd class location point chromatic component value determining unit 302 specifically for:
According to the chromatic component value of two points adjacent with described 3rd class location point, determine the chromatic component value of described 3rd class location point, two points that wherein said and described 3rd class location point is adjacent are point adjacent in the horizontal or vertical direction of described 3rd class location point.
Preferably, described 3rd class location point chromatic component value determining unit 302 specifically for:
Determine the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point, according to the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in horizontal direction, and according to the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in vertical direction, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point.
Preferably, if described 3rd class location point is non-edge point, then the luminance component relativity measurement value of described 3rd class location point meets following formula:
e 3=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 4=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 3represent the luminance component relativity measurement value of the 3rd class location point in horizontal direction, e 4represent the luminance component relativity measurement value of the 3rd class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 3rd class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 3rd class location point in vertical direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Preferably, described 4th class location point chromatic component value determining unit 303 specifically for:
According to the chromatic component value of two points adjacent with described 4th class location point, determine the chromatic component value of described 4th class location point, two points that wherein said and described 4th class location point is adjacent are point adjacent in the horizontal or vertical direction of described 4th class location point.
Preferably, described 4th class location point chromatic component value determining unit 303 specifically for:
Determine the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, according to the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in horizontal direction, and according to the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in vertical direction, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, determine the chromatic component value of described 4th class location point, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, determine the chromatic component value of described 4th class location point.
Preferably, if described 4th class location point is non-edge point, then the luminance component relativity measurement value of described 4th class location point meets following formula:
e 5=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 6=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 5represent the luminance component relativity measurement value of the 4th class location point in horizontal direction, e 6represent the luminance component relativity measurement value of the 4th class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 4th class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
Preferably, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 4th class location point in vertical direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.

Claims (20)

1. a method for digital image format conversion, it is characterized in that, the method comprises:
The position of the chromatic component determining each point in original image after conversion in image, and using the chromatic component of the chromatic component of point each in described original image as the first kind location point in converted images, and determine to need to carry out in image after conversion the position of chromatic component of the Equations of The Second Kind location point of interpolation calculation, the 3rd class location point and the 4th class location point;
For the chromatic component of an Equations of The Second Kind location point, the chromatic component value of described Equations of The Second Kind location point is determined, the central point in the region that wherein said Equations of The Second Kind location point surrounds for the first kind location point adjacent with described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point;
For the chromatic component of a 3rd class location point, determine the chromatic component value of described 3rd class location point according to the chromatic component value of the point adjacent with described 3rd class location point, wherein said 3rd class location point is point adjacent with first kind location point and adjacent with Equations of The Second Kind location point in vertical direction in horizontal direction;
For the chromatic component of a 4th class location point, determine the chromatic component value of described 4th class location point according to the chromatic component value of the point adjacent with described 4th class location point, wherein said 4th class location point is point adjacent with Equations of The Second Kind location point and adjacent with first kind location point in vertical direction in horizontal direction.
2. the method for claim 1, is characterized in that, determines the chromatic component value of described Equations of The Second Kind location point, specifically comprise according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point:
Determine the luminance component of each point in four described first kind location points;
Determine the luminance component relativity measurement value of the Equations of The Second Kind location point in the region that four first kind location points surround on every bar diagonal;
From the region that four first kind location points surround, two first kind location points on the diagonal selecting the luminance component relativity measurement value of Equations of The Second Kind location point minimum;
The chromatic component value of described Equations of The Second Kind location point is determined according to the chromatic component value of two first kind location points selected.
3. method as claimed in claim 2, it is characterized in that, if described Equations of The Second Kind location point is non-edge point, then the luminance component relativity measurement value of described Equations of The Second Kind location point meets following formula:
e 1=|2Y(i,j)-Y(i-2n+1,j-2n+1)-Y(i+2n-1,j+2n-1)|;
e 2=|2Y(i,j)-Y(i+2n-1,j-2n+1)-Y(i-2n+1,j+2n-1)|;
Wherein, e 1represent the luminance component relativity measurement value of Equations of The Second Kind location point on left diagonal, e 2represent the luminance component relativity measurement value of Equations of The Second Kind location point on right diagonal, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of Equations of The Second Kind location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
4. method as claimed in claim 3, it is characterized in that, if the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is not more than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i-2n+1,j-2n+1)+Chroma(i+2n-1,j+2n-1)]/2;
If the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is greater than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j-2n+1)+Chroma(i-2n+1,j+2n-1)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
5. the method for claim 1, is characterized in that, according to the chromatic component value of the point adjacent with described 3rd class location point, determines the chromatic component value of described 3rd class location point, specifically comprises:
Determine the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point;
According to the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in horizontal direction, and according to the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in vertical direction,
If the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point;
If the luminance component relativity measurement value of the 3rd class location point in horizontal direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point.
6. method as claimed in claim 5, it is characterized in that, if described 3rd class location point is non-edge point, then the luminance component relativity measurement value of described 3rd class location point meets following formula:
e 3=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 4=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 3represent the luminance component relativity measurement value of the 3rd class location point in horizontal direction, e 4represent the luminance component relativity measurement value of the 3rd class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 3rd class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
7. method as claimed in claim 6, it is characterized in that, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 3rd class location point in vertical direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
8. the method for claim 1, is characterized in that, according to the chromatic component value of the point adjacent with described 4th class location point, determines the chromatic component value of described 4th class location point, specifically comprises:
Determine the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point;
According to the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in horizontal direction, and according to the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in vertical direction,
If the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, determine the chromatic component value of described 4th class location point;
If the luminance component relativity measurement value of the 4th class location point in horizontal direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, determine the chromatic component value of described 4th class location point.
9. method as claimed in claim 8, it is characterized in that, if described 4th class location point is non-edge point, then the luminance component relativity measurement value of described 4th class location point meets following formula:
e 5=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 6=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 5represent the luminance component relativity measurement value of the 4th class location point in horizontal direction, e 6represent the luminance component relativity measurement value of the 4th class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 4th class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
10. method as claimed in claim 9, it is characterized in that, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 4th class location point in vertical direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
The device of 11. 1 kinds of digital image format conversions, it is characterized in that, this device comprises:
Point position determination unit, for the position of chromatic component after conversion in image determining each point in original image, and using the chromatic component of the chromatic component of point each in described original image as the first kind location point in converted images, and determine to need to carry out in image after conversion the position of chromatic component of the Equations of The Second Kind location point of interpolation calculation, the 3rd class location point and the 4th class location point;
Equations of The Second Kind location point chromatic component value determining unit, for the chromatic component for an Equations of The Second Kind location point, the chromatic component value of described Equations of The Second Kind location point is determined, the central point in the region that wherein said Equations of The Second Kind location point surrounds for the first kind location point adjacent with described Equations of The Second Kind location point according to the chromatic component value of the first kind location point adjacent with described Equations of The Second Kind location point;
3rd class location point chromatic component value determining unit, for the chromatic component for a 3rd class location point, determine the chromatic component value of described 3rd class location point according to the chromatic component value of the point adjacent with described 3rd class location point, wherein said 3rd class location point is point adjacent with first kind location point and adjacent with Equations of The Second Kind location point in vertical direction in horizontal direction;
4th class location point chromatic component value determining unit, for the chromatic component for a 4th class location point, determine the chromatic component value of described 4th class location point according to the chromatic component value of the point adjacent with described 4th class location point, wherein said 4th class location point is point adjacent with Equations of The Second Kind location point and adjacent with first kind location point in vertical direction in horizontal direction.
12. devices as claimed in claim 11, is characterized in that, described Equations of The Second Kind location point chromatic component value determining unit specifically for:
Determine the luminance component of each point in four described first kind location points; Determine the luminance component relativity measurement value of the Equations of The Second Kind location point in the region that four first kind location points surround on every bar diagonal; From the region that four first kind location points surround, two first kind location points on the diagonal selecting the luminance component relativity measurement value of Equations of The Second Kind location point minimum; The chromatic component value of described Equations of The Second Kind location point is determined according to the chromatic component value of two first kind location points selected.
13. devices as claimed in claim 12, is characterized in that, if described Equations of The Second Kind location point is non-edge point, then the luminance component relativity measurement value of described Equations of The Second Kind location point meets following formula:
e 1=|2Y(i,j)-Y(i-2n+1,j-2n+1)-Y(i+2n-1,j+2n-1)|;
e 2=|2Y(i,j)-Y(i+2n-1,j-2n+1)-Y(i-2n+1,j+2n-1)|;
Wherein, e 1represent the luminance component relativity measurement value of Equations of The Second Kind location point on left diagonal, e 2represent the luminance component relativity measurement value of Equations of The Second Kind location point on right diagonal, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of Equations of The Second Kind location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
14. devices as claimed in claim 13, it is characterized in that, if the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is not more than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i-2n+1,j-2n+1)+Chroma(i+2n-1,j+2n-1)]/2;
If the luminance component relativity measurement value of the Equations of The Second Kind location point on left diagonal is greater than the luminance component relativity measurement value of right corner to the Equations of The Second Kind location point on line, then the chromatic component value of described Equations of The Second Kind location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j-2n+1)+Chroma(i-2n+1,j+2n-1)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
15. devices as claimed in claim 11, is characterized in that, described 3rd class location point chromatic component value determining unit specifically for:
Determine the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, the luminance component of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point; According to the luminance component of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in horizontal direction, and according to the luminance component of two the Equations of The Second Kind positions adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, and the luminance component of described 3rd class location point, determine the luminance component relativity measurement value of the 3rd class location point in vertical direction; If the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 3rd class location point in the horizontal direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point; If the luminance component relativity measurement value of the 3rd class location point in horizontal direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 3rd class location point in the vertical direction of described 3rd class location point, determine the chromatic component value of described 3rd class location point.
16. devices as claimed in claim 15, is characterized in that, if described 3rd class location point is non-edge point, then the luminance component relativity measurement value of described 3rd class location point meets following formula:
e 3=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 4=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 3represent the luminance component relativity measurement value of the 3rd class location point in horizontal direction, e 4represent the luminance component relativity measurement value of the 3rd class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 3rd class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
17. devices as claimed in claim 16, it is characterized in that, if the luminance component relativity measurement value of the 3rd class location point in horizontal direction is not more than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 3rd class location point in vertical direction is greater than the luminance component relativity measurement value of the 3rd class location point in vertical direction, then the chromatic component value of described 3rd class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
18. devices as claimed in claim 11, is characterized in that, described 4th class location point chromatic component value determining unit specifically for:
Determine the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, according to the luminance component of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in horizontal direction, and according to the luminance component of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, and the luminance component of described 4th class location point, determine the luminance component relativity measurement value of the 4th class location point in vertical direction, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two the Equations of The Second Kind location points adjacent with described 4th class location point in the horizontal direction of described 4th class location point, determine the chromatic component value of described 4th class location point, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then according to the chromatic component value of two first kind location points adjacent with described 4th class location point in the vertical direction of described 4th class location point, determine the chromatic component value of described 4th class location point.
19. devices as claimed in claim 18, is characterized in that, if described 4th class location point is non-edge point, then the luminance component relativity measurement value of described 4th class location point meets following formula:
e 5=|2Y(i,j)-Y(i,j-2n+1)-Y(i,j+2n-1)|;
e 6=|2Y(i,j)-Y(i+2n-1,j)-Y(i-2n+1,j)|;
Wherein, e 5represent the luminance component relativity measurement value of the 4th class location point in horizontal direction, e 6represent the luminance component relativity measurement value of the 4th class location point in vertical direction, luminance component relativity measurement value less expression correlation is larger; I, j represent abscissa and the ordinate of the 4th class location point respectively, and n represents preset value, and are natural number, and Y (x, y) represents the luma component values of converted images on (x, y) position.
20. devices as claimed in claim 19, it is characterized in that, if the luminance component relativity measurement value of the 4th class location point in horizontal direction is not more than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i,j-2n+1)+Chroma(i,j+2n-1)]/2;
If the luminance component relativity measurement value of the 4th class location point in vertical direction is greater than the luminance component relativity measurement value of the 4th class location point in vertical direction, then the chromatic component value of described 4th class location point meets following formula:
Chroma(i,j)=[Chroma(i+2n-1,j)+Chroma(i-2n+1,j)]/2;
Wherein, Chroma (x, y) represents the chromatic component value (U or V) of converted images on (x, y) position.
CN201410609040.6A 2014-10-30 2014-10-30 A kind of method and device of digital image format conversion Active CN105554487B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410609040.6A CN105554487B (en) 2014-10-30 2014-10-30 A kind of method and device of digital image format conversion

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410609040.6A CN105554487B (en) 2014-10-30 2014-10-30 A kind of method and device of digital image format conversion

Publications (2)

Publication Number Publication Date
CN105554487A true CN105554487A (en) 2016-05-04
CN105554487B CN105554487B (en) 2017-07-25

Family

ID=55833398

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410609040.6A Active CN105554487B (en) 2014-10-30 2014-10-30 A kind of method and device of digital image format conversion

Country Status (1)

Country Link
CN (1) CN105554487B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631802A (en) * 2014-10-30 2016-06-01 炬芯(珠海)科技有限公司 Digital image format conversion method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7076095B2 (en) * 2000-11-22 2006-07-11 Samsung Electronics Co., Ltd. Method and apparatus for sectioning image into plurality of regions
CN101500066A (en) * 2008-02-03 2009-08-05 深圳艾科创新微电子有限公司 Method and system for image sampling format conversion
CN103024403A (en) * 2012-12-31 2013-04-03 Tcl集团股份有限公司 Conversion method and device for data format of video

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7076095B2 (en) * 2000-11-22 2006-07-11 Samsung Electronics Co., Ltd. Method and apparatus for sectioning image into plurality of regions
CN101500066A (en) * 2008-02-03 2009-08-05 深圳艾科创新微电子有限公司 Method and system for image sampling format conversion
CN103024403A (en) * 2012-12-31 2013-04-03 Tcl集团股份有限公司 Conversion method and device for data format of video

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105631802A (en) * 2014-10-30 2016-06-01 炬芯(珠海)科技有限公司 Digital image format conversion method and device
CN105631802B (en) * 2014-10-30 2018-11-30 炬芯(珠海)科技有限公司 A kind of method and device of digital image format conversion

Also Published As

Publication number Publication date
CN105554487B (en) 2017-07-25

Similar Documents

Publication Publication Date Title
JP5687608B2 (en) Image processing apparatus, image processing method, and image processing program
US11030715B2 (en) Image processing method and apparatus
JP2015141333A (en) Image processing apparatus, image processing method, display device, display device control method, and program
KR101377733B1 (en) -up-scaling
JP2009065639A (en) Method and apparatus for scaling image to produce scaled image
CN105574918A (en) Material adding method and apparatus of 3D model, and terminal
CN104299185A (en) Image magnification method, image magnification device and display device
CN102143322A (en) Image capturing apparatus and control method thereof
JP4649171B2 (en) Magnification Chromatic Aberration Correction Device, Magnification Chromatic Aberration Correction Method, and Magnification Chromatic Aberration Correction Program
TW201633214A (en) Edge detection system and methods
US20170127037A1 (en) Method for the representation of a three-dimensional scene on an auto-stereoscopic monitor
TWI544785B (en) Image downsampling apparatus and method
KR101279576B1 (en) Method for generating panorama image within digital image processing apparatus
CN105631802B (en) A kind of method and device of digital image format conversion
CN103259960A (en) Data interpolation method and device and image output method and device
CN105554487A (en) Method and apparatus for format conversion of digital image
JP2014042117A (en) Image processing apparatus and image processing method
KR102470242B1 (en) Image processing device, image processing method and program
JP2017045273A (en) Image processing apparatus, image processing method, and program
CN106791736B (en) Trapezoidal correction method and projector
CN110969675B (en) Method for simulating blurring of different-shape diaphragms of camera
JP2007324665A (en) Image correction apparatus and video display apparatus
JP2017126885A (en) Image correction device, image correction method and computer program for image correction
KR101212026B1 (en) Apparatus and method for adaptively compositing image using chroma key
JP5087845B2 (en) Image display circuit and image display processing method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: 519085 High-tech Zone, Tangjiawan Town, Zhuhai City, Guangdong Province

Patentee after: ACTIONS TECHNOLOGY Co.,Ltd.

Address before: 519085 High-tech Zone, Tangjiawan Town, Zhuhai City, Guangdong Province

Patentee before: ACTIONS (ZHUHAI) TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder