Surface model fitting method and device based on monocular vision

Through the surface model fitting method of monocular vision, fast road scene segmentation algorithm and curve fitting technology are used to solve the problems of high hardware cost and high data requirements for surface model estimation in autonomous vehicles, and realize the prediction of the road conditions ahead. Accurate estimation and real-time driving control.

CN113345087BActive Publication Date: 2024-09-27SUZHOU ZHITU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110668893.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-16
Publication Date
2024-09-27
Estimated Expiration
2041-06-16

AI Technical Summary

Technical Problem

Existing techniques for estimating surface models based on depth cameras and deep learning in self-driving cars have problems such as high hardware costs and high data sample requirements, and cannot accurately predict the road conditions ahead. The vehicle status method can only estimate the current location surface information.

Method used

The surface model fitting method based on monocular vision is used to calculate the road turning point by obtaining the coordinate value of the vanishing point of the straight road in the pixel coordinate system, the camera internal parameter matrix and the external parameter matrix, combined with the fast road scene segmentation algorithm and curve fitting technology. and coordinate values ​​of the vanishing point to determine road conditions and parameter values, including slope and curve type.

Benefits of technology

It achieves accurate estimation of the road conditions ahead, reduces hardware costs, can judge the slope and curve type of the road in real time, and improves the driving control accuracy of autonomous vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113345087B
    Figure CN113345087B
Patent Text Reader

Abstract

The present invention provides a surface model fitting method and device based on monocular vision, comprising: obtaining the coordinate value of a straight road vanishing point in a pixel coordinate system, a camera intrinsic parameter matrix and a camera extrinsic parameter matrix; obtaining a road scene segmentation point by using a fast road scene segmentation algorithm on a collected road scene image; screening the road scene segmentation point to obtain a road pavement segmentation contour point; curve fitting the road pavement segmentation contour point to obtain the parameters of a cubic curve equation of a plurality of pavement contour lines; calculating the coordinate value of a road turning point in a pixel coordinate system and the coordinate value of a road vanishing point in a pixel coordinate system according to the parameters of the cubic curve equation of the plurality of pavement contour lines; determining a road condition and a road parameter value according to the coordinate value of a straight road vanishing point in a pixel coordinate system, a camera intrinsic parameter matrix, a camera extrinsic parameter matrix, the coordinate value of a road turning point in a pixel coordinate system and the coordinate value of a road vanishing point in a pixel coordinate system, and accurately estimating a surface model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of autonomous driving vehicles, and in particular to a method and device for fitting a surface model based on monocular vision. Background Art

[0002] In recent years, with the continuous maturity of technologies such as intelligent driving and unmanned driving, visual sensors are used frequently. There is also an increasing demand for estimating the surface model ahead through visual sensors. For example, when an autonomous vehicle is driving on the road, it is necessary to predict the slope or curve of the road ahead in advance so as to accelerate or decelerate the autonomous vehicle in advance.

[0003] The surface model is usually estimated using a depth camera, deep learning, and vehicle status. In the process of estimating the surface model using deep learning, the camera acquires images, and the depth map of the road is predicted based on deep learning and converted into a disparity map. Then, the ground plane equation is fitted based on the relative disparity value in the disparity map and the camera installation height, so as to calculate the road slope.

[0004] In the process of estimating the surface model by the depth camera, the RGB image and depth image of the road are obtained through the color camera and the depth camera respectively, the depth image is mapped to the RGB image, and the three-dimensional point cloud of the candidate area is calculated. The road plane equation is solved according to the three-dimensional point cloud to calculate the road slope.

[0005] In the process of estimating the surface model using the vehicle state method, the vehicle state data is collected by a data acquisition device, and the model parameters are calculated by combining the vehicle state data and the vehicle's inherent parameters: then, based on the relationship model between the slope and the vehicle state data, an extended Kalman filter estimation model is constructed to estimate the road slope in real time.

[0006] In the process of estimating the surface model using deep learning and depth cameras, the hardware cost is high and the data sample requirements are high; in the process of estimating the surface model using the vehicle status method, only the surface information of the current position of the autonomous driving vehicle can be estimated, and the condition of the road ahead cannot be estimated. Therefore, the above method cannot accurately estimate the surface model. Summary of the invention

[0007] In view of this, the purpose of the present invention is to provide a surface model fitting method and device based on monocular vision, which determines the road condition ahead and road parameter values ​​according to the coordinate values ​​of the vanishing point of a straight road in a pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate values ​​of the road turning point in the pixel coordinate system, and the coordinate values ​​of the road vanishing point in the pixel coordinate system, so as to accurately estimate the surface model.

[0008] In a first aspect, an embodiment of the present invention provides a surface model fitting method based on monocular vision, the method comprising:

[0009] Get the coordinates of the vanishing point of the straight road in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix;

[0010] Collecting a road scene image, and applying a fast road scene segmentation algorithm to the road scene image to obtain a road scene segmentation point;

[0011] Screening the road scene segmentation points to obtain road pavement segmentation contour points;

[0012] Performing curve fitting on the road surface segmentation contour points to obtain parameters of cubic curve equations of multiple road surface contour lines;

[0013] Calculating the coordinate values ​​of the road turning point and the road vanishing point in the pixel coordinate system according to the parameters of the cubic curve equations of the plurality of road contour lines;

[0014] The road condition and the road parameter value are determined according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road inflection point in the pixel coordinate system, and the coordinate value of the road vanishing point in the pixel coordinate system.

[0015] Furthermore, the calculating, based on the parameters of the cubic curve equations of the plurality of road contour lines, the coordinate values ​​of the road turning points in the pixel coordinate system and the coordinate values ​​of the road vanishing points in the pixel coordinate system comprises:

[0016] Calculating the slope change rate of the cubic curve equations of the plurality of road contour lines to obtain the coordinate value of the road turning point in the pixel coordinate system;

[0017] Determining cubic curve equations of the plurality of road surface contour lines according to parameters of the cubic curve equations of the plurality of road surface contour lines;

[0018] Calculating the coordinate values ​​of the intersection points of the cubic curve equations of the plurality of road contour lines;

[0019] The coordinate value of the road vanishing point in the pixel coordinate system is obtained according to the intersection coordinate value.

[0020] Further, determining the road condition and the road parameter value according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road inflection point in the pixel coordinate system, and the coordinate value of the road vanishing point in the pixel coordinate system includes:

[0021] Obtaining a road vanishing point offset distance according to a coordinate value of the straight road vanishing point in the pixel coordinate system and a coordinate value of the road vanishing point in the pixel coordinate system;

[0022] Determining whether the road vanishing point offset distance is greater than a first threshold;

[0023] If it is not greater than the first threshold, the road ahead has no slope or curve;

[0024] If it is greater than the first threshold, determining whether the road vanishing point offset distance is greater than a second threshold or whether the road vanishing point offset distance is greater than a third threshold;

[0025] If it is greater than the second threshold, there is a left curve on the road ahead;

[0026] If it is not greater than the second threshold, determining whether the road vanishing point offset distance is greater than a fourth threshold;

[0027] If it is greater than the fourth threshold, there is a right curve on the road ahead;

[0028] If it is greater than the third threshold, there is an uphill slope on the road ahead;

[0029] If it is not greater than the third threshold, determining whether the road vanishing point offset distance is greater than a fifth threshold;

[0030] If it is greater than the fifth threshold, there is a downhill slope on the road ahead.

[0031] Further, determining the road condition and the road parameter value according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road inflection point in the pixel coordinate system, and the coordinate value of the road vanishing point in the pixel coordinate system includes:

[0032] Calculate a first slope value and a first curve value according to the coordinate value of the road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix;

[0033] Determine whether the first slope value is greater than 0;

[0034] If it is greater than 0, there is an uphill slope at the first distance from the turning point of the road to the autonomous driving vehicle, and the slope value of the uphill slope is the first slope value;

[0035] If it is not greater than 0, then there is a downhill slope at the first distance from the turning point of the road to the autonomous driving vehicle, and the slope value of the downhill slope is the opposite of the first slope value;

[0036] Determine whether the first curve value is greater than 0;

[0037] If it is greater than 0, there is a right curve at the first distance between the road turning point and the autonomous driving vehicle, and the curve value of the right curve is the first curve value;

[0038] If it is not greater than 0, there is a left curve at the first distance between the road turning point and the autonomous driving vehicle, and the curve value of the left curve is the opposite of the first curve value.

[0039] Furthermore, the first distance between the road turning point and the autonomous driving vehicle is obtained in the following manner:

[0040] Performing coordinate conversion on the coordinate value of the road turning point in the pixel coordinate system through the camera intrinsic parameter matrix and the camera extrinsic parameter matrix to obtain the coordinate value of the road turning point in the world coordinate system;

[0041] The first distance between the road turning point and the autonomous driving vehicle is determined according to the coordinate value of the road turning point in the world coordinate system.

[0042] Further, the camera extrinsic parameter matrix includes a rotation matrix and a translation matrix of a world coordinate system relative to a camera coordinate system, a camera pitch angle and a camera yaw angle are obtained according to the rotation matrix, and the camera intrinsic parameter matrix includes principal point coordinates and a focal length; the first slope value and the first curve value are calculated according to the coordinate value of the road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix, including:

[0043] The first slope value is calculated according to the following formula:

[0044] θ=arctan((V0-VP y ) / f y )-α

[0045] Wherein, θ is the first slope value, V0 is the ordinate value of the image center relative to the pixel coordinate system, and VP y is the ordinate value of the road vanishing point in the pixel coordinate system, f y is the number of pixels in the longitudinal direction with a length of f on the imaging plane with a focal length of f, and α is the pitch angle of the camera.

[0046] Furthermore, the calculating the first slope value and the first curve value according to the coordinate value of the road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix includes:

[0047] The first bend value is calculated according to the following formula:

[0048] γ=arctan((U0-VP x ) / f x )-β

[0049] Wherein, γ is the first bend value, U0 is the horizontal coordinate value of the image center relative to the pixel coordinate system, and VP x is the horizontal coordinate value of the road vanishing point in the pixel coordinate system, x is the number of pixels in the lateral direction of the length f on the imaging plane with the focal length f, and β is the yaw angle of the camera.

[0050] In a second aspect, an embodiment of the present invention provides a surface model fitting device based on monocular vision, the device comprising:

[0051] The camera calibration module is used to obtain the coordinate values ​​of the vanishing point of the straight road in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix;

[0052] A road segmentation module is used to collect road scene images and pass the road scene images through a fast road scene segmentation algorithm to obtain road scene segmentation points;

[0053] A road edge estimation module, used for screening the road scene segmentation points to obtain road pavement segmentation contour points;

[0054] A curve fitting module, used for performing curve fitting on the road surface segmentation contour points to obtain parameters of a cubic curve equation of a plurality of road surface contour lines;

[0055] A road turning point estimation module, used for calculating the coordinate value of the road turning point in the pixel coordinate system according to the parameters of the cubic curve equation of the plurality of road contour lines;

[0056] A road vanishing point estimation module, used to calculate the coordinate value of the road vanishing point in the pixel coordinate system according to the parameters of the cubic curve equation of the plurality of road contour lines;

[0057] The road model estimation module is used to determine the road condition and road parameter value according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road inflection point in the pixel coordinate system and the coordinate value of the road vanishing point in the pixel coordinate system.

[0058] In a third aspect, an embodiment of the present invention provides an electronic device, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor implements the method described above when executing the computer program.

[0059] In a fourth aspect, an embodiment of the present invention provides a computer-readable medium having a non-volatile program code executable by a processor, wherein the program code enables the processor to execute the method as described above.

[0060] The embodiment of the present invention provides a surface model fitting method and device based on monocular vision, including: obtaining the coordinate value of the vanishing point of a straight road in a pixel coordinate system, a camera intrinsic parameter matrix and a camera extrinsic parameter matrix; collecting a road scene image, and passing the road scene image through a fast road scene segmentation algorithm to obtain a road scene segmentation point; screening the road scene segmentation points to obtain road pavement segmentation contour points; curve fitting the road pavement segmentation contour points to obtain parameters of a cubic curve equation of multiple road pavement contour lines; calculating the coordinate value of the road turning point in the pixel coordinate system and the coordinate value of the road vanishing point in the pixel coordinate system according to the parameters of the cubic curve equation of the multiple road pavement contour lines; determining the road condition and road parameter values ​​according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road turning point in the pixel coordinate system and the coordinate value of the road vanishing point in the pixel coordinate system, thereby accurately estimating the surface model.

[0061] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0062] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0064] Figure 1 A flow chart of a surface model fitting method based on monocular vision provided in the first embodiment of the present invention;

[0065] Figure 2 This is a flow chart of step S106 in the surface model fitting method based on monocular vision provided in the first embodiment of the present invention;

[0066] Figure 3 A flowchart of step S106 in another surface model fitting method based on monocular vision provided in the first embodiment of the present invention;

[0067] Figure 4 A schematic diagram of a surface model fitting device based on monocular vision provided in the second embodiment of the present invention;

[0068] Figure 5 A schematic diagram of another surface model fitting device based on monocular vision provided in the second embodiment of the present invention.

[0069] icon:

[0070] 1- Camera calibration module; 2- Road surface segmentation module; 3- Road edge estimation module; 4- Curve fitting module; 5- Road turning point estimation module; 6- Road vanishing point estimation module; 7- Road model estimation module. DETAILED DESCRIPTION

[0071] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0072] To facilitate understanding of this embodiment, the embodiment of the present invention is described in detail below.

[0073] Embodiment 1:

[0074] Figure 1 This is a flow chart of a surface model fitting method based on monocular vision provided in Example 1 of the present invention.

[0075] Reference Figure 1 , the method comprises the following steps:

[0076] Step S101, obtaining the coordinate value of the vanishing point of the straight road in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix;

[0077] Here, the coordinate values ​​of the vanishing point on the straight road in the pixel coordinate system are mainly obtained by detecting the lane lines on the straight road based on the lane line detection algorithm, and then fitting the equation of the lane lines; the camera intrinsic parameter matrix and the camera extrinsic parameter matrix are mainly obtained based on the Zhang calibration method. The calibration of the above parameters is the static calibration of the camera on the straight road.

[0078] Step S102, collecting a road scene image, and applying a fast road scene segmentation algorithm to the road scene image to obtain a road scene segmentation point;

[0079] Here, the fast road scene segmentation algorithm is an algorithm based on the dilated convolution kernel and the Enet deep learning network. The road scene image is used as the input of the fast road scene segmentation algorithm, and the road scene segmentation points are obtained as output.

[0080] Step S103, screening the road scene segmentation points to obtain road pavement segmentation contour points;

[0081] Step S104, performing curve fitting on the road surface segmentation contour points to obtain parameters of cubic curve equations of multiple road surface contour lines;

[0082] Here, the curve fitting method may adopt an improved RANSAC algorithm, or may adopt a least square method, a Bezier curve fitting algorithm, etc. The improved RANSAC algorithm is taken as an example for description.

[0083] The road surface segmentation contour points are used as the input of the improved RANSAC algorithm, and cubic curve fitting is performed to obtain the parameters of the cubic curve equations of multiple road surface contour lines.

[0084] Based on the road pavement segmentation contour points, curve fitting is performed through the improved RANSAC algorithm, which can effectively improve the stability of road vanishing points.

[0085] Step S105, calculating the coordinate values ​​of the road turning points and the road vanishing points in the pixel coordinate system according to the parameters of the cubic curve equations of the plurality of road contour lines;

[0086] Specifically, since the fitted road contour line can reflect the road trend, especially when the straight road transitions to a curve or a ramp, the road contour line has an inflection point. The coordinate values ​​of the road inflection points in the pixel coordinate system are calculated according to the slope change rate of the parameters of the cubic curve equations of multiple road contour lines.

[0087] The cubic curve equations of the multiple road contour lines are constructed according to the parameters of the cubic curve equations of the multiple road contour lines, the cubic curve equations of the multiple road contour lines are solved to obtain the intersection coordinate values, and the coordinate values ​​of the road vanishing point in the pixel coordinate system are obtained according to the intersection coordinate values.

[0088] The road vanishing point may also be the vanishing point of other features, such as lane lines, electric poles, and road edges.

[0089] Step S106, determining the road condition and the road parameter value according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road turning point in the pixel coordinate system and the coordinate value of the road vanishing point in the pixel coordinate system.

[0090] Here, the coordinate value of the road turning point in the pixel coordinate system can also use the road features in the world coordinate system (such as lane lines, roadside edges, etc.) to fit a cubic curve, and the coordinate value of the road turning point in the pixel coordinate system is solved according to the characteristic values ​​of the cubic curve (such as the slope change rate, the curvature change rate, etc.).

[0091] Further, step S105 includes the following steps:

[0092] Step S201, calculating the slope change rate of the cubic curve equations of the plurality of road contour lines to obtain the coordinate values ​​of the road turning points in the pixel coordinate system;

[0093] Step S202, determining cubic curve equations of a plurality of road surface contour lines according to parameters of the cubic curve equations of the plurality of road surface contour lines;

[0094] Step S203, calculating the coordinate values ​​of the intersection points of the cubic curve equations of the plurality of road contour lines;

[0095] Step S204: obtaining the coordinate value of the road vanishing point in the pixel coordinate system according to the coordinate value of the intersection point.

[0096] Further, see Figure 2 , step S106 includes the following steps:

[0097] Step S301, obtaining a road vanishing point offset distance according to the coordinate value of the straight road vanishing point in the pixel coordinate system and the coordinate value of the road vanishing point in the pixel coordinate system;

[0098] Here, it is determined whether the road ahead is a curve or a slope according to the offset distance of the road vanishing point, and the first curve value and the second slope value and the corresponding position are solved. This method is simple and easy to implement.

[0099] Step S302, determining whether the road vanishing point offset distance is greater than a first threshold; if not greater than the first threshold, executing step S303; if greater than the first threshold, executing step S304;

[0100] Step S303: the road ahead has no slope or curve;

[0101] Step S304, determining whether the road vanishing point offset distance is greater than the second threshold or the road vanishing point offset distance is greater than the third threshold; if greater than the second threshold, executing step S305; if not greater than the second threshold, executing step S306; if greater than the third threshold, executing step S308; if not greater than the third threshold, executing step S309;

[0102] Step S305: There is a left curve on the road ahead;

[0103] Step S306, determining whether the road vanishing point offset distance is greater than a fourth threshold; if greater than the fourth threshold, executing step S307;

[0104] Step S307: There is a right curve on the road ahead;

[0105] Step S308: There is an uphill road ahead;

[0106] Step S309, determining whether the road vanishing point offset distance is greater than a fifth threshold; if greater than the fifth threshold, executing step S310;

[0107] Step S310: There is a downhill slope on the road ahead.

[0108] Further, see Figure 3 , step S106 includes the following steps:

[0109] Step S401, calculating a first slope value θ and a first curve value γ according to the coordinate value of the road vanishing point in the pixel coordinate system, a camera intrinsic parameter matrix and a camera extrinsic parameter matrix, wherein the camera extrinsic parameter matrix includes a camera pitch angle and a camera yaw angle, and the camera intrinsic parameter matrix includes a principal point coordinate and a focal length;

[0110] Step S402, determining whether the first slope value θ is greater than 0; if greater than 0, executing step S403; if not greater than 0, executing step S404;

[0111] Step S403: There is an uphill road at a first distance S from the turning point of the road to the autonomous driving vehicle, and the slope value of the uphill road is a first slope value θ;

[0112] Step S404: There is a downhill slope at a first distance S between the turning point of the road and the autonomous driving vehicle, and the slope value of the downhill slope is the opposite number (-θ) of the first slope value;

[0113] Step S405, determining whether the first curve value γ is greater than 0; if greater than 0, executing step S406; if not greater than 0, executing step S407;

[0114] Step S406: There is a right curve at a first distance S between the turning point of the road and the autonomous driving vehicle, and the curve value of the right curve is a first curve value γ;

[0115] Step S407: There is a left curve at a first distance S between the turning point of the road and the autonomous driving vehicle, and the curve value of the left curve is the opposite of the first curve value (-γ).

[0116] Among them, the slope is positive for an uphill slope and negative for a downhill slope; the curve is negative for a left curve and positive for a right curve.

[0117] Further, see Figure 3The first distance between the turning point of the road and the autonomous driving vehicle is obtained by the following method, which specifically includes the following steps:

[0118] Step S501, performing coordinate conversion on the coordinate value of the road turning point in the pixel coordinate system through the camera intrinsic parameter matrix and the camera extrinsic parameter matrix to obtain the coordinate value of the road turning point in the world coordinate system;

[0119] Here, the coordinate value of the road turning point in the world coordinate system is the turning point position of the real road. Through the above coordinate conversion, dependence on too much input can be avoided.

[0120] Step S502: determining a first distance S between the road turning point and the autonomous driving vehicle according to the coordinate value of the road turning point in the world coordinate system.

[0121] Furthermore, the camera external parameter matrix includes a rotation matrix and a translation matrix of the world coordinate system relative to the camera coordinate system, the camera pitch angle and the camera yaw angle are obtained according to the rotation matrix, and the camera internal parameter matrix includes the principal point coordinates and the focal length; step S401 includes:

[0122] The first slope value is calculated according to formula (1):

[0123] θ=arctan((V0-VP y ) / f y )-α

[0124] Among them, θ is the first slope value, V0 is the ordinate value of the image center relative to the pixel coordinate system, and VP y is the vertical coordinate value of the road vanishing point in the pixel coordinate system, f y is the number of pixels in the longitudinal direction with a length of f on the imaging plane with a focal length of f, and α is the camera pitch angle.

[0125] Furthermore, step S401 includes:

[0126] Calculate the first curve value according to formula (2):

[0127] γ=arctan((U0-VP x ) / f x )-β

[0128] Among them, γ is the first bend value, U0 is the horizontal coordinate value of the image center relative to the pixel coordinate system, and VP x is the horizontal coordinate value of the road vanishing point in the pixel coordinate system, f x is the number of pixels in the lateral direction with a length of f on the imaging plane with a focal length of f, and β is the camera yaw angle.

[0129] The embodiment of the present invention provides a surface model fitting method based on monocular vision, including: obtaining the coordinate value of the vanishing point of a straight road in a pixel coordinate system, a camera intrinsic parameter matrix and a camera extrinsic parameter matrix; collecting a road scene image, passing the road scene image through a fast road scene segmentation algorithm to obtain a road scene segmentation point; screening the road scene segmentation points to obtain road pavement segmentation contour points; curve fitting the road pavement segmentation contour points to obtain parameters of a cubic curve equation of multiple pavement contour lines; calculating the coordinate value of the road turning point in the pixel coordinate system and the coordinate value of the road vanishing point in the pixel coordinate system according to the parameters of the cubic curve equation of the multiple pavement contour lines; determining the road condition and the road parameter value according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road turning point in the pixel coordinate system and the coordinate value of the road vanishing point in the pixel coordinate system, thereby accurately estimating the surface model.

[0130] Embodiment 2:

[0131] Figure 4 Schematic diagram of a surface model fitting device based on monocular vision provided in Example 2 of the present invention.

[0132] Reference Figure 4 The device comprises: a camera calibration module 1, a road segmentation module 2, a road edge estimation module 3, a curve fitting module 4, a road inflection point estimation module 5, a road vanishing point estimation module 6 and a road model estimation module 7;

[0133] Reference Figure 5 , a camera calibration module 1, used to obtain the coordinate value of the vanishing point of the straight road in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix;

[0134] The road segmentation module 2 is used to collect road scene images and pass the road scene images through a fast road scene segmentation algorithm to obtain road scene segmentation points;

[0135] The road edge estimation module 3 is used to screen the road scene segmentation points to obtain the road surface segmentation contour points;

[0136] The curve fitting module 4 is used to perform curve fitting on the road surface segmentation contour points to obtain the parameters of the cubic curve equation of multiple road surface contour lines;

[0137] A road turning point estimation module 5, used to calculate the coordinate value of the road turning point in the pixel coordinate system according to the parameters of the cubic curve equation of multiple road contour lines;

[0138] A road vanishing point estimation module 6, used to calculate the coordinate value of the road vanishing point in the pixel coordinate system according to the parameters of the cubic curve equation of the plurality of road contour lines;

[0139] The road model estimation module 7 is used to determine the road condition and road parameter values ​​according to the coordinate values ​​of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate values ​​of the road turning point in the pixel coordinate system and the coordinate values ​​of the road vanishing point in the pixel coordinate system.

[0140] The embodiment of the present invention provides a surface model fitting device based on monocular vision, comprising: obtaining the coordinate value of a straight road vanishing point in a pixel coordinate system, a camera intrinsic parameter matrix and a camera extrinsic parameter matrix; collecting a road scene image, and passing the road scene image through a fast road scene segmentation algorithm to obtain a road scene segmentation point; screening the road scene segmentation points to obtain road pavement segmentation contour points; curve fitting the road pavement segmentation contour points to obtain parameters of a cubic curve equation of a plurality of pavement contour lines; calculating the coordinate value of a road turning point in a pixel coordinate system and the coordinate value of a road vanishing point in a pixel coordinate system according to the parameters of the cubic curve equation of the plurality of pavement contour lines; determining a road condition and a road parameter value according to the coordinate value of a straight road vanishing point in a pixel coordinate system, a camera intrinsic parameter matrix, a camera extrinsic parameter matrix, the coordinate value of a road turning point in a pixel coordinate system and the coordinate value of a road vanishing point in a pixel coordinate system, thereby accurately estimating a surface model.

[0141] An embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the surface model fitting method based on monocular vision provided in the above embodiment are implemented.

[0142] An embodiment of the present invention also provides a computer-readable medium having a non-volatile program code executable by a processor, wherein a computer program is stored on the computer-readable medium, and when the computer program is executed by the processor, the steps of the surface model fitting method based on monocular vision of the above embodiment are executed.

[0143] The computer program product provided in the embodiment of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method described in the previous method embodiment. The specific implementation can be found in the method embodiment and will not be repeated here.

[0144] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0145] In addition, in the description of the embodiments of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0146] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0147] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying 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, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0148] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The protection scope of the present invention is not limited thereto. Although the present invention is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed by the present invention, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A surface model fitting method based on monocular vision, characterized in that: The method comprises: Get the coordinates of the vanishing point of the straight road in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix; Collecting a road scene image, and applying a fast road scene segmentation algorithm to the road scene image to obtain a road scene segmentation point; Screening the road scene segmentation points to obtain road pavement segmentation contour points; Performing curve fitting on the road surface segmentation contour points to obtain parameters of cubic curve equations of multiple road surface contour lines; Calculating the coordinate values ​​of the road turning point and the road vanishing point in the pixel coordinate system according to the parameters of the cubic curve equations of the plurality of road contour lines; The road condition and the road parameter value are determined according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road inflection point in the pixel coordinate system, and the coordinate value of the road vanishing point in the pixel coordinate system.

2. The surface model fitting method based on monocular vision according to claim 1, characterized in that: The step of calculating the coordinate values ​​of the road turning point and the road vanishing point in the pixel coordinate system according to the parameters of the cubic curve equations of the plurality of road contour lines comprises: Calculating the slope change rate of the cubic curve equations of the plurality of road contour lines to obtain the coordinate value of the road turning point in the pixel coordinate system; Determining cubic curve equations of the plurality of road surface contour lines according to parameters of the cubic curve equations of the plurality of road surface contour lines; Calculating the coordinate values ​​of the intersection points of the cubic curve equations of the plurality of road contour lines; The coordinate value of the road vanishing point in the pixel coordinate system is obtained according to the intersection coordinate value.

3. The surface model fitting method based on monocular vision according to claim 1, characterized in that: The determining of the road condition and the road parameter value according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road inflection point in the pixel coordinate system, and the coordinate value of the road vanishing point in the pixel coordinate system comprises: Obtaining a road vanishing point offset distance according to a coordinate value of the straight road vanishing point in the pixel coordinate system and a coordinate value of the road vanishing point in the pixel coordinate system; Determining whether the road vanishing point offset distance is greater than a first threshold; If it is not greater than the first threshold, the road ahead has no slope or curve; If it is greater than the first threshold, determining whether the road vanishing point offset distance is greater than a second threshold or whether the road vanishing point offset distance is greater than a third threshold; If it is greater than the second threshold, there is a left curve on the road ahead; If it is not greater than the second threshold, determining whether the road vanishing point offset distance is greater than a fourth threshold; If it is greater than the fourth threshold, there is a right curve on the road ahead; If it is greater than the third threshold, there is an uphill slope on the road ahead; If it is not greater than the third threshold, determining whether the road vanishing point offset distance is greater than a fifth threshold; If it is greater than the fifth threshold, there is a downhill slope on the road ahead.

4. The surface model fitting method based on monocular vision according to claim 1, characterized in that: The determining of the road condition and the road parameter value according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road inflection point in the pixel coordinate system, and the coordinate value of the road vanishing point in the pixel coordinate system comprises: Calculate a first slope value and a first curve value according to the coordinate value of the road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix; Determine whether the first slope value is greater than 0; If it is greater than 0, there is an uphill slope at the first distance from the turning point of the road to the autonomous driving vehicle, and the slope value of the uphill slope is the first slope value; If it is not greater than 0, then there is a downhill slope at the first distance from the turning point of the road to the autonomous driving vehicle, and the slope value of the downhill slope is the opposite of the first slope value; Determine whether the first curve value is greater than 0; If it is greater than 0, there is a right curve at the first distance between the road turning point and the autonomous driving vehicle, and the curve value of the right curve is the first curve value; If it is not greater than 0, there is a left curve at the first distance between the road turning point and the autonomous driving vehicle, and the curve value of the left curve is the opposite of the first curve value.

5. The surface model fitting method based on monocular vision according to claim 4 is characterized in that: The first distance between the road turning point and the autonomous driving vehicle is obtained in the following manner: Performing coordinate conversion on the coordinate value of the road turning point in the pixel coordinate system through the camera intrinsic parameter matrix and the camera extrinsic parameter matrix to obtain the coordinate value of the road turning point in the world coordinate system; The first distance between the road turning point and the autonomous driving vehicle is determined according to the coordinate value of the road turning point in the world coordinate system.

6. The surface model fitting method based on monocular vision according to claim 4 is characterized in that: The camera extrinsic parameter matrix includes a rotation matrix and a translation matrix of a world coordinate system relative to a camera coordinate system, a camera pitch angle and a camera yaw angle are obtained according to the rotation matrix, and the camera intrinsic parameter matrix includes principal point coordinates and a focal length; the first slope value and the first curve value are calculated according to the coordinate value of the road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix, including: The first slope value is calculated according to the following formula: θ=arctan((V0-VP y ) / f y )-α Wherein, θ is the first slope value, V0 is the ordinate value of the image center relative to the pixel coordinate system, and VP y is the ordinate value of the road vanishing point in the pixel coordinate system, f y is the number of pixels in the longitudinal direction with a length of f on the imaging plane with a focal length of f, and α is the pitch angle of the camera.

7. The surface model fitting method based on monocular vision according to claim 6, characterized in that: The calculating the first slope value and the first curve value according to the coordinate value of the road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix includes: The first bend value is calculated according to the following formula: γ=arctan((U0-VP x ) / f x )-β Wherein, γ is the first bend value, U0 is the horizontal coordinate value of the image center relative to the pixel coordinate system, and VP x is the horizontal coordinate value of the road vanishing point in the pixel coordinate system, x is the number of pixels in the lateral direction of the length f on the imaging plane with the focal length f, and β is the yaw angle of the camera.

8. A surface model fitting device based on monocular vision, characterized in that: The device comprises: The camera calibration module is used to obtain the coordinate values ​​of the vanishing point of the straight road in the pixel coordinate system, the camera intrinsic parameter matrix and the camera extrinsic parameter matrix; A road segmentation module is used to collect road scene images and pass the road scene images through a fast road scene segmentation algorithm to obtain road scene segmentation points; A road edge estimation module, used for screening the road scene segmentation points to obtain road pavement segmentation contour points; A curve fitting module, used for performing curve fitting on the road surface segmentation contour points to obtain parameters of a cubic curve equation of a plurality of road surface contour lines; A road turning point estimation module, used for calculating the coordinate value of the road turning point in the pixel coordinate system according to the parameters of the cubic curve equation of the plurality of road contour lines; A road vanishing point estimation module, used to calculate the coordinate value of the road vanishing point in the pixel coordinate system according to the parameters of the cubic curve equation of the plurality of road contour lines; The road model estimation module is used to determine the road condition and road parameter value according to the coordinate value of the straight road vanishing point in the pixel coordinate system, the camera intrinsic parameter matrix, the camera extrinsic parameter matrix, the coordinate value of the road inflection point in the pixel coordinate system and the coordinate value of the road vanishing point in the pixel coordinate system.

9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

10. A computer readable medium having a non-volatile program code executable by a processor, characterized in that: The program code enables the processor to execute the method according to any one of claims 1 to 7.