A method for automatically optimizing position parameters of a stereo camera

By calculating the three-dimensional coordinate values ​​and determining the visual comfort zone in the stereo camera, and automatically adjusting the position parameters of the stereo camera, the problems of low accuracy and low efficiency caused by manual observation are solved, and efficient and accurate stereo effects and stronger visual impact are achieved. feel.

CN113034597BActive Publication Date: 2024-11-29SHENZHEN HUAQIANG DIGITAL ANIMATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110347630.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-31
Publication Date
2024-11-29
Estimated Expiration
2041-03-31

AI Technical Summary

Technical Problem

The position parameter setting of existing stereo cameras mainly relies on manual naked eye observation, resulting in problems such as low accuracy, high re-revision rate and low efficiency.

Method used

By calculating the coordinate values ​​of the stereo camera in three-dimensional space, converting them to the camera coordinate system, determining the zero parallax surface and visual comfort zone, adjusting the camera position parameters until the object model is in the visual comfort zone, and automatically optimizing the position parameter settings.

Benefits of technology

It improves the accuracy and efficiency of three-dimensional effects in three-dimensional film production, reduces the revision rate and cost, and can achieve stronger three-dimensional effects and better viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113034597B_ABST
    Figure CN113034597B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for realizing automatic optimization of position parameters of a stereo camera, comprising: step 1, calculating the coordinate value in the world coordinate system of the stereo camera; step 2, converting the coordinate value to the camera coordinate system; step 3, calculating the zero parallax plane and the visual comfort zone; step 4, determining the position of the object model to be photographed in the camera coordinate system, and deriving the object model whose position exceeds the zero parallax plane and the object model closest to the zero parallax plane; step 5, judging whether the object model is in the visual comfort zone, if so, proceeding to step 7; if not, proceeding to step 6; step 6, adjusting the position parameters of the stereo camera and returning to step 3; step 7, ending the setting. The method automatically optimizes the position parameters of the stereo camera in stereo film production by judging whether the object model is in the visual comfort zone, and can meet the stereo effect required by most lenses in stereo film production, and has good accuracy, low rework rate, high efficiency and low cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of stereoscopic film production, and in particular to a method for realizing automatic optimization of position parameters of a stereoscopic camera. Background Art

[0002] Stereoscopic imaging technology actually uses the difference in the different images of the same object seen by both eyes in the brain, allowing the audience to see the image produce parallax on the horizontal plane of the screen, increasing the sense of three-dimensionality and creating a more realistic visual effect. The specific principle of stereoscopic imaging is: the distance between a person's two eyes is about 5 to 6 cm. When looking at any object, the angles of the two eyes do not overlap, that is, there are two perspectives. This subtle difference in perspective is transmitted from the retina to the brain, and the front and back distance of the object can be distinguished, creating a strong sense of three-dimensionality. This is the principle of polarization, and almost all 3D imaging technologies have been developed based on this principle.

[0003] Therefore, the correct setting of the position parameters of the stereo camera is crucial to the stereoscopic film effect. If the position parameters are not set correctly, it may cause double images, poor stereoscopic effect, and the audience may easily experience visual fatigue or even dizziness. Therefore, the setting and management of the position parameters of the stereo camera is the core technology of stereoscopic movies.

[0004] At present, in China, the technology for setting the position parameters of stereo cameras is still relatively backward, and most of them are still at the stage of setting by manual observation with the naked eye. There are problems such as low accuracy, high repair rate and low efficiency. Summary of the invention

[0005] Based on the problems existing in the prior art, the purpose of the present invention is to provide a method for realizing automatic optimization of position parameters of a stereo camera, which can solve the problems that the position parameters of existing stereo cameras are mostly set by manual observation with the naked eye, with low accuracy, high repair rate and low efficiency.

[0006] The objective of the present invention is achieved through the following technical solutions:

[0007] An embodiment of the present invention provides a method for automatically optimizing position parameters of a stereo camera, comprising:

[0008] Step 1, calculating the coordinate values ​​of the stereo camera with a preset initial position in the world coordinate system of the three-dimensional space;

[0009] Step 2, converting the coordinate values ​​of the stereo camera in the world coordinate system to the camera coordinate system;

[0010] Step 3, calculating the zero parallax plane of the stereo camera in the camera coordinate system, and determining the visual comfort zone of the stereo camera according to the zero parallax plane;

[0011] Step 4, determining the position of the object model to be photographed in the camera coordinate system, and deriving the object model whose position exceeds the zero parallax plane and the object model closest to the zero parallax plane;

[0012] Step 5, determining whether all object models obtained in step 4 are within the visual comfort zone of the stereo camera, if so, proceeding to step 7; if not, proceeding to step 6;

[0013] Step 6, adjusting the position parameters of the stereo camera and returning to step 3 for processing;

[0014] Step 7, ending this setting, and taking the position parameters of the stereo camera corresponding to the current zero parallax plane and the visual comfort zone as the optimized position parameters.

[0015] It can be seen from the technical solution provided by the present invention that the method for realizing automatic optimization of position parameters of a stereo camera provided by an embodiment of the present invention has the following beneficial effects:

[0016] Through three-dimensional space recognition, it is determined whether the object model is in the visual comfort zone of the stereo camera, and then the optimal zero parallax plane and the optimal visual comfort zone relative to the position of the object model are obtained, and then the position parameters of the stereo camera corresponding to the optimal zero parallax plane and the optimal visual comfort zone are used as the automatically optimized position parameters. This method can meet the stereoscopic effect required by most lenses in stereoscopic film production. It is not only efficient and accurate, but also has low rework rate and cost. It also solves the problem that most of the existing stereo camera position parameters are set by manual naked eye observation, which has low accuracy, high rework rate and high time cost resulting in low efficiency. Based on the position parameters of the stereo camera automatically optimized and set by the present invention, targeted adjustments can be conveniently carried out to obtain the required special effects such as screen flushing or stronger stereoscopic effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0018] Figure 1 A flow chart of a method for automatically optimizing position parameters of a stereo camera provided by an embodiment of the present invention;

[0019] Figure 2 A flow chart for realizing automatic optimization of position parameters of a stereo camera provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in combination with the specific content of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work belong to the protection scope of the present invention. The contents not described in detail in the embodiments of the present invention belong to the prior art known to professional and technical personnel in this field.

[0021] See also Figure 1 , an embodiment of the present invention provides a method for realizing automatic optimization of position parameters of a stereo camera, comprising:

[0022] Step 1, calculating the coordinate values ​​of the stereo camera with a preset initial position in the world coordinate system of the three-dimensional space;

[0023] Step 2, converting the coordinate values ​​of the stereo camera in the world coordinate system to the camera coordinate system;

[0024] Step 3, calculating the zero parallax plane of the stereo camera in the camera coordinate system, and determining the visual comfort zone of the stereo camera according to the zero parallax plane;

[0025] Step 4, determining the position of the object model to be photographed in the camera coordinate system, and deriving the object model whose position exceeds the zero parallax plane and the object model closest to the zero parallax plane;

[0026] Step 5, determining whether all object models obtained in step 4 are within the visual comfort zone of the stereo camera, if so, proceeding to step 7; if not, proceeding to step 6;

[0027] Step 6, adjusting the position parameters of the stereo camera and returning to step 3 for processing;

[0028] Step 7, ending this setting, and taking the position parameters of the stereo camera corresponding to the current zero parallax plane and the visual comfort zone as the optimized position parameters.

[0029] In step 5 of the above method, within the visual comfort zone means:

[0030] All object models are within the visual comfort zone of the stereo camera;

[0031] Alternatively, there is at least one object model that is not within the visual comfort zone and the object model closest to the zero parallax plane is within the limit adjustment region of the visual comfort zone.

[0032] In the above method, not in the visual comfort zone means that: there is at least one object model that is not in the visual comfort zone and the object model closest to the zero parallax plane is not in the limit adjustment area of ​​the visual comfort zone.

[0033] In the above method, the limit adjustment area of ​​the visual comfort zone refers to: an area at the outer edge of the visual comfort zone and where the object model cannot be adjusted outward any further.

[0034] In step 3 of the above method, the visual comfort zone of the stereo camera is determined according to the zero parallax plane in the following manner, including:

[0035] First, the projection of the viewing cone and the zero parallax plane of the stereo camera in the camera coordinate system is calculated, and then the intersection plane of the viewing cone and the projection is calculated;

[0036] An area within the viewing cone of the stereo camera and within a preset distance of the intersection plane is used as a visual comfort zone.

[0037] In the above method, the visual comfort zone is an area whose distance from both sides of the zero parallax plane accounts for 15% to 30% of the average distance between the audience and the screen.

[0038] Step 5 of the above method further includes: if the camera is still not in the visual comfort zone after reaching the preset number of cycles, then proceeding to step 7. Preferably, the preset number of cycles is less than or equal to 10. Considering that too many cycles affect the setting efficiency, after the preset number of cycles, if the condition for interrupting the current setting is not met, it is also considered that the stereo camera has been set with better position parameters, and therefore, the current setting is exited in this way.

[0039] In the above method, in step 4, the position of the object model to be photographed in the camera coordinate system is determined by the following method, including:

[0040] Determine the BBX value of the object model in the camera coordinate system, and determine the position of the corresponding object model in the camera coordinate system according to the BBX value;

[0041] Alternatively, a detection point on the object model is determined, and the position of the object model in the camera coordinate system is determined by the distance between the detection point and the zero parallax plane of the stereo camera;

[0042] Alternatively, a detection line on the object model is determined, and the position of the object model in the camera coordinate system is determined through the distance between the detection line and the zero parallax plane of the stereo camera.

[0043] In step 1 of the above method, the stereo camera is preset at an initial position such that, after composing according to the requirements of the storyboard, all object models to be photographed can be included in the viewing cone of the stereo camera.

[0044] In the above method, during the optimization setting process, the cycle from step 3 to step 6 can generally complete the automatic optimization of the stereo camera position parameters within 10 times (usually 3 times), which is highly efficient.

[0045] It can be known that in the above method, the position of the stereo camera can be adjusted in a step-by-step manner within the allowable adjustment range, which belongs to the existing adjustment method and will not be explained in detail here.

[0046] The method of the present invention determines whether the object model in the camera coordinate system is in the visual comfort zone of the stereo camera through three-dimensional space recognition, and then obtains the best zero parallax plane and the best visual comfort zone relative to multiple object models, and uses the parameters of the stereo camera corresponding to the best zero parallax plane and the best visual comfort zone as the parameters for automatic optimization. This parameter can meet the stereo effect required by most lenses in the stereo film project. When special effects (such as screen wash or stronger stereo effects) are required, the stereo camera can be adjusted on the basis of this parameter to meet the corresponding stereo effect requirements. The method of the present invention not only improves the efficiency and accuracy of the optimization setting of the position parameters of the stereo camera in the production of the entire stereo film, but also can achieve a reasonable stereo effect and most lenses are in the visual comfort zone, which will not cause dizziness and other visual discomfort to the audience, and can better highlight the visual impact of the screen wash lens, giving the audience a better viewing experience.

[0047] The embodiments of the present invention are described in further detail below.

[0048] The method for realizing automatic optimization of position parameters of a stereo camera according to an embodiment of the present invention is specifically as follows: setting the initial position of the stereo camera according to the composition required by the storyboard, calculating the world coordinate position of the stereo camera in the three-dimensional space, and converting the world coordinate into the camera coordinate (the center camera of the stereo camera is set to (0,0,0));

[0049] Calculate the zero parallax plane of the stereo camera, and calculate the visual comfort zone of the stereo camera based on the zero parallax plane;

[0050] Scan and calculate the position of the stored object model (stored in the form of a file) in the camera coordinate system (the position can be determined by at least one of the BBX value, the distance from the detection point of the object model to the zero parallax plane, or the distance from the detection line of the object model to the zero parallax plane), determine all object models behind the zero parallax plane, and the object models closest to the zero parallax plane in front of and behind the zero parallax plane, and judge whether the position parameter settings of the stereo camera are reasonable based on these object models, specifically, judge whether the object model is in the visual comfort zone of the stereo camera. If it is in the visual comfort zone, no processing is performed and the optimization setting is terminated; if it is not in the visual comfort zone, the position parameters of the stereo camera are automatically optimized and set until the object models are in the best position relative to the visual comfort zone of the stereo camera, and the setting is completed.

[0051] Example

[0052] See also Figure 1 This embodiment provides a method for realizing automatic optimization of position parameters of a stereo camera, comprising the following steps:

[0053] Step 1, calculating the coordinate values ​​of the stereo camera with a preset initial position in the world coordinate system in the three-dimensional space;

[0054] Step 2, converting the coordinate values ​​of the stereo camera in the world coordinate system to the camera coordinate system;

[0055] Step 3, calculating the zero parallax plane of the stereo camera, and determining the visual comfort zone of the stereo camera according to the zero parallax plane;

[0056] Step 4, scanning and calculating the BBX value of the object model stored in the form of a file to be photographed in the camera coordinate system, and then determining the position of the object model in the camera coordinate system;

[0057] Step 5, determining, according to the position of the object model in the camera coordinate system, the object model beyond the zero parallax plane and the object model closest to the zero parallax plane among all the object models to be photographed;

[0058] Step 6, calculating and judging whether all object models determined in step 5 are within the visual comfort zone of the stereo camera, if they are within the visual comfort zone, proceed to step 7; if they are not within the visual comfort zone, proceed to step 6;

[0059] Step 6, adjust the position of the stereo camera, and then return to step 3 for processing;

[0060] Step 7, ending this setting, and using the position parameters corresponding to the current zero parallax plane and the visual comfort zone as the position parameters of the automatically optimized stereo camera.

[0061] In the above method, the maximum number of loops of step 3 to step 6 is 10, and usually no more than 3, which can complete the automatic optimization setting of the stereo camera position parameters.

[0062] In the above method, judging that all object models are in the visual comfort zone means:

[0063] All object models are within the visual comfort zone;

[0064] Alternatively, there is at least one object model that is not within the visual comfort zone and the object model closest to the zero parallax plane is within the limit adjustment region of the visual comfort zone.

[0065] In the above method, not in the visual comfort zone means that: there is at least one object model that is not in the visual comfort zone and the object model closest to the zero parallax plane is not in the limit adjustment area of ​​the visual comfort zone.

[0066] In the above method, the limit adjustment area of ​​the visual comfort zone refers to: an area at the outer edge of the visual comfort zone and where the object model cannot be adjusted outward any further.

[0067] In step 6 of the above method, each time the position of the stereo camera is adjusted, it is necessary to ensure that all object models to be photographed are within the viewing cone of the stereo camera, that is, it is necessary to ensure that all object models to be photographed are within the visible range.

[0068] By using the method of the present invention, the maker of a 3D film can adjust the initial position of the 3D camera as needed. After the required composition of the storyboard is achieved, the position parameters of the 3D camera can be automatically optimized by the above method, so that the 3D camera is set in the visual comfort zone. Then, the position parameters of the 3D camera can be adjusted for subtle or special effects according to the required 3D effect (see Figure 2 ).

[0069] The method of the present invention has at least the following advantages:

[0070] (1) It can automatically optimize and adjust the position parameters of the stereo camera and can be used in most stereoscopic film projects.

[0071] (2) It uses underlying graphics and image science and three-dimensional space algorithms, which have reliable effects and strong versatility.

[0072] (3) It can significantly reduce the repeated production of subsequent links caused by the setting of the position parameters of the stereo camera, especially the rendering cost caused by repeated rendering, thereby reducing the production cost of stereoscopic movies and improving production efficiency.

[0073] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0074] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for automatically optimizing position parameters of a stereo camera, characterized in that: include: Step 1, calculating the coordinate values ​​of the stereo camera with a preset initial position in the world coordinate system of the three-dimensional space; Step 2, converting the coordinate values ​​of the stereo camera in the world coordinate system to the camera coordinate system; Step 3, calculating the zero parallax plane of the stereo camera in the camera coordinate system, determining the visual comfort zone of the stereo camera according to the zero parallax plane, and determining the visual comfort zone of the stereo camera according to the zero parallax plane in the following manner, including: first calculating the projection of the visual cone of the stereo camera and the zero parallax plane in the camera coordinate system, and then calculating the intersection plane of the visual cone and the projection; taking the area within the visual cone of the stereo camera and within a preset distance of the intersection plane as the visual comfort zone; the visual comfort zone is an area whose distance from both sides of the zero parallax plane accounts for 15% to 30% of the average distance between the audience and the screen; Step 4, determining the position of the object model to be photographed in the camera coordinate system, and deriving the object model whose position exceeds the zero parallax plane and the object model closest to the zero parallax plane; Step 5, determining whether all the object models obtained in step 4 are within the visual comfort zone of the stereo camera. If they are within the visual comfort zone, proceed to step 7, wherein the within the visual comfort zone means that all the object models are within the visual comfort zone of the stereo camera; or, there is at least one object model that is not within the visual comfort zone and the object model closest to the zero parallax plane is within the limit adjustment area of ​​the visual comfort zone; if not within the visual comfort zone, proceed to step 6, wherein the not within the visual comfort zone means that there is at least one object model that is not within the visual comfort zone and the object model closest to the zero parallax plane is not within the limit adjustment area of ​​the visual comfort zone; It also includes: after reaching the preset number of cycles, if it is still not within the visual comfort zone, proceed to step 7 Step 6, adjusting the position parameters of the stereo camera and returning to step 3 for processing; Step 7, ending this setting, and taking the position parameters of the stereo camera corresponding to the current zero parallax plane and the visual comfort zone as the optimized position parameters.

2. The method for realizing automatic optimization of position parameters of a stereo camera according to claim 1, characterized in that: The preset number of cycles is less than or equal to 10 times.

3. The method for realizing automatic optimization of position parameters of a stereo camera according to claim 1, characterized in that: In step 4, the position of the object model to be photographed in the camera coordinate system is determined by the following method, including: Determine the BBX value of the object model in the camera coordinate system, and determine the position of the corresponding object model in the camera coordinate system according to the BBX value; Alternatively, a detection point on the object model is determined, and the position of the object model in the camera coordinate system is determined by the distance between the detection point and the zero parallax plane of the stereo camera; Alternatively, a detection line on the object model is determined, and the position of the object model in the camera coordinate system is determined through the distance between the detection line and the zero parallax plane of the stereo camera.

4. The method for realizing automatic optimization of position parameters of a stereo camera according to claim 1, characterized in that: In step 1, the stereo camera is preset at an initial position such that, after composing according to the requirements of the storyboard, all object models to be photographed can be included in the viewing cone of the stereo camera.