CN117968624A - Binocular camera ranging method, device, equipment and storage medium - Google Patents

Binocular camera ranging method, device, equipment and storage medium Download PDF

Info

Publication number
CN117968624A
CN117968624A CN202311809023.2A CN202311809023A CN117968624A CN 117968624 A CN117968624 A CN 117968624A CN 202311809023 A CN202311809023 A CN 202311809023A CN 117968624 A CN117968624 A CN 117968624A
Authority
CN
China
Prior art keywords
distance
standard
determining
camera
dimensional image
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.)
Pending
Application number
CN202311809023.2A
Other languages
Chinese (zh)
Inventor
梁令羽
王佑星
贵宁
陈�光
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Faw Nanjing Technology Development Co ltd
FAW Group Corp
Original Assignee
Faw Nanjing Technology Development Co ltd
FAW Group Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Faw Nanjing Technology Development Co ltd, FAW Group Corp filed Critical Faw Nanjing Technology Development Co ltd
Priority to CN202311809023.2A priority Critical patent/CN117968624A/en
Publication of CN117968624A publication Critical patent/CN117968624A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention discloses a binocular camera ranging method, a binocular camera ranging device, binocular camera ranging equipment and a storage medium. The method comprises the steps of obtaining a first original plane image and a second original plane image shot by a binocular camera; determining a first standard three-dimensional image according to the first original plane image and a pre-constructed coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-constructed coordinate mapping dictionary; respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance; and determining a target predicted distance according to the first predicted distance and the second predicted distance, so that the influence of parameters such as internal and external parameters of the binocular camera can be reduced, and the accuracy and reliability of the range measurement based on the binocular camera are improved.

Description

Binocular camera ranging method, device, equipment and storage medium
Technical Field
The present invention relates to the field of image processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for measuring distance by using a binocular camera.
Background
At present, the target distance detection research of a vehicle-mounted binocular camera has been carried out for many years, and the current scheme generally calculates the parallax of feature points in images shot by two cameras by matching the feature points according to parameters such as internal parameters and external parameters of the cameras, focal lengths of the cameras and the like, so as to calculate the distance of a target object. The effect of this method is often severely dependent on the accuracy of parameters such as camera internal and external parameters and camera focal length. The practical project is limited by the factors of internal parameter calibration accuracy, focal length change caused by camera use aging, external parameter change caused by camera vibration influence and the like, and the ranging method is often poor in universality and reliability.
Disclosure of Invention
The invention provides a binocular camera ranging method, a binocular camera ranging device, binocular camera ranging equipment and a binocular camera ranging storage medium, so that influences of parameters such as internal parameters and external parameters of a binocular camera are reduced, and accuracy and reliability of binocular camera-based ranging are improved.
According to an aspect of the present invention, there is provided a binocular camera ranging method. The method comprises the following steps:
Acquiring a first original plane image and a second original plane image shot by a binocular camera;
Determining a first standard three-dimensional image according to the first original plane image and a pre-constructed coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-constructed coordinate mapping dictionary;
respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance;
And determining a target predicted distance according to the first predicted distance and the second predicted distance.
According to another aspect of the present invention, a binocular camera ranging apparatus is provided. The device comprises:
The original plane image acquisition module is used for acquiring a first original plane image and a second original plane image shot by the binocular camera;
The standard three-dimensional image determining module is used for determining a first standard three-dimensional image according to the first original plane image and a pre-built coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-built coordinate mapping dictionary;
The predicted distance data determining module is used for respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance;
and the target prediction distance determining module is used for determining a target prediction distance according to the first prediction distance and the second prediction distance.
According to another aspect of the present invention, there is provided an electronic apparatus including:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the binocular camera ranging method of any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the binocular camera ranging method according to any of the embodiments of the present invention when executed.
According to the technical scheme, a first original plane image and a second original plane image shot by a binocular camera are obtained; determining a first standard three-dimensional image according to the first original plane image and a pre-constructed coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-constructed coordinate mapping dictionary; respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance; and determining a target predicted distance according to the first predicted distance and the second predicted distance, so as to reduce the influence of the internal and external parameters on the detection result and improve the accuracy and reliability of the range measurement based on the binocular camera.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a binocular camera ranging method according to a first embodiment of the present invention;
fig. 2 is a flowchart of a binocular camera ranging method according to a second embodiment of the present invention;
fig. 3 is a block diagram of a binocular camera ranging apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a binocular camera ranging method according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a binocular camera ranging method according to an embodiment of the present invention, where the method may be performed by a binocular camera ranging device, and the binocular camera ranging device may be implemented in hardware and/or software, and the binocular camera ranging device may be configured in an electronic device. As shown in fig. 1, the method includes:
S101, acquiring a first original plane image and a second original plane image shot by a binocular camera.
The binocular camera may be a first preset angle of view standard camera and a second preset angle of view standard camera. The angle of view refers to the range covered by the lens, i.e., how wide a camera lens can cover a scene, and is usually expressed in terms of angle. Generally, high values of field angle hold more scenes and objects in the field of view have poor sharpness. The low field angle value has a limited field of view but a higher sharpness in the field of view. Typically, one vehicle-mounted binocular camera is mounted with a high field angle camera for detecting near objects and a low field angle camera for detecting far objects, respectively. The viewing angle is not particularly limited, and preferably, the first preset viewing angle may be 120 ° and the second preset viewing angle may be 30 °. The first original plane image may refer to an original image acquired by a first preset angle-of-view standard camera in the binocular camera, and the second original plane image may refer to an original image acquired by a second preset angle-of-view standard camera in the binocular camera.
Specifically, according to corresponding execution instructions, such as an image acquisition instruction or a distance prediction instruction, the first original plane image and the second original plane image are photographed with a binocular camera, and the photographed images are uploaded into image processing.
S102, determining a first standard three-dimensional image according to the first original plane image and a pre-built coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-built coordinate mapping dictionary.
The coordinate mapping dictionary may be obtained by training in advance according to sample data, and the coordinate mapping dictionary records a mapping relationship between the planar image and the three-dimensional image.
Specifically, a mapping relation corresponding to the first original plane image is queried in a coordinate mapping dictionary, and a first standard three-dimensional image corresponding to the first original plane image is determined according to the mapping relation. And based on the same principle, obtaining a second standard three-dimensional image corresponding to the second original plane.
S103, respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance.
The target distance prediction model can be a transducer network model and can be obtained by training in advance according to a three-dimensional image of a target sample and an ideal prediction distance. The first predicted distance may refer to a predicted distance corresponding to the first standard three-dimensional image, and the second predicted distance may refer to a predicted distance corresponding to the second standard three-dimensional image.
Specifically, the first standard three-dimensional image is input into the target distance prediction model to perform distance prediction, and the first predicted distance can be obtained according to the output of the target distance prediction model. Similarly, the second standard three-dimensional image is input to the target distance prediction model, and the second predicted distance can be obtained.
Illustratively, the process of constructing the target distance prediction model includes:
Acquiring a three-dimensional image of a target sample, and determining an ideal prediction distance corresponding to the three-dimensional image of the target sample; inputting the three-dimensional image of the target sample into a preset distance prediction model to perform distance prediction processing, and obtaining an output prediction distance based on the output of the preset distance prediction model; determining a training error based on the ideal predicted distance and the output predicted distance, and reversely transmitting the training error to the preset distance prediction model to adjust network parameters in the preset distance prediction model; and when the preset ending condition is met, determining that the training of the preset distance prediction model is ended, and obtaining a target distance prediction model.
The three-dimensional image of the target sample can be obtained randomly or regularly through a preset rule. The ideal predicted distance may be obtained from actual measurements. The preset distance prediction model may be an untrained transducer network model.
Specifically, the output predicted distance of the output of the preset distance prediction model is compared with the ideal predicted distance, and the training error between the output predicted distance and the ideal predicted distance is determined. And reversely transmitting the training error to a preset distance prediction model, and adjusting network parameters in the preset distance prediction model by referring to the training error. And under the condition that the preset end condition is met, determining that the training of the preset distance prediction model is ended, namely obtaining the target distance prediction model.
S104, determining a target predicted distance according to the first predicted distance and the second predicted distance.
The target predicted distance may refer to a predicted distance to be finally determined in the present invention.
Specifically, because the first preset field angle standard camera and the second preset field angle standard camera are different in detection range, the standard camera with a wider field angle is more accurate in short-distance detection effect, and the standard camera with a narrower field angle is more accurate in long-distance detection effect. Thus, the first predicted distance and the second predicted distance may be combined to determine the target predicted distance.
Illustratively, the specific process of combining the first predicted distance and the second predicted distance includes:
According to preset weights, carrying out weighted summation processing on the first predicted distance and the second predicted distance to obtain a target predicted distance; or carrying out average value processing on the first predicted distance and the second predicted distance to obtain a target predicted distance.
That is, the weight corresponding to the first predicted distance and the weight corresponding to the second predicted distance may be determined according to the preset weight, and the first predicted distance and the second predicted distance may be weighted and summed to obtain the target predicted distance. Or solving an average value of the first predicted distance and the second predicted distance, and determining the average value as the target predicted distance.
According to the technical scheme, a first original plane image and a second original plane image shot by a binocular camera are obtained; determining a first standard three-dimensional image according to the first original plane image and a pre-constructed coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-constructed coordinate mapping dictionary; respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance; and determining a target predicted distance according to the first predicted distance and the second predicted distance, so as to reduce the influence of the internal and external parameters on the detection result and improve the accuracy and reliability of the range measurement based on the binocular camera.
Example two
Fig. 2 is a flowchart of a binocular camera ranging method according to a second embodiment of the present invention, where the first standard three-dimensional image is determined to be further refined according to the first original plane image and a pre-constructed coordinate mapping dictionary based on the above embodiments. As shown in fig. 2, the method includes:
S201, a first original plane image and a second original plane image shot by a binocular camera are acquired.
S202, determining a first standard plane image according to the first original plane image and a pre-constructed standard parameter conversion matrix.
The standard parameter conversion matrix can be a conversion matrix which is constructed by combining with an actual application scene in advance. It should be noted that, because the difference between the internal and external parameters of the cameras with different angles of view is large, two sets of standard parameter conversion matrices are respectively set for the cameras with different angles of view.
Specifically, the first original plane image is subjected to conversion processing according to the standard parameter conversion matrix, and the first standard plane image can be obtained.
Illustratively, the determining the first standard plane image according to the first original plane image and the pre-constructed standard parameter transformation matrix includes:
and determining a first original camera parameter corresponding to the first field angle camera. And determining a standard parameter conversion matrix according to the first original camera parameters and preset standard camera parameters. And converting the first original plane image into a first standard plane image based on the standard parameter conversion matrix.
Wherein the first raw camera parameters include camera intrinsic parameters and camera extrinsic parameters. Camera references (INTRINSICS) refer to parameters related to the hardware characteristics of the camera itself, which describe the process by which light is projected from the three-dimensional world through the lens onto the two-dimensional image sensor. Camera internal parameters include focal length, principal point position, and non-linear relationship between pixels, etc. The off-camera parameters may refer to parameters in the world coordinate system, such as the position, rotation direction, etc. of the camera. These parameters describe the position and orientation of the camera in space, which can only be obtained through experimentation and calculation. The standard camera parameters may be internal and external parameters corresponding to the camera in a predefined standard state.
Specifically, according to the first original camera parameters and the preset standard camera parameters, a standard parameter conversion matrix corresponding to the conversion into the standard state can be determined. And performing operations such as scaling, rotation, filling or distortion on the first original plane image according to the standard parameter conversion matrix to generate a first standard plane image.
S203, determining a first standard three-dimensional image according to the first standard plane image and a pre-constructed coordinate mapping dictionary.
Specifically, each plane point in the standard plane image can be quickly mapped into the corresponding standard three-dimensional image by a coordinate mapping dictionary mode, so that the first standard three-dimensional image can be obtained.
Illustratively, the process of constructing the coordinate mapping dictionary includes:
Acquiring a sample plane image shot by the binocular camera and a sample three-dimensional image actually corresponding to the sample plane image; determining a camera internal parameter matrix and a camera external parameter matrix corresponding to the binocular camera; for each plane pixel point in the sample plane image, determining a first plane coordinate of the plane pixel point in a camera coordinate system according to the camera internal reference matrix; determining a second plane coordinate of the first plane coordinate in a world coordinate system according to the camera external parameter matrix; and mapping the second plane coordinates into the sample three-dimensional image, and constructing a coordinate mapping dictionary based on the mapping relation of each preset area.
The camera coordinate system may be a three-dimensional coordinate system constructed according to a camera optical axis and an imaging plane, the first plane coordinate may refer to a coordinate in the camera coordinate system, and the second plane coordinate may refer to a coordinate in a world coordinate system.
Specifically, each plane pixel point in the sample plane image determines a first plane coordinate of the plane pixel point in a camera coordinate system according to the camera internal reference matrix. And converting the first plane coordinate into a second plane coordinate in the world coordinate system according to the camera internal reference matrix. And simultaneously, mapping the second plane coordinates into the sample three-dimensional image, determining the mapping relation between each region in the sample plane image and the corresponding region in the sample three-dimensional image, and constructing a coordinate mapping dictionary according to the mapping relation. For example, with the vehicle as a starting point, a front vehicle 60m is detected, each 30m is left and right, and the up and down 5m is the preset detection distance of the camera. Then, the front, back, left and right are divided into 200 areas, and the upper and lower areas are divided into 64 areas. The pixel points of the sample plane image can be mapped into each sample three-dimensional image through the internal and external parameters, and the corresponding relation is recorded to form a coordinate mapping dictionary.
S204, determining a second standard three-dimensional image according to the second original plane image and a pre-constructed coordinate mapping dictionary.
S205, respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance.
S206, determining a target predicted distance according to the first predicted distance and the second predicted distance.
According to the technical scheme, the first standard plane image is determined according to the first original plane image and the pre-constructed standard parameter conversion matrix. According to the first standard plane image and the pre-constructed coordinate mapping dictionary, a first standard three-dimensional image is determined, and camera images with different internal and external parameters and the internal and external parameters are mapped to a set of pre-defined standard parameter conditions, so that the influence of the internal and external parameters on a detection result can be reduced, and the accuracy of the prediction distance is further improved.
Example III
Fig. 3 is a schematic structural diagram of a binocular camera ranging device according to a third embodiment of the present invention.
As shown in fig. 3, the apparatus includes:
An original plane image obtaining module 301, configured to obtain a first original plane image and a second original plane image that are captured by a binocular camera;
A standard three-dimensional image determining module 302, configured to determine a first standard three-dimensional image according to the first original plane image and a pre-constructed coordinate mapping dictionary, and determine a second standard three-dimensional image according to the second original plane image and the pre-constructed coordinate mapping dictionary;
the predicted distance data determining module 303 is configured to input the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained by training in advance, to perform distance prediction, and obtain a first predicted distance and a second predicted distance respectively;
The target predicted distance determining module 304 is configured to determine a target predicted distance according to the first predicted distance and the second predicted distance.
According to the technical scheme, a first original plane image and a second original plane image shot by a binocular camera are obtained; determining a first standard three-dimensional image according to the first original plane image and a pre-constructed coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-constructed coordinate mapping dictionary; respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance; and determining a target predicted distance according to the first predicted distance and the second predicted distance, so as to reduce the influence of the internal and external parameters on the detection result and improve the accuracy and reliability of the range measurement based on the binocular camera.
Optionally, the standard three-dimensional image determination module 302 includes:
the standard plane image determining unit is used for determining a first standard plane image according to the first original plane image and a pre-constructed standard parameter conversion matrix;
And the standard three-dimensional image determining unit is used for determining a first standard three-dimensional image according to the first standard plane image and a pre-constructed coordinate mapping dictionary.
Optionally, the standard plane image determining unit is specifically configured to:
Determining a first original camera parameter corresponding to the first field angle camera, wherein the first original camera parameter comprises a camera internal parameter and a camera external parameter;
determining a standard parameter conversion matrix according to the first original camera parameters and preset standard camera parameters;
and converting the first original plane image into a first standard plane image based on the standard parameter conversion matrix.
Optionally, the apparatus further comprises:
The coordinate mapping dictionary construction module is used for:
Acquiring a sample plane image shot by the binocular camera and a sample three-dimensional image actually corresponding to the sample plane image;
Determining a camera internal parameter matrix and a camera external parameter matrix corresponding to the binocular camera;
For each plane pixel point in the sample plane image, determining a first plane coordinate of the plane pixel point in a camera coordinate system according to the camera internal reference matrix;
determining a second plane coordinate of the first plane coordinate in a world coordinate system according to the camera external parameter matrix;
and mapping the second plane coordinates into the sample three-dimensional image, and constructing a coordinate mapping dictionary based on the mapping relation of each preset area.
Optionally, the apparatus further comprises:
the distance prediction model construction module is used for:
acquiring a three-dimensional image of a target sample, and determining an ideal prediction distance corresponding to the three-dimensional image of the target sample;
inputting the three-dimensional image of the target sample into a preset distance prediction model to perform distance prediction processing, and obtaining an output prediction distance based on the output of the preset distance prediction model;
determining a training error based on the ideal predicted distance and the output predicted distance, and reversely transmitting the training error to the preset distance prediction model to adjust network parameters in the preset distance prediction model;
And when the preset ending condition is met, determining that the training of the preset distance prediction model is ended, and obtaining a target distance prediction model.
Optionally, the target prediction distance determining module 304 is specifically configured to:
according to preset weights, carrying out weighted summation processing on the first predicted distance and the second predicted distance to obtain a target predicted distance;
or carrying out average value processing on the first predicted distance and the second predicted distance to obtain a target predicted distance.
Optionally, the binocular camera at least comprises a first preset field angle standard camera and a second preset field angle standard camera; the target distance prediction model includes a transducer network model.
The binocular camera ranging device provided by the embodiment of the invention can execute the binocular camera ranging method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example IV
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as method binocular camera ranging.
In some embodiments, the method binocular camera ranging may be implemented as a computer program tangibly embodied on a computer readable storage medium, such as the storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the method binocular camera ranging described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method binocular camera ranging in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A binocular camera ranging method, comprising:
Acquiring a first original plane image and a second original plane image shot by a binocular camera;
Determining a first standard three-dimensional image according to the first original plane image and a pre-constructed coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-constructed coordinate mapping dictionary;
respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance;
And determining a target predicted distance according to the first predicted distance and the second predicted distance.
2. The method of claim 1, wherein determining a first standard three-dimensional image from the first original planar image and a pre-constructed coordinate mapping dictionary comprises:
determining a first standard plane image according to the first original plane image and a pre-constructed standard parameter conversion matrix;
and determining a first standard three-dimensional image according to the first standard plane image and a pre-constructed coordinate mapping dictionary.
3. The method of claim 2, wherein the binocular camera comprises a first field angle camera and a second field angle camera; the determining a first standard plane image according to the first original plane image and a pre-constructed standard parameter conversion matrix comprises the following steps:
Determining a first original camera parameter corresponding to the first field angle camera, wherein the first original camera parameter comprises a camera internal parameter and a camera external parameter;
determining a standard parameter conversion matrix according to the first original camera parameters and preset standard camera parameters;
and converting the first original plane image into a first standard plane image based on the standard parameter conversion matrix.
4. The method of claim 2, wherein the process of constructing the coordinate mapping dictionary comprises:
Acquiring a sample plane image shot by the binocular camera and a sample three-dimensional image actually corresponding to the sample plane image;
Determining a camera internal parameter matrix and a camera external parameter matrix corresponding to the binocular camera;
For each plane pixel point in the sample plane image, determining a first plane coordinate of the plane pixel point in a camera coordinate system according to the camera internal reference matrix;
determining a second plane coordinate of the first plane coordinate in a world coordinate system according to the camera external parameter matrix;
and mapping the second plane coordinates into the sample three-dimensional image, and constructing a coordinate mapping dictionary based on the mapping relation of each preset area.
5. The method of claim 1, wherein the process of constructing the target distance prediction model comprises:
acquiring a three-dimensional image of a target sample, and determining an ideal prediction distance corresponding to the three-dimensional image of the target sample;
inputting the three-dimensional image of the target sample into a preset distance prediction model to perform distance prediction processing, and obtaining an output prediction distance based on the output of the preset distance prediction model;
determining a training error based on the ideal predicted distance and the output predicted distance, and reversely transmitting the training error to the preset distance prediction model to adjust network parameters in the preset distance prediction model;
And when the preset ending condition is met, determining that the training of the preset distance prediction model is ended, and obtaining a target distance prediction model.
6. The method of claim 1, wherein the determining a target predicted distance from the first predicted distance and the second predicted distance comprises:
according to preset weights, carrying out weighted summation processing on the first predicted distance and the second predicted distance to obtain a target predicted distance;
or carrying out average value processing on the first predicted distance and the second predicted distance to obtain a target predicted distance.
7. The method of claim 1, wherein the binocular camera comprises at least a first preset angle of view standard camera and a second preset angle of view standard camera; the target distance prediction model includes a transducer network model.
8. A binocular camera ranging apparatus, comprising:
The original plane image acquisition module is used for acquiring a first original plane image and a second original plane image shot by the binocular camera;
The standard three-dimensional image determining module is used for determining a first standard three-dimensional image according to the first original plane image and a pre-built coordinate mapping dictionary, and determining a second standard three-dimensional image according to the second original plane image and the pre-built coordinate mapping dictionary;
The predicted distance data determining module is used for respectively inputting the first standard three-dimensional image and the second standard three-dimensional image into a target distance prediction model obtained through pre-training to conduct distance prediction, and respectively obtaining a first predicted distance and a second predicted distance;
and the target prediction distance determining module is used for determining a target prediction distance according to the first prediction distance and the second prediction distance.
9. An electronic device, the electronic device comprising:
At least one processor; and
A memory communicatively coupled to the at least one processor; wherein,
The memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the binocular camera ranging method of any of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the binocular camera ranging method of any of claims 1-7 when executed.
CN202311809023.2A 2023-12-26 2023-12-26 Binocular camera ranging method, device, equipment and storage medium Pending CN117968624A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311809023.2A CN117968624A (en) 2023-12-26 2023-12-26 Binocular camera ranging method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311809023.2A CN117968624A (en) 2023-12-26 2023-12-26 Binocular camera ranging method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117968624A true CN117968624A (en) 2024-05-03

Family

ID=90858644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311809023.2A Pending CN117968624A (en) 2023-12-26 2023-12-26 Binocular camera ranging method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117968624A (en)

Similar Documents

Publication Publication Date Title
CN111340864A (en) Monocular estimation-based three-dimensional scene fusion method and device
CN112967345B (en) External parameter calibration method, device and system of fish-eye camera
CN113344906B (en) Camera evaluation method and device in vehicle-road cooperation, road side equipment and cloud control platform
CN117078767A (en) Laser radar and camera calibration method and device, electronic equipment and storage medium
CN111311671B (en) Workpiece measuring method and device, electronic equipment and storage medium
CN115311624B (en) Slope displacement monitoring method and device, electronic equipment and storage medium
CN116129422A (en) Monocular 3D target detection method, monocular 3D target detection device, electronic equipment and storage medium
CN113470103B (en) Method and device for determining camera acting distance in vehicle-road cooperation and road side equipment
CN116208853A (en) Focusing angle determining method, device, equipment and storage medium
CN117968624A (en) Binocular camera ranging method, device, equipment and storage medium
CN115683046A (en) Distance measuring method, distance measuring device, sensor and computer readable storage medium
CN113112551B (en) Camera parameter determining method and device, road side equipment and cloud control platform
CN115049810A (en) Coloring method, device and equipment for solid-state laser radar point cloud and storage medium
CN117726666B (en) Cross-camera monocular picture measurement depth estimation method, device, equipment and medium
CN114463409B (en) Image depth information determining method and device, electronic equipment and medium
CN116258714B (en) Defect identification method and device, electronic equipment and storage medium
CN113312979B (en) Image processing method and device, electronic equipment, road side equipment and cloud control platform
CN116721339B (en) Method, device, equipment and storage medium for detecting power transmission line
CN118115765A (en) Image matching method, device, equipment and storage medium
CN116342715A (en) Method, device, equipment and storage medium for detecting precision of camera rotation movement
CN117152270A (en) Laser radar and camera combined calibration method, device, equipment and medium
CN117058250A (en) 3D target detection method, device, equipment and medium based on camera
CN116684569A (en) Virtual three-dimensional object imaging method, device, camera and storage medium
CN117611687A (en) Sensor external parameter calibration and model training method, device, equipment and medium
CN115761005A (en) Virtual reality equipment adjusting method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination