Method and device for performing target detection on binocular camera image, and storage medium

Through stereo correction and fusion detection technology of binocular camera images, combined with road equation segmentation, the problem of missed detection and false detection in convolutional neural network detection in vehicle-road collaboration is solved, and the accuracy and stability of target detection are improved.

CN118537832APending Publication Date: 2024-08-23FAW VOLKSWAGEN AUTOMOTIVE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310154928.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

Existing Technology In vehicle-road collaboration, target detection methods based on convolutional neural networks have the problem of missed detection and false detection of small targets and undefined targets, and traditional computer vision methods have poor stability and are difficult to meet the requirements for detection results.

Method used

Binocular camera images are used for target detection, and the spatial position information of the target is obtained through stereo correction and convolutional neural network detection results and computer vision-based detection results, combined with road equations for depth map segmentation and three-dimensional point cloud processing.

Benefits of technology

It effectively improves the problem of missed detection and misdetection of small targets and undefined targets by neural networks, and improves the accuracy and stability of spatial three-dimensional information for target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118537832A
    Figure CN118537832A
Patent Text Reader

Abstract

The invention provides a method and a device for performing target detection on a binocular camera image, and a storage medium. The method comprises the following steps: performing target detection on a first camera image subjected to stereo correction by using a convolutional neural network and a detection mode based on computer vision to obtain a first target detection frame and a second target detection frame; executing detection frame fusion to obtain a fusion target detection frame; executing stereo matching to obtain an original depth map taking the first camera image as a reference; converting points on the original depth map into an original three-dimensional point cloud; removing points on a road surface from the original three-dimensional point cloud according to a road surface equation to obtain a foreground three-dimensional point cloud; projecting the foreground three-dimensional point cloud to a camera imaging plane to obtain a road surface rejection depth map; and placing the fused target detection frame at a corresponding position on the road surface rejection depth map, and obtaining a three-dimensional point cloud of the detection frame, thereby obtaining target position and size data. The problems of missing detection and false detection of the target are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention generally relate to the field of intelligent driving technology, and more specifically, to a method, device and storage medium for performing target detection on binocular camera images. Background Art

[0002] Vehicle-road collaboration is a technological trend in the future development of intelligent vehicles. In the development of vehicle-road collaboration functions, field cameras are often needed to detect pedestrians, vehicles and other targets on the road and in the parking lot, and send target information to the vehicle. The vehicle combines the detection results of its own sensors to achieve autonomous obstacle avoidance, autonomous parking and other functions. Since vehicle sensors often have blind spots and small field of view, sometimes there will be missed detections or false detections of surrounding targets or obstacles, and field cameras can make up for these defects to a certain extent.

[0003] At present, most field-side target detection methods are based on convolutional neural networks, and a small number are based on traditional computer vision methods, such as template matching and pattern recognition. However, methods based on convolutional neural networks are more dependent on pre-prepared training data sets, and are prone to false detection and missed detection for targets that have not been trained in advance. At the same time, small targets are also prone to missed detection. Methods based on traditional computer vision have poor stability, and the detection effect is often unsatisfactory, with a high probability of missed detection. Summary of the invention

[0004] In order to solve the above-mentioned problems in the prior art, in a first aspect, an embodiment of the present invention provides a method for performing target detection on a binocular camera image, the method comprising: acquiring a binocular camera image acquired by a binocular camera, the binocular camera image comprising a first camera image and a second camera image; based on predetermined internal and external parameters of the binocular camera, performing stereo correction on the first camera image and the second camera image to obtain a stereo-corrected first camera image and a stereo-corrected second camera image; performing target detection on the stereo-corrected first camera image using a convolutional neural network to obtain a neural network detection result, the neural network detection result comprising a first target detection frame, the first target detection frame having a first target type; performing target detection on the stereo-corrected first camera image using a detection method based on computer vision to obtain a computer vision detection result, the computer vision detection result comprising a second target detection frame; and performing stereo correction on the first target detection frame and the second target detection frame. The method comprises the following steps: performing detection frame fusion to obtain a fused target detection frame, wherein the fused target detection frame has a fused target type; performing stereo matching on the stereo-corrected first camera image and the stereo-corrected second camera image to obtain a disparity map based on the first camera image, and then obtaining an original depth map according to the disparity map; converting points on the original depth map into an original three-dimensional point cloud; removing points on the road surface from the original three-dimensional point cloud according to a road surface equation to obtain a foreground three-dimensional point cloud; projecting the foreground three-dimensional point cloud to a camera imaging plane to obtain a road surface removal depth map; placing the fused target detection frame at a corresponding position on the road surface removal depth map, wherein the corresponding position corresponds to the position of the fused target detection frame in the stereo-corrected first camera image; projecting points in the fused target detection frame to a Euclidean three-dimensional space to obtain a detection frame three-dimensional point cloud; obtaining target position and size data according to the detection frame three-dimensional point cloud; and obtaining a target detection result according to the target position and size data and the fused target type.

[0005] In some embodiments, performing detection frame fusion on the first target detection frame and the second target detection frame to obtain a fused target detection frame includes: calculating an intersection-and-union ratio of the first target detection frame and the second target detection frame; comparing the intersection-and-union ratio with a predefined intersection-and-union ratio threshold; if the intersection-and-union ratio is greater than or equal to the intersection-and-union ratio threshold, setting the first target detection frame as a fused target detection frame; if the intersection-and-union ratio is less than the intersection-and-union ratio threshold, setting both the first target detection frame and the second target detection frame as a fused target detection frame.

[0006] In some embodiments, performing detection frame fusion on the first target detection frame and the second target detection frame to obtain a fused target detection frame further includes: for the same frame image, when only the first target detection frame exists and the second target detection frame does not exist, setting the first target detection frame to the fused target detection frame, and when only the second target detection frame exists without the first target detection frame, setting the second target detection frame to the fused target detection frame.

[0007] In some embodiments, points on the road surface are removed from the original three-dimensional point cloud according to the road surface equation to obtain a foreground three-dimensional point cloud, including: calculating the distance from the point in the original three-dimensional point cloud to the road surface according to the road surface equation; comparing the distance from the point to the road surface with a road surface distance threshold; if the distance from the point to the road surface is less than or equal to the road surface distance threshold, determining that the point is a point on the road surface; if the distance from the point to the road surface is greater than the road surface distance threshold, determining that the point is a foreground point; removing the points on the road surface from the original three-dimensional point cloud and retaining the foreground point, thereby generating the foreground three-dimensional point cloud.

[0008] In some embodiments, target detection is performed on the stereo-rectified first camera image using a computer vision-based detection method, and obtaining a computer vision detection result includes: performing background subtraction on the stereo-rectified first camera image to obtain a foreground image; extracting a region of interest from the foreground image, and using the frame of the region of interest as the second target detection frame.

[0009] In some embodiments, obtaining the target position and size data based on the detection frame three-dimensional point cloud includes: obtaining the minimum enclosing cube of the detection frame three-dimensional point cloud as the three-dimensional detection frame of the target; calculating the center coordinates of the minimum enclosing cube as the center position of the target; and obtaining the size data of the three-dimensional detection frame of the target as the target size data.

[0010] In some embodiments, the method further includes: after obtaining the target detection result in the current frame, tracking the target in the target detection result in the next frame, so as to obtain speed and / or acceleration information of the target.

[0011] In some embodiments, the road surface equation is determined by the following steps: setting a marker on the road surface, wherein the marker is set so that it is evenly distributed in the image captured by the binocular camera; obtaining a first camera calibration image and a second camera calibration image via the binocular camera; establishing a reference coordinate system based on the position of the first camera in the binocular camera, and stereo correcting the first camera calibration image and the second camera calibration image according to the internal and external parameters of the binocular camera to obtain a stereo-corrected first camera calibration image and a stereo-corrected second camera calibration image; extracting the two-dimensional coordinates of the corner points in the stereo-corrected first camera calibration image and the stereo-corrected second camera calibration image, and matching them with the corner points in the first camera calibration image and the second camera calibration image; based on the matching results of the corner points, restoring the three-dimensional coordinates of the corner points in the reference coordinate system based on the binocular parallax; calculating the coefficients of the road surface equation according to the three-dimensional coordinates of the corner points, thereby obtaining the road surface equation.

[0012] In a second aspect, an embodiment of the present invention proposes a device for performing target detection on a binocular camera image, the device comprising: an image acquisition module, configured to acquire a binocular camera image captured by a binocular camera, the binocular camera image comprising a first camera image and a second camera image; a stereo correction module, configured to perform stereo correction on the first camera image and the second camera image based on predetermined internal and external parameters of the binocular camera, to obtain a stereo-corrected first camera image and a stereo-corrected second camera image; a convolutional neural network detection module, configured to perform target detection on the stereo-corrected first camera image using a convolutional neural network, to obtain a neural network detection result, the neural network detection result comprising a first target detection frame, the first target detection frame having a first target type; a computer vision detection module, configured to perform target detection on the stereo-corrected first camera image using a detection method based on computer vision, to obtain a computer vision detection result, the computer vision detection result comprising a second target detection frame; a detection frame fusion module, configured to perform detection frame fusion on the first target detection frame and the second target detection frame, to obtain a fused target detection frame, the fused target detection frame having a fused target type type; a stereo matching module, configured to perform stereo matching on the stereo-corrected first camera image and the stereo-corrected second camera image to obtain a disparity map based on the first camera image, and then obtain an original depth map according to the disparity map; an original 3D point cloud conversion module, configured to convert points on the original depth map into an original 3D point cloud; a foreground 3D point cloud acquisition module, configured to remove points on the road surface from the original 3D point cloud according to a road surface equation to obtain a foreground 3D point cloud; a road surface removal depth map acquisition module, configured to project the foreground 3D point cloud onto the camera imaging plane to obtain a road surface removal depth map ; A detection frame positioning module, configured to place the fused target detection frame at a corresponding position on the road surface removal depth map, wherein the corresponding position corresponds to the position of the fused target detection frame in the stereo-corrected first camera image; a detection frame three-dimensional point cloud acquisition module, configured to project the points in the fused target detection frame into the Euclidean three-dimensional space to obtain a detection frame three-dimensional point cloud; a position and size acquisition module, configured to obtain target position and size data based on the detection frame three-dimensional point cloud; a target detection result acquisition module, configured to obtain a target detection result based on the target position and size data and the fused target type.

[0013] In a third aspect, an embodiment of the present invention provides a storage medium storing computer-readable instructions, which, when executed by a processor, executes the method according to any of the above embodiments.

[0014] The method, device and storage medium for target detection on binocular camera images proposed in the embodiments of the present invention integrate the detection based on neural network and the detection based on computer vision, effectively improving the problem of missed detection and false detection of small targets and undefined targets by neural network. The depth map obtained by the binocular camera is segmented by the road surface equation to obtain a road surface elimination depth map with road surface points eliminated, and the spatial three-dimensional position information of the target in the detection frame is obtained by the road surface elimination depth map and the detection frame, which effectively improves the problem of large error in the detection of target spatial three-dimensional information based on neural network and the inability to detect undefined targets. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The above and other objects, features and advantages of the embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:

[0016] Figure 1 A flow chart of a method for performing target detection on a binocular camera image according to an embodiment of the present invention is shown;

[0017] Figure 2 A flowchart showing an example of a method for performing target detection on a binocular camera image according to an embodiment of the present invention is shown;

[0018] Figure 3 A block diagram of an apparatus for performing target detection on a binocular camera image according to an embodiment of the present invention is shown.

[0019] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION

[0020] The principle and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way.

[0021] In one aspect, an embodiment of the present invention provides a method for performing target detection on a binocular camera image. Figure 1 , which shows a flow chart of a method 100 for performing target detection on a binocular camera image according to an embodiment of the present invention. Figure 1 As shown, the method 100 includes steps S101-S113.

[0022] In step S101, a binocular camera image captured by a binocular camera is acquired, where the binocular camera image includes a first camera image and a second camera image.

[0023] As an example, the two cameras in the binocular camera can be arranged horizontally, vertically or at any other angle. Taking the horizontal arrangement as an example, the binocular camera can include two cameras placed horizontally left and right, for example, the first eye camera is the left eye camera, the second eye camera is the right eye camera, or the first eye camera is the right eye camera, and the second eye camera is the left eye camera. The binocular cameras described in the embodiments of the present invention may also be any two cameras in the multi-eye camera. The present invention is not limited in this respect.

[0024] In step S102, based on the predetermined intrinsic parameters and extrinsic parameters of the binocular camera, the first camera image and the second camera image are stereo-corrected to obtain the stereo-corrected first camera image and the stereo-corrected second camera image. As an example, the intrinsic parameters and extrinsic parameters of the binocular camera can be obtained by offline calibration, such as calibration by a calibration board. The intrinsic parameters may include the focal lengths, principal point coordinates, distortion coefficients, etc. of the two cameras, and the extrinsic parameters may include the rotation and translation matrices between the two cameras.

[0025] In step S103, a convolutional neural network (CNN) is used to perform target detection on the stereo-corrected first camera image (e.g., the left camera image) to obtain a neural network detection result, which includes a first target detection frame (also referred to as a CNN detection frame), and the first target detection frame has a first target type. Typically, the target type corresponding to the CNN detection frame is a target pre-defined by the CNN, such as a car, a pedestrian, a cone, etc.

[0026] In step S104, target detection is performed on the stereo-corrected first camera image (e.g., the left camera image) using a detection method based on computer vision to obtain a computer vision detection result, which includes a second target detection frame. The detection method based on computer vision can be any traditional computer vision method, such as background subtraction method, template matching method, pattern recognition method, foreground segmentation technology, traditional motion target extraction, etc., and can also be a computer vision detection method that is different from a convolutional neural network that may appear in the future. When a computer vision method that cannot classify the target is used, the target type of the target detection frame can be set to "undefined target".

[0027] As an embodiment of the present invention, this step may specifically include: performing background subtraction on the stereo-corrected first camera image to obtain a foreground image; extracting a region of interest (ROI) from the foreground image, and using the frame of the region of interest as a second target detection frame, which may also be referred to as an ROI detection frame. The ROI detection frame is represented by, for example, a rectangular frame.

[0028] In step S105, the first target detection frame and the second target detection frame are fused to obtain a fused target detection frame, where the fused target detection frame has a fused target type. As just one example, the union of the first target detection frame and the second target detection frame can be used as the fused target detection frame.

[0029] As an embodiment of the present invention, detection frame fusion can be performed in the following manner: calculate the intersection-over-union (IOU) of the first target detection frame (CNN detection frame) and the second target detection frame (such as the ROI detection frame), assuming that the first target detection frame is A and the second target detection frame is B, then the IOU is: IOU = (A∩B) / (A∪B); compare the IOU with a predefined IOU threshold T; if the IOU is greater than or equal to the IOU threshold T, it means that the two detection frames detect the same object, and the first target detection frame (CNN detection frame) is set as the fused target detection frame, that is, the CNN detection frame is retained and the ROI detection frame is discarded. In this case, the fused target type of the fused target detection frame is the first target type; if the IOU is less than the IOU threshold T, it means that the two detection frames do not detect the same object, and the first target detection frame and the second target detection frame are both set as fused target detection frames. The detection results of convolutional neural networks usually include defined target types, while the detection results based on computer vision are usually undefined target types. When two detection frames detect the same object, retaining the CNN detection frame can retain the target type obtained by the convolutional neural network.

[0030] As an embodiment of the present invention, the first target detection frame and the second target detection frame are fused to obtain the fused target detection frame, and the fused target detection frame further includes: for the same frame image, when only the first target detection frame exists but the second target detection frame does not exist, the first target detection frame is set as the fused target detection frame, and when only the second target detection frame exists but the first target detection frame does not exist, the second target detection frame is set as the fused target detection frame. In this way, the problem of missed detection or false detection of small targets and undefined targets by the neural network can be improved.

[0031] In step S106, stereo matching is performed on the stereo-corrected first camera image and the stereo-corrected second camera image to obtain a disparity map based on the first camera image (eg, the left camera image), and then an original depth map is obtained according to the disparity map.

[0032] In step S107, the points on the original depth map are converted into an original three-dimensional point cloud.

[0033] In step S108, points on the road surface are removed from the original three-dimensional point cloud according to the road surface equation to obtain a foreground three-dimensional point cloud.

[0034] As an embodiment of the present invention, the road surface equation can be determined by the following steps: setting a marker on the road surface, for example, placing a plane checkerboard calibration plate on the road surface, or pasting a paper with several obvious corner points printed on it on the road surface, and setting the marker so that it is evenly distributed in the image captured by the binocular camera, for example, evenly distributed in the top, bottom, left, right and middle positions of the imaging screen; obtaining a first camera calibration image and a second camera calibration image through the binocular camera; establishing a reference coordinate system based on the position of the first camera in the binocular camera, and calibrating the first camera calibration image and the second camera according to the internal and external parameters of the binocular camera. The calibration images are stereo-corrected to obtain a stereo-corrected first camera calibration image and a stereo-corrected second camera calibration image; the two-dimensional coordinates of the corner points are extracted from the stereo-corrected first camera calibration image and the stereo-corrected second camera calibration image, and matched with the corner points in the first camera calibration image and the second camera calibration image; according to the matching results of the corner points, the three-dimensional coordinates (X, Y, Z) of the corner points in the reference coordinate system are restored based on binocular parallax; the coefficients (A, B, C, D) of the road surface equation are calculated according to the three-dimensional coordinates of the corner points, so as to obtain the road surface equation (Ax+By+Cz+D=0).

[0035] As an embodiment of the present invention, step S108 may specifically include: calculating the distance d from the point in the original three-dimensional point cloud to the road surface according to the road surface equation (Ax+By+Cz+D=0); comparing the distance from the point to the road surface with the road surface distance threshold t; if the distance from the point to the road surface is less than or equal to the road surface distance threshold, that is, d<=t, then judging that the point is a point on the road surface; if the distance from the point to the road surface is greater than the road surface distance threshold, that is, d>t, then judging that the point is a foreground point; removing the points on the road surface from the original three-dimensional point cloud and retaining the foreground point, thereby generating a foreground three-dimensional point cloud.

[0036] In step S109, the foreground three-dimensional point cloud is projected onto the camera imaging plane to obtain a road surface culled depth map of culled road surface points.

[0037] In step S110, the fused target detection frame is placed at a corresponding position on the road surface removal depth map, wherein the corresponding position corresponds to the position of the fused target detection frame in the stereo-rectified first camera image.

[0038] In step S111, the points in the fused target detection frame are projected into the Euclidean three-dimensional space to obtain a three-dimensional point cloud of the detection frame.

[0039] In step S112, the target position and size data are obtained according to the three-dimensional point cloud of the detection box.

[0040] As an embodiment of the present invention, this step may specifically include: obtaining the minimum enclosing cube of the three-dimensional point cloud of the detection box as the three-dimensional detection box of the target; calculating the center coordinates (x0, y0, z0) of the minimum enclosing cube as the center position of the target; obtaining the size data of the three-dimensional detection box of the target, such as the length, width and height of the three-dimensional detection box, as the target size data.

[0041] In step S113, the target detection result is obtained according to the target position and size data and the fused target type. The type may include two categories: predefined targets and undefined targets, and the position may include the center point coordinates and the length, width and height of the three-dimensional detection box.

[0042] As an embodiment of the present invention, the method may further include: after obtaining the target detection result in the current frame, tracking the target in the target detection result in the next frame, for example, by Kalman filtering, so as to obtain the speed and / or acceleration information of the target.

[0043] The method for target detection on binocular camera images proposed in the embodiment of the present invention integrates the detection based on neural network and the detection based on computer vision, which effectively improves the problem of missed detection and false detection of small targets and undefined targets by neural network. The depth map obtained by the binocular camera is segmented by the road surface equation to obtain a road surface elimination depth map with road surface points eliminated, and the spatial three-dimensional position information of the target in the detection frame is obtained by the road surface elimination depth map and the detection frame, which effectively improves the problem of large error in the detection of target spatial three-dimensional information based on neural network and the inability to detect undefined targets.

[0044] refer to Figure 2 , which shows a flowchart of an example of a method for performing target detection on a binocular camera image according to an embodiment of the present invention.

[0045] like Figure 2 As shown, the flow chart can be divided into a real-time part and an offline part.

[0046] The offline part includes binocular camera calibration and road surface calibration. The binocular camera internal and external parameters are obtained through binocular camera calibration, and the road surface equation is obtained through road surface calibration.

[0047] During the binocular camera calibration process, the binocular camera is calibrated with a calibration board to obtain its internal and external parameters. The internal parameters mainly include the focal length, principal point coordinates, distortion coefficient, etc. of the two cameras, and the external parameters mainly include the rotation and translation matrices between the two cameras.

[0048] During the road calibration process, the left camera in the binocular camera is used as the reference coordinate system to calibrate the road surface and obtain the road surface equation. The calibration method is as follows:

[0049] a. Place a flat checkerboard calibration plate on the road surface, or paste a piece of paper with several obvious corner points on the road surface. The calibration plate or paper with corner points should be roughly evenly distributed in the upper, lower, left, right and middle positions of the binocular camera imaging screen;

[0050] b. Perform stereo correction on the left and right images of the binocular camera based on the internal and external parameters obtained by calibration;

[0051] c. Extract the coordinates of the corner points in the left and right images after stereo correction and match the corner points in the left and right camera images one by one, and restore the three-dimensional coordinates (X, Y, Z) of the corner points in the reference coordinate system based on the principle of binocular parallax;

[0052] d. Based on these points, use the least squares method to find the four coefficients A, B, C, and D of the road surface equation, thereby obtaining the road surface equation Ax+By+Cz+D=0.

[0053] like Figure 2 As shown, the real-time part includes the following steps:

[0054] 1) For each left and right image pair of the binocular camera, stereo correction is performed on the left and right images of the binocular camera based on the internal and external parameters of the binocular camera to obtain the stereo corrected left camera image and right camera image.

[0055] 2) Set the CNN_det flag and use a convolutional neural network (CNN) to perform target detection on the stereo-rectified left camera image:

[0056] a. If there is a detection frame, it means that the target is detected in the image. The detection frame is recorded as the CNN detection frame, and the CNN_det flag is set to 1. The target type corresponding to the CNN detection frame is the target pre-defined by CNN (car, pedestrian, cone, etc.);

[0057] b. If there is no detection box, it means that no target is detected in the image, and the CNN_det flag is set to 0.

[0058] 3) Set the ROI_det flag and use traditional computer vision methods to perform target detection on the stereo-rectified left camera image:

[0059] a. Remove the background part of the image by background subtraction method (or template matching, pattern recognition method, etc.) to obtain the foreground part;

[0060] b. Extract ROI (region of interest) from the image containing only the foreground part. The ROI is represented by a rectangular box, which is recorded as the ROI detection box;

[0061] c. If the ROI is extracted, the ROI_det flag is set to 1, and the target type corresponding to the ROI detection box is "undefined target";

[0062] d. If no ROI is extracted, set the ROI_det flag to 0.

[0063] 4) If the values ​​of the CNN_det and ROI_det flags are both 0, it means that neither CNN nor the traditional computer vision method has detected the target, and it is judged that there is no target in the current frame image. At this time, the detection of this frame is terminated and the detection of the next frame is started.

[0064] 5) If the values ​​of the CNN_det and ROI_det flags are both 1, it means that both CNN and traditional computer vision methods have detected the target. Calculate the intersection-over-union ratio. Let A be the CNN detection box and B be the ROI detection box. The intersection-over-union ratio is: IOU = (A∩B) / (A∪B).

[0065] a. If the intersection-over-union ratio is greater than the set threshold T, it means that the two detection frames detect the same object. Then the CNN detection frame is set as the target detection frame, and the corresponding ROI detection frame is discarded, thereby retaining the category result of CNN detection);

[0066] b. If the intersection-over-union ratio is less than the set threshold T, it means that the two detection frames are not detecting the same object. At the same time, the CNN detection frame and the ROI detection frame are set as the target detection frame.

[0067] 6) If only one of the CNN_det and ROI_det flags is 1,

[0068] a. If the CNN_det flag is 1, set the CNN detection box to the target detection box;

[0069] b. If the ROI_det flag is 1, set the ROI detection box as the target detection box.

[0070] 7) The left and right camera images obtained in step 1 after stereo correction are used for stereo matching to obtain a disparity map based on the left camera image, and further a depth map can be obtained, which is defined as the original depth map.

[0071] 8) Restore the points on the original depth map to a three-dimensional point cloud P, calculate the distance d from the point in the three-dimensional point cloud to the road surface through the road surface equation Ax+By+Cz+D=0, and set the road surface distance threshold t.

[0072] a. If d<=t, the point is determined to be a point on the road surface and is removed from the three-dimensional point cloud P;

[0073] b. If d>t, the point is judged as a foreground point and retained in the three-dimensional point cloud P.

[0074] 9) Project the 3D point cloud back to the camera imaging plane to obtain a road surface removal depth map with road surface points removed.

[0075] 10) The target detection frame obtained in step (5) and step (6) is placed at a position on the road surface removal depth map corresponding to the position in the left camera image, and the points in the frame are projected into the Euclidean three-dimensional space to obtain a three-dimensional point cloud. The minimum enclosing cube of the point cloud is regarded as the three-dimensional detection frame of the target, and the center of the cube (x0, y0, z0) is recorded as the center position of the target.

[0076] 11) Output the type and position of the target, where the type includes two categories: pre-defined targets and undefined targets, and the position includes the center point coordinates and the length, width and height of the three-dimensional detection box.

[0077] 12) Use Kalman filtering to track the target in the next frame. After tracking, the type and position of the target in the next frame are obtained. If the target appears in multiple consecutive frames, the speed and acceleration can be calculated based on time.

[0078] In another aspect, an embodiment of the present invention provides a device for performing target detection on a binocular camera image. Figure 3 , which shows a block diagram of an apparatus for performing target detection on a binocular camera image according to an embodiment of the present invention. Figure 3 As shown, the device includes modules 301-313.

[0079] The image acquisition module 301 may be configured to acquire a binocular camera image captured by a binocular camera, where the binocular camera image includes a first camera image and a second camera image.

[0080] The stereo correction module 302 may be configured to perform stereo correction on the first camera image and the second camera image based on predetermined internal and external parameters of the binocular camera to obtain a stereo-corrected first camera image and a stereo-corrected second camera image.

[0081] The convolutional neural network detection module 303 can be configured to perform target detection on the stereo-corrected first camera image using a convolutional neural network to obtain a neural network detection result, wherein the neural network detection result includes a first target detection frame, and the first target detection frame has a first target type.

[0082] The computer vision detection module 304 may be configured to perform target detection on the stereo-rectified first camera image using a detection method based on computer vision to obtain a computer vision detection result, wherein the computer vision detection result includes a second target detection frame.

[0083] The detection frame fusion module 305 may be configured to fuse the first target detection frame and the second target detection frame to obtain a fused target detection frame, where the fused target detection frame has a fused target type.

[0084] The stereo matching module 306 may be configured to perform stereo matching on the stereo-rectified first camera image and the stereo-rectified second camera image to obtain a disparity map based on the first camera image, and then obtain an original depth map according to the disparity map.

[0085] The original 3D point cloud conversion module 307 may be configured to convert points on the original depth map into an original 3D point cloud.

[0086] The foreground three-dimensional point cloud acquisition module 308 may be configured to remove points on the road surface from the original three-dimensional point cloud according to the road surface equation to acquire the foreground three-dimensional point cloud.

[0087] The road surface removal depth map acquisition module 309 may be configured to project the foreground three-dimensional point cloud onto the camera imaging plane to obtain a road surface removal depth map.

[0088] The detection frame positioning module 310 can be configured to place the fused target detection frame at a corresponding position on the road surface rejection depth map, wherein the corresponding position corresponds to the position of the fused target detection frame in the stereo-rectified first camera image.

[0089] The detection frame three-dimensional point cloud acquisition module 311 can be configured to project the points in the fusion target detection frame into the Euclidean three-dimensional space to obtain the detection frame three-dimensional point cloud.

[0090] The position and size acquisition module 312 may be configured to obtain target position and size data based on the three-dimensional point cloud of the detection box.

[0091] The target detection result acquisition module 313 may be configured to obtain the target detection result according to the target position and size data and the fused target type.

[0092] It should be noted that the functions implemented by each module in the device for performing target detection on binocular camera images proposed in the embodiments of the present invention correspond one-to-one to the various steps in the method for performing target detection on binocular camera images described above. For its specific implementation methods, examples and beneficial effects, please refer to the specific description of the method above, which will not be repeated here.

[0093] On the other hand, an embodiment of the present invention provides a storage medium storing computer-readable instructions, which, when executed by a processor, executes the method for detecting a target on a binocular camera image according to any of the above embodiments.

[0094] The method, device and storage medium for target detection in binocular camera images proposed in the embodiments of the present invention can effectively improve the problem of missed detection and false detection of small targets and undefined targets by commonly used neural network-based detection methods by fusing convolutional neural networks with detection methods based on computer vision technologies such as background subtraction; by calibrating the road surface in advance to obtain a road surface equation, a road surface elimination depth map with road surface points eliminated is obtained based on the road surface equation, and then the spatial three-dimensional position information of the target in the detection frame is obtained, thereby effectively improving the problem of large error in the detection of target spatial three-dimensional information based on neural networks.

[0095] The target detection scheme for binocular camera images proposed in the embodiments of the present invention can be applied to future vehicle-road cooperative function development projects or test field autonomous driving projects for target detection. It can be used for target recognition and detection in industrial production, and can also be used for intrusion detection in security equipment.

[0096] For the purpose of illustration, the foregoing description of the embodiments of the present invention has been given, which is not exhaustive nor intended to limit the present invention to the disclosed exact form. It will be appreciated by those skilled in the art that various changes can be made without departing from the scope of the present invention, and that the elements therein can be replaced with equivalents. In addition, without departing from the basic scope of the present invention, many modifications can be made so that specific situations or materials are adapted to the teachings of the present invention. Therefore, the present invention is not intended to be limited to the specific embodiments disclosed as the best mode for realizing the present invention, and the present invention will include all embodiments falling within the scope of the appended claims.

Claims

1. A method for object detection on binocular camera images, It is characterized in that The method comprises: Acquire a binocular camera image captured by a binocular camera, wherein the binocular camera image includes a first camera image and a second camera image; Based on predetermined internal and external parameters of the binocular camera, stereo correction is performed on the first camera image and the second camera image to obtain a stereo-corrected first camera image and a stereo-corrected second camera image; Performing target detection on the stereo-rectified first camera image using a convolutional neural network to obtain a neural network detection result, wherein the neural network detection result includes a first target detection frame, and the first target detection frame has a first target type; Performing target detection on the stereo-rectified first camera image using a detection method based on computer vision to obtain a computer vision detection result, wherein the computer vision detection result includes a second target detection frame; Performing detection frame fusion on the first target detection frame and the second target detection frame to obtain a fused target detection frame, where the fused target detection frame has a fused target type; Performing stereo matching on the stereo-rectified first camera image and the stereo-rectified second camera image to obtain a disparity map based on the first camera image, and then obtaining an original depth map according to the disparity map; Converting the points on the original depth map into an original three-dimensional point cloud; Removing points on the road surface from the original three-dimensional point cloud according to a road surface equation to obtain a foreground three-dimensional point cloud; Projecting the foreground three-dimensional point cloud onto the camera imaging plane to obtain a road surface removal depth map; Placing the fused object detection frame at a corresponding position on the road surface removal depth map, wherein the corresponding position corresponds to a position of the fused object detection frame in the stereo-rectified first camera image; Projecting the points in the fused target detection frame into the Euclidean three-dimensional space to obtain a three-dimensional point cloud of the detection frame; Obtaining target position and size data according to the three-dimensional point cloud of the detection frame; The target detection result is obtained according to the target position and size data and the fused target type.

2. The method according to claim 1, It is characterized in that Fusing the first target detection frame and the second target detection frame to obtain a fused target detection frame includes: Calculating an intersection-over-union ratio of the first object detection frame and the second object detection frame; Comparing the intersection-over-union ratio with a predefined intersection-over-union ratio threshold; If the IoU is greater than or equal to the IoU threshold, setting the first object detection frame as a fused object detection frame; If the IoU is less than the IoU threshold, both the first object detection frame and the second object detection frame are set as fused object detection frames.

3. The method according to claim 2, It is characterized in that Fusing the first target detection frame and the second target detection frame to obtain a fused target detection frame further includes: For the same frame image, when there is only a first target detection frame and no second target detection frame, the first target detection frame is set as the fused target detection frame; and when there is no first target detection frame and only the second target detection frame, the second target detection frame is set as the fused target detection frame.

4. The method according to claim 1, It is characterized in that Removing points on the road surface from the original three-dimensional point cloud according to the road surface equation to obtain a foreground three-dimensional point cloud includes: Calculating the distance from the point in the original three-dimensional point cloud to the road surface according to the road surface equation; Compare the distance from the point to the road surface with a road surface distance threshold; If the distance from the point to the road surface is less than or equal to the road surface distance threshold, the point is determined to be a point on the road surface; If the distance from the point to the road surface is greater than the road surface distance threshold, the point is determined to be a foreground point; The points on the road surface are removed from the original three-dimensional point cloud and the foreground points are retained, thereby generating the foreground three-dimensional point cloud.

5. The method according to claim 1, It is characterized in that Performing target detection on the stereo-rectified first camera image using a detection method based on computer vision to obtain a computer vision detection result includes: Performing background subtraction on the stereo-rectified first camera image to obtain a foreground image; A region of interest is extracted from the foreground image, and a frame of the region of interest is used as the second object detection frame.

6. The method according to claim 1, It is characterized in that According to the detection frame three-dimensional point cloud, obtaining the target position and size data includes: Obtaining the minimum enclosing cube of the three-dimensional point cloud of the detection frame as the three-dimensional detection frame of the target; Calculate the center coordinates of the minimum enclosing cube as the center position of the target; The size data of the three-dimensional detection frame of the target is obtained as the target size data.

7. The method according to claim 1, It is characterized in that The method further comprises: After obtaining the target detection result in the current frame, target tracking is performed on the target in the target detection result in the next frame, thereby obtaining the speed and / or acceleration information of the target.

8. The method according to claim 1, It is characterized in that The pavement equation is determined by the following steps: Setting markers on the road surface, wherein the markers are set so as to be evenly distributed in the image captured by the binocular camera; Acquire a first camera calibration image and a second camera calibration image via the binocular camera; A reference coordinate system is established based on the position of a first camera in the binocular camera, and a stereo correction is performed on the first camera calibration image and the second camera calibration image according to the internal parameters and external parameters of the binocular camera to obtain a stereo-corrected first camera calibration image and a stereo-corrected second camera calibration image; Extracting two-dimensional coordinates of corner points in the stereo-rectified first camera calibration image and the stereo-rectified second camera calibration image, and matching them with corner points in the first camera calibration image and the second camera calibration image; According to the matching results of the corner points, the three-dimensional coordinates of the corner points in the reference coordinate system are restored based on the binocular parallax; The coefficients of the road surface equation are calculated according to the three-dimensional coordinates of the corner points, thereby obtaining the road surface equation.

9. A device for detecting targets in binocular camera images, It is characterized in that The device comprises: An image acquisition module, configured to acquire a binocular camera image collected by a binocular camera, wherein the binocular camera image includes a first camera image and a second camera image; A stereo correction module, configured to perform stereo correction on the first camera image and the second camera image based on predetermined internal parameters and external parameters of the binocular camera, to obtain a stereo corrected first camera image and a stereo corrected second camera image; a convolutional neural network detection module, configured to perform target detection on the stereo-rectified first camera image using a convolutional neural network to obtain a neural network detection result, wherein the neural network detection result includes a first target detection frame, and the first target detection frame has a first target type; A computer vision detection module, configured to perform target detection on the stereo-rectified first camera image using a detection method based on computer vision to obtain a computer vision detection result, wherein the computer vision detection result includes a second target detection frame; a detection frame fusion module, configured to fuse the first target detection frame and the second target detection frame to obtain a fused target detection frame, wherein the fused target detection frame has a fused target type; A stereo matching module configured to perform stereo matching on the stereo-corrected first camera image and the stereo-corrected second camera image to obtain a disparity map based on the first camera image, and then obtain an original depth map according to the disparity map; An original three-dimensional point cloud conversion module, configured to convert points on the original depth map into an original three-dimensional point cloud; A foreground three-dimensional point cloud acquisition module is configured to remove points on the road surface from the original three-dimensional point cloud according to a road surface equation to acquire a foreground three-dimensional point cloud; A road surface removal depth map acquisition module is configured to project the foreground three-dimensional point cloud onto a camera imaging plane to obtain a road surface removal depth map; a detection frame positioning module, configured to place the fused target detection frame at a corresponding position on the road surface rejection depth map, wherein the corresponding position corresponds to a position of the fused target detection frame in the stereo-rectified first camera image; A detection frame three-dimensional point cloud acquisition module is configured to project the points in the fusion target detection frame into a Euclidean three-dimensional space to obtain a detection frame three-dimensional point cloud; A position and size acquisition module, configured to obtain target position and size data according to the three-dimensional point cloud of the detection frame; The target detection result acquisition module is configured to obtain the target detection result according to the target position and size data and the fused target type.

10. A storage medium storing computer-readable instructions, wherein when the instructions are executed by a processor, the method according to any one of claims 1 to 8 is executed.