CN106228530B - A kind of stereography method, device and stereo equipment - Google Patents
A kind of stereography method, device and stereo equipment Download PDFInfo
- Publication number
- CN106228530B CN106228530B CN201610410762.8A CN201610410762A CN106228530B CN 106228530 B CN106228530 B CN 106228530B CN 201610410762 A CN201610410762 A CN 201610410762A CN 106228530 B CN106228530 B CN 106228530B
- Authority
- CN
- China
- Prior art keywords
- mrow
- distance
- stereo camera
- msub
- mfrac
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 238000012545 processing Methods 0.000 claims abstract description 35
- 230000000007 visual effect Effects 0.000 claims description 89
- 239000011521 glass Substances 0.000 claims description 24
- 230000003190 augmentative effect Effects 0.000 claims description 21
- 238000004422 calculation algorithm Methods 0.000 claims description 14
- 238000000605 extraction Methods 0.000 claims description 9
- 238000000926 separation method Methods 0.000 claims 1
- 238000005516 engineering process Methods 0.000 abstract description 7
- 230000007935 neutral effect Effects 0.000 abstract 1
- 230000000694 effects Effects 0.000 description 18
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 5
- 238000009795 derivation Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G03—PHOTOGRAPHY; CINEMATOGRAPHY; ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ELECTROGRAPHY; HOLOGRAPHY
- G03B—APPARATUS OR ARRANGEMENTS FOR TAKING PHOTOGRAPHS OR FOR PROJECTING OR VIEWING THEM; APPARATUS OR ARRANGEMENTS EMPLOYING ANALOGOUS TECHNIQUES USING WAVES OTHER THAN OPTICAL WAVES; ACCESSORIES THEREFOR
- G03B35/00—Stereoscopic photography
- G03B35/08—Stereoscopic photography by simultaneous recording
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N13/00—Stereoscopic video systems; Multi-view video systems; Details thereof
- H04N13/20—Image signal generators
- H04N13/275—Image signal generators from 3D object models, e.g. computer-generated stereoscopic image signals
- H04N13/279—Image signal generators from 3D object models, e.g. computer-generated stereoscopic image signals the virtual viewpoint locations being selected by the viewers or determined by tracking
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Testing, Inspecting, Measuring Of Stereoscopic Televisions And Televisions (AREA)
Abstract
The invention provides a kind of stereography method, device and stereo equipment, it is related to display technology field, this method includes:According to the left and right original image of photographed scene, determine stereo camera to the distance of nearest object and the distance to farthest object;It is equal with the ratio to the 4th parallax under the distance of farthest object with the 3rd parallax under the distance of photographed scene neutral body video camera to nearest object according to the ratio of the second parallax under the first parallax and maximum recessed distances of the maximum protrusion in real scene under, it is determined that regarding spacing and image cropping parameter;According to regarding spacing, the distance of left and right binocular stereo camera is adjusted;Using image cropping parameter, cutting processing is carried out to the left images gathered after adjustment;The left images after cutting processing are exported, the stereo-picture of present filming scene is built so as to the left images after being handled according to cutting.The solution of the present invention has reached preferable stereoeffect.
Description
Technical Field
The present invention relates to the field of display technologies, and in particular, to a stereoscopic photographing method and apparatus, and a stereoscopic photographing device.
Background
With the continuous improvement and maturity of stereoscopic display technology and virtual and real vr (visual reality) technology, the interest and demand of the people for stereoscopic display are increasing. The key point for realizing the three-dimensional display is that different images with slight difference received by the left eye and the right eye of an observer are constructed, and because the visual images received by the left eye and the right eye are different, the brain integrates the information of the two images of the left eye and the right eye to superpose and reproduce the images, so that the observer generates three-dimensional effect.
Stereoscopic movies are an application of stereoscopic display technology, and are an important part of the movie industry today. When watching the stereo movie, people can have a feeling of being personally on the scene. In the former stage of stereoscopic film, a camera with two lenses simulating human eyes is usually used to capture two-viewpoint images of a scene, and the images from two viewpoints are projected synchronously by a projector during projection, so that the two slightly different images are displayed on a screen, and a viewer can see the image captured from a left viewing angle with the left eye and the image captured from a right viewing angle with the right eye, and then the images are synthesized into a stereoscopic image.
The stereoscopic film can be used in a plurality of projection occasions, such as cinemas, stereoscopic display terminals and the like, and the stereoscopic effect of the same stereoscopic film source projected in different projection occasions can be different, so that the stereoscopic film source obtained by shooting is adapted to the projection occasions, thereby ensuring that the stereoscopic effect is more real, and becoming a difficulty of the stereoscopic photography technology.
Disclosure of Invention
The invention aims to provide a stereo photography method, a stereo photography device and a stereo photography device, and solves the problem that in the prior art, a stereo film source cannot be well adapted to a projection occasion, so that a better stereo effect cannot be achieved.
To solve the above technical problem, an embodiment of the present invention provides a stereo photography method applied to a stereo photography apparatus including left and right binocular stereo cameras, the stereo photography method including:
acquiring left and right original images of a current shooting scene by using the left and right binocular stereo cameras;
determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the left and right original images;
according to the fact that the ratio of a first parallax under the maximum protruding distance and a second parallax under the maximum recessing distance in a real scene is equal to the ratio of a third parallax under the distance from a stereo camera to a nearest object and a fourth parallax under the distance from the stereo camera to a farthest object in a shooting scene, the visual distance and the image cutting parameters of left and right binocular stereo cameras are determined according to the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object;
adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras;
acquiring left and right images of the current shooting scene by using the adjusted left and right binocular stereo cameras, and cutting the left and right images by using the image cutting parameters;
and outputting the cut left and right images, so that the stereo image of the current shooting scene can be constructed according to the cut left and right images.
Further, the step of determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the left and right original images comprises:
extracting feature point information of the two left and right original images;
determining a feature point matching point set pair between the two left and right original images according to the feature point information;
acquiring horizontal parallax between the matching point set pairs;
according to the horizontal parallax between the matching point set pairs, the depth of the object point corresponding to the matching point set pairs is obtained;
and determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the depth of the object point.
Further, the step of extracting feature point information of the two left and right original images includes:
extracting feature point information of the two left and right original images by adopting a Scale Invariant Feature Transform (SIFT) algorithm;
the step of determining a feature point matching point set pair between the two left and right original images according to the feature point information includes:
and determining a feature point matching point set pair between the two left and right original images according to the feature point information by adopting a minimum mean square error ZSSD algorithm.
Further, the step of determining the inter-view distance and the image cropping parameters of the left and right binocular stereo cameras according to the distance between the stereo camera and the nearest object and the distance between the stereo camera and the farthest object by using the ratio between the first parallax at the maximum protruding distance and the second parallax at the maximum recessing distance in the real scene as well as the ratio between the third parallax at the distance between the stereo camera and the nearest object and the fourth parallax at the distance between the stereo camera and the farthest object in the shooting scene is equal to each other includes:
obtaining a first parallax d under the maximum projection distance in a real scene through the following formulaN_R:
Wherein, N _ R is the maximum projection distance, E _ R is the visual distance in the real scene, and Z _ R is the distance from the two eyes to the real screen in the real scene;
obtaining a second parallax d at the maximum recess distance in the real scene by the following formulaF_R;
Wherein F _ R is the maximum recess distance;
determining a first distance Con from the stereo camera to a zero-parallax plane according to the following relational expression which is constructed by the fact that the ratio of the first parallax to the second parallax in the real scene is equal to the ratio of the third parallax in the shooting scene under the distance from the stereo camera to the nearest object and the fourth parallax in the shooting scene under the distance from the stereo camera to the farthest object:
wherein N _ O is the distance from the stereo camera to the nearest object, F _ O is the distance from the stereo camera to the farthest object, and R is the first parallax dN_RAnd the second parallax dF_RThe ratio of the amount of the first and the second,
determining the visual distance of the left and right binocular stereo cameras according to the first distance;
and determining image cutting parameters of the left and right binocular stereo cameras according to the first distance and the visual distance of the left and right binocular stereo cameras.
Further, the step of determining the inter-view distance of the left and right binocular stereo cameras according to the first distance includes:
determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
where Con is the first distance, W _ R is the width of the real screen in the real scene, dN_RFor the first parallax, N _ O is the distance from the stereo camera to the nearest object, and theta is the field angle of the stereo camera;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein d isF_RF _ O is the distance from the stereo camera to the farthest object for the second parallax;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
further, the step of determining image cropping parameters of the left and right binocular stereo cameras according to the first distance and the inter-view distance of the left and right binocular stereo cameras comprises:
is obtained by the following formulaWidth W of virtual screen in current shooting sceneCon:
Wherein Con is the first distance, and theta is the angle of view of the stereo camera;
or
Acquiring the width W of a virtual screen in a current shooting scene through the following formulaCon:
Wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
determining an image cropping parameter Crop of the left and right binocular stereo cameras by the following formula:
and Sep is the visual distance between the left and right binocular stereo cameras.
Further, the step of performing cropping processing on the left and right images by using the image cropping parameters includes:
cutting off X & ltcrop pixel at the leftmost end of the left image in the horizontal direction by using the image cutting parameters, thereby obtaining a cut left image;
and
cutting off X & ltcrop pixel at the rightmost end of the right image in the horizontal direction by using the image cutting parameter, thereby obtaining a cut right image; wherein X is the number of horizontal pixels of the left image and the right image, and Crop is the image cropping parameter.
Further, the output left and right images after the cropping processing are specifically applied to a cinema occasion, and the cinema is provided with a left projection device and a right projection device, wherein the left image is provided for the left projection device of the cinema, and the right image is provided for the right projection device of the cinema, so that a stereoscopic shooting scene is projected;
further, the output left and right images after the clipping processing are specifically applied to a virtual reality helmet, and the virtual reality helmet has left and right display screens, the left image is provided for the left display screen of the virtual reality helmet, and the right image is provided for the right display screen of the virtual reality helmet;
further, the output left and right images after the clipping processing are specifically applied to augmented reality glasses, and the augmented reality glasses have left and right display lenses, the left image is provided to the left display lens of the augmented reality glasses, and the right image is provided to the right display lens of the augmented reality glasses.
To solve the above technical problem, an embodiment of the present invention further provides a stereo camera apparatus applied to a stereo camera device including left and right binocular stereo cameras, the stereo camera apparatus including:
the acquisition module is used for acquiring left and right original images of the current shooting scene by utilizing the left and right binocular stereo cameras;
the first determining module is used for determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the left and right original images;
the second determining module is used for determining the visual distance and the image clipping parameters of the left and right binocular stereo cameras according to the distance between the stereo camera and the nearest object and the distance between the stereo camera and the farthest object, wherein the ratio between the first parallax at the maximum protruding distance and the second parallax at the maximum recessing distance in the real scene is equal to the ratio between the third parallax at the distance between the stereo camera and the nearest object and the fourth parallax at the distance between the stereo camera and the farthest object in the shooting scene;
the adjusting module is used for adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras;
the acquisition module is also used for acquiring left and right images of the current shooting scene by utilizing the adjusted left and right binocular stereo cameras;
the cutting module is used for cutting the left image and the right image by utilizing the image cutting parameters;
and the output module is used for outputting the left and right images after the cutting processing, so that the stereo image of the current shooting scene can be constructed according to the left and right images after the cutting processing.
Further, the first determining module comprises:
the extraction submodule is used for extracting the characteristic point information of the two left and right original images;
the first determining submodule is used for determining a feature point matching point set pair between the two left and right original images according to the feature point information;
a first obtaining sub-module, configured to obtain a horizontal disparity between the pair of matching point sets;
the second obtaining submodule is used for obtaining the depth of the object point corresponding to the matching point set pair according to the horizontal parallax between the matching point set pair;
and the second determining submodule is used for determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the depth of the object point.
Further, the extraction sub-module includes:
the extraction unit is used for extracting feature point information of the two left and right original images by adopting a Scale Invariant Feature Transform (SIFT) algorithm;
the first determination submodule includes:
and the first determining unit is used for determining a feature point matching point set pair between the two left and right original images according to the feature point information by adopting a minimum mean square error ZSSD algorithm.
Further, the second determining module includes:
a third obtaining submodule, configured to obtain the first parallax d at the maximum protrusion distance in the real scene according to the following formulaN_R:
Wherein, N _ R is the maximum projection distance, E _ R is the visual distance in the real scene, and Z _ R is the distance from the two eyes to the real screen in the real scene;
a fourth obtaining sub-module for obtaining a second parallax d at a maximum recess distance in the real scene by the following formulaF_R;
Wherein F _ R is the maximum recess distance;
a third determining sub-module, configured to determine a first distance Con from the stereo camera to the zero-disparity plane according to a following relation that a ratio between the first disparity and the second disparity in the real scene is equal to a ratio between a third disparity in the shooting scene at the distance from the stereo camera to the nearest object and a fourth disparity in the shooting scene at the distance from the stereo camera to the farthest object:
wherein N _ O is the distance from the stereo camera to the nearest object, F _ O is the distance from the stereo camera to the farthest object, and R is the first parallax dN_RAnd the second parallax dF_RThe ratio of the amount of the first and the second,
the fourth determining submodule is used for determining the visual distance of the left and right binocular stereo cameras according to the first distance;
and the fifth determining submodule is used for determining the image cutting parameters of the left and right binocular stereo cameras according to the first distance and the visual distance of the left and right binocular stereo cameras.
Further, the fourth determination submodule includes:
a second determining unit, configured to determine a visual distance Sep of the left and right binocular stereo cameras according to the following formula:
where Con is the first distance, W _ R is the width of the real screen in the real scene, dN_RFor the first parallax, N _ O is the distance from the stereo camera to the nearest object, and theta is the field angle of the stereo camera;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein d isF_RF _ O is the distance from the stereo camera to the farthest object for the second parallax;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
further, the fifth determination submodule includes:
a first obtaining unit for obtaining the width W of the virtual screen in the current shooting scene by the following formulaCon:
Wherein Con is the first distance, and theta is the angle of view of the stereo camera;
or
Acquiring the width W of a virtual screen in a current shooting scene through the following formulaCon:
Wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
a third determining unit, configured to determine an image cropping parameter Crop of the left and right binocular stereo cameras according to the following formula:
and Sep is the visual distance between the left and right binocular stereo cameras.
Further, the cropping module comprises:
the first cutting submodule is used for cutting the leftmost end of the left image in the horizontal direction by using the image cutting parameters to remove X-Crop pixels so as to obtain a cut left image;
and
the second cutting submodule is used for cutting the rightmost end of the right image in the horizontal direction to remove X-Crop pixels by using the image cutting parameters so as to obtain a cut right image;
wherein X is the number of horizontal pixels of the left image and the right image, and Crop is the image cropping parameter.
Further, the output left and right images after the cropping processing are specifically applied to a cinema occasion, and the cinema is provided with a left projection device and a right projection device, wherein the left image is provided for the left projection device of the cinema, and the right image is provided for the right projection device of the cinema, so that a stereoscopic shooting scene is projected;
further, the output left and right images after the clipping processing are specifically applied to a virtual reality helmet, and the virtual reality helmet has left and right display screens, the left image is provided for the left display screen of the virtual reality helmet, and the right image is provided for the right display screen of the virtual reality helmet;
further, the output left and right images after the clipping processing are specifically applied to augmented reality glasses, and the virtual reality glasses have left and right display lenses, the left image is provided to the left display lens of the augmented reality glasses, and the right image is provided to the right display lens of the augmented reality glasses.
To solve the above technical problem, an embodiment of the present invention further provides a stereoscopic camera device, including: control binocular stereo camera, display screen, casing, treater, memory, circuit board and power supply circuit, wherein:
the left binocular stereo camera, the right binocular stereo camera and the display screen are embedded in the shell;
the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board;
the power supply circuit is used for supplying power to each circuit or device of the stereo camera equipment;
the memory is used for storing executable program codes;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, and executes:
acquiring left and right original images of a current shooting scene by using the left and right binocular stereo cameras;
determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the left and right original images;
according to the fact that the ratio of a first parallax under the maximum protruding distance and a second parallax under the maximum recessing distance in a real scene is equal to the ratio of a third parallax under the distance from a stereo camera to a nearest object and a fourth parallax under the distance from the stereo camera to a farthest object in a shooting scene, the visual distance and the image cutting parameters of left and right binocular stereo cameras are determined according to the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object;
adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras;
acquiring left and right images of the current shooting scene by using the adjusted left and right binocular stereo cameras, and cutting the left and right images by using the image cutting parameters;
outputting the left and right images after the cutting processing;
and constructing the stereo image of the current shooting scene according to the cut left and right images, so that the stereo image is displayed through the display screen.
The technical scheme of the invention has the following beneficial effects:
the stereo photography method, the stereo photography device and the stereo photography equipment of the embodiment of the invention acquire the distance from a stereo camera to a nearest object and the distance from the stereo camera to a farthest object under a current shooting scene, and then determine the visual space and the image clipping parameters of a left binocular stereo camera and a right binocular stereo camera according to the fact that the ratio of a first parallax under the maximum projecting distance and a second parallax under the maximum recessed distance in the real scene (corresponding to a projection device of a projection occasion) is equal to the ratio of a third parallax under the distance from the stereo camera to the nearest object and a fourth parallax under the distance from the stereo camera to the farthest object in the shooting scene, and thus the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object are determined; then adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras; acquiring left and right images of a current shooting scene by using the adjusted left and right binocular stereo cameras, and cutting the left and right images according to image cutting parameters; and finally, outputting the left and right images after the cutting processing, wherein the showing device can construct a three-dimensional image of the current shooting scene according to the left and right images after the cutting processing, namely showing the three-dimensional image. Therefore, the visual distance between the three-dimensional cameras is set and the pictures are cut according to the equal parallax proportion of the real scene and the shooting scene, when the three-dimensional shooting scene is constructed by utilizing the obtained three-dimensional images of the shooting scene, the shooting scene can be mapped between the maximum protruding distance and the maximum recessing distance in the real scene, so that the shooting scene can be well matched with the real scene, namely the showing occasion, the good three-dimensional effect can be achieved, the watching experience of a user is improved, and the problem that the film source of the three-dimensional film in the prior art cannot be well matched with the showing occasion, and the good three-dimensional effect cannot be achieved is solved.
Drawings
FIG. 1 is a flow chart of a stereo photography method of the present invention;
FIG. 2 is a schematic view of a real scene observed in the stereo photography method of the present invention;
FIG. 3 is a schematic view of a scene being photographed for observation in the stereo photography method of the present invention;
FIG. 4 is a schematic diagram of a left stereo camera in a stereo photography method according to the present invention;
FIG. 5 is a schematic structural diagram of a stereo camera device according to the present invention;
fig. 6 is a schematic structural diagram of a stereo camera device according to the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages of the present invention more apparent, the following detailed description is given with reference to the accompanying drawings and specific embodiments.
In order to make those skilled in the art better understand the present invention, the real scene and the shooting scene referred to in the embodiments of the present invention will be described first.
The real scene is the real observation space of people, the space that people's eyes saw, and the observer can obtain information such as the degree of depth and size of the object under the real scene through cognition, experience, etc., and is the measurement of length unit under the real scene. In the embodiment of the invention, the real scene observed by the observer is the display, and the observer and the display form an observer-display space. It is understood that, in the embodiment of the present invention, for stereoscopic photography, a real scene may be regarded as a display for showing the shot content.
The shooting scene is a scene shot by the stereo camera equipment. The photographed scene is displayed by the display, and the fixed position of the person in the real scene receives the contents displayed by the display through the human eye. The contents of a shot scene are intended to be represented in a real scene and to be presented in a stereoscopic manner, a mapping of the scene is required.
The stereo photography method and the device provided by the embodiment of the invention provide a stereo photography mode, namely, a left image and a right image of a certain scene are obtained through shooting and cutting, and the left image and the right image are projected in the real scene as stereo film sources, namely, the shooting scene is mapped to the real scene, so that the stereo image of the shooting scene is presented in the real scene.
The stereo photography method and the device provided by the embodiment of the invention actually simulate a virtual scene constructed by a graphic engine, form a left virtual camera and a right virtual camera through the offset of the virtual cameras, construct the virtual scene into a virtual stereo scene principle through the asymmetric perspective projection of the left virtual camera and the right virtual camera, equate a shooting scene to the virtual scene, equate a left binocular stereo camera and a right binocular stereo camera to the left virtual camera and the right virtual camera, equate left images and right images shot by the left binocular stereo camera and the right binocular stereo camera to scene contents after the asymmetric perspective projection of the left virtual camera and the right virtual camera, and thus stereoscopically present the shooting scene in a real scene.
Referring to fig. 1 to 3, a stereo photography method according to an embodiment of the present invention is applied to a stereo photography apparatus including left and right binocular stereo cameras, and includes:
step 101, acquiring left and right original images of a current shooting scene by using left and right binocular stereo cameras.
Here, after the positions of the left and right binocular stereo cameras are initialized, shooting by the stereo cameras is started, and two left and right original images shot by the stereo cameras are collected in real time.
And step 102, determining the distance N _ O from the stereo camera to the nearest object and the distance F _ O from the stereo camera to the farthest object in the current shooting scene according to the left and right original images.
Here, N _ O and F _ O in the current photographing scene are determined from the left and right original images to obtain a stereoscopic image of the current photographing scene.
103, according to the first parallax d under the maximum projection distance N _ R in the real sceneN_RSecond parallax d from maximum recess distance F _ RF_RThe ratio of the distance between the first parallax and the second parallax is equal to the ratio of the third parallax under the distance N _ O from the stereo camera to the nearest object and the fourth parallax under the distance F _ O from the stereo camera to the farthest object in the shooting scene, so that the visual distance and the image cutting parameters of the left and right binocular stereo cameras are determined according to the distance N _ O from the stereo camera to the nearest object and the distance F _ O from the stereo camera to the farthest object.
Referring to fig. 2, the maximum protrusion distance N _ R and the maximum recess distance F _ R are used to characterize the stereoscopic display capability of the stereoscopic display in the real scene, i.e., the projection occasion, i.e., the depth range of the stereoscopic scene that can be presented by the stereoscopic display is within the interval defined by the maximum protrusion distance and the maximum recess distance, and the maximum protrusion distance and the maximum recess distance are not exceeded by the most recess portion of the stereoscopic scene.
Here, based on that the ratio between the first parallax and the second parallax in the real scene is equal to the ratio between the third parallax and the fourth parallax in the shooting scene, the visual distance and the image clipping of the left and right binocular stereo cameras are determined, and the stereo effect of the shooting scene mapped to the real scene can be effectively ensured.
Unlike the stereoscopic display of a virtual scene constructed by using a graphics engine, the left and right virtual cameras of the virtual scene construct an asymmetric projection scene, and the stereo camera uses a symmetric projection scene, so as to ensure a better stereoscopic effect, an asymmetric scene (a virtual scene constructed by similar OpenGL) is simulated, and the same view field width is maintained, so that the acquired stereoscopic image needs to be cut, and the distance between the stereo cameras needs to be adjusted. Generally, when the field angle or the focal length of the camera cannot be adjusted, the camera cannot directly correspond to the asymmetric view volume, so the distance between the left and right binocular cameras needs to be finely adjusted, the position requirement of a zero-parallax plane under the asymmetric view volume is met, and then the extra plane is cut.
And 104, adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras.
And 105, acquiring left and right images of the current shooting scene by using the adjusted left and right binocular stereo cameras, and cutting the left and right images by using the image cutting parameters.
And 106, outputting the left and right images after the cutting processing, so that the stereo image of the current shooting scene can be constructed according to the left and right images after the cutting processing.
Here, after the positions of the left and right binocular stereo cameras are adjusted according to the visual intervals of the left and right binocular stereo cameras, the left and right images collected by the adjusted left and right binocular stereo cameras are cropped using the image cropping parameters, and finally, the cropped left and right images are output. When the left and right images are projected as film sources, the projection device can construct a stereoscopic image of the current shooting scene according to the left and right images after the cutting processing, namely, the projected stereoscopic image.
According to the stereo photography method provided by the embodiment of the invention, the visual distance between the stereo cameras and the picture are set and cut according to the equal parallax proportion of the real scene and the shooting scene, when the obtained stereo image of the shooting scene is used for constructing the stereo shooting scene, the shooting scene can be mapped between the maximum protruding distance and the maximum recessing distance in the real scene, so that the shooting scene can be well adapted to the real scene, namely the showing occasion, better stereo effect can be achieved, the watching experience of a user is improved, and the problem that in the prior art, the film source of the stereo film cannot be well adapted to the showing occasion, and better stereo effect cannot be achieved is solved.
Preferably, the step of step 102 may include:
step 1021, extracting feature point information of two left and right original images;
step 1022, determining a feature point matching point set pair between the two left and right original images according to the feature point information;
step 1023, acquiring horizontal parallax between the matching point set pairs;
step 1024, acquiring the depth of the object point corresponding to the matching point set pair according to the horizontal parallax between the matching point set pair;
and step 1025, determining the distance N _ O from the stereo camera to the nearest object and the distance F _ O from the stereo camera to the farthest object in the current shooting scene according to the depth of the object point.
At this time, by establishing a feature point matching point set pair between two left and right original images, acquiring a horizontal parallax between the matching point set pair, and combining the theory and formula of a binocular vision system, the depth of an object point corresponding to the matching point set pair, namely the distance from a stereo camera to an object, can be accurately and quickly acquired, so that the distance N _ O from the stereo camera to the nearest object and the distance F _ O from the stereo camera to the farthest object under a shooting scene are determined.
Specifically, in step 1021, the feature point information of the two left and right original images may be extracted by using a Scale Invariant Feature Transform (SIFT) algorithm.
Here, the SIFT algorithm may be used for the two left and right original images, respectively, to obtain feature point information.
Specifically, in step 1022, a minimum mean square error zsd algorithm may be used to determine a feature point matching point set pair between the two left and right original images according to the feature point information.
Here, the pair of matching point sets between the two left and right original images can be accurately established by using the extracted feature point information of the two left and right original images and the ZSSD algorithm.
Further, in step 1025, a depth information histogram of the object point may be constructed, and the fluctuating data may be filtered out and directly located to the depth maximum and the depth minimum, so as to obtain the distance N _ O from the stereo camera to the nearest object and the distance F _ O from the stereo camera to the farthest object.
After the distance N _ O from the stereo camera to the nearest object and the distance F _ O from the stereo camera to the farthest object are obtained, the view interval and the image cutting parameters of the left and right binocular stereo cameras are determined according to the N _ O and the F _ O. The following describes in detail how to determine the inter-view distance and image cropping parameters of the left and right binocular stereo cameras.
Preferably, the step of step 103 may include:
step 1031, obtaining the first parallax d under the maximum projection distance N _ R in the real scene by the following formulaN_R:
Wherein, N _ R is the maximum protrusion distance, E _ R is the inter-view distance in the real scene, and Z _ R is the distance from both eyes to the real screen in the real scene.
Step 1032, obtaining the second parallax d under the maximum recess distance F _ R in the real scene by the following formulaF_R;
Where F _ R is the maximum recess distance. N _ R, E _ R, Z _ R and F _ R are preset values.
Here, as can be seen from fig. 2, the above-mentioned relations (1) and (2) are obtained according to the proportional relation of the corresponding edges of the similar graph. As shown in fig. 2, a visual distance E _ R between the left eye L and the right eye R in the real scene, a distance Z _ R between the two eyes and the real screen Display, a maximum protrusion distance N _ R, a maximum recess distance F _ R, a width W _ R of the real screen Display, and a first parallax dN_RAnd a second parallax dF_RAre labeled in the figures. The above equations (1), (2) can be obtained according to the theorem of similar triangles.
At the moment, the first parallax under the maximum protruding distance and the second parallax under the maximum recessing distance in the real scene can be accurately obtained through the formulas (1) and (2), so that the ratio of the first parallax to the second parallax can be accurately obtained, and the accuracy and the convenience of calculation are improved by utilizing the geometric relationship.
Step 1033, according to the first parallax d in the real sceneN_RAnd a second parallax dF_RThe ratio of the first parallax d to the second parallax d at the distance N _ O from the stereo camera to the nearest object in the shooting sceneN_OFourth parallax d at distance F _ O from the stereo camera to the farthest objectF_OThe first distance Con of the stereo camera to the zero-disparity plane (i.e. the virtual screen) is determined by the following relation, which is constructed by equaling the ratio between:
wherein N _ O is a stereo cameraDistance to the nearest object, F _ O is the distance from the stereo camera to the farthest object, and R is the first parallax dN_RAnd the second parallax dF_RThe ratio of the amount of the first and the second,
wherein:
third parallax
Fourth parallax
Ratio of third parallax to fourth parallax
Relation (3) is formed byAnd (5) derivation and obtaining.
Here, as shown in fig. 3, a visual distance Sep between a left stereo camera L 'corresponding to a left-eye output image and a right stereo camera R' corresponding to a right-eye output image in a captured scene, a first distance Con from the stereo camera to a Virtual screen visual Display 2 (also referred to as a zero-disparity plane), a distance N _ V from the stereo camera to a near clipping plane 1, a distance F _ V from the stereo camera to a far clipping plane 3, and a fifth disparity d from the stereo camera to the near clipping plane 1N_VAnd a sixth parallax d of the stereo camera to the far clipping plane 3F_VAre labeled in the figures. According to the similar triangle theorem, the following can be obtained:
by analogy with the above equations (8), (9):
therefore, the ratio relation between the third parallax and the fourth parallax can be obtained by the above equations (5) and (6):
based on the above equation (7), there is the following relationship:
here, although the conversion unit and the numerical value are different between the parallax in the shooting scene and the real scene, they have the same ratio R.
Modifying equation (10) yields:
at this time, the first distance from the stereo camera to the virtual screen can be accurately obtained according to the first parallax, the second parallax, the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object.
Step 1034, determining a visual interval Sep of the left and right binocular stereo cameras according to the first distance Con;
and 1035, determining image cutting parameters of the left and right binocular stereo cameras according to the first distance Con and the visual distance Sep of the left and right binocular stereo cameras.
At this time, according to the fact that the parallax ratio value under the maximum protruding distance and the maximum recessing distance in the real scene is equal to the parallax ratio value under the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the shooting scene, the first distance from the stereo camera to the zero parallax plane can be effectively determined; then, according to the first distance, the visual distance between the left binocular stereo camera and the right binocular stereo camera can be effectively determined; and finally, determining image cutting parameters of the left and right binocular stereo cameras according to the first distance and the visual distance. The method comprises the steps of setting visual intervals between three-dimensional cameras and cutting pictures according to equal parallax proportions of a real scene and a shooting scene, and when the obtained three-dimensional images of the shooting scene are used for building the three-dimensional shooting scene, the shooting scene can be mapped between the maximum protruding distance and the maximum recessing distance in the real scene, so that the shooting scene can be well matched with the real scene, namely a showing occasion, and a good three-dimensional effect can be achieved. .
Further, the step 1034 may include:
determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
where Con is the first distance, W _ R is the width of the real screen in the real scene, dN_RFor the first parallax, N _ O is the distance from the stereo camera to the nearest object, and θ is the field angle of the stereo camera;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein d isF_RF _ O is the distance from the stereo camera to the farthest object for the second parallax;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein, W _ R, theta, WfAnd f are both preset values.
At this time, the visual distance of the left and right binocular stereo cameras corresponding to the visual distance of the real scene in the photographed scene can be accurately obtained by the above equations (11), (12), (13) or (14).
The derivation process of the above equation (11) is described in detail below:
referring to fig. 4, for a symmetric projection scene volume of left and right binocular stereo cameras, a left camera leftcamera and a right camera riThe part where the scene of the right camera intersects, i.e. the virtual screen, i.e. the zero-disparity plane, has a width WCon。
First, the scaling ratio between the virtual screen and the real screen can be obtained by the following formula
Wherein, WConW _ R is the width of the virtual screen, and W _ R is the width of the real screen.
The following can be obtained from the above equation (15):
the above equation (16) is transformed to obtain:
sep satisfies:
the above equation (18) is transformed to obtain:
substituting the above equation (19) into the above equation (17) can obtain:
the formula (20) is substituted into the formula (18) to obtain:
referring to fig. 4, for a symmetrical projection scene volume of a stereo camera, the angle of view satisfies the following formula:
the formula (11) can be obtained by substituting the formula (22) into the formula (21):
the above equation (12) can be obtained by referring to the derivation process of the above equation (11).
In addition, the above equation (22) is replaced with the following equation:
the above equations (13) and (14) can be obtained by the same derivation procedure.
Thus, the first distance and the visual distance between the left and right binocular stereo cameras are obtained, and then image cutting parameters of the left and right binocular stereo cameras are further determined so as to cut the image according to the image cutting parameters after the positions of the left and right binocular stereo cameras are adjusted.
As shown in fig. 4, the effective part of the scene contents captured by the left and right binocular cameras when constructing the stereoscopic scene is WconAnd the proportion of the ineffective part Sep is Sep/(Sep + W)con) Therefore, the photographed left and right images can be cropped according to the ratio.
For the position adjustment of the left and right binocular stereo cameras, the current positions of the left and right binocular stereo cameras can be referred to, and then the positions of the two stereo cameras are finely adjusted according to the visual distance between the left and right binocular stereo cameras.
For the image cropping parameters of the left and right binocular stereo cameras, preferably, the step 1035 may include:
in step 10351, the width W of the virtual screen in the current shooting scene is obtained by the following formulaCon:
Wherein Con is the first distance, and theta is the angle of view of the stereo camera;
or
Acquiring the width W of a virtual screen in a current shooting scene through the following formulaCon:
Wherein, WfThe width of the stereo camera sensor, f the focal length of the lens of the stereo camera.
As shown in fig. 4, the effective part of the scene contents captured by the left and right binocular cameras when constructing the stereoscopic scene is WconAnd the proportion of the ineffective part Sep is Sep/(Sep + W)con) Therefore, the photographed left and right images can be cropped according to the ratio. Thus:
step 10352, determining an image cropping parameter Crop of the left and right binocular stereo cameras according to the following formula:
and Sep is the visual distance between the left and right binocular stereo cameras.
At this time, the image cropping parameters of the left and right binocular stereo cameras can be accurately obtained by the above formula (26).
Specifically, in step 105, the step of performing the cropping processing on the left and right images by using the image cropping parameters may include:
step 1051, cutting off X & ltcrop pixel at the leftmost end of the left image in the horizontal direction by using the image cutting parameters, thereby obtaining a cut left image;
and
step 1052, cutting off X Crop pixels from the rightmost end of the right image in the horizontal direction by using the image cutting parameters, thereby obtaining a cut right image;
wherein X is the number of horizontal pixels of the left image and the right image, and Crop is the image cropping parameter.
At this time, for the Left image shot by the Left stereo Camera Left Camera, the pixels of X Crop from the leftmost end in the horizontal direction, and the width of the Left image after cropping is: and X (1-Crop) pixels. For the Right image shot by the Right Camera of the Right stereo Camera, cutting X Crop pixels from the rightmost end in the horizontal direction, wherein the width of the cut Right image is also as follows: and X (1-Crop) pixels.
The method of the embodiment of the invention can adjust the distance of the left and right binocular stereo cameras according to the left and right original image data of one frame according to the process, cut the left and right images shot by the adjusted left and right binocular stereo cameras by utilizing the calculated image cutting parameters, and process the image data of the next frame, namely dynamically adjust. The distance between the left and right binocular stereo cameras can be adjusted in advance according to a preset scene, and the left and right images shot by the adjusted left and right binocular stereo cameras are cut by utilizing the calculated image cutting parameters.
Further, the output left and right images after the clipping processing are specifically applied to a cinema occasion, and the cinema is provided with a left projection device and a right projection device, the left image is provided for the left projection device of the cinema, and the right image is provided for the right projection device of the cinema, so that a stereoscopic shooting scene is projected;
further, the output left and right images after the clipping processing are specifically applied to a virtual reality helmet, and the virtual reality helmet has left and right display screens, the left image is provided for the left display screen of the virtual reality helmet, and the right image is provided for the right display screen of the virtual reality helmet;
furthermore, the output left and right images after the cutting processing are specifically applied to the augmented reality glasses, the augmented reality glasses are provided with left and right display lenses, the left image is provided with the left display lens of the augmented reality glasses, and the right image is provided with the right display lens of the augmented reality glasses.
It is to be understood that the terms of the virtual camera, the zero-disparity plane, the near clipping plane, the far clipping plane, and the like in the embodiments of the present invention are all well-known terms in computer graphics, and are not described in detail herein.
The following illustrates a specific embodiment of the stereo photography method of the present invention:
suppose that: the maximum protruding distance N _ R in the real scene is 50mm, the maximum recessing distance F _ R is 60mm, the width W _ R of the real screen is 435mm, the binocular visual interval E _ R is 65mm, and the distance Z _ R from the two eyes to the real screen is 500 mm. The distance N _ O from the stereo camera to the nearest object in the shooting scene determined by the above steps 101-102 is 2135mm, and the distance F _ O from the stereo camera to the farthest object is 2584 mm. The resolution of the stereo camera is X (1600) × Y (900), the lens focal length f of the stereo camera is 80mm, and the stereo camera sensesWidth W of the devicefIs 36 mm.
By applying the method of the invention, the first parallax d under the maximum projection distance N _ R in the real scene is obtained by the following formulaN_RAnd a second parallax d at a maximum recess distance F _ RF_R:
And then obtaining a ratio R between the first parallax and the second parallax by the following formula:
then, a first distance Con from the stereo camera to the virtual screen is obtained by the following formula:
then, the visual interval Sep between the left and right binocular stereo cameras is obtained through the following formula:
the distance between the left and right binocular stereo cameras is adjusted to 153.98 mm.
Then obtaining the width W of the virtual screen by the following formulaCon:
And then obtaining an image clipping parameter Crop of the left and right binocular stereo cameras by the following formula:
therefore, the left image shot by the adjusted left stereo camera is clipped from the leftmost end in the horizontal direction by X Crop (240 pixels), and the width of the clipped left image is: x (1-Crop) ═ 1360 pixels.
Cutting the right image shot by the adjusted right stereo camera from the rightmost end in the horizontal direction by X & ltcrop & gt (240 pixels), wherein the width of the cut right image is as follows: x (1-Crop) ═ 1360 pixels.
To sum up, the stereo photography method according to the embodiment of the present invention sets the view distance between stereo cameras and cuts pictures according to the disparity ratio of a real scene and a shot scene being equal, and when a stereo shot scene is constructed by using an obtained stereo image of the shot scene, the shot scene can be mapped between the maximum protrusion distance and the maximum recess distance in the real scene, so that the shot scene can be well adapted to the real scene, i.e., a showing occasion, thereby achieving a good stereo effect, improving the viewing experience of a user, and solving the problem that in the prior art, a film source of a stereo film cannot be well adapted to the showing occasion, and thus a good stereo effect cannot be achieved.
As shown in fig. 5, an embodiment of the present invention also provides a stereoscopic photographing apparatus applied to a stereoscopic photographing apparatus including left and right binocular stereoscopic cameras, the stereoscopic photographing apparatus including:
the acquisition module 601 is used for acquiring left and right original images of a current shooting scene by using the left and right binocular stereo cameras;
a first determining module 602, configured to determine, according to the left and right original images, a distance from a stereo camera to a nearest object and a distance from the stereo camera to a farthest object in the current shooting scene;
a second determining module 603, configured to determine, according to a ratio between a first parallax at a maximum protrusion distance and a second parallax at a maximum recess distance in a real scene, and a ratio between a third parallax at a distance from a stereo camera to a nearest object in a shooting scene and a fourth parallax at a distance from the stereo camera to a farthest object, so as to determine, according to a distance from the stereo camera to the nearest object and a distance from the stereo camera to the farthest object, a view interval and an image cropping parameter of a left and right binocular stereo cameras;
an adjusting module 604, configured to adjust a distance between the left and right binocular stereo cameras according to a visual distance between the left and right binocular stereo cameras;
the acquisition module 601 is further configured to acquire left and right images of the current shooting scene by using the adjusted left and right binocular stereo cameras;
a cropping module 605, configured to crop the left and right images by using the image cropping parameter;
and an output module 606, configured to output the left and right images after the clipping processing, so that a stereoscopic image of the current shooting scene can be constructed according to the left and right images after the clipping processing.
According to the stereo photographic device provided by the embodiment of the invention, the visual distance between the stereo cameras and the picture are set and cut according to the equal parallax proportion of the real scene and the shooting scene, when the obtained stereo image of the shooting scene is used for constructing the stereo shooting scene, the shooting scene can be mapped between the maximum protruding distance and the maximum recessing distance in the real scene, so that the shooting scene can be well adapted to the real scene, namely the showing occasion, and therefore, a good stereo effect can be achieved, the watching experience of a user is improved, and the problem that in the prior art, the film source of the stereo film cannot be well adapted to the showing occasion, and therefore, a good stereo effect cannot be achieved is solved.
Preferably, the first determining module 602 may include:
the extraction submodule is used for extracting the characteristic point information of the two left and right original images;
the first determining submodule is used for determining a feature point matching point set pair between the two left and right original images according to the feature point information;
a first obtaining sub-module, configured to obtain a horizontal disparity between the pair of matching point sets;
the second obtaining submodule is used for obtaining the depth of the object point corresponding to the matching point set pair according to the horizontal parallax between the matching point set pair;
and the second determining submodule is used for determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the depth of the object point.
Further, the extraction sub-module may include:
the extraction unit is used for extracting feature point information of the two left and right original images by adopting a Scale Invariant Feature Transform (SIFT) algorithm;
the first determination submodule includes:
and the first determining unit is used for determining a feature point matching point set pair between the two left and right original images according to the feature point information by adopting a minimum mean square error ZSSD algorithm.
Preferably, the second determining module 603 may include:
a third obtaining submodule, configured to obtain the first parallax d at the maximum protrusion distance in the real scene according to the following formulaN_R:
Wherein, N _ R is the maximum projection distance, E _ R is the visual distance in the real scene, and Z _ R is the distance from the two eyes to the real screen in the real scene;
a fourth obtaining sub-module for obtaining a second parallax d at a maximum recess distance in the real scene by the following formulaF_R;
Wherein F _ R is the maximum recess distance;
a third determining sub-module, configured to determine a first distance Con from the stereo camera to the zero-disparity plane according to a following relation that a ratio between the first disparity and the second disparity in the real scene is equal to a ratio between a third disparity in the shooting scene at the distance from the stereo camera to the nearest object and a fourth disparity in the shooting scene at the distance from the stereo camera to the farthest object:
wherein N _ O is the distance from the stereo camera to the nearest object, F _ O is the distance from the stereo camera to the farthest object, and R is the first parallax dN_RAnd the second parallax dF_RThe ratio of the amount of the first and the second,
the fourth determining submodule is used for determining the visual distance of the left and right binocular stereo cameras according to the first distance;
and the fifth determining submodule is used for determining the image cutting parameters of the left and right binocular stereo cameras according to the first distance and the visual distance of the left and right binocular stereo cameras.
Further, the fourth determination submodule may include:
a second determining unit, configured to determine a visual distance Sep of the left and right binocular stereo cameras according to the following formula:
where Con is the first distance, W _ R is the width of the real screen in the real scene, dN_RFor the first parallax, N _ O is the distance from the stereo camera to the nearest object, and theta is the field angle of the stereo camera;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein d isF_RF _ O is the distance from the stereo camera to the farthest object for the second parallax;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
further, the fifth determination sub-module may include:
a first obtaining unit for obtaining the width W of the virtual screen in the current shooting scene by the following formulaCon:
Wherein Con is the first distance, and theta is the angle of view of the stereo camera;
or
Acquiring the width W of a virtual screen in a current shooting scene through the following formulaCon:
Wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
a third determining unit, configured to determine an image cropping parameter Crop of the left and right binocular stereo cameras according to the following formula:
and Sep is the visual distance between the left and right binocular stereo cameras.
Preferably, the clipping module 605 may include:
the first cutting submodule is used for cutting the leftmost end of the left image in the horizontal direction by using the image cutting parameters to remove X-Crop pixels so as to obtain a cut left image;
and
the second cutting submodule is used for cutting the rightmost end of the right image in the horizontal direction to remove X-Crop pixels by using the image cutting parameters so as to obtain a cut right image;
wherein X is the number of horizontal pixels of the left image and the right image, and Crop is the image cropping parameter.
Further, the output left and right images after the clipping processing are specifically applied to a cinema occasion, and the cinema is provided with a left projection device and a right projection device, the left image is provided for the left projection device of the cinema, and the right image is provided for the right projection device of the cinema, so that a stereoscopic shooting scene is projected;
or,
the output left and right images after the cutting processing are specifically applied to a virtual reality helmet, the virtual reality helmet is provided with a left display screen and a right display screen, the left image is provided for the left display screen of the virtual reality helmet, and the right image is provided for the right display screen of the virtual reality helmet;
or
The left and right images after the cutting processing are output and specifically applied to the augmented reality glasses, the virtual reality glasses are provided with left and right display lenses, the left image is provided with the left display lens of the augmented reality glasses, and the right image is provided with the right display lens of the augmented reality glasses.
According to the stereo photographic device provided by the embodiment of the invention, the visual distance between the stereo cameras and the picture are set and cut according to the equal parallax proportion of the real scene and the shooting scene, when the obtained stereo image of the shooting scene is used for constructing the stereo shooting scene, the shooting scene can be mapped between the maximum protruding distance and the maximum recessing distance in the real scene, so that the shooting scene can be well adapted to the real scene, namely the showing occasion, and therefore, a good stereo effect can be achieved, the watching experience of a user is improved, and the problem that in the prior art, the film source of the stereo film cannot be well adapted to the showing occasion, and therefore, a good stereo effect cannot be achieved is solved.
The stereoscopic camera device is a device corresponding to the stereoscopic camera method, and all the implementation manners in the method embodiments are applicable to the embodiment of the device, so that the same technical effects can be achieved.
An embodiment of the present invention further provides a stereoscopic camera apparatus, which may include the stereoscopic camera device according to any of the foregoing embodiments.
Fig. 6 is a schematic structural diagram of an embodiment of a stereo camera device according to the present invention, which can implement the process of the embodiment of fig. 1 of the present invention. As shown in fig. 6, the above-described stereoscopic photographing apparatus may include: left and right binocular stereo cameras (not shown), a display screen (not shown), a housing 71, a processor 72, a memory 73, a circuit board 74 and a power circuit 75, wherein the left and right binocular stereo cameras and the display screen are embedded on the housing 71; the circuit board 74 is arranged inside the space enclosed by the casing 71, and the processor 72 and the memory 73 are arranged on the circuit board 74; a power supply circuit 75 for supplying power to each circuit or device of the above-mentioned stereoscopic camera apparatus; the memory 73 is used to store executable program code; the processor 72 executes a program corresponding to the executable program code by reading the executable program code stored in the memory 73, for executing the stereo photography method according to any one of the foregoing embodiments, and acquires left and right original images of a current shooting scene using left and right binocular stereo cameras; determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the left and right original images; according to the fact that the ratio of a first parallax under the maximum protruding distance and a second parallax under the maximum recessing distance in a real scene is equal to the ratio of a third parallax under the distance from a stereo camera to a nearest object and a fourth parallax under the distance from the stereo camera to a farthest object in a shooting scene, the visual distance and the image cutting parameters of left and right binocular stereo cameras are determined according to the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object; adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras; acquiring left and right images of the current shooting scene by using the adjusted left and right binocular stereo cameras, and cutting the left and right images by using the image cutting parameters; outputting the left and right images after the cutting processing; and constructing the stereo image of the current shooting scene according to the cut left and right images, so that the stereo image is displayed through the display screen.
For a specific execution process of the above steps by the processor 72 and further steps executed by the processor 72 by running the executable program code, reference may be made to the description of the embodiment shown in fig. 1 of the present invention, which is not described herein again.
The stereo camera device exists in various forms including, but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, application providers (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
In embodiments of the present invention, modules may be implemented in software for execution by various types of processors. An identified module of executable code may, for instance, comprise one or more physical or logical blocks of computer instructions which may, for instance, be constructed as an object, procedure, or function. Nevertheless, the executables of an identified module need not be physically located together, but may comprise disparate instructions stored in different bits which, when joined logically together, comprise the module and achieve the stated purpose for the module.
Indeed, a module of executable code may be a single instruction, or many instructions, and may even be distributed over several different code segments, among different programs, and across several memory devices. Likewise, operational data may be identified within the modules and may be embodied in any suitable form and organized within any suitable type of data structure. The operational data may be collected as a single data set, or may be distributed over different locations including over different storage devices, and may exist, at least partially, merely as electronic signals on a system or network.
When a module can be implemented by software, considering the level of existing hardware technology, a module implemented by software may build a corresponding hardware circuit to implement a corresponding function, without considering cost, and the hardware circuit may include a conventional Very Large Scale Integration (VLSI) circuit or a gate array and an existing semiconductor such as a logic chip, a transistor, or other discrete components. A module may also be implemented in programmable hardware devices such as field programmable gate arrays, programmable array logic, programmable logic devices or the like.
In various embodiments of the present invention, it should be understood that the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.
Claims (15)
1. A stereoscopic photography method applied to a stereoscopic photography apparatus including left and right binocular stereoscopic cameras, the stereoscopic photography method comprising:
acquiring left and right original images of a current shooting scene by using the left and right binocular stereo cameras;
determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the left and right original images;
according to the fact that the ratio of a first parallax under the maximum protruding distance and a second parallax under the maximum recessing distance in a real scene is equal to the ratio of a third parallax under the distance from a stereo camera to a nearest object and a fourth parallax under the distance from the stereo camera to a farthest object in a shooting scene, the visual distance and the image cutting parameters of left and right binocular stereo cameras are determined according to the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object;
adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras;
acquiring left and right images of the current shooting scene by using the adjusted left and right binocular stereo cameras, and cutting the left and right images by using the image cutting parameters;
outputting the cut left and right images so as to construct a stereoscopic image of the current photographing scene from the cut left and right images,
wherein the step of determining the inter-view distance and the image cropping parameters of the left and right binocular stereo cameras according to the distance between the stereo camera and the nearest object and the distance between the stereo camera and the farthest object is performed by equalizing the ratio between the first parallax at the maximum projecting distance and the second parallax at the maximum recessed distance in the real scene with the ratio between the third parallax at the distance between the stereo camera and the nearest object and the fourth parallax at the distance between the stereo camera and the farthest object in the shooting scene:
obtaining a first parallax d under the maximum projection distance in a real scene through the following formulaN_R:
<mrow> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mi>E</mi> <mo>_</mo> <mi>R</mi> </mrow> <mrow> <mi>Z</mi> <mo>_</mo> <mi>R</mi> <mo>-</mo> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
Wherein, N _ R is the maximum projection distance, E _ R is the visual distance in the real scene, and Z _ R is the distance from the two eyes to the real screen in the real scene;
obtaining a second parallax d at the maximum recess distance in the real scene by the following formulaF_R;
<mrow> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mi>E</mi> <mo>_</mo> <mi>R</mi> </mrow> <mrow> <mi>Z</mi> <mo>_</mo> <mi>R</mi> <mo>+</mo> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
Wherein F _ R is the maximum recess distance;
determining a first distance Con from the stereo camera to a zero-parallax plane according to the following relational expression which is constructed by the fact that the ratio of the first parallax to the second parallax in the real scene is equal to the ratio of the third parallax in the shooting scene under the distance from the stereo camera to the nearest object and the fourth parallax in the shooting scene under the distance from the stereo camera to the farthest object:
<mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>=</mo> <mfrac> <mrow> <mi>R</mi> <mo>+</mo> <mn>1</mn> </mrow> <mrow> <mfrac> <mn>1</mn> <mrow> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>+</mo> <mfrac> <mi>R</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein N _ O is the distance from the stereo camera to the nearest object, F _ O is the distance from the stereo camera to the farthest object, and R is the first parallax dN_RAnd the second parallax dF_RThe ratio of the amount of the first and the second,determining the visual distance of the left and right binocular stereo cameras according to the first distance;
and determining image cutting parameters of the left and right binocular stereo cameras according to the first distance and the visual distance of the left and right binocular stereo cameras.
2. The stereo photography method according to claim 1, wherein the step of determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current photography scene from the left and right original images comprises:
extracting feature point information of the two left and right original images;
determining a feature point matching point set pair between the two left and right original images according to the feature point information;
acquiring horizontal parallax between the matching point set pairs;
according to the horizontal parallax between the matching point set pairs, the depth of the object point corresponding to the matching point set pairs is obtained;
and determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the depth of the object point.
3. The stereo photography method according to claim 2, wherein the step of extracting feature point information of the two left and right original images comprises:
extracting feature point information of the two left and right original images by adopting a Scale Invariant Feature Transform (SIFT) algorithm;
the step of determining a feature point matching point set pair between the two left and right original images according to the feature point information includes:
and determining a feature point matching point set pair between the two left and right original images according to the feature point information by adopting a minimum mean square error ZSSD algorithm.
4. The stereo photography method according to claim 1, wherein the step of determining the apparent separation of the left and right binocular stereo cameras according to the first distance comprises:
determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
<mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mn>2</mn> <mo>*</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <mi>tan</mi> <mrow> <mo>(</mo> <mfrac> <mi>&theta;</mi> <mn>2</mn> </mfrac> <mo>)</mo> </mrow> <mo>*</mo> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> <mrow> <mi>W</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mrow> <mo>(</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>-</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
where Con is the first distance, W _ R is the width of the real screen in the real scene, dN_RFor the first parallax, N _ O is the distance from the stereo camera to the nearest object, and theta is the field angle of the stereo camera;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
<mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mn>2</mn> <mo>*</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <mi>t</mi> <mi>a</mi> <mi>n</mi> <mrow> <mo>(</mo> <mfrac> <mi>&theta;</mi> <mn>2</mn> </mfrac> <mo>)</mo> </mrow> <mo>*</mo> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> <mrow> <mi>W</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mrow> <mo>(</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> <mo>-</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein d isF_RF _ O is the distance from the stereo camera to the farthest object for the second parallax;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
<mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mo>(</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <msub> <mi>W</mi> <mi>f</mi> </msub> <mo>/</mo> <mi>f</mi> <mo>)</mo> <mo>*</mo> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> <mrow> <mi>W</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mrow> <mo>(</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>-</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
<mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mo>(</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <msub> <mi>W</mi> <mi>f</mi> </msub> <mo>/</mo> <mi>f</mi> <mo>)</mo> <mo>*</mo> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> <mrow> <mi>W</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mrow> <mo>(</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> <mo>-</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>.</mo> </mrow>
5. the stereo photography method according to claim 1, wherein the step of determining image cropping parameters of the left and right binocular stereo cameras based on the first distance and the inter-view distance of the left and right binocular stereo cameras comprises:
acquiring the width W of a virtual screen in a current shooting scene through the following formulaCon:
<mrow> <msub> <mi>W</mi> <mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mn>2</mn> <mo>*</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <mi>t</mi> <mi>a</mi> <mi>n</mi> <mrow> <mo>(</mo> <mfrac> <mi>&theta;</mi> <mn>2</mn> </mfrac> <mo>)</mo> </mrow> <mo>-</mo> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>;</mo> </mrow>
Wherein Con is the first distance, and theta is the angle of view of the stereo camera;
or
Acquiring the width W of a virtual screen in a current shooting scene through the following formulaCon:
<mrow> <msub> <mi>W</mi> <mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <msub> <mi>W</mi> <mi>f</mi> </msub> </mrow> <mi>f</mi> </mfrac> <mo>-</mo> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>;</mo> </mrow>
Wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
determining an image cropping parameter Crop of the left and right binocular stereo cameras by the following formula:
<mrow> <mi>C</mi> <mi>r</mi> <mi>o</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> </mrow> <mrow> <msub> <mi>W</mi> <mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> </mrow> </msub> <mo>+</mo> <mi>S</mi> <mi>e</mi> <mi>p</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
and Sep is the visual distance between the left and right binocular stereo cameras.
6. The stereo photography method according to claim 1, wherein the step of performing cropping processing on the left and right images using the image cropping parameters comprises:
cutting off X & ltcrop pixel at the leftmost end of the left image in the horizontal direction by using the image cutting parameters, thereby obtaining a cut left image;
and
cutting off X & ltcrop pixel at the rightmost end of the right image in the horizontal direction by using the image cutting parameter, thereby obtaining a cut right image;
wherein X is the number of horizontal pixels of the left image and the right image, and Crop is the image cropping parameter.
7. The stereoscopic photography method according to any one of claims 1 to 6, wherein the output clipped left and right images are specifically used in a theater, and the theater has two left and right projection devices, and the left image is provided to the left projection device of the theater and the right image is provided to the right projection device of the theater, thereby projecting a stereoscopic scene;
or,
the output left and right images after the cutting processing are specifically applied to a virtual reality helmet, the virtual reality helmet is provided with a left display screen and a right display screen, the left image is provided for the left display screen of the virtual reality helmet, and the right image is provided for the right display screen of the virtual reality helmet;
or
The left and right images after the cutting processing are output and specifically applied to the augmented reality glasses, the augmented reality glasses are provided with left and right display lenses, the left image is provided with the left display lens of the augmented reality glasses, and the right image is provided with the right display lens of the augmented reality glasses.
8. A stereoscopic camera apparatus applied to a stereoscopic camera device including left and right binocular stereoscopic cameras, the stereoscopic camera apparatus comprising:
the acquisition module is used for acquiring left and right original images of the current shooting scene by utilizing the left and right binocular stereo cameras;
the first determining module is used for determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the left and right original images;
the second determining module is used for determining the visual distance and the image clipping parameters of the left and right binocular stereo cameras according to the distance between the stereo camera and the nearest object and the distance between the stereo camera and the farthest object, wherein the ratio between the first parallax at the maximum protruding distance and the second parallax at the maximum recessing distance in the real scene is equal to the ratio between the third parallax at the distance between the stereo camera and the nearest object and the fourth parallax at the distance between the stereo camera and the farthest object in the shooting scene;
the adjusting module is used for adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras;
the acquisition module is also used for acquiring left and right images of the current shooting scene by utilizing the adjusted left and right binocular stereo cameras;
the cutting module is used for cutting the left image and the right image by utilizing the image cutting parameters;
an output module for outputting the clipped left and right images so as to construct a stereoscopic image of the current shooting scene from the clipped left and right images,
wherein the second determining module comprises:
a third obtaining submodule, configured to obtain the first parallax d at the maximum protrusion distance in the real scene according to the following formulaN_R:
<mrow> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mi>E</mi> <mo>_</mo> <mi>R</mi> </mrow> <mrow> <mi>Z</mi> <mo>_</mo> <mi>R</mi> <mo>-</mo> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
Wherein, N _ R is the maximum projection distance, E _ R is the visual distance in the real scene, and Z _ R is the distance from the two eyes to the real screen in the real scene;
a fourth obtaining sub-module for obtaining a second parallax d at a maximum recess distance in the real scene by the following formulaF_R;
<mrow> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mi>E</mi> <mo>_</mo> <mi>R</mi> </mrow> <mrow> <mi>Z</mi> <mo>_</mo> <mi>R</mi> <mo>+</mo> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
Wherein F _ R is the maximum recess distance;
a third determining sub-module, configured to determine a first distance Con from the stereo camera to the zero-disparity plane according to a following relation that a ratio between the first disparity and the second disparity in the real scene is equal to a ratio between a third disparity in the shooting scene at the distance from the stereo camera to the nearest object and a fourth disparity in the shooting scene at the distance from the stereo camera to the farthest object:
<mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>=</mo> <mfrac> <mrow> <mi>R</mi> <mo>+</mo> <mn>1</mn> </mrow> <mrow> <mfrac> <mn>1</mn> <mrow> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>+</mo> <mfrac> <mi>R</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein N _ O is the distance from the stereo camera to the nearest object, F _ O is the distance from the stereo camera to the farthest object, and R is the first parallax dN_RAnd the second parallax dF_RThe ratio of the amount of the first and the second,
the fourth determining submodule is used for determining the visual distance of the left and right binocular stereo cameras according to the first distance;
and the fifth determining submodule is used for determining the image cutting parameters of the left and right binocular stereo cameras according to the first distance and the visual distance of the left and right binocular stereo cameras.
9. The stereo camera device according to claim 8, wherein the first determination module includes:
the extraction submodule is used for extracting the characteristic point information of the two left and right original images;
the first determining submodule is used for determining a feature point matching point set pair between the two left and right original images according to the feature point information;
a first obtaining sub-module, configured to obtain a horizontal disparity between the pair of matching point sets;
the second obtaining submodule is used for obtaining the depth of the object point corresponding to the matching point set pair according to the horizontal parallax between the matching point set pair;
and the second determining submodule is used for determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the depth of the object point.
10. The stereo camera device according to claim 9, wherein the extraction sub-module includes:
the extraction unit is used for extracting feature point information of the two left and right original images by adopting a Scale Invariant Feature Transform (SIFT) algorithm;
the first determination submodule includes:
and the first determining unit is used for determining a feature point matching point set pair between the two left and right original images according to the feature point information by adopting a minimum mean square error ZSSD algorithm.
11. The stereo camera device according to claim 8, wherein the fourth determination sub-module includes:
a second determining unit, configured to determine a visual distance Sep of the left and right binocular stereo cameras according to the following formula:
<mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mn>2</mn> <mo>*</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <mi>t</mi> <mi>a</mi> <mi>n</mi> <mrow> <mo>(</mo> <mfrac> <mi>&theta;</mi> <mn>2</mn> </mfrac> <mo>)</mo> </mrow> <mo>*</mo> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> <mrow> <mi>W</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mrow> <mo>(</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>-</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
where Con is the first distance, W _ R is the width of the real screen in the real scene, dN_RFor the first parallax, N _ O is the distance from the stereo camera to the nearest object, and theta is the field angle of the stereo camera;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
<mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mn>2</mn> <mo>*</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <mi>t</mi> <mi>a</mi> <mi>n</mi> <mrow> <mo>(</mo> <mfrac> <mi>&theta;</mi> <mn>2</mn> </mfrac> <mo>)</mo> </mrow> <mo>*</mo> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> <mrow> <mi>W</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mrow> <mo>(</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> <mo>-</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein d isF_RF _ O is the distance from the stereo camera to the farthest object for the second parallax;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
<mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mo>(</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <msub> <mi>W</mi> <mi>f</mi> </msub> <mo>/</mo> <mi>f</mi> <mo>)</mo> <mo>*</mo> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> <mrow> <mi>W</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mrow> <mo>(</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>-</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
or
Determining the visual interval Sep of the left and right binocular stereo cameras by the following formula:
<mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mo>(</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <msub> <mi>W</mi> <mi>f</mi> </msub> <mo>/</mo> <mi>f</mi> <mo>)</mo> <mo>*</mo> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> <mrow> <mi>W</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mrow> <mo>(</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> <mo>-</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>)</mo> </mrow> <mo>+</mo> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>*</mo> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>.</mo> </mrow>
12. the stereo camera device according to claim 8, wherein the fifth determination sub-module includes:
a first obtaining unit for obtaining the width W of the virtual screen in the current shooting scene by the following formulaCon:
<mrow> <msub> <mi>W</mi> <mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mn>2</mn> <mo>*</mo> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <mi>t</mi> <mi>a</mi> <mi>n</mi> <mrow> <mo>(</mo> <mfrac> <mi>&theta;</mi> <mn>2</mn> </mfrac> <mo>)</mo> </mrow> <mo>-</mo> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>;</mo> </mrow>
Wherein Con is the first distance, and theta is the angle of view of the stereo camera;
or
Is obtained by the following formulaTaking the width W of a virtual screen in the current shooting sceneCon:
<mrow> <msub> <mi>W</mi> <mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>*</mo> <msub> <mi>W</mi> <mi>f</mi> </msub> </mrow> <mi>f</mi> </mfrac> <mo>-</mo> <mi>S</mi> <mi>e</mi> <mi>p</mi> <mo>;</mo> </mrow>
Wherein, WfF, the lens focal length of the stereo camera is the width of the stereo camera sensor;
a third determining unit, configured to determine an image cropping parameter Crop of the left and right binocular stereo cameras according to the following formula:
<mrow> <mi>C</mi> <mi>r</mi> <mi>o</mi> <mi>p</mi> <mo>=</mo> <mfrac> <mrow> <mi>S</mi> <mi>e</mi> <mi>p</mi> </mrow> <mrow> <msub> <mi>W</mi> <mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> </mrow> </msub> <mo>+</mo> <mi>S</mi> <mi>e</mi> <mi>p</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
and Sep is the visual distance between the left and right binocular stereo cameras.
13. The stereo camera device according to claim 8, wherein the cropping module comprises:
the first cutting submodule is used for cutting the leftmost end of the left image in the horizontal direction by using the image cutting parameters to remove X-Crop pixels so as to obtain a cut left image;
and
the second cutting submodule is used for cutting the rightmost end of the right image in the horizontal direction to remove X-Crop pixels by using the image cutting parameters so as to obtain a cut right image;
wherein X is the number of horizontal pixels of the left image and the right image, and Crop is the image cropping parameter.
14. The stereoscopic camera apparatus according to any one of claims 8 to 13, wherein the outputted clipped left and right images are specifically applied to a theater, and the theater has two left and right projection devices, and the left image is provided to the left projection device of the theater and the right image is provided to the right projection device of the theater, thereby projecting a stereoscopic scene;
or,
the output left and right images after the cutting processing are specifically applied to a virtual reality helmet, the virtual reality helmet is provided with a left display screen and a right display screen, the left image is provided for the left display screen of the virtual reality helmet, and the right image is provided for the right display screen of the virtual reality helmet;
or
The left and right images after the cutting processing are output and specifically applied to the augmented reality glasses, the virtual reality glasses are provided with left and right display lenses, the left image is provided with the left display lens of the augmented reality glasses, and the right image is provided with the right display lens of the augmented reality glasses.
15. A stereoscopic camera apparatus, characterized by comprising: control binocular stereo camera, display screen, casing, treater, memory, circuit board and power supply circuit, wherein:
the left binocular stereo camera, the right binocular stereo camera and the display screen are embedded in the shell;
the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board;
the power supply circuit is used for supplying power to each circuit or device of the stereo camera equipment;
the memory is used for storing executable program codes;
the processor executes a program corresponding to the executable program code by reading the executable program code stored in the memory, and executes:
acquiring left and right original images of a current shooting scene by using the left and right binocular stereo cameras;
determining the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object in the current shooting scene according to the left and right original images;
according to the fact that the ratio of a first parallax under the maximum protruding distance and a second parallax under the maximum recessing distance in a real scene is equal to the ratio of a third parallax under the distance from a stereo camera to a nearest object and a fourth parallax under the distance from the stereo camera to a farthest object in a shooting scene, the visual distance and the image cutting parameters of left and right binocular stereo cameras are determined according to the distance from the stereo camera to the nearest object and the distance from the stereo camera to the farthest object;
adjusting the distance between the left and right binocular stereo cameras according to the visual distance between the left and right binocular stereo cameras;
acquiring left and right images of the current shooting scene by using the adjusted left and right binocular stereo cameras, and cutting the left and right images by using the image cutting parameters;
outputting the left and right images after the cutting processing;
constructing a stereo image of the current shooting scene according to the cut left and right images so as to present the stereo image through the display screen,
wherein the step of determining the inter-view distance and the image cropping parameters of the left and right binocular stereo cameras according to the distance between the stereo camera and the nearest object and the distance between the stereo camera and the farthest object is performed by equalizing the ratio between the first parallax at the maximum projecting distance and the second parallax at the maximum recessed distance in the real scene with the ratio between the third parallax at the distance between the stereo camera and the nearest object and the fourth parallax at the distance between the stereo camera and the farthest object in the shooting scene:
obtaining a first parallax d under the maximum projection distance in a real scene through the following formulaN_R:
<mrow> <msub> <mi>d</mi> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <mi>N</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mi>E</mi> <mo>_</mo> <mi>R</mi> </mrow> <mrow> <mi>Z</mi> <mo>_</mo> <mi>R</mi> <mo>-</mo> <mi>N</mi> <mo>_</mo> <mi>R</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
Wherein, N _ R is the maximum projection distance, E _ R is the visual distance in the real scene, and Z _ R is the distance from the two eyes to the real screen in the real scene;
obtaining a second parallax d at the maximum recess distance in the real scene by the following formulaF_R;
<mrow> <msub> <mi>d</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </msub> <mo>=</mo> <mfrac> <mrow> <mi>F</mi> <mo>_</mo> <mi>R</mi> <mo>*</mo> <mi>E</mi> <mo>_</mo> <mi>R</mi> </mrow> <mrow> <mi>Z</mi> <mo>_</mo> <mi>R</mi> <mo>+</mo> <mi>F</mi> <mo>_</mo> <mi>R</mi> </mrow> </mfrac> <mo>;</mo> </mrow>
Wherein F _ R is the maximum recess distance;
determining a first distance Con from the stereo camera to a zero-parallax plane according to the following relational expression which is constructed by the fact that the ratio of the first parallax to the second parallax in the real scene is equal to the ratio of the third parallax in the shooting scene under the distance from the stereo camera to the nearest object and the fourth parallax in the shooting scene under the distance from the stereo camera to the farthest object:
<mrow> <mi>C</mi> <mi>o</mi> <mi>n</mi> <mo>=</mo> <mfrac> <mrow> <mi>R</mi> <mo>+</mo> <mn>1</mn> </mrow> <mrow> <mfrac> <mn>1</mn> <mrow> <mi>N</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> <mo>+</mo> <mfrac> <mi>R</mi> <mrow> <mi>F</mi> <mo>_</mo> <mi>O</mi> </mrow> </mfrac> </mrow> </mfrac> <mo>;</mo> </mrow>
wherein N _ O is the distance from the stereo camera to the nearest object, F _ O is the distance from the stereo camera to the farthest object, and R is the first parallax dN_RAnd the second parallax dF_RThe ratio of the amount of the first and the second,
determining the visual distance of the left and right binocular stereo cameras according to the first distance;
and determining image cutting parameters of the left and right binocular stereo cameras according to the first distance and the visual distance of the left and right binocular stereo cameras.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610410762.8A CN106228530B (en) | 2016-06-12 | 2016-06-12 | A kind of stereography method, device and stereo equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610410762.8A CN106228530B (en) | 2016-06-12 | 2016-06-12 | A kind of stereography method, device and stereo equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106228530A CN106228530A (en) | 2016-12-14 |
CN106228530B true CN106228530B (en) | 2017-10-10 |
Family
ID=57520315
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610410762.8A Expired - Fee Related CN106228530B (en) | 2016-06-12 | 2016-06-12 | A kind of stereography method, device and stereo equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106228530B (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107168008B (en) * | 2017-06-27 | 2021-06-08 | 银河威尔科技(北京)有限公司 | Correction method and device of 3Dvr camera for eliminating dizzy feeling |
CN107277485B (en) * | 2017-07-18 | 2019-06-18 | 歌尔科技有限公司 | Image display method and device based on virtual reality |
CA3086592A1 (en) | 2017-08-30 | 2019-03-07 | Innovations Mindtrick Inc. | Viewer-adjusted stereoscopic image display |
CN109982061A (en) * | 2017-12-27 | 2019-07-05 | 上海文广互动电视有限公司 | The depth design method of 3D program making |
CN108181993A (en) * | 2018-01-26 | 2018-06-19 | 成都科木信息技术有限公司 | For the scene drawing method of augmented reality equipment |
KR102377499B1 (en) * | 2018-02-08 | 2022-03-24 | 이노베이션스 마인드트릭 인크. | Viewer-adjustable stereoscopic image display |
CN111031198A (en) * | 2018-10-09 | 2020-04-17 | 任志忠 | Real-time film production technology |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103238337B (en) * | 2010-11-23 | 2016-03-16 | 深圳超多维光电子有限公司 | Three-dimensional image acquisition system and method |
TWI566576B (en) * | 2014-06-03 | 2017-01-11 | 宏碁股份有限公司 | Stereoscopic view synthesis method and apparatus using the same |
CN104023221B (en) * | 2014-06-23 | 2016-04-13 | 深圳超多维光电子有限公司 | Stereo image parallax control method and device |
CN104765156B (en) * | 2015-04-22 | 2017-11-21 | 京东方科技集团股份有限公司 | A kind of three-dimensional display apparatus and 3 D displaying method |
CN105072433B (en) * | 2015-08-21 | 2017-03-22 | 山东师范大学 | Depth perception mapping method applied to head track virtual reality system |
CN105611271A (en) * | 2015-12-18 | 2016-05-25 | 华中科技大学 | Real-time stereo image generating system |
-
2016
- 2016-06-12 CN CN201610410762.8A patent/CN106228530B/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
CN106228530A (en) | 2016-12-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106228530B (en) | A kind of stereography method, device and stereo equipment | |
CN106251403B (en) | A kind of methods, devices and systems of virtual three-dimensional Scene realization | |
US7983477B2 (en) | Method and apparatus for generating a stereoscopic image | |
ES2599858T3 (en) | Effective multi-view coding | |
US20150358539A1 (en) | Mobile Virtual Reality Camera, Method, And System | |
US20120140038A1 (en) | Zero disparity plane for feedback-based three-dimensional video | |
RU2016141397A (en) | Stereo view | |
KR20160135660A (en) | Method and apparatus for providing 3-dimension image to head mount display | |
CN106231292B (en) | A kind of stereoscopic Virtual Reality live broadcasting method, device and equipment | |
CN108833877B (en) | Image processing method and device, computer device and readable storage medium | |
US20190266802A1 (en) | Display of Visual Data with a Virtual Reality Headset | |
Devernay et al. | Stereoscopic cinema | |
US20150326847A1 (en) | Method and system for capturing a 3d image using single camera | |
CN106228613B (en) | A kind of construction method, device and the stereoscopic display device of virtual three-dimensional scene | |
JP2003348621A (en) | Means for setting two-viewpoint camera | |
CN115174805B (en) | Panoramic stereo image generation method and device and electronic equipment | |
CN109729338B (en) | Display data processing method, device and system | |
KR20110025083A (en) | Apparatus and method for displaying 3d image in 3d image system | |
CN113382222B (en) | Display method based on holographic sand table in user moving process | |
TWI572899B (en) | Augmented reality imaging method and system | |
Wei et al. | Color anaglyphs for panorama visualizations | |
US10701345B2 (en) | System and method for generating a stereo pair of images of virtual objects | |
US20240236288A9 (en) | Method And Apparatus For Generating Stereoscopic Display Contents | |
CN118476213A (en) | Scaling three-dimensional content displayed on an autostereoscopic display device | |
JP2013223133A (en) | Guiding device, guiding method, and guiding program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20180725 Address after: 518054 Room 201, building A, 1 front Bay Road, Shenzhen Qianhai cooperation zone, Shenzhen, Guangdong Patentee after: SUPERD Co.,Ltd. Address before: 518053 H-1 Tung 101, overseas Chinese town, Nanshan District, Shenzhen, Guangdong. Patentee before: SHENZHEN SUPER PERFECT OPTICS Ltd. |
|
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20171010 |