For the band direction FMM image repair methods of virtual visual point image
Technical field
The invention belongs to empty image repair field, it is related to a kind of band direction FMM images for virtual visual point image to repair
Compound method, especially for the band cavity image obtained after the virtual viewpoint rendering based on depth map.
Background technology
With the development due to 3D technology and the gradually enhancing of 3D hardware devices, people for 3D products demand increasingly
Increase.This causes that 2D turns 3D technology and developed, while also making rendering technique (the Model Based based on model
Rendering, MBR) and image basedrendering (Image Based Rendering, IBR) as virtual view synthesize
Key technology.The characteristics of speed is fast, bandwidth demand is small is drawn because image basedrendering has, it is increasingly becoming master
Stream.Wherein the virtual viewpoint rendering (Depth Image Based Rendering, DIBR) based on depth map uses more wide
It is general.And for the new viewpoint image of DIBR technology to drawing, can there are problems that a series of visibility problems, resampling and cavity are asked
Topic.
In new virtual visual point image, some cavities not of uniform size often occur.Empty Producing reason is that
A little pixels being blocked in former visual point image become visible in new virtual visual point image.Empty problem be in DIBR most
Important problem, while being also most scabrous problem.Can typically be pre-processed by depth map, be referred to using multiple
Viewpoint come draw virtual view and to cavity filled up to solve using series of algorithms.There was only one or two pixel for some
The cavity of fine cracks type wide, often using image repair algorithm with regard to preferable effect can be obtained.And due to foreground area and
The depth information difference of background area is larger, can cause the in larger distance of foreground area skew in new virtual view, produces larger
Cavity.For this cavity, the fast marching algorithms that were proposed in 2004 using Telea (Fast Marching Method,
FMM empty reparation) is carried out, the obfuscation of display foreground edges of regions information can be caused.
Fig. 1 is the reparation direction of FMM algorithms, and its principle is first to repair empty borderline region, then progressive, will be whole
Repair in individual cavity.It all uses the value of all of non-empty pixel in hole region periphery according to weight function, meter
Calculate the pixel value of hole region.The pixel value of foreground area by certain weighting ratio, will be passed to hole region by this.
So as to cause hole region to be influenceed by foreground area pixel.
The content of the invention
The present invention is for the new virtual visual point image after DIBR, there is provided a kind of Fast marching image repair side with direction
Method.
The technical solution adopted for the present invention to solve the technical problems is as follows:
The present invention changes it and repairs direction to reach reparation mesh on the basis of traditional fast marching algorithms principle is not changed
's.
Specifically, for right virtual visual point image, hole region is turned left reparation from the right side;For left virtual visual point image, cavity
Repair from left to right in region.What is repaired at first is edge pixel point, and each edge pixel point is, it is necessary to the institute sampled in fixed neighborhood
There is known pixels point.All known pixels points in the neighborhood should all be background pixel point, and these pixels can be to the edge
Pixel produces certain influence.And the influence that the known pixels point in the neighborhood is produced to the pixel to be repaired is different
's.Weight function that influence degree is constituted by the distance to empty pixel, to the factor such as distance of empty edge line determines.
General principles are with tradition fast marching algorithms.
Again, checking hole region using improved expansion carries out T-shaped expansion and rectangular expansion, obtains unilateral border,
Repaired by specific direction since border.
Finally obtain the new viewpoint image repaired and complete.
Beneficial effect of the present invention:Compared to traditional Fast marching image repair algorithm when repairing larger empty, can cause
Foreground area edge blurry.The present invention can preferably keep prospect side in the empty image after processing virtual viewpoint rendering
Edge information it is complete.
Brief description of the drawings
Fig. 1 is the reparation directional diagram of FMM algorithms;
Fig. 2 is the right virtual visual point image drawn;
Fig. 3 is a pair of expansion cores in traditional fast marching algorithms;
Fig. 4 is a pair of expansion cores in the embodiment of the present invention;
Fig. 5 is another to expansion core in the embodiment of the present invention.
Specific embodiment
Below in conjunction with accompanying drawing, the invention will be further described
Larger cavity can be produced around new virtual visual point image prospect after for DIBR.And these cavities should try one's best and adopt
Filled with the pixel value of background area.Therefore two kinds of situations can be produced:For the left virtual visual point image drawn, foreground area
Offset to the right, cavity results from the left side of foreground area, background area pixels value on the left of cavity of now sampling fills sky
Hole region.Right virtual visual point image is then opposite.
Such as the right virtual visual point image that Fig. 2 is drafting, it is illustrated that the hole region of shade should use the background on the right side of cavity
Pixel is filled.Can so be calculated using only image repair in the case where not possessing without multiple reference views or other conditions
Method, the hole region to repairing larger has preferable effect.
The specific implementation of the present embodiment is as follows:
Step 1. is schemed for the empty mask of right virtual visual point image, replaces tradition quick using the expansion core shown in Fig. 4
The expansion core of traveling algorithm such as Fig. 3, carries out T-shaped expansion and rectangular expansion respectively.After T-shaped expansion, empty mask regions are subtracted, obtained
To the narrow side at empty edge, right side of the narrow side in cavity.After rectangular expansion, empty mask regions are subtracted, obtain cavity right side
The large area at edge.Pixel in the region can produce influence to hole region.Therefore, the pixel in the region is arrived
The distance at empty edge is obtained, and is stored in array.
The narrow side that step 2. is obtained since step 1, the pixel in narrow side is taken out successively.The pixel for now taking out
It is known pixels point.At this moment to the left side of known pixels point, upside, the pixel in three directions in downside is judged.If in the presence of
It is empty, then carry out the reparation with direction.
Step 3. with empty pixel as the center of circle, with certain pixel distance(Typically take three pixels)For radius is used
In the circle for repairing the empty pixel.All known pixels points obtain the pixel value of cavity point by weight function in right semi-circle,
Finally cavity is repaired.
If left virtual visual point image, then using the expansion core shown in Fig. 5 instead of the expansion core shown in Fig. 4 in step 1, and
In step 2 and 3, make all of right operation into a left side, if cromogram, then process three passages respectively.