The content of the invention
The embodiment provides a kind of apply to make general and VR stereopsis side in depth map addition curved surface
Method, nature curved surface is effectively added on the edge of certain objects in depth image to realize.
To achieve these goals, this invention takes following technical scheme.
A kind of apply makes general and VR stereopsis method in depth map addition curved surface, including:
Pending curved surface field is isolated from overall Depth Map, using the pending curved surface field as original
Beginning Depth Map, need to add curved surface on the edge of the certain objects in the original Depth Map;
According to the curved surface field of desired addition set in advance, size and pixel to the original Depth Map
Depth values are adjusted, and the original Depth Map after adjustment and the original Depth Map are synthesized, after obtaining synthesis
Depth Map;
Outward flange Fuzzy Processing, the Depth after the Fuzzy Processing of outward flange are carried out to the Depth Map after the synthesis
The original Depth Map that with the addition of nature curved surface area are isolated in Map;
The original Depth Map that the with the addition of nature curved surface area and overall Depth Map are synthesized, obtained
To the final Depth Map that with the addition of nature curved surface area.
Further, it is described that pending curved surface field is isolated from overall Depth Map, will be described pending
Curved surface field needs to add curved surface as original Depth Map on the edge of the certain objects in the original Depth Map,
Including:
Certain objects region is separated from overall Depth Map, the edge of the certain objects is showed
Go out a line, embody the difference between the color world of the certain objects region and the color world in other regions,
The color world of the certain objects region is preserved as Mask Channel, from the Mask Channel
Pending curved surface field is isolated, using the pending curved surface field as original Depth Map, the original Depth
Need to add curved surface on the edge of certain objects in Map.
Further, the curved surface field according to desired addition set in advance, to the original Depth Map's
The Depth values of size and each pixel are adjusted, including:
The curved surface field for wanting addition is preset, and determines the size in the curved surface field of the desired addition and each
The Depth values of pixel, the size of the original Depth Map is changed so that the area ratio of the original Depth Map
The area in the curved surface field of the desired addition is big or equal;
According to the Depth values of each pixel in the curved surface field of the desired addition, to the original Depth after change size
The Depth values of each pixel are adjusted in Map, are adjusted the Depth Map, original Depth Map deformed after Depth values
In each pixel Depth values adjustment numerical value according to right between the curved surface field of original Depth Map and the desired addition
Answer the Depth value differences of pixel and original Depth Map are converted into the three-dimensional deviation after 3D images and determined.
Further, the original Depth Map by after the adjustment and original Depth Map are synthesized, and are obtained
Depth Map after to synthesis, including:
Using the original Depth Map as foreground picture, make being sized with the Depth Map deformed after Depth values
For Background, the foreground picture and Background are synthesized, the Depth Map after being synthesized.
Further, the Depth Map to after the synthesis carry out outward flange Fuzzy Processing, are obscured from outward flange
The original Depth Map that with the addition of nature curved surface area are isolated in Depth Map after processing, including:
Transfer the color world Mask Channel of the certain objects of the preservation, by the Mask Channel with it is described
Depth Map after synthesis are synthesized, and obtain the Depth Map after secondary synthesis.
After the outer wheels profile of certain objects in Depth Map after the secondary synthesis is arranged to edge, according to institute
The curved surface field for wanting addition is stated to the Depth Map progress outward flange Fuzzy Processings after the secondary synthesis, obtains including side
The Depth Map, the Depth Map comprising edge curved surface of edge curved surface are the original Depth that with the addition of nature curved surface area
Map, the outward flange Fuzzy Processing refers to survey inside centered on exterior contour and outside forms Fuzzy Processing with blur, described
Area of the Fuzzy Processing with blur is the area of the natural curved surface area added.
Further, described method also includes:
When adjusting original Depth Map area, it is necessary to by original Depth Map rea adjusting into than Fuzzy Processing
Area with blur is bigger or equal.
Further, described method also includes:
, it is necessary to ensure depth value from spy when carrying out outward flange Fuzzy Processing to the Depth Map after the secondary synthesis
The outer wheels profile of earnest body is to consecutive variations in outer peripheral scope of the Fuzzy Processing with blur.
Further, the Depth Map to after the synthesis carry out outward flange Fuzzy Processing, are obscured from outward flange
The original Depth Map that with the addition of nature curved surface area are isolated in Depth Map after processing, including:
The Fuzzy Processing band blur in the outside in the original Depth Map of nature curved surface area is with the addition of described in rejecting, is protected
The Fuzzy Processing band blur of the inner side in the original Depth Map that with the addition of nature curved surface area is stayed, obtains with the addition of certainly
The original Depth Map of right curved surface area.
Further, it is described by the original Depth Map and the overall Depth that with the addition of nature curved surface area
Map is synthesized, and obtains with the addition of the final Depth Map of nature curved surface area, including:
The original Depth Map that the with the addition of nature curved surface area and overall Depth Map are synthesized, obtained
To the final Depth Map that with the addition of nature curved surface area, the entirety is obtained using Projection mapping methods
Comparison diagram between Depth Map and the final Depth Map, confirms the overall Depth Map according to the comparison diagram
In the edges of certain objects with the addition of nature curved surface.
Method provided in an embodiment of the present invention can be with it can be seen from the technical scheme provided by embodiments of the invention described above
Realize that oneself desired natural curved surface freely, is effectively added in the edge of the special object in Depth Map, formed both
Exquisite and complicated Depth Map, so as to obtain the image of better quality.
The additional aspect of the present invention and advantage will be set forth in part in the description, and these will become from the following description
Obtain substantially, or recognized by the practice of the present invention.
Embodiment
Embodiments of the present invention are described below in detail, the example of the embodiment is shown in the drawings, wherein from beginning
Same or similar element is represented to same or similar label eventually or there is the element of same or like function.Below by ginseng
The embodiment for examining accompanying drawing description is exemplary, is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singulative " one " used herein, " one
It is individual ", " described " and "the" may also comprise plural form.It is to be further understood that what is used in the specification of the present invention arranges
Diction " comprising " refer to the feature, integer, step, operation, element and/or component be present, but it is not excluded that in the presence of or addition
One or more other features, integer, step, operation, element, component and/or their groups.It should be understood that when we claim member
Part is " connected " or during " coupled " to another element, and it can be directly connected or coupled to other elements, or there may also be
Intermediary element.In addition, " connection " used herein or " coupling " can include wireless connection or coupling.Wording used herein
"and/or" includes any cell of one or more associated list items and all combined.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, all terms used herein (including technology art
Language and scientific terminology) with the general understanding identical meaning with the those of ordinary skill in art of the present invention.Should also
Understand, those terms defined in such as general dictionary, which should be understood that, to be had and the meaning in the context of prior art
The consistent meaning of justice, and unless defined as here, will not be with idealizing or the implication of overly formal be explained.
For ease of the understanding to the embodiment of the present invention, done further by taking several specific embodiments as an example below in conjunction with accompanying drawing
Explanation, and each embodiment does not form the restriction to the embodiment of the present invention.
The method of the embodiment of the present invention can turn the small curved surface in object boundary in Depth Map forming processes
Change the size that user wants to obtain into.
Depth Map are that the distance value of all objects is embodied with Depth (color) values.Such as:Depth values " 1 " are set
The object for representing closest is set to, Depth values " 0 " are arranged to represent apart from farthest object.The setting that may be reversed.
In the embodiment of the present invention, Depth values " 1 " are arranged to closest object, Depth values " 0 " are arranged to apart from farthest thing
Body.
In Depth Map, as some object Edge (edge) on have the small curved surface embodied, just by the object
It is converted into after 3D, if being observed as having on the method for anaglyph spectacles, the small curved surface on the Edge will seem true
Curved surface.If it can do small curved surface in Depth Map edge section, allow for object and seem truer
A bit.
As the color distortion on Depth Map can be converted into how many pixel (pixel), and change the big of small curved surface
It is small, meeting difference corresponding to generation in image perspective transformations.If the difference of Depth values is 0.1, it is carried out
After Projection, then it can set in the image of incidence and will show how many Pixel differences, such as:Depth values are
When 0.1, there can be 1Px difference with the three-dimensional time difference.The meaning for having 1Px differences is:Or so image make solid when, Depth
When its object on Map specific Pixel will become solid, the range deviation of its object has 1px difference.
The a kind of of embodiment offer applies the place that general and VR stereopsis method is made in depth map addition curved surface
Flow is managed as shown in figure 1, including following processing step:
Pending overall Depth Map shown in step 1, input Fig. 2.
Step 2, pending curved surface field shown in Fig. 3 is isolated from above-mentioned overall Depth Map, it is above-mentioned pending
Curved surface field be the certain objects that are separated from overall Depth Map in order to add curved surface on the Edge of certain objects.
Pending curved surface field after separation shown in Fig. 3 is named as original Depth Map.
In order to which above-mentioned certain objects region is separated from overall Depth Map, by the edge of certain objects
After showing a line, embody between the color world of the certain objects region and the color world in other regions
Difference.Such as:Background color is " black ", and object is " white ", and the color world of the certain objects region is referred to as
Mask Channel, preserve Mask Channel.Then, above-mentioned original Depth is isolated from above-mentioned Mask Channel
Map。
The embodiment of the present invention first isolates schoolgirl (the original Depth of recumbency on the ground on overall Depth Map
Map after), curved surface is added on the Edge of this schoolgirl.
Step 3, the curved surface field for wanting addition is preset, and determine to want the size in the curved surface field of addition and every
The Depth values of individual pixel.
Above-mentioned original Depth Map size is changed, be changed to it is equally bigger than the curved surface field for wanting addition or
More greatly a bit, the original Depth Map after the change size shown in Fig. 4 are obtained.
Unit minimum in image is referred to as Pixel (pixel), wants addition on original Depth Map Edge
It is necessary to original Depth Map size is increased to 10Pixel or more than 10Pixel if 10Pixel curved surfaces.It is original
After Depth Map size changes, the Depth Map of formation slope can also change.
If changing the method for original Depth Map size and having Erode filter.The method for expanding size has very
More, still, on changing the mode of image size, the present invention does not define clearly
The Depth values of each pixel in step 4, the curved surface field according to above-mentioned desired addition, to the original after change size
The Depth values of each pixel are adjusted in beginning Depth Map, obtain the Depth deformed after the adjustment Depth values shown in Fig. 5
Map。
The adjustment numerical value (increase is reduced) of the Depth values of each pixel is according to original Depth in original Depth Map
The Depth value differences of respective pixel and original Depth Map are converted into 3D images between the curved surface field of Map and the desired addition
Rear three-dimensional deviation and determine.Assuming that curved surface field of the Depth values of each pixel with wanting addition in original Depth Map
When the Depth value differences of middle respective pixel are 0.1, corresponding Three-dimensional movable deviation is 1Pixel, and wants obtained stereopsis
Difference is 2Pixel, then, can shape on the object if carrying out reducing -0.2 in the Depth values of pixel in original Depth Map
Into the Depth that can form a 2Pixel stereoscopic parallaxes Map Edge curved surface.
After increasing and decreasing on original Depth Map Depth values, particular value will be formed, here it is for formulate
Stereoscopic parallax value.During using ProjectionMaping method to form stereopsis, according to
Depth deviations, Stereoscopic parallax can be defined.
Ex) stereoscopic parallax=Depth deviations 0.1=1pixel
Stereoscopic parallax be the object seen on two stereo cameras in appearance the displacement of position or
Difference, the angle of two lines and the Disparity (Binocular disparity) on stereopsis to an object
By being adjusted to the Depth values of each pixel in the original Depth Map after change size, can be formed
Positive (actively) and Negative (passive) curved surface.The process that the embodiment of the present invention is described is all referring to formation
The situation of positive curved surfaces, i.e., so that 3D visual differences from the point of view of the curved surface of formation add inside picture and are formed.Formed
The situation of positive curved surfaces makes finger look at the situation that the picture of distant place is fallen in outer peripheral picture.
Step 5, using the original Depth Map shown in above-mentioned Fig. 3 as foreground picture, being sized shown in above-mentioned Fig. 5
With the Depth Map that are deformed after Depth values as Background, above-mentioned foreground picture and Background are synthesized, obtained shown in Fig. 6
Synthesis after Depth Map.
Using the Positive directions curved surface that generally uses, (i.e. the original Depth Map of Fig. 3 are used as foreground picture, Fig. 5 to the present invention
Deformation Depth Map as Background) be formed as principal solution and release, this is provided to the convenience explained, can also be to phase
Closed in anti-direction (i.e. for the original Depth Map of Fig. 3 as Background, the Depth Map of Fig. 5 deformation are as foreground picture)
Into.Synthesis order among the present invention is intended merely to explain, will not set sequentially.
More than step 1- steps 5 correspond to input depth map step in representative graph 1, separating step, be sized step
Suddenly, the first round synthesis step such as percentage regulation value step and depth map.
Step 6, transfer above-mentioned preservation certain objects color world Mask Channel, by above-mentioned Mask Channel
Synthesized with the Depth Map shown in Fig. 6, obtain the Depth Map after secondary synthesis.
The exterior contour in certain objects in the Depth Map after secondary synthesis (field for wanting addition nature curved surface)
Line is arranged to edge.Then, outward flange is carried out to the Depth Map after secondary synthesis according to the curved surface field of above-mentioned desired addition
Fuzzy Processing, obtain the Depth Map for including edge curved surface after the Fuzzy Processing shown in Fig. 7.Outward flange Fuzzy Processing refers to
Surveyed inside centered on exterior contour and outside forms Fuzzy Processing band (blur).
The area of above-mentioned Fuzzy Processing band (blur) just becomes the area of the natural curved surface added.Therefore, adjusting
, it is necessary to be adjusted to bigger or identical than the area of Fuzzy Processing band (blur) during original Depth Map area.I.e. adjustment is former
, it is necessary to consider to want area and the face of Fuzzy Processing band (blur) in increased curved surface field simultaneously when the area of beginning depth map
Product, to want after adjusting the position where the outer wheels profile in the region of addition nature curved surface, at least meet to be formed to obscure
The area of processing band (blur).
If original Depth Map size is smaller than the area of above-mentioned Fuzzy Processing band (blur), it may appear that meaning
Value unexpectedly.I.e.:Outer peripheral BLUR is contrasted with the pixel value being applied on the outside of the outline pixel of blur sizes, with
Adjust the pixel value of outline.If without specified pixel value with " black 0 " is contrasted, formed blur will be formed not
The curved surface being necessary.
, it is necessary to calculate during progress Fuzzy Processing:The field that addition nature curved surface is wanted from original depth-map (corresponds to figure
3) outer wheels profile (i.e. edge) arrives the outer peripheral depth value of Fuzzy Processing band (blur) so that depth value is from specific thing
The outer wheels profile of body is to consecutive variations in outer peripheral scope of the Fuzzy Processing with blur., will be original in Fig. 7 referring to Fig. 8
During Depth Map edge amplification, it is seen that the consecutive variations of the Depth values on original Depth Map peripheries.
If Blur filterings are specified by pixel, the value and boundary face pixel value of the pixel outline specified are carried out pair
Than when the trickle pixel of adjustment 10 in color.Can with the method for trickle change may according to being applied to blur filter algorithms and
It is different.The present invention will not specify fixed blur to filter, since it is considered that increase the scope of the claims, so not defining blur
The characteristic of filtering.
Step 7, after outward flange Fuzzy Processing is carried out to the Depth Map shown in Fig. 6, including shown in obtained Fig. 7
The Depth Map of edge curved surface interior outside can all form Fuzzy Processing band (blur), reject in the Depth Map shown in Fig. 7
Outside Fuzzy Processing band (blur), retain Fig. 7 shown in Depth Map in inner side Fuzzy Processing band (blur), obtain
The natural curved surface area generated to the separation shown in Fig. 9, that is, obtain with the addition of the original Depth Map of nature curved surface area.
Fig. 3 is that the Depth Map of the curved surface of formation are divided using the color world Mask Channel of certain objects
From process, synthesis frame in suitable premultiply.Edge in Fig. 9 and Fig. 3 with the addition of Fuzzy Processing band (blur)
Schematic diagram.
Step 8:By the entirety that with the addition of shown in the original Depth Map and Fig. 1 of nature curved surface area shown in Fig. 9
Depth Map carry out the second wheel synthesis, obtain the final figure of the Depth Map that with the addition of nature curved surface shown in Figure 10.With existing
After thering is the natural curved surface in technology suitable for the Depth Map of 3D images edge to be contrasted, it can be seen that thing in Figure 10
The edge of body shows fine natural curved surface.
Figure 11 is to enter the Depth Map that with the addition of nature curved surface shown in the original Depth Map and Figure 10 shown in Fig. 3
The schematic diagram of row contrast, can confirm that in the edge in the field of the desired addition nature curved surface of original depth-map according to Figure 11
Added natural curved surface.
Referring to Figure 11, in order to confirm that trickle curved surface is with the addition of in the edge of object, Projection can be used
Mapping methods obtain the comparison diagram between the overall Depth Map and the final Depth Map, according to the contrast
Figure passes through comparative observation, confirms that the edge of the certain objects in the overall Depth Map with the addition of fine natural curved surface.
This difference can be more notable when being shown in large-scale movie theatre.
In the method for the invention described above, the Depth values for wanting addition curved surface field are only changed, other parts do not have completely
Change, it can confirm that the part of modification deformation.
In summary, method provided in an embodiment of the present invention can realize the edge of the special object in Depth Map
Place freely, effectively adds oneself desired natural curved surface, not only exquisite but also complicated Depth Map is formed, so as to obtain more
The image of good quality.
Method provided in an embodiment of the present invention implements simply, saves time and expense.
One of ordinary skill in the art will appreciate that:Accompanying drawing is the schematic diagram of one embodiment, module in accompanying drawing or
Flow is not necessarily implemented necessary to the present invention.
As seen through the above description of the embodiments, those skilled in the art can be understood that the present invention can
Realized by the mode of software plus required general hardware platform.Based on such understanding, technical scheme essence
On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product
It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are causing a computer equipment
(can be personal computer, server, either network equipment etc.) performs some of each embodiment of the present invention or embodiment
Method described in part.
Each embodiment in this specification is described by the way of progressive, identical similar portion between each embodiment
Divide mutually referring to what each embodiment stressed is the difference with other embodiment.Especially for device or
For system embodiment, because it is substantially similar to embodiment of the method, so describing fairly simple, related part is referring to method
The part explanation of embodiment.Apparatus and system embodiment described above is only schematical, wherein the conduct
The unit that separating component illustrates can be or may not be it is physically separate, can be as the part that unit is shown or
Person may not be physical location, you can with positioned at a place, or can also be distributed on multiple NEs.Can root
Factually border needs to select some or all of module therein realize the purpose of this embodiment scheme.Ordinary skill
Personnel are without creative efforts, you can to understand and implement.
The foregoing is only a preferred embodiment of the present invention, but protection scope of the present invention be not limited thereto,
Any one skilled in the art the invention discloses technical scope in, the change or replacement that can readily occur in,
It should all be included within the scope of the present invention.Therefore, protection scope of the present invention should be with scope of the claims
It is defined.