Monocular ranging method and apparatus for intelligent driving of vehicle, and device, medium and vehicle

Through the combination of monocular camera video stream and convolutional neural network, clustering calculation model and geometric ranging model, the problem of large calculation amount and high cost in the binocular vision system ranging method is solved, achieving high accuracy and low cost. vehicle distance measurement.

WO2024198171A1PCT designated stage expired Publication Date: 2024-10-03CHANGZHOU XINGYU AUTOMOTIVE LIGHTING SYST CO LTD

Patent Information

Application Number
PCT/CN2023/108299
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-28
Filing Date
2023-07-20
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

Existing distance measurement methods based on binocular vision systems, while ensuring measurement accuracy, require a large amount of calculations, high computing power requirements for processing units, high equipment costs, and large application limitations.

Method used

The monocular ranging method for intelligent vehicle driving is adopted, by reading image information from the video stream captured by the vehicle's monocular camera, using a convolutional neural network to detect the vehicle instance segmentation map and depth map, and combining the clustering calculation model and geometric ranging model, calculate the distance of the vehicle, and perform fusion processing through the Kalman filter algorithm to improve measurement accuracy.

Benefits of technology

It achieves high measurement accuracy and low processing unit computing power requirements, reduces implementation costs, and expands the scope of applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023108299_03102024_PF_FP_ABST
    Figure CN2023108299_03102024_PF_FP_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of intelligent driving of vehicles, and particularly relates to a monocular ranging method for intelligent driving of a vehicle. The method comprises: acquiring image information, and inputting the image information into a first convolutional neural network model for detection, so as to obtain a segmentation map and a depth map, wherein the segmentation map comprises a detection box of a target object; extracting a rectangular box corresponding to the detection box of each target object, segmenting the segmentation map according to the rectangular box, so as to acquire a region-of-interest map corresponding to the target object, and inputting the region-of-interest map into a second convolutional neural network model for detection, so as to acquire information of the target object; processing the segmentation map and the depth map, and calculating a first distance by means of a clustering calculation model; in view of the information of the target object, calculating a second distance by means of a geometric ranging model; and performing fusion processing calculation on the first distance and the second distance, so as to obtain a final distance from the target object in a real space. The monocular ranging method for intelligent driving of a vehicle in the present invention improves the measurement accuracy, is not limited in use and has low implementation costs.
Need to check novelty before this filing date? Find Prior Art

Description

Monocular ranging method, device, equipment, medium and vehicle for intelligent vehicle driving Technical Field

[0001] The present invention relates to the field of vehicle intelligent driving technology, and in particular to a monocular ranging method, device, equipment, medium and vehicle for vehicle intelligent driving. Background Art

[0002] Intelligent Driver Assistance Systems (ADAS) utilize in-vehicle sensors to continuously perceive the surrounding environment, collect data, identify, detect, and track static and dynamic objects, and perform systematic calculations and analysis in conjunction with navigation map data. This allows the driver to be aware of potential dangers in advance, effectively improving driving comfort and safety. Measuring the distance to the vehicle ahead is a fundamental requirement in intelligent driver assistance systems and is often used in features such as adaptive cruise control (ACC) and automatic emergency braking (AEB). Therefore, high accuracy is required when calculating the distance to the vehicle ahead.

[0003] Existing ranging methods based on binocular vision systems mainly estimate the distance to obstacles in the scene by calculating the parallax between two cameras. This method is computationally intensive and, while ensuring accuracy, places high demands on the computing power of the processing unit. It also requires the two cameras to be horizontally coaxial, with parallel optical axes, synchronized acquisition, and consistent exposure parameters. This has significant limitations in practical applications. In addition, the two cameras and the high-computing processing unit are costly to implement.

[0004] Summary of the Invention

[0005] The technical problem to be solved by the present invention is: in order to solve the technical problems that the distance measurement methods in the prior art cannot take into account measurement accuracy, application limitations and cost, the present invention provides a monocular distance measurement method for vehicle intelligent driving, which improves measurement accuracy, is not limited in use, and is low in cost.

[0006] The technical solution adopted by the present invention to solve the technical problem is: a monocular ranging method for intelligent driving of a vehicle, comprising the following steps:

[0007] Step S1: Read image information frame by frame from the video stream captured by the on-board monocular camera;

[0008] Step S2: Inputting the image information into a first convolutional neural network model for detection to obtain a vehicle instance segmentation map and a depth map, wherein the vehicle instance segmentation map includes a detection frame of at least one target object;

[0009] Step S3: extracting a rectangular frame corresponding to each target detection frame, segmenting the vehicle instance segmentation map according to the rectangular frame, obtaining a region of interest map corresponding to the target object, inputting the region of interest map into a second convolutional neural network model for detection, and obtaining information about the target object;

[0010] The target information includes: target category, actual height and the height of the target in the image;

[0011] Step S4: extracting a depth ROI map based on the detection frame of the target object and the depth map, calculating the minimum distance of pixels in the depth ROI map using a clustering calculation model, and obtaining the coordinates s(u, v) of the pixels. The minimum distance of the pixels is the first distance D1 between the on-board monocular camera and the target object in real space.

[0012] Step S5: combining the information of the target object and the coordinates s(u, v) of the pixel point, and calculating a second distance D2 between the vehicle-mounted monocular camera and the target object in real space through a geometric ranging model;

[0013] Step S6: The first distance D1 and the second distance D2 are fused and calculated to obtain the final distance between the vehicle-mounted monocular camera and the target object in real space.

[0014] Furthermore, specifically, extracting the rectangular frame corresponding to each target object detection frame in step S3 specifically includes the following steps:

[0015] S31: Establish pixel coordinate system o-uv;

[0016] S32: Obtain the upper boundary point (u t ,v t ), lower boundary point (u d ,v d ), left boundary point (u l ,v l ) and the right boundary point (u r ,v r );

[0017] S33: Draw a rectangular frame of the target detection frame according to the coordinates of the upper boundary point, the lower boundary point, the left boundary point and the right boundary point. The height of the target in the image is h=v d -v tt .

[0018] Further, specifically, in step S4, the clustering calculation model includes:

[0019] S41: Assume that there are n pixels in the depth ROI image. In the initial calculation, each pixel is a cluster S. The depth value corresponding to the pixel is d. n ;

[0020] S42: Calculate the distance between each two clusters and merge the two clusters with the closest distance into one cluster;

[0021] S43: Repeat step S42 until the distance between every two clusters is greater than the threshold T;

[0022] S44: Count the number of all pixels in the two clusters respectively, and get the cluster with the largest number of pixels S Max , read the cluster S Max The depth value corresponding to each pixel in the cluster S is obtained Max Minimum depth value d min The pixel corresponding to the minimum depth value, the minimum depth value d min is the minimum distance between the pixels;

[0023] Among them, when the minimum depth value d min When the number is one, get the minimum depth value d min The corresponding pixel coordinates s(u,v);

[0024] Or when the minimum depth value d min When the number is multiple, there will be multiple pixel coordinates. The coordinates of the intersection m of the optical axis of the vehicle-mounted monocular camera in the pixel coordinate system o-uv are (u0, v0). The Euclidean distance between each pixel and the intersection m is calculated. When the Euclidean distance is the minimum, the minimum depth value d is obtained. min The corresponding pixel point coordinates s(u,v).

[0025] Further, specifically, in step S5, the geometric ranging model includes:

[0026] S51: Establish a camera coordinate system O-XYZ with the vehicle-mounted monocular camera as the origin, and the direction perpendicular to the o-uv plane of the pixel coordinate system is the Z axis direction of the camera coordinate system;

[0027] S52: In the pixel coordinate system o-uv, the pixel coordinates s(u,v) are known, the optical axis intersects at m(u0,v0) in the pixel coordinate system o-uv, the actual height of the target is H, the height of the target in the image is h, S(x,y,z) is the closest point of the target in the camera coordinate system, the SMN surface is parallel to the imaging plane, the intersection of the optical axis and the SMN surface is M, and the coordinates of M in the camera coordinate system are (0,0,z). Calculate the second distance D2 from the vehicle-mounted monocular camera to the target in real space. The calculation formula is: d z =(H×f y ) / h Δu=u-u0 Δv=v-v0 d x =(d z ×Δu) / f x d y =(d z ×Δv) / f y ;

[0028] Among them, d z is the length of OM, d x is the distance from S to OYZ plane, d y is the distance from S to OXZ surface, f x and f y is the internal parameter of the vehicle-mounted monocular camera, △u is the distance difference between the pixel point s and the intersection point m in the u-axis direction, and △v is the distance difference between the pixel point s and the intersection point m in the v-axis direction.

[0029] Further, specifically, the step S6 specifically includes: obtaining the standard deviation σ1 of the first distance D1 and the standard deviation σ2 of the second distance D2, and calculating the distance fusion standard deviation. The calculation formula of the distance fusion standard deviation is:

[0030] According to the distance fusion standard deviation, the distance D3 between the vehicle-mounted monocular camera and the target object in the final real space is calculated as follows: D3=D1+k(D1-D2).

[0031] Furthermore, specifically, a Kalman filter algorithm is also used to process the distance D3 between the vehicle-mounted monocular camera and the target object in the final real space.

[0032] A monocular ranging device for intelligent vehicle driving using the monocular ranging method for intelligent vehicle driving as described above, the monocular ranging device comprising:

[0033] The first acquisition module: reads image information frame by frame from the video stream captured by the on-board monocular camera;

[0034] A first detection module: inputs the image information into a first convolutional neural network model for detection to obtain a vehicle instance segmentation map and a depth map, wherein the vehicle instance segmentation map includes a detection frame of at least one target object;

[0035] The second detection module extracts a rectangular frame corresponding to each target detection frame, segments the vehicle instance segmentation map according to the rectangular frame, obtains a region of interest map corresponding to the target object, and inputs the region of interest map into a second convolutional neural network model for detection to obtain information about the target object;

[0036] The target information includes: target category, actual height and the height of the target in the image;

[0037] A first calculation module: extracting a depth ROI map based on the detection frame of the target object and the depth map, calculating the minimum distance of pixels in the depth ROI map using a clustering calculation model, and obtaining the coordinates s(u, v) of the pixels. The minimum distance of the pixels is the first distance D1 between the on-board monocular camera and the target object in real space;

[0038] A second calculation module is configured to calculate a second distance D2 between the vehicle-mounted monocular camera and the target object in real space by combining the information of the target object and the coordinates s(u, v) of the pixel point through a geometric ranging model;

[0039] Fusion calculation module: The first distance D1 and the second distance D2 are fused to obtain the distance between the vehicle-mounted monocular camera and the target object in the final real space.

[0040] A computer device comprising:

[0041] processor;

[0042] a memory for storing executable instructions;

[0043] The processor is used to read the executable instructions from the memory and execute the executable instructions to implement the monocular ranging method for intelligent vehicle driving as described above.

[0044] A computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the processor implements the monocular ranging method for intelligent vehicle driving as described above.

[0045] A vehicle comprises the monocular ranging device for intelligent vehicle driving as described above.

[0046] The beneficial effects of the present invention are:

[0047] (1) The video stream captured by the vehicle-mounted monocular camera is not limited in use and has low implementation cost compared to the prior art method of estimating the distance of obstacles in the scene based on the parallax calculation between two cameras;

[0048] (2) After processing the original image information, the first distance is calculated through the clustering algorithm model, which can effectively remove external interference. The result of the first distance is highly accurate. Combined with the actual data obtained, the second distance is calculated through the geometric ranging model. The result of the second distance is highly accurate. The first distance and the second distance are then fused and calculated to finally obtain the distance to the preceding vehicle in real space. Compared with the monocular ranging in the prior art, the present invention has high measurement accuracy and relatively low computing power requirements for the processing unit, which further reduces the implementation cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The present invention will be further described below with reference to the accompanying drawings and examples.

[0050] FIG1 is a flow chart of the first embodiment of the present invention.

[0051] FIG2 is a schematic diagram of image information according to the first embodiment of the present invention.

[0052] FIG3 is a schematic diagram of a vehicle example segmentation diagram according to the first embodiment of the present invention.

[0053] FIG4 is a schematic diagram of a depth map according to the first embodiment of the present invention.

[0054] FIG5 is a schematic diagram of a detection frame of a target object in a pixel coordinate system according to the first embodiment of the present invention.

[0055] FIG6 is a partial depth ROI diagram of the first embodiment of the present invention.

[0056] FIG7 is a schematic diagram of calculating the distance between two clusters according to the first embodiment of the present invention.

[0057] FIG8 is a schematic diagram showing the principle of a geometric ranging model according to an embodiment of the present invention.

[0058] FIG9 is a schematic structural diagram of a second embodiment of the present invention.

[0059] FIG10 is a schematic diagram of the hardware structure of the third embodiment of the present invention

[0060] In the figure, 20 is a monocular distance measuring device; 200 is a first acquisition module; 201 is a first detection module; 202 is a second detection module; 203 is a first calculation module; 204 is a second calculation module; 205 is a fusion calculation module;

[0061] 10. Computer device; 1002. Processor; 1004. Memory; 1006. Transmission device. DETAILED DESCRIPTION

[0062] The present invention will now be described in further detail with reference to the accompanying drawings, which are simplified schematic diagrams that illustrate the basic structure of the present invention in a schematic manner.

[0063] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, features defined as "first" or "second" may explicitly or implicitly include one or more of such features. In the description of the present invention, unless otherwise specified, "multiple" means two or more.

[0064] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0065] Example 1: This embodiment of the present application provides a monocular ranging method for intelligent driving of a vehicle, comprising the following steps:

[0066] Step S1: Reading image information frame by frame from the video stream captured by the on-board monocular camera. As shown in FIG2 , the video stream captured by the on-board monocular camera is used to estimate the distance of obstacles in the scene based on the parallax calculation between the two cameras in the prior art. The present application is not limited in use, has a wide range of applications, and has low implementation costs.

[0067] Step S2: Input the image information into the first convolutional neural network model for detection to obtain a vehicle instance segmentation map and a depth map, wherein the vehicle instance segmentation map includes a detection frame of at least one target object;

[0068] The first convolutional neural network uses, but is not limited to, the SOLOv2 segmentation network structure to obtain a vehicle instance segmentation map. A depth map prediction branch is provided within the first convolutional neural network to obtain a depth map. The first convolutional neural network achieves high-precision and fast image segmentation. If there is only one vehicle on the road ahead, the vehicle instance segmentation map contains only one target detection frame. If there are only two vehicles on the road ahead, the vehicle instance segmentation map contains two target detection frames. The number of target detection frames in the vehicle instance segmentation map is the same as the number of vehicles on the road ahead, as shown in Figure 3. Depth represents the distance of each point in the road ahead scene relative to the onboard monocular camera. That is, each pixel value in the depth map represents the distance between a point in the road ahead scene and the onboard monocular camera. A depth map is an image formed by replacing the grayscale levels of a grayscale image with the longitudinal depth values ​​of the object. The length and width of the depth map are the same as the length and width of the image information. Figure 4 is a schematic diagram of a depth map according to this embodiment. In Figure 4, darker colors indicate closer distances to the vehicle, while lighter colors indicate farther distances.

[0069] Step S3: Extract the rectangular box corresponding to each target detection box, segment the vehicle instance segmentation map according to the rectangular box, obtain the region of interest map corresponding to the target, input the region of interest map into the second convolutional neural network model for detection, and obtain the target information; wherein the target information includes: target category, actual height, and target height in the image;

[0070] In this embodiment, as shown in FIG5 , step S3 of extracting the rectangular frame corresponding to each target object detection frame specifically includes the following steps:

[0071] S31: Establish pixel coordinate system o-uv;

[0072] S32: Get the upper boundary point of the detection frame of the target object (u t ,v t ), lower boundary point (u d ,v d ), left boundary point (u l ,v l ) and the right boundary point (u r ,v r ), the detection frame of the target object is but not limited to a polygonal shape;

[0073] S33: Draw a rectangular frame of the target detection frame according to the coordinates of the upper boundary point, the lower boundary point, the left boundary point and the right boundary point. The height of the target in the image is h=v d -v t .

[0074] In this embodiment, the vehicle instance segmentation map is segmented according to the drawn rectangular frame based on the image segmentation algorithm to obtain the region of interest (ROI) corresponding to the target object, and the target object type is detected by the second convolutional neural network model. The second convolutional neural network adopts but is not limited to the ShuffleNetv2 network structure, which improves the accuracy of target object classification and has a fast processing speed. The categories of the target objects include but are not limited to cars, SUVs or buses. The actual height corresponding to the target object is then obtained according to the category of the target object, such as: the actual height of the car is 1.5m, the actual height of the SUV is 1.7m, and the height of the bus is 3m, thereby further improving the accuracy of the calculation results.

[0075] Step S4: According to the detection frame and depth map of the target object, the depth ROI map is extracted, and the minimum distance of the pixels in the depth ROI map is calculated by the clustering calculation model to obtain the coordinates s(u, v) of the pixel points corresponding to the minimum distance of the pixels. The minimum distance of the pixels is the first distance D1 between the on-board monocular camera and the target object in real space. Specifically, according to the detection frame and depth map of the target object, the depth ROI map is extracted, and the coordinates of the detection frame of the target object in the vehicle instance segmentation map are fused with the depth map to obtain a depth ROI (region of interest) map.

[0076] In this embodiment, the cluster calculation model in step S4 includes:

[0077] S41: Assume that there are An pixels in the depth ROI image. In the initial calculation, each pixel is a cluster S, and the depth value corresponding to the pixel is d n ;

[0078] S42: Calculate the distance between each two clusters and merge the two clusters with the closest distance into one cluster. Specifically, as shown in FIG7 , let the two clusters be S P and S Q , where cluster S P There is pixel A P , cluster S Q There is pixel A Q , pixel A P1 The corresponding depth value d p1 With pixel A Q1 The corresponding depth value d Q1 Subtract the result d PQ1 Pixel A P1 With pixel A Q1 The distance between the two clusters is obtained by P , S Q )=min(d pQ );

[0079] S43: Repeat step S42 until the distance between every two clusters is greater than the threshold T;

[0080] S44: Count the number of all pixels in the two clusters respectively, and get the cluster with the largest number of pixels S Max , read cluster S Max The depth value corresponding to each pixel in the cluster S is obtained Max Minimum depth value d min The pixel corresponding to the minimum depth value, the minimum depth value d min is the minimum distance between pixels;

[0081] Among them, when the minimum depth value d min When the number is one, get the minimum depth value d min The corresponding pixel coordinates s(u,v); or when the minimum depth value d min When the number is multiple, there will be multiple pixel coordinates. The coordinates of the intersection m of the optical axis of the on-board monocular camera in the pixel coordinate system o-uv are (u0, v0). Calculate the Euclidean distance between each pixel and the intersection m. When the Euclidean distance is minimum, obtain the minimum depth value d min The corresponding pixel coordinates s(u,v). After fusing the coordinates of the detection box of the target object in the vehicle instance segmentation map with the depth map, the minimum distance between the pixels is obtained. The minimum distance between the pixels is the closest distance between the front vehicle and the vehicle itself. The pixel coordinates of the pixel are obtained based on the minimum distance. This facilitates the calculation of subsequent steps, reduces calculation errors, and improves the accuracy of the calculation results.

[0082] It should be noted that when a vehicle-mounted monocular camera captures an image, the target object will block the distant target object due to the distance between the targets. This will make the outline of the nearby target object relatively complete, while the outline of the distant target object will be missing. The front-back relationship of the target object can be obtained based on the depth. In order to calculate the distance from the vehicle-mounted monocular camera to the distant target object, the occlusion in the depth map is used as an example. Figure 6 is a 16*16 part of the depth ROI map. The pixels in area A are the depth of the nearby target object, and the pixels in area B are the depth of the distant target object. The black pixels are noise points. When calculating the distance to the distant target object, it is necessary to avoid the computational interference caused by noise points and nearby targets. The clustering calculation model of this embodiment is used to obtain three clusters, namely cluster S in area A and cluster S in area B. A , cluster S in region B B and abnormal cluster S Y By counting the number of pixels in each cluster, we can get the cluster S with the most pixels. A , in cluster S AThe minimum depth value in the image represents the minimum distance, i.e., the first distance between the vehicle's monocular camera and the target in real space. The clustering calculation model removes interference from nearby objects and noise (both near and far), improving the accuracy and stability of the calculation results. Furthermore, it accurately calculates regardless of the vehicle's orientation, position, or whether there are obstructions, making it widely applicable.

[0083] Step S5: combining the information of the target object and the pixel coordinates s(u, v), and calculating the second distance D2 between the on-board monocular camera and the target object in real space through a geometric ranging model;

[0084] In this embodiment, as shown in FIG8 , the geometric ranging model in step S5 includes:

[0085] S51: Establish a camera coordinate system O-XYZ with the onboard monocular camera as the origin, and the direction perpendicular to the o-uv plane of the pixel coordinate system is the Z axis direction of the camera coordinate system;

[0086] S52: In the pixel coordinate system o-uv, the pixel coordinates s(u,v) are known, the intersection of the optical axis in the pixel coordinate system o-uv is m(u0,v0), the actual height of the target is H, the height of the target in the image is h, S(x,y,z) is the closest point of the target in the camera coordinate system, the SMN surface is parallel to the imaging plane, the intersection of the optical axis and the SMN surface is M, and the coordinates of M in the camera coordinate system are (0,0,z). Calculate the second distance D2 from the on-board monocular camera to the target in real space. The calculation formula is: d z =(H×f y ) / h Δu=u-u0 Δv=v-v0 d x =(d z ×Δu) / f x d y =(d z ×Δv) / f y ;

[0087] Among them, d z is the length of OM, d x is the distance from S to OYZ plane, d y is the distance from S to OXZ surface, f x and f y is the internal parameter of the vehicle-mounted monocular camera, △u is the distance difference between the pixel point s and the intersection point m in the u-axis direction, and △v is the distance difference between the pixel point s and the intersection point m in the v-axis direction.

[0088] Step S6: The first distance D1 and the second distance D2 are fused and calculated to obtain the final distance between the vehicle-mounted monocular camera and the target object in real space.

[0089] Specifically, obtain the standard deviation σ1 of the first distance D1 and the standard deviation σ2 of the second distance D2 and calculate the distance fusion standard deviation. The calculation formula of the distance fusion standard deviation is:

[0090] According to the distance fusion standard deviation, the distance D3 between the on-board monocular camera and the target object in the final real space is calculated as follows: D3 = D1 + k (D1-D2).

[0091] In this embodiment, the Kalman filter algorithm 3 is further used to process the distance D between the vehicle-mounted monocular camera and the target object in the final real space. The distance obtained after processing further improves the measurement accuracy of the distance measurement method.

[0092] In this embodiment, the threshold T is calculated before executing the distance measurement method of the present invention, and the calculation result is stored. Specifically, in the experimental scene environment, due to the distance relationship between the target objects, the target object near the target object will block the target object far away. This scene environment is a special case of this example. When there is occlusion, a high-precision laser rangefinder is used to measure the distances between the two targets and the vehicle, respectively, L1 and L2, and the difference between the two distances is L d =|L1-L2|, this embodiment counts the distance difference L of 1000 groups of different occlusion situations d , the smallest L d(min) The result is used as the threshold T to improve the accuracy of the calculation results of the clustering calculation model, thereby improving the measurement accuracy of the ranging method.

[0093] In this embodiment, the farther the target object is, the greater the ranging error is. In the experimental scene environment, a high-precision laser ranging instrument is used to measure the actual distance D to the target object. ZS , using steps S1 to S5 of this embodiment to collect 1000 sets of image information samples, respectively calculating the first distance D1 and the second distance D2, and obtaining 1000 sets of [D ZS , D1, D2] data, let X1 and X2 be the relative distance ratios of D1 and D2 respectively, and the relative distance ratio calculation formula is as follows: X1 = (D1-D ZS ) / D ZS X2=(D2-D ZS ) / D ZS ;

[0094] 1000 groups [D ZS ,D1,D2] data to solve the relative distance ratio standard deviation σ1 and standard deviation σ2 corresponding to X1 and X2, and save the relative distance ratio standard deviation σ1 and standard deviation σ2. The calculation formula is as follows:

[0095] It should be noted that the calculation of the standard deviation σ1 and the standard deviation σ2 is complex and large, so in this embodiment, they are calculated and stored by computer simulation, and manual calculation is rarely performed. The computer simulation calculation has high accuracy and high speed, thereby improving the measurement accuracy of the ranging method. When used, the standard deviation σ1 and the standard deviation σ2 are directly obtained.

[0096] The present invention provides a monocular ranging method for intelligent vehicle driving. The method uses a video stream captured by a vehicle-mounted monocular camera to estimate the distance to obstacles in a scene based on parallax calculation between two cameras in the prior art. The present invention is not limited in use and has low implementation cost. After processing the original image information, a first distance is calculated using a clustering algorithm model, which can effectively eliminate external interference and provide a high-precision result for the first distance. Combined with the actual data obtained, a second distance is calculated using a geometric ranging model and has a high-precision result for the second distance. The first distance and the second distance are then fused and calculated to ultimately obtain the distance to the preceding vehicle in real space. Compared with the monocular ranging method in the prior art, the present invention has high measurement accuracy and relatively low requirements on the computing power of the processing unit, further reducing implementation cost.

[0097] Example 2: The present application provides a monocular ranging device for intelligent vehicle driving using the above monocular ranging method for intelligent vehicle driving. As shown in FIG9 , the monocular ranging device includes:

[0098] The first acquisition module 200 reads image information frame by frame from a video stream captured by a vehicle-mounted monocular camera;

[0099] The first detection module 201 inputs the image information into the first convolutional neural network model for detection, and obtains a vehicle instance segmentation map and a depth map, wherein the vehicle instance segmentation map includes a detection frame of at least one target object;

[0100] Second detection module 202: extracts the rectangular frame corresponding to each target detection frame, segments the vehicle instance segmentation map according to the rectangular frame, obtains a region of interest map corresponding to the target, and inputs the region of interest map into the second convolutional neural network model for detection to obtain target information; wherein the target information includes: target category, actual height, and target height in the image;

[0101] First calculation module 203: extracts a depth ROI map based on the detection frame and depth map of the target object, calculates the minimum distance of pixels in the depth ROI map using a clustering calculation model, and obtains the coordinates s(u, v) of the pixel points. The minimum distance of the pixel points is the first distance D1 between the on-board monocular camera and the target object in real space;

[0102] The second calculation module 204 calculates the second distance D2 between the vehicle-mounted monocular camera and the target object in real space by combining the information of the target object and the coordinates s(u, v) of the pixel point through a geometric ranging model;

[0103] Fusion calculation module 205: The first distance D1 and the second distance D2 are fused to obtain the final distance between the vehicle-mounted monocular camera and the target object in real space.

[0104] The first acquisition module 200 and the second detection module 202 are both connected to the first detection module 201, the first calculation module 203 is connected to the first detection module 201, the first calculation module and the second detection module are both connected to the second calculation module 204, and the first calculation module 203 and the second calculation module 204 are both connected to the fusion calculation module 205.

[0105] It should be noted that the apparatus provided in the above embodiments, when implementing its functions, is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0106] Example 3: An embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement a monocular ranging method provided in the above method embodiment.

[0107] Figure 10 shows a hardware structure diagram of a device for implementing a monocular ranging method provided in an embodiment of the present application. The device can participate in or include the device or system provided in an embodiment of the present application. As shown in Figure 10, the computer device 10 may include one or more processors 1002 (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1004 for storing data, and a transmission device 1006 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It will be understood by those skilled in the art that the structure shown in Figure 10 is only illustrative and does not limit the structure of the above-mentioned electronic device. For example, the computer device 10 may also include more or fewer components than shown in Figure 10, or have a configuration different from that shown in Figure 10.

[0108] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuitry". The data processing circuitry may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuitry may be a single independent processing module, or may be incorporated in whole or in part into any of the other components of the computer device 10 (or mobile device). As described in the embodiments of the present application, the data processing circuitry serves as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0109] Memory 1004 can be used to store software programs and modules for application software, such as the program instructions / data storage device corresponding to a monocular ranging method in an embodiment of the present application. The processor executes the software programs and modules stored in memory 1004 to execute various functional applications and data processing, thereby implementing one of the aforementioned methods. Memory 1004 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 1004 may further include memory remotely located relative to the processor, and these remote memories may be connected to the computer device 10 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0110] The transmission device 1006 is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the communications provider of the computer device 10. In one embodiment, the transmission device 1006 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 1006 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0111] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer device 10 (or mobile device).

[0112] Example 4: The embodiment of the present application also provides a computer-readable storage medium, which can be set in a server to store at least one instruction or at least one program related to implementing a monocular ranging method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement a monocular ranging method provided in the above method embodiment.

[0113] Optionally, in this embodiment, the storage medium may be located in at least one of a plurality of network servers in a computer network. Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0114] Embodiment 5: This embodiment of the present invention further provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a monocular ranging method provided in any of the above-mentioned optional embodiments.

[0115] Example 6: An embodiment of the present invention further provides a vehicle, which includes the above monocular ranging device for intelligent driving of the vehicle.

[0116] It should be noted that the order of the embodiments of the present application described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0117] The various embodiments in this application are described in a progressive manner. Similar portions between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the device, equipment, and storage medium embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For relevant portions, refer to the descriptions of the method embodiments.

[0118] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0119] With the above-described preferred embodiments of the present invention as a guide, and with reference to the above description, relevant personnel are fully capable of making various changes and modifications without departing from the technical scope of this invention. The technical scope of this invention is not limited to the contents of the specification and must be determined according to the scope of the claims.

Claims

1. A monocular ranging method for vehicle intelligent driving, It is characterized in that The following steps are involved: Step S1: reading image information frame by frame from the video stream captured by the on-board monocular camera; Step S2: inputting the image information into a first convolutional neural network model for detection to obtain a vehicle instance segmentation map and a depth map, wherein the vehicle instance segmentation map includes a detection frame of at least one target object; Step S3: extracting a rectangular frame corresponding to each target object detection frame, segmenting the vehicle instance segmentation map according to the rectangular frame, obtaining a region of interest map corresponding to the target object, inputting the region of interest map into the second convolutional neural network model for detection, and obtaining information of the target object; The information of the target object includes: the target object category, the actual height and the height of the target object in the image; Step S4: extracting a depth ROI map according to the detection frame of the target object and the depth map, calculating the minimum distance of pixels in the depth ROI map through a clustering calculation model, and obtaining the coordinates s(u, v) of the pixels, where the minimum distance of the pixels is the first distance D1 between the vehicle-mounted monocular camera and the target object in real space; Step S5: combining the information of the target object and the coordinates s(u, v) of the pixel point, and calculating a second distance D2 between the vehicle-mounted monocular camera and the target object in real space through a geometric ranging model; Step S6: The first distance D1 and the second distance D2 are fused and calculated to obtain the distance between the vehicle-mounted monocular camera and the target object in the final real space.

2. The monocular ranging method for intelligent driving of a vehicle as claimed in claim 1, It is characterized in that Extracting the rectangular frame corresponding to each target object detection frame in step S3 specifically includes the following steps: S31: Establish pixel coordinate system o-uv; S32: Obtain the upper boundary point (u t ,v t ), the lower boundary point (u d ,v d ), left boundary point (u l ,v l ) and the right boundary point (u r ,v r ); S33: according to the upper boundary point, the lower boundary point, the left boundary point and the right boundary point The coordinates are used to draw a rectangular frame of the target detection frame, and the height of the target in the image is h=v d -v t .

3. The monocular ranging method for intelligent driving of a vehicle as claimed in claim 2, It is characterized in that In step S4, the clustering calculation model includes: S41: Assume that there are n pixels in the depth ROI map. In the initial calculation, each pixel is a cluster S. The depth value corresponding to the pixel is d. n ; S42: Calculate the distance between every two clusters, and merge the two clusters with the closest distance into one cluster; S43: repeat step S42 until the distance between every two clusters is greater than the threshold T; S44: Count the number of all pixels in the two clusters respectively, and obtain the cluster S with the largest number of pixels. Max , read the cluster S Max The depth value corresponding to each pixel in the cluster S is obtained Max The minimum depth value d min The pixel corresponding to the minimum depth value is min is the minimum distance between the pixels; Among them, when the minimum depth value d min When the number is one, get the minimum depth value d min The corresponding pixel point coordinates s(u,v); Or when the minimum depth value d min When the number is multiple, there will be multiple pixel coordinates. The coordinates of the intersection point m of the optical axis of the vehicle-mounted monocular camera in the pixel coordinate system o-uv are (u 0 ,v 0 ), calculate the Euclidean distance between each pixel point and the intersection point m, wherein when the Euclidean distance is the minimum value, obtain the minimum depth value d min The corresponding pixel point coordinates s(u,v).

4. The monocular ranging method for intelligent driving of a vehicle as claimed in claim 3, It is characterized in that In step S5, the geometric distance measurement model includes: S51: Establish a camera coordinate system O-XYZ with the vehicle-mounted monocular camera as the origin, and the direction perpendicular to the o-uv plane of the pixel coordinate system is the Z-axis direction of the camera coordinate system; S52: In the pixel coordinate system o-uv, the pixel point coordinate s(u,v) is known, and the intersection point m(u 0 ,v 0 ), the actual height of the target is H, the target The height in the image is h, S(x, y, z) is the nearest point of the target in the camera coordinate system, the SMN surface is parallel to the imaging plane, the intersection of the optical axis and the SMN surface is M, and the coordinate of M in the camera coordinate system is (0, 0, z). The second distance D2 between the vehicle-mounted monocular camera and the target in real space is calculated using the following formula: d z =(H×f y ) / h Δu=uu 0 Δv=v-v 0 d x =(d z ×Δu) / f x d y =(d z ×Δv) / f y ; Among them, d z is the length of OM, d x is the distance from S to the OYZ plane, d y is the distance from S to OXZ surface, f x and f y is the internal parameter of the vehicle-mounted monocular camera, △u is the distance difference between the pixel point s and the intersection point m in the u-axis direction, and △v is the distance difference between the pixel point s and the intersection point m in the v-axis direction.

5. The monocular ranging method for intelligent driving of a vehicle as claimed in claim 4, It is characterized in that The step S6 specifically includes: obtaining the standard deviation σ1 of the first distance D1 and the standard deviation σ2 of the second distance D2, and calculating the distance fusion standard deviation, and the calculation formula of the distance fusion standard deviation is: According to the distance fusion standard deviation, the distance D3 between the vehicle-mounted monocular camera and the target object in the final real space is calculated as follows: D3 = D1 + k (D1 - D2).

6. The monocular ranging method for intelligent driving of a vehicle as claimed in claim 5, It is characterized in that A Kalman filter algorithm is also used to process the distance D3 between the vehicle-mounted monocular camera and the target object in the final real space.

7. A monocular distance measurement device for intelligent vehicle driving using the monocular distance measurement method for intelligent vehicle driving according to any one of claims 1 to 6, It is characterized in that The monocular distance measuring device comprises: A first acquisition module (200): reads image information frame by frame from a video stream captured by a vehicle-mounted monocular camera; A first detection module (201): inputting the image information into a first convolutional neural network model for detection to obtain a vehicle instance segmentation map and a depth map, wherein the vehicle instance segmentation map includes a detection frame of at least one target object; The second detection module (202) extracts a rectangular frame corresponding to each target object detection frame, segments the vehicle instance segmentation map according to the rectangular frame, obtains a region of interest map corresponding to the target object, inputs the region of interest map into a second convolutional neural network model for detection, and obtains information about the target object; The information of the target object includes: the target object category, the actual height and the height of the target object in the image; A first calculation module (203): extracting a depth ROI map according to the detection frame of the target object and the depth map, calculating the minimum distance of pixels in the depth ROI map by a clustering calculation model, and obtaining the coordinates s(u, v) of the pixels, wherein the minimum distance of the pixels is a first distance D1 between the vehicle-mounted monocular camera and the target object in real space; A second calculation module (204): combining the information of the target object and the coordinates s(u, v) of the pixel point, and calculating a second distance D2 between the vehicle-mounted monocular camera and the target object in real space through a geometric distance measurement model; A fusion calculation module (205): The first distance D1 and the second distance D2 are fused to obtain a final distance between the vehicle-mounted monocular camera and the target object in real space.

8. A computer device, It is characterized in that include: processor; A memory for storing executable instructions; Wherein, the processor is used to read the executable instructions from the memory and execute the executable instructions to implement the monocular ranging method for vehicle intelligent driving as described in any one of claims 1-6.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the monocular ranging method for intelligent driving of a vehicle as described in any one of claims 1-6.

10. A vehicle, It is characterized in that It includes a monocular ranging device for intelligent driving of a vehicle as described in claim 7.

Citation Information

Patent Citations

  • Novel non-contact measuring method for vehicle loading length

    CN102278960A

  • Target positioning method and device

    CN110207702A

  • Vision-based target distance measuring and calculating method

    CN111829484A

  • Pedestrian active collision avoidance system and method based on monocular camera

    CN112356815A

  • Monocular target ranging method and device

    CN114332187A

Cited By

  • Distance measurement method and device based on target width and electronic equipment

    CN120233349A

  • Road vehicle real-time twinning method and system based on monocular camera

    CN120260000A

  • Detection device, detection method, and detection program

    JP2026138846A

  • Detection device, detection method, and detection program

    JP7823241B1