【Content of the invention】
It is an object of the invention to provide a kind of three dimensional image processing method and device, its can by the fog-level of background withThe change of images of left and right eyes object parallax size and adjust so that the image that viewing effect is seen closer to actual human eye retina,Third dimension can be higher, views and admires comfort level so as to improve beholder.
For solving the above problems, technical scheme is as follows:
A kind of three dimensional image processing method, the three dimensional image processing method include:
3-D view is received, and the 3-D view is divided into left-eye image, eye image and background image;
The left-eye image is moved to right, the eye image is moved to left;
The distance between eye image after calculating the left-eye image after moving to right and moving to left;
According to the distance, the background image is obscured;
Will fuzzy after the background image, move to right after left-eye image and the eye image synthesis graphics after moving to leftPicture.
Preferably, in described three dimensional image processing method, described obscure the background image the step of include:
The background image is obscured using Gauss algorithm.
Preferably, in described three dimensional image processing method, according to the distance, obscure the background image the step ofIncluding:
The distance is bigger, and the fog-level for obscuring the background image is then bigger.
Preferably, in described three dimensional image processing method, according to the distance, obscure the background image the step ofIncluding:
The distance is less, and the fog-level for obscuring the background image is then less.
Preferably, in described three dimensional image processing method, the step of obscure the background image using Gauss algorithmIncluding:
Determine blur radius;
Using the central point of the pixel in the range of the blur radius as origin, distribute weight according to Gauss distribution;
According to the blur radius and the weight calculation weighted mean for distributing, wherein, the weighted mean isValue after pixel is fuzzy;
The value after the background image all pixels are obscured is calculated, the background image after Gaussian Blur is obtained.
A kind of 3-dimensional image processing apparatus, the 3-dimensional image processing apparatus include:
Division module, for receiving 3-D view, and by the 3-D view be divided into left-eye image, eye image andBackground image;
Mobile module, for moving to right the left-eye image, the eye image is moved to left;
Computing module, for calculating the distance between the left-eye image after moving to right and the eye image after moving to left;
Obfuscation module, for according to the distance, obscuring the background image;
Synthesis module, for will fuzzy after the background image, move to right after left-eye image and the right eye after moving to leftImage compositing 3 d images.
Preferably, in described 3-dimensional image processing apparatus,
The obfuscation module, specifically for obscuring the background image using Gauss algorithm.
Preferably, in described 3-dimensional image processing apparatus,
The obfuscation module, bigger specifically for the distance, the fog-level for obscuring the background image is then bigger.
Preferably, in described 3-dimensional image processing apparatus,
The obfuscation module, less specifically for the distance, the fog-level for obscuring the background image is then less.
Preferably, in described 3-dimensional image processing apparatus, the obfuscation module includes:
Determining module, for determining blur radius;
Distribution weight module, for using the central point of the pixel in the range of the blur radius as origin, according to GaussDistribution distribution weight;
Computing module, for according to the blur radius and the weight calculation weighted mean that distributes, wherein, described plusWeight average value is the value after pixel is obscured;
Processing module, for calculating the value after the background image all pixels are obscured, obtains the background after Gaussian BlurImage.
Eye image is moved to left by hinge structure, the present invention by moving to right left-eye image;Calculate the left eye after moving to rightThe distance between image and the eye image after moving to left;According to the distance, blurred background image;The present invention can be by backgroundFog-level is adjusted with the change of images of left and right eyes object parallax size so that viewing effect is closer to actual human eye retinaThe image that sees, third dimension can be higher, view and admire comfort level so as to improve beholder.
It is that the above of the present invention can be become apparent, preferred embodiment cited below particularly, and coordinate institute's accompanying drawings, makeDescribe in detail as follows.
【Specific embodiment】
The word " embodiment " used by this specification means serving as example, example or illustration.Additionally, this specification and instituteArticle " one " used in attached claim can usually be interpreted to mean " one or more ", unless otherwise orGuiding singulative is understood from context.
In embodiments of the present invention, by moving to right left-eye image, eye image is moved to left;Calculate the left eye figure after moving to rightAs and the distance between eye image after moving to left;According to the distance, blurred background image;The present invention can be by the mould of backgroundPaste degree is adjusted with the change of images of left and right eyes object parallax size so that viewing effect is seen closer to actual human eye retinaThe image for arriving, third dimension can be higher, view and admire comfort level so as to improve beholder.
In order to technical solutions according to the invention are described, illustrate below by specific embodiment.
Fig. 1 is referred to, is that three dimensional image processing method provided in an embodiment of the present invention realizes schematic flow sheet;Which is mainComprise the following steps:
In step S101, receive 3-D view, and by the 3-D view be divided into left-eye image, eye image andBackground image;
In step s 102, the left-eye image is moved to right, the eye image is moved to left;
In step s 103, the distance between eye image after calculating the left-eye image after moving to right and moving to left;
In step S104, according to the distance, the background image is obscured;
In embodiments of the present invention, according to the distance, obscure the background image the step of include:
The distance is bigger, and the fog-level for obscuring the background image is then bigger.
The distance is less, and the fog-level for obscuring the background image is then less.
In step S105, will fuzzy after the background image, move to right after left-eye image and the right eye after moving to leftImage compositing 3 d images.
In embodiments of the present invention, the background image is obscured using Gauss algorithm, is implemented as follows:
Determine blur radius;Blur radius are bigger, and fog-level is more serious, and blur radius are less, and fog-level is more seriousSlightly;
Using the central point of the pixel in the range of blur radius as origin, distribute weight according to Gauss distribution, e.g., from originThe weight that remote pixel is assigned to is bigger, and fog-level is more serious);
According to the blur radius having determined and the weight calculation weighted mean for distributing, the weighted mean isFor value of the pixel after fuzzy;
The value after background image all pixels are obscured is calculated, the background image after Gaussian Blur is obtained.
In embodiments of the present invention, so-called " obscuring ", it is possible to understand that take the average of neighboring pixel into each pixelValue." intermediate point " takes the meansigma methodss of " surrounding point ".Numerically, this is a kind of " smoothing ".On figure, it is equivalent to produceRaw " obscuring " effect, " intermediate point " loses details.Obviously, when calculating meansigma methodss, span is maximum, and " blur effect " is strongerStrong.Blur radius are bigger, and image is fuzzyyer.From in terms of numerical value angle, it is exactly that numerical value is more smooth.Each point will take neighboring pixelMeansigma methodss, in the present embodiment, weighted average is more reasonable, and the nearer point weight of distance is bigger, and the more remote point weight of distance is less.Normal distribution is clearly a kind of desirable weight distribution pattern.As shown in Fig. 2 normal distribution is a kind of bell shaped curve, closer toCenter, value are bigger, and further away from center, value is less.When calculating meansigma methodss, it is only necessary to by " central point " as origin,Other positions according to which on normal curve, distribute weight, it is possible to obtain a weighted mean.Normal distribution closeDegree function is called " Gaussian function " (Gaussian function).Weight matrix is calculated, has weight matrix, it is possible to calculateThe value of Gaussian Blur.Each point is multiplied by the weighted value of oneself:Each value is added up, is exactly the value of the Gaussian Blur of central point.To repeating a little this process, the image after Gaussian Blur has just been obtained.If artwork is colour picture, can be to RGB tri-Individual passage does Gaussian Blur respectively.
Refer to Fig. 3,
Structural representation for 3-dimensional image processing apparatus provided in an embodiment of the present invention.For convenience of description, only illustrateRelated to the embodiment of the present invention part.
The 3-dimensional image processing apparatus include:Division module 101, mobile module 102, computing module 103, obfuscation module104 and synthesis module 105.The 3-dimensional image processing apparatus can be built in image processing equipment software unit,Hardware cell or the unit of software and hardware combining.It is understood, however, that described image processing equipment can be computerDeng electronic product.
The 3-D view for receiving 3-D view, and is divided into left-eye image, eye image by division module 101And background image;
Mobile module 102, for moving to right the left-eye image, the eye image is moved to left;
Computing module 103, for calculating the distance between the left-eye image after moving to right and the eye image after moving to left;
Obfuscation module 104, for according to the distance, obscuring the background image;
In embodiments of the present invention, the obfuscation module 104, specifically for obscuring the Background using Gauss algorithmPicture.
Synthesis module 105, for will fuzzy after the background image, move to right after left-eye image and the right side after moving to leftEye pattern is as compositing 3 d images.
In embodiments of the present invention, the obfuscation module 104, bigger specifically for the distance, obscure the BackgroundThe fog-level of picture is then bigger;The distance is less, and the fog-level for obscuring the background image is then less.
Used as the preferred embodiment of the present invention, the obfuscation module includes:Determining module, weight distribution module, computing moduleAnd processing module.
Determining module, for determining blur radius;
Distribution weight module, for using the central point of the pixel in the range of the blur radius as origin, according to GaussDistribution distribution weight;
Computing module, for according to the blur radius and the weight calculation weighted mean that distributes, wherein, described plusWeight average value is the value after pixel is obscured;
Processing module, for calculating the value after the background image all pixels are obscured, obtains the background after Gaussian BlurImage.
In sum, 3-D view provided in an embodiment of the present invention is processed and device, and which passes through to move to right left-eye image, willEye image is moved to left;The distance between eye image after calculating the left-eye image after moving to right and moving to left;According to the distance,Blurred background image;The fog-level of background can be adjusted by the present invention with the change of images of left and right eyes object parallax size so thatThe image that viewing effect is seen closer to actual human eye retina, third dimension can be higher, comfortable so as to improve viewing and admiring for beholderDegree.
Although illustrating and describing the present invention, those skilled in the art relative to one or more implementationsBased on the reading to the specification and drawings and understanding it will be appreciated that equivalent variations and modification.The present invention includes all such repairChange and modification, and be limited only by the scope of the following claims.Particularly with the various functions executed by said modules, useIt is intended to corresponding to the specified function of executing the component in the term of component as description that (for example which is functionally of equal value) random component (unless otherwise instructed), even if in structure with the exemplary realization for executing this specification shown in this articleThe open structure of the function in mode is not equal to.Although additionally, the special characteristic of this specification is relative to some realization sidesOnly one in formula is disclosed, but this feature can with as being to expect and favourable for given or application-specificOther combinations of features one or more of other implementations.And, with regard to term " including ", " with ", " containing " or its deformationFor being used in specific embodiment or claim, such term is intended to bag in the way of similar to term "comprising"Include.
In sum, although the present invention is disclosed above with preferred embodiment, but above preferred embodiment is not used to limitThe system present invention, one of ordinary skill in the art without departing from the spirit and scope of the present invention, can make various changes and profitDecorations, therefore protection scope of the present invention is defined by the scope that claim is defined.