Embodiment
Describe embodiments of the invention below in detail, the example of described embodiment is shown in the drawings, and wherein identical from start to finish or similar label is represented identical or similar elements or the element with identical or similar functions.Below by the embodiment that is described with reference to the drawings is exemplary, only is used to explain the present invention, and can not be interpreted as limitation of the present invention.
The present invention mainly is: according to the kinetic characteristic of image on room and time bad piece or bad point are detected, obtain the preceding frame motion compensation point and the back frame motion compensation point of pixel correspondence in this two field picture by motion vector, thereby just can detect bad piece or bad point more accurately according to frame motion compensation point before described and back frame motion compensation point.For example (x, y), (x, forward motion vector y) and backward motion vector just can obtain this pixel A (x according to described forward motion vector and backward motion vector to access this pixel A by calculating for the pixel A in this two field picture
1, y
1) preceding frame motion compensation point B (x in the corresponding prior image frame
2, y
2) and corresponding back two field picture in back frame motion compensation point C (x
3, y
3).That is to say that in this three two field picture image is frame motion compensation point B (x in the past
2, y
2) move to pixel A (x
1, y
1), again by pixel A (x
1, y
1) move to back frame motion compensation point C (x
3, y
3).Definite by to preceding frame motion compensation point B and back frame motion compensation point C just can judge accurately whether pixel A is bad point, and this method also is applicable to the detection to bad piece equally like this.As one embodiment of the present of invention, the present invention carries out piecemeal to this two field picture, prior image frame and back two field picture simultaneously, and calculate the block motion vector of each piecemeal in this two field picture with respect to prior image frame and back two field picture, conduct belongs to the motion vector of all pixels in this piecemeal with regard to the available block motion vector like this, thereby can reduce operand effectively.Wherein, preferably, the mode of employing classification piece coupling obtains the block motion vector of piecemeal, with revised block motion vector in subordinate's image as the initial value of block motion vector at the corresponding levels, like this by can guarantee the accuracy of the block motion vector that finally obtains in every grade of image to the correction of this grade block motion vector.
Below just the description by specific embodiment the present invention is introduced:
As described in Figure 1, flow chart for one embodiment of the invention dead pixel points of images detection method, preceding frame motion compensation point and back frame motion compensation point by relative prior image frame of pixel in definite this two field picture and back two field picture, can effectively detect this pixel, improve the accuracy that dead pixel points of images detects.This embodiment may further comprise the steps:
Step S101 carries out buffer memory at least three frame continuous images, comprises this two field picture, at least one prior image frame and at least one back two field picture.Wherein, the number of prior image frame and back two field picture is at least one, as selects for use a plurality of prior image frames and/or back two field picture then will help to improve the precision that bad point detects.Need to prove select for use prior image frame and the back two field picture number can be unequal.
Step S102 determines that pixel in this two field picture is respectively with respect to the forward motion vector of prior image frame with respect to the backward motion vector of back two field picture.
As an optimal way of this step, can carry out piecemeal to this two field picture, prior image frame and back two field picture, and determine that each piecemeal in this two field picture is respectively with respect to the forward block motion vector of prior image frame and back to block motion vector with respect to the back two field picture.So just can be with the forward block motion vector of piecemeal and back to block motion vector as forward motion vector that belongs to all pixels in this piecemeal and backward motion vector, so can reduce operand effectively.As the foregoing description mode more preferably, the block motion vector that obtains by classification piece coupling, begin to calculate the block motion vector of this grade from the lowermost level image, and the block motion vector that subordinate's image the is obtained initial value of higher level's image motion vector the most, until the block motion vector that obtains highest image, thereby further improve the accuracy of block motion vector by the mode of approaching step by step.More preferably, subordinate's image is as before the image block motion vector initial value at the corresponding levels in the above-described embodiments, it is judged, if this subordinate's image unreliable then it is revised, thereby the accuracy of the block motion vector that assurance finally obtains further improves the accuracy of bad some detection.
As shown in Figure 2, be the flow chart of one embodiment of the invention, may further comprise the steps by classification piece matching way computing block motion vector:
Step S201 carries out m filtering with low pass filter respectively to this two field picture, prior image frame and back two field picture, obtains this two field picture, prior image frame and the back two field picture of m level different resolution, and the high more then described image level of resolution is high more.Wherein, m is preferably 2-5 time, and more excellent is 3 times.
Step S202 carries out piecemeal to this two field picture, prior image frame and back two field picture under different resolution, wherein, the resolution of classification is big or small opposite with described piecemeal, and resolution is low more, and piecemeal is big more; Otherwise resolution is big more, and then piecemeal is more little.
Step S203 from this two field picture of lowermost level (lowest resolution), searches for best matching blocks to each piecemeal in this this two field picture in prior image frame and back two field picture.Wherein, the fast adoptable matching criterior of search optimum Match is that modes such as the absolute value difference of minimum average B configuration (MAD), sqrt, crossvariance or the equal value difference of piece are determined best matching blocks.
Step S204, according to the above-mentioned best matching blocks that searches determine each piecemeal in this two field picture of lowermost level the forward block motion vector and the back to block motion vector.
Step S205 judges whether the forward block motion vector of piecemeal in above-mentioned definite this two field picture of lowermost level and back be reliable to block motion vector.Wherein, as a specific embodiment, the present invention proposes a kind of reliable method that judges whether, be about to calculate the MAD value of corresponding rectangular block in forward motion vector and backward motion vector MAD value and the calculating front and back frame, judge according to following formula whether motion vector is reliable:
In above-mentioned formula (1), 1 expression (x, y) the motion vector MV of piece place (x, y) unreliable, 0 expression motion vector MV (x, y) reliable, wherein, T
1And T
2Be respectively preset threshold value, T
2<T
1, b represents reverse, f represents propulsion, the motion before and after bf represents between the frame.Preferably, T
1Be 20, T
2Be 10.Wherein, above-mentioned judgment criterion has been utilized the continuity of moving on the time shaft, has therefore reduced the sensitivity to noise to a certain extent.
Step S206 if judge that the block motion vector of this two field picture of lowermost level calculating is unreliable, then revises it; If judge reliably, then execution in step S207.For detected unreliable motion vector, then calculate the MAD of this piece, and this block motion vector is revised with the neighborhood block motion vector of minimum MAD correspondence with the neighborhood block motion vector.Modified motion vector is as the initial value of next stage piece coupling.Equation expression is:
In above-mentioned formula (2), (x, y) (x, neighborhood block motion vector y), A are the neighborhood set to expression motion vector MV to MVnb, MAD
MVnb (x, y)Be motion vector MV (x, the absolute value difference of minimum average B configuration of neighborhood block motion vector y).
Step S207, with each piecemeal correspondence in this two field picture of lowermost level reliably or through the block motion vector revised block motion vector initial value as corresponding piecemeal in this two field picture of its higher level, calculate the block motion vector of this two field picture of higher level.Be specially: search for the best matching blocks of this grade at one in more among a small circle reliably or through the block motion vector revised according to what subordinate's image provided, and then determine the block motion vector of each piecemeal in this two field picture of this grade according to the best matching blocks that searches.
Step S208, whether the block motion vector of each piecemeal is reliable in this two field picture of this grade that obtains among the determining step S207.Judge whether that reliable method is identical with the method that step S205 is adopted in same this step.If judge reliably, then execution in step S210; If it is unreliable to judge, execution in step S209 then.
Step S209 if judge that the block motion vector of this this two field picture of level (non-lowermost level image) calculating is unreliable, then revises it.
Same the present invention has also proposed a kind of correcting mode, but different with the formula of step S206 correction here, its difference is to have added upper level motion vector initial value, and this motion vector correction formula is:
Wherein, MV
I-1(x y) is (x, y) the revised motion vector in piece place, MV at the corresponding levels
iBe that (x, y) the revised motion vector in piece place, λ are weights to upper level, weigh upper level motion vector shared proportion in the correction of this grade motion vector, MVnb
I-1Be that (x, the y) motion vector of piece place neighborhood, A are the neighborhood set to this level, MAD
MVnb (x, y)Be motion vector MV (x, the absolute value difference of minimum average B configuration of neighborhood block motion vector y).
Step S210 will judge the block motion vector initial value of the block motion vector of reliable or process step S209 correction as corresponding piecemeal in this two field picture of its higher level among the step S208, calculate the block motion vector of this two field picture of higher level.The forward block motion vector of repeating step S208-S210 piecemeal in drawing highest this two field picture and back are to block motion vector.
Step S211, with the forward block motion vector of piecemeal in highest this two field picture and back to block motion vector as piecemeal described in this two field picture in the forward motion vector and the backward motion vector of all pixels.
Step S103, the forward motion vector and the backward motion vector of each pixel in this two field picture that obtains according to step S102, determine pixel in this two field picture respectively with respect to the preceding frame motion compensation point of prior image frame, and with respect to the back frame motion compensation point of back two field picture.As according to as described in forward motion vector and backward motion vector obtain this pixel A (x
1, y
1) preceding frame motion compensation point B (x in the corresponding prior image frame
2, y
2) and corresponding back two field picture in back frame motion compensation point C (x
3, y
3).
Step S104 goes bad some detection according to frame motion compensation point before described and described back frame motion compensation point to pixel described in described the two field picture.The present invention proposes a species diversity sort method and go bad the method that a little detects, be specially according to preceding frame motion compensation point B (x
2, y
2) and back frame motion compensation point C (x
3, y
3), and preceding frame motion compensation point B (x
2, y
2) neighborhood and back frame motion compensation point C (x
3, y
3) pixel A (x in u pixel of neighborhood and this two field picture
1, y
1) correlation, judge this pixel A (x
1, y
1) whether be bad point.Wherein, optional preceding frame motion compensation point B (x
2, y
2) and back frame motion compensation point C (x
3, y
3) horizontal u the pixel (do not comprise back frame motion compensation point C) of neighborhood, or vertically conduct such as u pixel with reference to point.Wherein, u is 1-9, and preferred u is 2, also can select more reference point for use in order to improve the accuracy of judgement degree certainly.
As one embodiment of the present of invention, the present invention proposes and a kind ofly judge that whether pixel is the method for bad point, select to remove preceding frame motion compensation point B (x among this embodiment
2, y
2) and back frame motion compensation point C (x
3, y
3) outside horizontal 2 neighborhood territory pixel points as with reference to pixel.As shown in Figure 3, specifically may further comprise the steps:
Step S301 supposes
It is n two field picture coordinate
Place's gray value, and definition vector
: vector wherein
Be frame motion compensation point B (x before comprising
2, y
2) and back frame motion compensation point C (x
3, y
3), with and the vector of neighborhood territory pixel point.
In the following formula (4),
N-1 frame and n+1 two field picture have been comprised
If six pixels of neighborhood are at the n two field picture
The place is a spot, so
Will with
In pixel between no correlation, gray scale difference value each other is bigger, on the contrary gray scale difference value can be smaller.
Step S302 averages preceding frame motion compensation vertex neighborhood and back frame motion compensation vertex neighborhood gray values of pixel points, obtains the grade average.Wherein, proposed a kind of method that obtains the grade average, be specially vector as one embodiment of the present of invention
In element resequence according to gray value, obtain new vector
Wherein,
And define a grade average
Step S303 determines the grade difference, and described grade difference is weighed the size of spot correlation on pixel and the time neighborhood, described grade difference
Obtain by following formula:
Wherein, described
It is n two field picture coordinate
Place's gray value.
Step S304 judges the correlation of pixel and grade average in described the two field picture, if relevant, then this pixel is not a bad point; If uncorrelated, then this pixel is a bad point.Be specially according to the grade difference
Whether greater than threshold value T
iJudge whether this pixel is relevant with the grade average in described the two field picture:
I=1,2,3, wherein, i=1,2,3, T
1, T
2And T
3Be predetermined threshold, and T
1<T
2<T
3Set up as arbitrary inequality in the above-mentioned formula, judge that then pixel is uncorrelated with the grade average in this two field picture, this pixel is a bad point.Wherein, preferably, T1 is 5, T2 is 10, T3 is 40.Wherein, because threshold value T1 weighs each pixel of vertex neighborhood to be detected and the immediate degree of measuring point pixel value to be checked, so threshold value T1 is a most important threshold value.
As one embodiment of the present of invention, the present invention also proposes a kind of restorative procedure of dead pixel points of images, at first utilizes the dead pixel points of images detection method of the foregoing description to determine not repeat them here bad point in the image; By vector median filtering mode, gradient diffusion repair mode or weighted average repair mode described bad point is repaired then.As one embodiment of the present of invention, the present invention proposes and repair the concrete implementation of vector median filtering mode, as shown in Figure 4, may further comprise the steps:
Step S401 transfers filter template W
z, the template W of this filter wherein
z(z=1,2,3,4,5) are at the n two field picture
Place definition, template figure as shown in Figure 5, wherein template is of a size of 3 * 3, black region is represented the pixel that will use in the filtering in the template.Certainly also can select the template of other sizes, or select the template of other corresponding black region.
Step S402 finds described template W according to described bad point
zLast corresponding pixel, and obtain
Described
Determine by following formula,
Wherein,
D (i, j)=| X
i-X
j|, X
i, X
jBe the bad some template W of institute
zThe middle pairing pixel gray value of black region, (i j) is X to d
i, X
jBetween distance.
Step S403, definition set
And according to described
Calculate s (z), described
z=1,2,3,4,5。
Step S404 selects s (z) minimum value pairing
As the pixel value at described bad some place, as pass through formula
Obtain.
The foregoing description has illustrated the detection and the restorative procedure of the present invention's bad point in to image, and the present invention equally also can be applicable to the detection of bad piece in the image and reparation, below will be described with detection and the reparation to bad piece of the mode of embodiment.
As shown in Figure 6, the flow chart for the bad piece detection method of the image of one embodiment of the invention may further comprise the steps:
Step S601 carries out buffer memory at least three frame continuous images, comprises this two field picture, at least one prior image frame and at least one back two field picture.Wherein, the number of prior image frame and back two field picture is at least one, as selects for use a plurality of prior image frames and/or back two field picture will help to improve the precision that bad point detects.Need to prove select for use prior image frame and the back two field picture number can be unequal.
Step S602 carries out m filtering with low pass filter respectively to this two field picture, prior image frame and back two field picture, obtains this two field picture, prior image frame and the back two field picture of m level different resolution, and the high more then described image level of resolution is high more.Wherein, m is preferably 2-5 time, and more excellent is 3 times.
Step S603 carries out piecemeal to this two field picture, prior image frame and back two field picture under different resolution, wherein, the resolution of classification is big or small opposite with described piecemeal, and resolution is low more, and piecemeal is big more; Otherwise resolution is big more, and then piecemeal is more little.
Step S604 determines that piecemeal in this two field picture is respectively with respect to the forward block motion vector of prior image frame and back to block motion vector with respect to the back two field picture.As shown in Figure 7, the flow chart for one embodiment of the invention computing block motion vector specifically may further comprise the steps:
Step S701 from this two field picture of lowermost level (lowest resolution), searches for best matching blocks to each piecemeal in this this two field picture in prior image frame and back two field picture.Wherein, the fast adoptable matching criterior of search optimum Match is the absolute value difference of minimum average B configuration (MAD), sqrt, crossvariance or the equal value difference of piece etc.
Step S702, according to the above-mentioned best matching blocks that searches determine each piecemeal in this two field picture of lowermost level the forward block motion vector and the back to block motion vector.
Step S703 judges whether the forward block motion vector of piecemeal in above-mentioned definite this two field picture of lowermost level and back be reliable to block motion vector.Wherein, as a specific embodiment, the present invention proposes a kind of reliable method that judges whether, be about to calculate the MAD value of corresponding rectangular block in forward motion vector and backward motion vector MAD value and the calculating front and back frame, judge according to following formula whether motion vector is reliable:
In above-mentioned formula (1), 1 expression (x, y) the motion vector MV of piece place (x, y) unreliable, 0 expression motion vector MV (x, y) reliable, wherein, T
1And T
2Be respectively preset threshold value, T
2<T
1, b represents reverse, f represents propulsion, the motion before and after bf represents between the frame.Preferably, T
1Be 20, T
2Be 10.Wherein above-mentioned judgment criterion has been utilized the continuity of moving on the time shaft, has therefore reduced the sensitivity to noise to a certain extent.
Step S704 if judge that the block motion vector of this two field picture of lowermost level calculating is unreliable, then revises it; If reliable, execution in step S207 then.For detected unreliable motion vector, then calculate the MAD of this piece, and this block motion vector is revised with the neighborhood block motion vector of minimum MAD correspondence with the neighborhood block motion vector.Modified motion vector is as the initial value of next stage piece coupling.Equation expression is:
In above-mentioned formula (2), (x, y) (x, neighborhood block motion vector y), A are the neighborhood set to expression motion vector MV to MVnb, MAD
MVnb (x, y)Be motion vector MV (x, the absolute value difference of minimum average B configuration of neighborhood block motion vector y).
Step S705, with each piecemeal correspondence in this two field picture of lowermost level reliably or through the block motion vector revised block motion vector initial value as corresponding piecemeal in this two field picture of its higher level, calculate the block motion vector of its this two field picture of higher level.Be specially: search for the best matching blocks of this grade at one in more among a small circle reliably or through the block motion vector revised according to what subordinate's image provided, and then determine the block motion vector of each piecemeal in this two field picture of this grade according to the best matching blocks that searches.
Step S706, whether the block motion vector of each piecemeal is reliable in this two field picture of this grade that obtains among the determining step S705.Judge whether that reliable method is identical with the method that step S703 is adopted in same this step.If judge reliably, then execution in step S708; If it is unreliable to judge, execution in step S707 then.
Step S707 if judge that the block motion vector of this this two field picture of level (non-lowermost level image) calculating is unreliable, then revises it.
The correction formula of same this step is different with the formula that step S704 revises, and its difference is to have added upper level motion vector initial value, and this motion vector correction formula is:
Wherein, MV
I-1(x y) is (x, y) the revised motion vector in piece place, MV at the corresponding levels
iBe that (x, y) the revised motion vector in piece place, λ are weights to upper level, weigh upper level motion vector shared proportion in the correction of this grade motion vector, MVnb
I-1Be that (x, the y) motion vector of piece place neighborhood, A are the neighborhood set to this level, MAD
MVb (x, y)Be motion vector MV (x, the absolute value difference of minimum average B configuration of neighborhood block motion vector y).
Step S708 will judge the block motion vector initial value of the block motion vector of reliable or process step S707 correction as corresponding piecemeal in this two field picture of its higher level among the step S706, calculate the block motion vector of its this two field picture of higher level.The forward block motion vector of repeating step S706-S708 piecemeal in drawing highest this two field picture and back are to block motion vector.
Step S605 go bad a little detection to block motion vector to each pixel in the piecemeal according to the forward block motion vector of piecemeal and back, determines counting of bad pixel in the piecemeal.Be specially: determine each pixel in this piecemeal respectively with respect to the forward motion vector of prior image frame with respect to the backward motion vector of back two field picture according to the forward block motion vector of the piecemeal correspondence in this two field picture and back to block motion vector, before determining according to forward motion vector and backward motion vector again frame motion compensation point and after frame motion compensation point; Last again according to each pixel in the piecemeal, and corresponding described before frame motion compensation point and described after frame motion compensation point each pixel in the described piecemeal is gone bad some detection, determine counting of bad pixel in the described piecemeal.Whether wherein, detect pixel is that the method for going bad point can not repeat them here with reference to flow process shown in Figure 3.
Step S606 judges according to counting of bad pixel in the piecemeal whether piecemeal is bad piece, if the counting greater than predetermined threshold value of bad pixel, then this piecemeal is a bad piece.Wherein, predetermined threshold value needs the size decision according to piecemeal, and as one 3 * 3 piecemeal, then can establish threshold value is 2, promptly just thinks that if any 2 bad points this piecemeal is a bad piece in this piecemeal.If piecemeal is very big certainly, and 1 or 2 bad point is wherein only arranged,, so just can think that this piecemeal is not a bad piece for insignificant.
Same the present invention has also proposed the restorative procedure to bad piece, when promptly step S606 determines that this piecemeal is bad piece in the above-described embodiments, respectively each the bad point in this bad piece is repaired.Wherein, can repair bad point by vector median filtering mode, gradient diffusion repair mode or weighted average repair mode.Wherein, the vector median filtering mode does not repeat them here shown in Fig. 4 flow chart.
As shown in Figure 8, dead pixel points of images checkout gear structure chart for one embodiment of the invention, this device comprises that picture frame cache module 810, motion vector computation module 820, motion compensation point determination module 830 and bad point detect module 840, picture frame cache module 810 is used at least three frame continuous images are carried out buffer memory, comprises this two field picture, at least one prior image frame and at least one back two field picture; Motion vector computation module 820 is used for the image according to picture frame cache module 810 buffer memorys, determines pixel in this two field picture respectively with respect to the forward motion vector of prior image frame, and with respect to the backward motion vector of back two field picture; Motion compensation point determination module 830 is used for the forward motion vector that obtains according to motion vector computation module 820 and backward motion vector and determines that this two field picture pixel is respectively with respect to the preceding frame motion compensation point of prior image frame with respect to the back back frame motion compensation point of two field picture; The preceding frame motion compensation points that bad some detection module 840 is used for determining according to motion compensation point determination module 830 are gone bad a little this two field picture pixel with back frame motion compensation point and are detected.
Wherein, as an embodiment, motion vector computation module 820 comprises piecemeal submodule 821 and block motion vector calculating sub module 822, and piecemeal submodule 821 is used for described two field picture of picture frame cache module 810 buffer memorys, described prior image frame and described back two field picture are carried out piecemeal; Block motion vector calculating sub module 822 is used for determining this two field picture piecemeal respectively with respect to the forward block motion vector of prior image frame and back to block motion vector with respect to the back two field picture, and wherein the forward block motion vector of piecemeal and back can be used as described forward motion vector and the described backward motion vector that belongs to pixel in the piecemeal to block motion vector.
Wherein, motion vector computation module 820 also comprises classification submodule 823 in the above-described embodiments, is used for according to resolution this two field picture, prior image frame and back two field picture being carried out classification respectively, wherein, the high more then described image level of resolution is high more, and the resolution of classification is big or small opposite with piecemeal; Block motion vector calculating sub module 822 also be used for the forward block motion vector of subordinate's image piecemeal and back to block motion vector as image at the corresponding levels in the initial value of corresponding piecemeal, obtain piecemeal in the described image at the corresponding levels the forward block motion vector and the back to block motion vector, in drawing highest image the forward block motion vector of piecemeal and the back to block motion vector.
Wherein, the motion vector computation module 820 in the foregoing description also comprises to be judged submodule 824 and revises submodule 825, judges that submodule 824 is used for judging whether the block motion vector of subordinate's image piecemeal is reliable; Revising submodule 825 is used for when judging that submodule 824 decision block motion vectors are unreliable this block motion vector being revised.
As shown in Figure 9, dead pixel points of images prosthetic device structure chart for one embodiment of the invention, this prosthetic device comprises that picture frame cache module 910, motion vector computation module 920, motion compensation point determination module 930, bad point detect module 940 and repair module 950, picture frame cache module 910 is used at least three frame continuous images are carried out buffer memory, comprises this two field picture, at least one prior image frame and at least one back two field picture; Motion vector computation module 920 is used for the image according to picture frame cache module 910 buffer memorys, determines that pixel in this two field picture is respectively with respect to the forward motion vector of prior image frame with respect to the backward motion vector of back two field picture; Motion compensation point determination module 930 is used for the forward motion vector that obtains according to motion vector computation module 920 and backward motion vector and determines that this two field picture pixel is respectively with respect to the preceding frame motion compensation point of prior image frame with respect to the back back frame motion compensation point of two field picture; The preceding frame motion compensation points that bad some detection module 940 is used for determining according to motion compensation point determination module 930 are gone bad a little this two field picture pixel with back frame motion compensation point and are detected; Repairing module 950 is used for when bad point detects module 940 detection pixels for bad point this pixel being repaired.
Wherein, as one embodiment of the present of invention, motion vector computation module 920 comprises piecemeal submodule 921 and block motion vector calculating sub module 922, and piecemeal submodule 921 is used for described two field picture of picture frame cache module 910 buffer memorys, described prior image frame and described back two field picture are carried out piecemeal; Block motion vector calculating sub module 922 is used for determining this two field picture piecemeal respectively with respect to the forward block motion vector of prior image frame and back to block motion vector with respect to the back two field picture, and wherein the forward block motion vector of piecemeal and back can be used as the forward motion vector and the backward motion vector of the described pixel that belongs to this piecemeal to block motion vector.
Wherein, motion vector computation module 920 also comprises classification submodule 923 in the above-described embodiments, is used for according to resolution this two field picture, prior image frame and back two field picture being carried out classification, wherein, the high more then image level of resolution is high more, and the resolution of classification is big or small opposite with piecemeal; Block motion vector calculating sub module 922 also be used for the forward block motion vector of subordinate's image piecemeal and back to block motion vector as image at the corresponding levels in the initial value of corresponding piecemeal, obtain piecemeal in the described image at the corresponding levels the forward block motion vector and the back to block motion vector, in drawing described highest image the forward block motion vector of piecemeal and the back to block motion vector.
Wherein, motion vector computation module 920 also comprises judgement submodule 924 and revises submodule 925 in the above-described embodiments, judges that submodule 924 is used for judging whether the block motion vector of subordinate's image piecemeal is reliable; Revising submodule 925 is used for when judging that submodule 924 judges that described block motion vector is unreliable this block motion vector being revised.
As shown in figure 10, be the bad piece checkout gear of the image of one embodiment of the invention structure chart, this bad piece checkout gear comprises picture frame cache module 1010, piecemeal module 1020, block motion vector computing module 1030, bad count determination module 1040 and bad piece detection module 1050, picture frame cache module 1010 is used at least three frame continuous images are carried out buffer memory, comprises this two field picture, at least one prior image frame and at least one back two field picture; Piecemeal module 1020 is used for this two field picture of picture frame cache module 1010 buffer memorys, prior image frame and back two field picture are carried out piecemeal; The piecemeal that block motion vector computing module 1030 is used for determining 1020 pairs of these two field pictures of piecemeal module is respectively with respect to the forward block motion vector of prior image frame and back to block motion vector with respect to the back two field picture; Counting of described bad pixel of piecemeal determined to block motion vector in forward block motion vector and back that the bad determination module 1040 of counting is used for obtaining according to block motion vector computing module 1030; Bad piece detection module 1050 is used for judging according to the counting of bad pixel that the bad determination module 1040 of counting is determined whether described piecemeal is bad piece, if the counting greater than predetermined threshold value of described bad pixel, then described piecemeal is a bad piece.
Wherein, as one embodiment of the present of invention, the bad determination module 1040 of counting comprises that motion compensation point determines that submodule 1041 and bad point detect submodule 1042, motion compensation point determine submodule 1041 be used for according to the forward block motion vector and after to block motion vector determine each pixel of piecemeal respectively with respect to the preceding frame motion compensation point of prior image frame and with respect to after the back frame motion compensation point of two field picture; Bad point detects submodule 1042 and is used for each pixel according to described piecemeal, and motion compensation point determine the correspondence that submodule 1041 obtains preceding frame motion compensation point and after frame motion compensation point each pixel in the piecemeal is gone bad some detection.
Wherein, block motion vector computing module 1030 also comprises classification submodule 1031 and block motion vector calculating sub module 1032 at the corresponding levels in the above-described embodiments, classification submodule 1031 is used for according to resolution this two field picture, prior image frame and back two field picture being carried out classification, wherein, the high more then described image level of resolution is high more, and the resolution of classification is big or small opposite with piecemeal; Block motion vector calculating sub module 1032 at the corresponding levels be used for the forward block motion vector of subordinate's image piecemeal and back to block motion vector as image at the corresponding levels in the initial value of corresponding piecemeal, obtain piecemeal in the image at the corresponding levels the forward block motion vector and the back to block motion vector, in drawing highest image the forward block motion vector of piecemeal and the back to block motion vector.
Wherein, block motion vector computing module 1030 also comprises judgement submodule 1033 and revises submodule 1034 in the above-described embodiments, judges that submodule 1033 is used for judging whether the block motion vector of subordinate's image piecemeal is reliable; Revising submodule 1034 is used for when judging that submodule 1033 decision block motion vectors are unreliable block motion vector being revised.
As shown in figure 11, be the bad block repair apparatus structure chart of the image of one embodiment of the invention, this bad block repair apparatus of image comprises that picture frame cache module 1110, piecemeal module 1120, block motion vector computing module 1130, bad point detect module 1140 and repair module 1150, picture frame cache module 1110 is used at least three frame continuous images are carried out buffer memory, comprises this two field picture, at least one prior image frame and at least one back two field picture; Piecemeal module 1120 is used for this two field picture of picture frame cache module 1110 buffer memorys, prior image frame and back two field picture are carried out piecemeal; Block motion vector computing module 1130 is used for determining that this two field picture piecemeal is respectively with respect to the forward block motion vector of prior image frame and back to block motion vector with respect to the back two field picture; The forward block motion vector that bad some detection module 1140 is used for obtaining according to block motion vector computing module 1130 is gone bad a little each pixel of piecemeal to block motion vector with the back and is detected; Repairing module 1150 is used for that bad point is detected the bad point that module 1140 detects piecemeal and repairs.
Wherein, as one embodiment of the present of invention, bad point detects a module 1140 and comprises that motion compensation point determines that submodule 1141 and bad point detect submodule 1142, motion compensation point determine submodule 1141 be used for according to the forward block motion vector and after to block motion vector determine each pixel of piecemeal respectively with respect to the preceding frame motion compensation point of prior image frame and with respect to after the back frame motion compensation point of two field picture; Bad point detects submodule 1142 and is used for each pixel according to piecemeal, and motion compensation point determine the correspondence that submodule 1141 obtains preceding frame motion compensation point and after frame motion compensation point each pixel in the piecemeal is gone bad some detection.
Wherein, block motion vector computing module 1130 also comprises classification submodule 1131 and block motion vector calculating sub module 1132 at the corresponding levels in the above-described embodiments, classification submodule 1131 is used for according to resolution this two field picture, prior image frame and back two field picture being carried out classification, wherein, the high more then image level of resolution is high more, and the resolution of classification is big or small opposite with piecemeal; Block motion vector calculating sub module 1132 at the corresponding levels be used for the forward block motion vector of subordinate's image piecemeal and back to block motion vector as image at the corresponding levels in the initial value of corresponding piecemeal, obtain piecemeal in the described image at the corresponding levels the forward block motion vector and the back to block motion vector, in drawing highest image the forward block motion vector of piecemeal and the back to block motion vector.
Wherein, block motion vector computing module 1130 also comprises judgement submodule 1133 and revises submodule 1134 in the above-described embodiments, judges that submodule 1131 is used for judging whether the block motion vector of subordinate's image piecemeal is reliable; Revising submodule 1134 is used for when judging that submodule 1133 decision block motion vectors are unreliable block motion vector being revised.
Advantage of the present invention is: taken into full account image in time with the epigraph gray scale characteristics relevant in space with motion vector, obtain the motion compensation point in the two field picture of pixel correspondence front and back in this two field picture according to motion vector, and according to the pixel after the motion compensation pixel of this two field picture is gone bad a little and to be detected, thereby improve the accuracy of detection of bad point or bad piece, the accuracy of the reparation of bad point or bad piece in the improvement image.
And the present invention represents the motion vector of each pixel in the piecemeal by block motion vector, thereby can effectively reduce operand.
The present invention also obtains piecemeal by the mode that adopts classification piece coupling block motion vector mates step by step, thereby has improved the accuracy that block motion vector calculates.
The present invention is also when the classification piece mates, reliability to the block motion vector of subordinate's image is judged, if it is unreliable then it is revised, thereby guarantee that block motion vector as higher level's image initial value all is reliably or through revising, thereby further improved the accuracy that block motion vector calculates.
Although illustrated and described embodiments of the invention, for the ordinary skill in the art, be appreciated that without departing from the principles and spirit of the present invention and can carry out multiple variation, modification, replacement and modification that scope of the present invention is by claims and be equal to and limit to these embodiment.