Binocular camera design method and system
Through iterative search and field of view model calculation, the problem in binocular camera design that the effective field of view at a specified depth cannot be accurately obtained is solved, the accuracy and reliability of binocular camera design are achieved, and the effect of structural parameters on the field of view can be intuitively displayed. scope impact.
Patent Information
- Application Number
- CN202410762599.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-03
Smart Images

Figure CN118587300A
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of computer vision, and in particular relates to a binocular camera design method and system. Background Art
[0002] With the continuous development of computer vision technology, stereo vision sensors have been used more and more widely, especially binocular cameras composed of dual CCDs, which have the advantages of high measurement accuracy and fast measurement speed. Therefore, they are widely used in many fields such as industrial inspection, target recognition, robot self-guidance, shooting range, etc.
[0003] The binocular camera uses two CCD cameras to imitate the functions of the human eye. The mechanism is similar to the visual mechanism of the human eye. The overlapping part of the field of view (that is, the area that both cameras can observe at the same time) is its effective field of view, and the other area outside this area is called the "blind area". Therefore, the effective field of view of the binocular camera is not only affected by the parameters of the monocular camera itself (such as the size of the target surface, the field of view angle, etc.), but also related to the structural parameters between the two monocular cameras (such as the baseline distance, the angle between the camera optical axis and the baseline, etc.).
[0004] When designing a binocular camera, the effective field of view is often described qualitatively by making a maximum inscribed sphere within the effective field of view and using the radius of the sphere. The radius of the sphere is positively correlated with the effective field of view. This method can intuitively display the effective field of view, but since the specific size of the effective field of view at a specified depth cannot be obtained, it will affect the accuracy of the binocular camera design. Summary of the invention
[0005] In view of this, an embodiment of the present invention provides a binocular camera design method and system for solving the problem that the existing binocular camera design cannot obtain the specific size of the effective field of view at a specified depth, which affects the accuracy of the binocular camera design.
[0006] In a first aspect of an embodiment of the present invention, a binocular camera design method is provided, comprising:
[0007] Set the camera parameters and camera structure parameter benchmark values, iteration steps, effective field of view width and height target values, and determine the corresponding iteration parameter group;
[0008] The parameters in the iterative parameter group include at least the horizontal field of view half angle, the vertical field of view half angle, the baseline distance, and the angle between the optical axis and the baseline. A single parameter changes in each iteration, and the other parameters remain unchanged.
[0009] Preliminary screening of iterative parameter groups based on prior knowledge of the binocular camera;
[0010] Input each group of parameters in the iterative parameter group into the field of view model, calculate the monocular field of view of the camera, calculate the corresponding binocular field of view, and output the width and height of the effective field of view of the binocular camera;
[0011] Compare the output effective field of view width and height with the effective field of view width and height target value to determine whether the target value requirements are met;
[0012] If not, continue to iterate the parameter group until the parameters that meet the requirements are obtained. Based on all parameter values that meet the requirements, the effective field of view of the binocular camera is constructed for simulation display to assist in the design of the binocular camera structure.
[0013] In a second aspect of an embodiment of the present invention, a system for designing a binocular camera is provided, comprising:
[0014] The parameter setting module is used to set the camera parameters and camera structure parameter reference values, iteration steps, effective field of view width and height target values, and determine the corresponding iteration parameter group;
[0015] The parameters in the iterative parameter group include at least the horizontal field of view half angle, the vertical field of view half angle, the baseline distance, and the angle between the optical axis and the baseline. A single parameter changes in each iteration, and the other parameters remain unchanged.
[0016] A preliminary screening module is used to perform preliminary screening of the iterative parameter group based on the prior knowledge of the binocular camera;
[0017] The field of view calculation module is used to input each group of parameters in the iterative parameter group into the field of view model, calculate the monocular field of view of the camera, calculate the corresponding binocular field of view, and output the width and height of the effective field of view of the binocular camera;
[0018] A comparison and judgment module is used to compare the output effective field of view width and height with the effective field of view width and height target value to determine whether the target value requirements are met. If not, continue to iterate in the parameter group until the parameters that meet the requirements are obtained;
[0019] The simulation design module is used to construct the effective field of view of the stereo camera based on all parameter values that meet the requirements for simulation display to assist in the design of the stereo camera structure.
[0020] In a third aspect of an embodiment of the present invention, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method described in the first aspect of the embodiment of the present invention when executing the computer program.
[0021] In a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method provided in the first aspect of the embodiment of the present invention are implemented.
[0022] In the embodiment of the present invention, based on the constructed binocular camera effective field of view model, the effective field of view width and height in different parameter groups are calculated by iteratively searching the camera structure parameters, and all camera structure parameters that meet the target requirements are obtained, so as to facilitate the structural design of the binocular camera. Not only can the accuracy of the effective field of view width and height calculation be guaranteed, but also the accuracy and reliability of the binocular camera design can be guaranteed. At the same time, the influence of each structural parameter on the effective field of view range can be intuitively displayed, effectively assisting the structural design of the binocular camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A schematic diagram of a flow chart of a binocular camera design method provided by one embodiment of the present invention;
[0025] Figure 2 An effective field of view model intent provided for one embodiment of the present invention;
[0026] Figure 3 A schematic diagram of the effective field of view of a binocular camera provided by one embodiment of the present invention;
[0027] Figure 4 A schematic diagram of the structure of a system for binocular camera design provided by one embodiment of the present invention;
[0028] Figure 5 A schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not 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 are within the scope of protection of the present invention.
[0030] It should be understood that the term "including" and other similar expressions in the specification or claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions, such as a process, method, system, or device including a series of steps or units is not limited to the listed steps or units. In addition, "first" and "second" are used to distinguish different objects, not to describe a specific order.
[0031] See also Figure 1 , a schematic flow chart of a binocular camera design method provided by an embodiment of the present invention includes:
[0032] S101, setting camera parameters and camera structure parameter reference values, iteration steps, effective field of view width and height target values, and determining a corresponding iteration parameter group;
[0033] The parameters in the iterative parameter group include at least the horizontal field of view half angle, the vertical field of view half angle, the baseline distance, and the angle between the optical axis and the baseline. Each time a single parameter is changed in the iteration, the other parameters remain unchanged.
[0034] The camera parameters refer to the horizontal and vertical field of view angles of the camera, that is, the field of view of the monocular camera in the horizontal and vertical directions. The camera structure parameter reference values include the horizontal field of view half-angle reference value, the vertical field of view half-angle reference value, the baseline distance reference value, and the angle between the optical axis and the baseline.
[0035] The iteration step size refers to the step size of each parameter in each iteration, that is, the difference between the current iteration parameter value and the next iteration, which is usually a fixed value. Each time the horizontal field of view half angle, vertical field of view half angle, baseline distance, optical axis baseline angle and other parameters are iterated (cycled), the parameter values will change, and the changed parameters are regarded as an iteration parameter group.
[0036] Specifically, let the camera's horizontal field of view half-angle reference value be β0, and the vertical field of view half-angle reference value be The corresponding iteration step is Δβ, Let the reference value of the baseline distance be L0, the corresponding iteration step be ΔL, let the reference value of the angle between the optical axis and the baseline be α0, the corresponding iteration step be Δα;
[0037] If the current iteration horizontal field of view half angle, vertical field of view half angle, baseline distance, and angle between the optical axis and the baseline are respectively nth β , n L 、n α iterations, the current iteration parameter group is
[0038] Optionally, the order of iterative search of parameters in the iterative parameter group is horizontal field of view half angle, vertical field of view half angle, baseline distance, and angle between the optical axis and the baseline.
[0039] S102, preliminarily screening the iterative parameter group based on the prior knowledge of the binocular camera;
[0040] The prior knowledge is prior knowledge when designing a binocular camera, and generally includes constraints on camera parameters, effective field of view and other parameters.
[0041] Specifically, based on condition one and condition two, the current iteration parameter group is screened. If the conditions are not met, the current parameter group is directly excluded. If the conditions are met, the screening continues.
[0042] Filter based on condition three and the expected type of the binocular camera field of view. If it does not meet the condition, the current parameter group is directly excluded. If it meets the condition, it is retained.
[0043] Among them, the first condition is that the parameters of the camera must meet the following requirements:
[0044]
[0045] The second condition is that the requirement for the binocular camera to have an effective field of view is that the right interface of the left camera must be located on the right side of the plane formed by the Y axis and the Z axis in the three-dimensional coordinate system, and the left interface of the right camera must be located on the left side of the plane formed by the Y axis and the Z axis in the three-dimensional coordinate system, otherwise the left and right cameras have no effective field of view, which is expressed as: α-β<90°;
[0046] The third condition is that if the left and right cameras have an effective field of view, the effective field of view will increase monotonically in the vertical direction, while the change trend in the horizontal direction is related to the horizontal field of view half angle β and the angle α between the optical axis and the baseline, and the following relationship exists:
[0047] like Then the horizontal field of view will first increase with the depth of field and then remain constant, extending to infinity;
[0048] like The horizontal field of view will first increase with the depth of view and then decrease until it intersects with the depth of view at a certain point.
[0049] like Then the horizontal field of view will first increase monotonically with the depth of field of view and extend to infinity;
[0050] In the formula, α represents the angle between the camera optical axis and the baseline, β represents the horizontal field of view half angle, represents the vertical field of view half angle, and z represents the depth of field of view.
[0051] The prior knowledge includes condition one, condition two and condition three. The parameters of the iteration parameter group are preliminarily screened based on each condition. If they are met, they are retained, and if they are not met, they are excluded.
[0052] S103, inputting each group of parameters in the iterative parameter group into the field of view model, calculating the monocular field of view of the camera, and calculating the corresponding binocular field of view, and outputting the width and height of the effective field of view of the binocular camera;
[0053] The field of view model is an effective field of view model corresponding to monocular operation. The monocular field of view can be calculated based on the field of view depth and the angle relationship in the model. Figure 2 As shown in the figure, the camera is located at the origin O of the three-dimensional coordinate system XYZ, and its horizontal field of view half angle and vertical field of view half angle are represented as β, α represents the angle between the camera optical axis and the baseline, rectangle ABCD represents the upper half of the effective field of view of the left camera, E and F are the midpoints of AD and BC respectively, and the effective field of view of the monocular camera can be expressed as the area of rectangle ABCD.
[0054] Among them, a three-dimensional coordinate system is constructed. When the depth of field of view of the monocular camera is z0, the effective field of view of the monocular camera is represented as a rectangular camera target area surrounded by four points ABCD, where the coordinates of point A are represented as (z0cot(α-β),0,z0), and the coordinates of point B are represented as The coordinates of point C are expressed as The coordinates of point D are expressed as (z0cot(α+β),0,z0).
[0055] The camera target surface is a rectangle, so the effective field of view of the monocular camera can be simplified to a four-sided pyramid. Assuming that the world coordinate system o-xyz is established with the left camera, rectangle ABCD is the upper half of the effective field of view of the left camera (i.e., the part located on the xoz plane), then for point A, its field of view depth z A Its coordinates are (z A cot(a-β),0,z A ), similarly, the coordinates of point D are (z D cot(a+β),0,z D ).
[0056] For point B, the following relationship exists:
[0057]
[0058] The coordinates of point B are Similarly, the coordinates of point C are Since the field of view depth z0 corresponds to the field of view of the monocular camera, the Z coordinates of ABCD can all be represented by z0.
[0059] Furthermore, the width and height of the effective field of view of the binocular camera are expressed as:
[0060]
[0061] In the formula, w represents the width of the field of view, h represents the height of the field of view, z represents the depth of the field of view, α represents the angle between the camera optical axis and the baseline, and β represents the horizontal field of view half angle. Indicates the vertical field of view half angle.
[0062] Assume that the left and right cameras have the same parameters and are symmetrical and placed horizontally, with a baseline distance of L. Similarly, there is a rectangle A′B′C′D′ for the right camera, and its coordinates are A′(Lz A′ cot(α+β),0,z A′ ), D′(Lz D′ cot(α-β),0,z D′ ).
[0063] Let the z coordinates of the left and right camera monocular fields of view be equal, then the overlapping area of the two monocular fields of view is the effective field of view of the binocular camera. Figure 3 As shown, the solid line is the field of view of the left camera, and the dotted line is the field of view of the right camera. There are two cases in the overlapping area:
[0064] (1) The monocular field of view of the right camera is A′B′C′D′, and its left boundary C′D′ is located in the field of view of the left camera ABCD. The effective field of view is ABC′D′.
[0065] zcot(α-β)>L-zcot(α-β)>zcot(α+β);
[0066] (2) The monocular field of view of the right camera is A″B″C″D″, and its right boundary A″B″ is located within the field of view ABCD of the left camera. The effective field of view is A″B″CD.
[0067] zcot(a-β)>L-zcot(α+β)>zcot(a+β);
[0068] Thus, the total expression w×h of the width×height of the effective field of view of the binocular camera can be obtained.
[0069] S104, comparing the output effective field of view width and height with the effective field of view width and height target value to determine whether the target value requirement is met;
[0070] Compare the calculated width and height of the effective field of view of the binocular camera with the preset target values to determine whether the current parameters meet the target design requirements. If so, retain them, save the current parameter group, and continue to iterate.
[0071] S105, if not satisfied, continue to iterate on the parameter group until the parameters that meet the requirements are obtained, and construct the effective field of view of the binocular camera based on all parameter values that meet the requirements for simulation display to assist the binocular camera structure design.
[0072] The effective field of view of the binocular camera corresponding to the parameter structure that meets the design requirements is displayed, such as the effective field of view width, height, field of view depth, etc. Users can select the corresponding parameter group to design the binocular camera structure according to their needs.
[0073] Exemplarily, the iteration benchmark of the horizontal field of view angle is set to 10°, the maximum value is 70°, and the iteration step is 0.25°; the iteration benchmark of the vertical field of view angle is set to 10°, the maximum value is 70°, and the iteration step is 0.25°; the iteration benchmark of the baseline distance is set to 20 mm, the maximum value is 40 mm, and the iteration step is 1 mm; the iteration benchmark of the angle between the optical axis and the baseline is set to 30°, the maximum value is 160°, and the iteration step is 1°; when the depth of field of view is 30 mm, the binocular effective field of view width w ≥ 12 mm, and the field of view height h ≥ 20 mm.
[0074] Calculate the monocular field of view according to the parameter group, and obtain the binocular field of view based on the monocular field of view, and output the width and height data of the effective field of view of the binocular camera;
[0075] When the parameter group is:
[0076]
[0077] When the depth of field is 30mm, the corresponding field width is:
[0078] w=2z×cot(α-β)-L=2×30×cot50°-35=15.34mm;
[0079] The corresponding field of view height is:
[0080]
[0081] By searching all parameters, calculating the corresponding effective field of view width and height respectively, and comparing them with the target values 12mm and 20mm, all parameters that meet the requirements can be obtained.
[0082] Matlab is used to simulate the binocular field of view in the embodiment; Solidwork is used to model the binocular field of view. When the depth of field of view is 30 mm, the width and height of the field of view are 15.35 mm and 23.44 mm respectively.
[0083] By comparing the simulation results of the field of view model with the Solidwork modeling results, it can be seen that the change trends of the field of view width and height of the two are consistent, and both increase monotonically with the depth of field of view; the difference between the field of view width and height values of the two is small, and both are within the allowable error range.
[0084] In this embodiment, based on the camera effective field of view model, the camera structure parameters are iteratively searched to calculate the corresponding effective field of view of the binocular camera, which is compared with the target field of view to determine all iterative parameters that meet the requirements. The effective field of view of the binocular camera is constructed with all parameter values that meet the requirements for simulation display, which can not only ensure the accuracy of the calculation of the effective field of view of the binocular camera, but also provide a reliable basis for the design of the binocular camera, thereby ensuring the accuracy and reliability of the design of the binocular camera.
[0085] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0086] Figure 4 A schematic diagram of the structure of a system for binocular camera design provided by an embodiment of the present invention, the system comprising:
[0087] The parameter setting module 410 is used to set the camera parameters and camera structure parameter reference values, iteration steps, effective field width and height target values, and determine the corresponding iteration parameter group;
[0088] The parameters in the iterative parameter group include at least the horizontal field of view half angle, the vertical field of view half angle, the baseline distance, and the angle between the optical axis and the baseline. A single parameter changes in each iteration, and the other parameters remain unchanged.
[0089] Specifically, let the camera's horizontal field of view half-angle reference value be β0, and the vertical field of view half-angle reference value be The corresponding iteration step is Δβ, Let the baseline distance be L E , the corresponding iteration step is ΔL, the reference value of the angle between the optical axis and the baseline is α0, and the corresponding iteration step is Δα;
[0090] If the current iteration horizontal field of view half angle, vertical field of view half angle, baseline distance, and angle between the optical axis and the baseline are respectively nth β , n L 、n a iterations, the current iteration parameter group is
[0091] A preliminary screening module 420, for preliminary screening of the iteration parameter group based on the prior knowledge of the binocular camera;
[0092] Specifically, based on condition one and condition two, the current iteration parameter group is screened. If the conditions are not met, the current parameter group is directly excluded. If the conditions are met, the screening continues.
[0093] Filter based on condition three and the expected type of the binocular camera field of view. If it does not meet the condition, the current parameter group is directly excluded. If it meets the condition, it is retained.
[0094] Among them, the first condition is that the parameters of the camera must meet the following requirements:
[0095]
[0096] The second condition is that the requirement for the binocular camera to have an effective field of view is that the right interface of the left camera must be located on the right side of the plane formed by the Y axis and the Z axis in the three-dimensional coordinate system, and the left interface of the right camera must be located on the left side of the plane formed by the Y axis and the Z axis in the three-dimensional coordinate system, otherwise the left and right cameras have no effective field of view, which is expressed as: α-β<90°;
[0097] The third condition is that if the left and right cameras have an effective field of view, the effective field of view will increase monotonically in the vertical direction, while the change trend in the horizontal direction is related to the horizontal field of view half angle β and the angle α between the optical axis and the baseline, and the following relationship exists:
[0098] like Then the horizontal field of view will first increase with the depth of field and then remain constant, extending to infinity;
[0099] like The horizontal field of view will first increase with the depth of view and then decrease until it intersects with the depth of view at a certain point.
[0100] like Then the horizontal field of view will first increase monotonically with the depth of field of view and extend to infinity;
[0101] In the formula, α represents the angle between the camera optical axis and the baseline, β represents the horizontal field of view half angle, represents the vertical field of view half angle, and z represents the depth of field of view.
[0102] The field of view calculation module 430 is used to input each group of parameters in the iterative parameter group into the field of view model, calculate the monocular field of view of the camera, calculate the corresponding binocular field of view, and output the width and height of the effective field of view of the binocular camera;
[0103] Wherein, the computing camera monocular field of view includes:
[0104] Construct a three-dimensional coordinate system. When the depth of field of view of the monocular camera is z0, the effective field of view of the monocular camera is represented as a rectangular camera target area surrounded by four points ABCD, where the coordinates of point A are represented as (z0cot(α-β),0,z0), and the coordinates of point B are represented as The coordinates of point C are expressed as The coordinates of point D are expressed as (z0cot(α+β),0,z0);
[0105] In the formula, α represents the angle between the camera optical axis and the baseline, β represents the horizontal field of view half angle, Indicates the vertical field of view half angle.
[0106] The binocular field of view corresponding to the calculation includes:
[0107] The width and height of the effective field of view of the stereo camera are expressed as:
[0108]
[0109] In the formula, w represents the width of the field of view, h represents the height of the field of view, z represents the depth of the field of view, α represents the angle between the camera optical axis and the baseline, and β represents the horizontal field of view half angle. Indicates the vertical field of view half angle.
[0110] The comparison and judgment module 440 is used to compare the output effective field of view width and height with the effective field of view width and height target value to determine whether the target value requirements are met. If not, continue to iterate in the parameter group until the parameters that meet the requirements are obtained;
[0111] The simulation design module 450 is used to construct the effective field of view of the binocular camera based on all parameter values that meet the requirements for simulation display to assist in the design of the binocular camera structure.
[0112] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described system and module can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0113] Figure 5 1 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. The electronic device is used for binocular camera auxiliary design. Figure 5 As shown, the electronic device 5 of this embodiment includes: a memory 510, a processor 520 and a system bus 530, wherein the memory 510 includes an executable program 3101 stored thereon, and those skilled in the art can understand that Figure 5 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0114] Combine the following Figure 5 A detailed introduction to the various components of electronic equipment:
[0115] The memory 510 can be used to store software programs and modules. The processor 320 executes various functional applications and data processing of the electronic device by running the software programs and modules stored in the memory 510. The memory 510 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device (such as cache data), etc. In addition, the memory 510 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0116] The memory 510 includes an executable program 5101 of a network request method, and the executable program 5101 can be divided into one or more modules / units, which are stored in the memory 510 and executed by the processor 520 to assist in the design of the binocular camera structure, etc. The one or more modules / units can be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the executable program 5101 in the electronic device 5. For example, the executable program 5101 can be divided into functional modules such as a parameter setting module, a preliminary screening module, a field of view calculation module, a comparison and judgment module, and a simulation design module.
[0117] The processor 520 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. By running or executing software programs and / or modules stored in the memory 510, and calling data stored in the memory 510, it performs various functions of the electronic device and processes data, thereby monitoring the overall status of the electronic device. Optionally, the processor 520 may include one or more processing units; preferably, the processor 520 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 520.
[0118] The system bus 530 is used to connect the various functional components inside the computer, and can transmit data information, address information, and control information. Its types can be, for example, PCI bus, ISA bus, CAN bus, etc. The instructions of the processor 520 are transmitted to the memory 510 through the bus, and the memory 510 feeds back data to the processor 520. The system bus 530 is responsible for the data and instruction exchange between the processor 520 and the memory 510. Of course, the system bus 530 can also be connected to other devices, such as network interfaces, display devices, etc.
[0119] In the embodiment of the present invention, the executable program executed by the processor 520 included in the electronic device includes:
[0120] Set the camera parameters and camera structure parameter benchmark values, iteration steps, effective field of view width and height target values, and determine the corresponding iteration parameter group;
[0121] The parameters in the iterative parameter group include at least the horizontal field of view half angle, the vertical field of view half angle, the baseline distance, and the angle between the optical axis and the baseline. Each time a single parameter is changed in the iteration, the other parameters remain unchanged.
[0122] Preliminary screening of iterative parameter groups based on prior knowledge of the binocular camera;
[0123] Input each group of parameters in the iterative parameter group into the field of view model, calculate the monocular field of view of the camera, calculate the corresponding binocular field of view, and output the width and height of the effective field of view of the binocular camera;
[0124] Compare the output effective field of view width and height with the effective field of view width and height target value to determine whether the target value requirements are met;
[0125] If not, continue to iterate the parameter group until the parameters that meet the requirements are obtained. Based on all parameter values that meet the requirements, the effective field of view of the binocular camera is constructed for simulation display.
[0126] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0127] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0128] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A binocular camera design method, characterized in that: include: Set the camera parameters and camera structure parameter benchmark values, iteration steps, effective field of view width and height target values, and determine the corresponding iteration parameter group; The parameters in the iterative parameter group include at least the horizontal field of view half angle, the vertical field of view half angle, the baseline distance, and the angle between the optical axis and the baseline. Each time a single parameter is changed in the iteration, the other parameters remain unchanged. Preliminary screening of iterative parameter groups based on prior knowledge of the binocular camera; Input each group of parameters in the iterative parameter group into the field of view model, calculate the monocular field of view of the camera, calculate the corresponding binocular field of view, and output the width and height of the effective field of view of the binocular camera; Compare the output effective field of view width and height with the effective field of view width and height target value to determine whether the target value requirements are met; If not, continue to iterate the parameter group until the parameters that meet the requirements are obtained. Based on all parameter values that meet the requirements, the effective field of view of the binocular camera is constructed for simulation display to assist in the design of the binocular camera structure.
2. The method according to claim 1, characterized in that The setting of camera parameters and camera structure parameter reference values, iteration steps, effective field width and height target values, and determining the corresponding iteration parameter group includes: Let the camera's horizontal field of view half-angle reference value be β0, and the vertical field of view half-angle reference value be The corresponding iteration step is Δβ, Let the reference value of the baseline distance be L0, the corresponding iteration step be ΔL, let the reference value of the angle between the optical axis and the baseline be α0, the corresponding iteration step be Δα; If the current iteration horizontal field of view half angle, vertical field of view half angle, baseline distance, and angle between the optical axis and the baseline are respectively nth β , n L 、n α iterations, the current iteration parameter group is 3. The method according to claim 1, characterized in that The preliminary screening of the iterative parameter group based on the prior knowledge of the binocular camera includes: Based on condition 1 and condition 2, the current iteration parameter group is screened. If the conditions are not met, the current parameter group is directly excluded. If the conditions are met, the screening continues. Filter based on condition three and the expected type of the binocular camera field of view. If it does not meet the condition, the current parameter group is directly excluded. If it meets the condition, it is retained. Among them, the first condition is that the parameters of the camera must meet the following requirements: The second condition is that the requirement for the binocular camera to have an effective field of view is that the right interface of the left camera must be located on the right side of the plane formed by the Y axis and the Z axis in the three-dimensional coordinate system, and the left interface of the right camera must be located on the left side of the plane formed by the Y axis and the Z axis in the three-dimensional coordinate system, otherwise the left and right cameras have no effective field of view, which is expressed as: α-β<90°; The third condition is that if the left and right cameras have an effective field of view, the effective field of view will increase monotonically in the vertical direction, while the change trend in the horizontal direction is related to the horizontal field of view half angle β and the angle α between the optical axis and the baseline, and the following relationship exists: like Then the horizontal field of view will first increase with the depth of field and then remain constant, extending to infinity; like The horizontal field of view will first increase with the depth of view and then decrease until it intersects with the depth of view at a certain point. like Then the horizontal field of view will first increase monotonically with the depth of field of view and extend to infinity; In the formula, α represents the angle between the camera optical axis and the baseline, β represents the horizontal field of view half angle, represents the vertical field of view half angle, and z represents the depth of field of view.
4. The method according to claim 1, characterized in that: Inputting each group of parameters in the iterative parameter group into the field of view model to calculate the monocular field of view of the camera includes: Construct a three-dimensional coordinate system. When the depth of field of view of the monocular camera is z0, the effective field of view of the monocular camera is represented as a rectangular camera target area surrounded by four points ABCD, where the coordinates of point A are represented as (z0cot(α-β), 0, z0), and the coordinates of point B are represented as The coordinates of point C are expressed as The coordinates of point D are expressed as (z0cot(α+β), 0, z0); In the formula, α represents the angle between the camera optical axis and the baseline, β represents the horizontal field of view half angle, Indicates the vertical field of view half angle.
5. The method according to claim 1, characterized in that The binocular field of view corresponding to the calculation includes: The width and height of the effective field of view of the stereo camera are expressed as: In the formula, w represents the width of the field of view, h represents the height of the field of view, z represents the depth of the field of view, α represents the angle between the camera optical axis and the baseline, and β represents the horizontal field of view half angle. Indicates the vertical field of view half angle.
6. A system for binocular camera design, characterized in that: include: The parameter setting module is used to set the camera parameters and camera structure parameter reference values, iteration steps, effective field of view width and height target values, and determine the corresponding iteration parameter group; The parameters in the iterative parameter group include at least the horizontal field of view half angle, the vertical field of view half angle, the baseline distance, and the angle between the optical axis and the baseline. A single parameter changes in each iteration, and the other parameters remain unchanged. A preliminary screening module is used to perform preliminary screening of the iterative parameter group based on the prior knowledge of the binocular camera; The field of view calculation module is used to input each group of parameters in the iterative parameter group into the field of view model, calculate the monocular field of view of the camera, calculate the corresponding binocular field of view, and output the width and height of the effective field of view of the binocular camera; A comparison and judgment module is used to compare the output effective field of view width and height with the effective field of view width and height target value to determine whether the target value requirements are met. If not, continue to iterate in the parameter group until the parameters that meet the requirements are obtained; The simulation design module is used to construct the effective field of view of the stereo camera based on all parameter values that meet the requirements for simulation display to assist in the design of the stereo camera structure.
7. The system according to claim 6, characterized in that The preliminary screening of the iterative parameter group based on the prior knowledge of the binocular camera includes: Based on condition 1 and condition 2, the current iteration parameter group is screened. If the conditions are not met, the current parameter group is directly excluded. If the conditions are met, the screening continues. Filter based on condition three and the expected type of the binocular camera field of view. If it does not meet the condition, the current parameter group is directly excluded. If it meets the condition, it is retained. Among them, the first condition is that the parameters of the camera must meet the following requirements: The second condition is that the requirement for the binocular camera to have an effective field of view is that the right interface of the left camera must be located on the right side of the plane formed by the Y axis and the Z axis in the three-dimensional coordinate system, and the left interface of the right camera must be located on the left side of the plane formed by the Y axis and the Z axis in the three-dimensional coordinate system, otherwise the left and right cameras have no effective field of view, which is expressed as: α-β<90°; The third condition is that if the left and right cameras have an effective field of view, the effective field of view will increase monotonically in the vertical direction, while the change trend in the horizontal direction is related to the horizontal field of view half angle β and the angle α between the optical axis and the baseline, and the following relationship exists: like Then the horizontal field of view will first increase with the depth of field and then remain constant, extending to infinity; like The horizontal field of view will first increase with the depth of view and then decrease until it intersects with the depth of view at a certain point. like Then the horizontal field of view will first increase monotonically with the depth of field of view and extend to infinity; In the formula, α represents the angle between the camera optical axis and the baseline, β represents the horizontal field of view half angle, represents the vertical field of view half angle, and z represents the depth of field of view.
8. The system according to claim 6, characterized in that Inputting each group of parameters in the iterative parameter group into the field of view model to calculate the monocular field of view of the camera includes: Construct a three-dimensional coordinate system. When the depth of field of view of the monocular camera is z0, the effective field of view of the monocular camera is represented as a rectangular camera target area surrounded by four points ABCD, where the coordinates of point A are represented as (z0cot(α-β), 0, z0), and the coordinates of point B are represented as The coordinates of point C are expressed as The coordinates of point D are expressed as (z0cot(α+β), 0, z0); In the formula, α represents the angle between the camera optical axis and the baseline, β represents the horizontal field of view half angle, Indicates the vertical field of view half angle.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of a binocular camera design method as described in any one of claims 1 to 5 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the steps of a binocular camera design method as described in any one of claims 1 to 5 are implemented.
