CN115511938A - Height determining method and device based on monocular camera - Google Patents

Height determining method and device based on monocular camera Download PDF

Info

Publication number
CN115511938A
CN115511938A CN202211364431.7A CN202211364431A CN115511938A CN 115511938 A CN115511938 A CN 115511938A CN 202211364431 A CN202211364431 A CN 202211364431A CN 115511938 A CN115511938 A CN 115511938A
Authority
CN
China
Prior art keywords
point
pixel
lane line
ramp
road image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211364431.7A
Other languages
Chinese (zh)
Inventor
陈睐
杨维民
周艳宗
韩华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingzhi Automobile Technology Suzhou Co ltd
Original Assignee
Qingzhi Automobile Technology Suzhou Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qingzhi Automobile Technology Suzhou Co ltd filed Critical Qingzhi Automobile Technology Suzhou Co ltd
Priority to CN202211364431.7A priority Critical patent/CN115511938A/en
Publication of CN115511938A publication Critical patent/CN115511938A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/50Depth or shape recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30248Vehicle exterior or interior
    • G06T2207/30252Vehicle exterior; Vicinity of vehicle
    • G06T2207/30256Lane; Road marking

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Traffic Control Systems (AREA)

Abstract

The application discloses a height determining method and device based on a monocular camera. Wherein, the method comprises the following steps: acquiring a road image of a road on which a target vehicle runs; according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system, the height information of the first point is obtained, slope identification can be completed through the camera, and the technical problem of high cost of slope identification in the related technology can be solved.

Description

Height determining method and device based on monocular camera
Technical Field
The application relates to the field of automatic driving, in particular to a height determining method and device based on a monocular camera.
Background
With the continuous development of the field of automatic driving, the requirement of perception capability on the target is increased. Particularly, when the driver drives a road section with a slope, if the slope information of the front road can be accurately calculated in real time, the driver can know the surrounding environment in time, and the driver can drive the vehicle more safely and stably.
At present, although a laser radar and a 4D millimeter wave radar can measure point cloud data with gradient information, the point cloud data is too large in amount, and the calculation cost and the equipment cost are high, so that the point cloud data is difficult to popularize. In the monocular-camera-based perception, due to the imaging, depth information is lacked, so that gradient information is difficult to obtain directly, and in the existing target positioning method, the road surface is assumed to be a plane, so that certain deviation exists in target positioning based on the monocular camera in a road scene with a gradient, and subsequent links such as function decision, regulation and control are influenced.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a height determining method and device based on a monocular camera, and aims to at least solve the technical problem that the cost of gradient identification in the related technology is high.
According to an aspect of the embodiments of the present application, there is provided a height determining method based on a monocular camera, including: acquiring a road image of a road on which a target vehicle runs; and obtaining the height information of the first point according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system.
Optionally, before obtaining the height information of the first point according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the slope in the world coordinate system, the method further includes: obtaining an angle value corresponding to the longitudinal coordinate of the pixel point from the road image; and obtaining the longitudinal distance of the first point on the ramp under a world coordinate system according to the road image.
Optionally, obtaining an angle value corresponding to a longitudinal coordinate of a pixel point from the road image includes: determining the angular range of the camera of the target vehicle in the pitching direction according to the resolution of the road image
Figure BDA0003923631470000011
Wherein imgH is the pixel height of the road image, f is the focal length of the camera, atan () is an arctan function; obtaining an angle value radPerPixel = V corresponding to the longitudinal coordinate of the pixel in the road image according to the angle range VFOVFOV/imgH。
Optionally, obtaining a longitudinal distance of a first point on the ramp in a world coordinate system according to the road image includes: carrying out lane line detection on the road image by using a lane line detection model to obtain lane line point cloud data; performing linear fitting on the point cloud data of the lane line of the target lane to obtain a lane line equation under a pixel coordinate system; according to the lane line equation, calculating the distance between a point on the lane line and the lane line, and determining the point with the distance value change larger than the distance threshold value as the starting point of the ramp; respectively fitting the left lane line and the right lane line of the ramp by taking the starting point of the ramp as a starting point to obtain a fitting equation of the left lane line and a fitting equation of the right lane line; determining coordinates (u) of a first point using the fitted equation of the left lane line and the fitted equation of the right lane line i ,v i ) And the coordinates (u) of the second point j ,v j ) Wherein the first point is an intersection of a horizontal line on the ramp and a left lane line, and the second point is an intersection of a horizontal line on the ramp and a right lane line; acquiring a lane pixel width value at the horizontal line by using the coordinates of the first point and the coordinates of the second point; and obtaining the longitudinal distance of the horizontal line under a world coordinate system according to the lane pixel width value by using a pinhole imaging principle.
Optionally, after obtaining the longitudinal distance at the horizontal line in the world coordinate system according to the lane pixel width value by using a pinhole imaging principle, the method further includes: mapping the calculated longitudinal distance to a pixel coordinate system through coordinate conversion to obtain a pixel coordinate corresponding to the first point; the pixel coordinate value v obtained by mapping x And the detected pixel coordinate value v i Subtracting to obtain a coordinate difference value v d
Optionally, obtaining height information of the first point according to an angle value corresponding to a longitudinal coordinate of a pixel point obtained from the road image and a longitudinal distance of the first point on the slope in a world coordinate system, where the angle value includes: according to the angle value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image, the rampLongitudinal distance L of the first point on the world coordinate system x And coordinate difference v d And obtaining height information H of the first point:
H=L x *tan(θ),θ=v d *radPerPixel。
optionally, the longitudinal distance L of the first point on the ramp in the world coordinate system is the longitudinal distance L of the first point on the ramp according to the angle value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image x And coordinate difference v d After obtaining the height information H of the first point, the method further includes: and according to the longitudinal distance of the first point on the ramp under the world coordinate system and the distance difference between the point on the lane line and the central axis of the picture, calculating the transverse position information of the point on the ramp under the world coordinate system.
According to another aspect of the embodiments of the present application, there is also provided a monocular camera-based height determining apparatus, including: the acquisition unit is used for acquiring a road image of a road on which a target vehicle runs; and the determining unit is used for obtaining the height information of the first point according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system.
Optionally, the determining unit is further configured to: before obtaining the height information of a first point under a world coordinate system according to an angle value corresponding to a longitudinal coordinate of a pixel point obtained from the road image and the longitudinal distance of the first point on a ramp, obtaining an angle value corresponding to the longitudinal coordinate of the pixel point from the road image; and obtaining the longitudinal distance of the first point on the ramp in the world coordinate system according to the road image.
Optionally, the determining unit is further configured to: determining the angular range of the camera of the target vehicle in the pitching direction according to the resolution of the road image
Figure BDA0003923631470000021
Wherein imgH is the pixel height of the road image, f is the focal length of the camera, atan () is an arctan function; obtaining the road according to the angle range VFOVThe angular value radPerPixel = VFOV/imgH to which the longitudinal coordinates of the pixel in the image correspond.
Optionally, the determining unit is further configured to: carrying out lane line detection on the road image by using a lane line detection model to obtain lane line point cloud data; performing linear fitting on the point cloud data of the lane line of the target lane to obtain a lane line equation under a pixel coordinate system; calculating the distance between a point on the lane line and the lane line according to the lane line equation, and determining the point with the distance value change larger than the distance threshold value as a ramp starting point; respectively fitting the left lane line and the right lane line of the ramp by taking the starting point of the ramp as a starting point to obtain a fitting equation of the left lane line and a fitting equation of the right lane line; determining coordinates (u) of a first point using the fitted equation of the left lane line and the fitted equation of the right lane line i ,v i ) And coordinates (u) of the second point j ,v j ) Wherein the first point is an intersection of a horizontal line on the ramp and a left lane line, and the second point is an intersection of a horizontal line on the ramp and a right lane line; acquiring a lane pixel width value at the horizontal line by using the coordinates of the first point and the coordinates of the second point; and obtaining the longitudinal distance of the horizontal line under the world coordinate system according to the lane pixel width value by using a pinhole imaging principle.
Optionally, the determining unit is further configured to: after the longitudinal distance at the horizontal line under a world coordinate system is obtained according to the lane pixel width value by using a pinhole imaging principle, mapping the calculated longitudinal distance under a pixel coordinate system through coordinate conversion to obtain a pixel coordinate corresponding to the first point; the pixel coordinate value v obtained by mapping x And the detected pixel coordinate value v i Subtracting to obtain a coordinate difference value v d
Optionally, the determining unit is further configured to: according to the angle value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance L of the first point on the ramp in the world coordinate system x And coordinate difference v d And obtaining the height information H of the first point:
H=L x *tan(θ),θ=v d *radPerPixel。
optionally, the determining unit is further configured to: according to the angle value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance L of the first point on the ramp in the world coordinate system x And coordinate difference v d And after the height information H of the first point is obtained, calculating the transverse position information of the point on the ramp under the world coordinate system according to the longitudinal distance of the first point on the ramp under the world coordinate system and the distance difference between the point on the lane line and the central axis of the picture.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method described above through the computer program.
According to an aspect of the application, a computer program product or computer program is provided, comprising computer instructions, the computer instructions being stored in a computer readable storage medium. The computer instructions are read by a processor of the computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps of any one of the above-described embodiments of the method.
By applying the technical scheme of the invention, the road image of the road on which the target vehicle runs is collected; according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system, the height information of the first point is obtained, slope identification can be completed through the camera, and the technical problem of high cost of slope identification in the related technology can be solved.
In addition to the objects, features and advantages described above, other objects, features and advantages of the present invention are also provided. The present invention will be described in further detail below with reference to the drawings.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a flow chart of an alternative monocular camera-based altitude determination method according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an alternative pixel width value according to an embodiment of the present application;
fig. 3 is a schematic diagram of an alternative monocular camera-based height determining device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The utility model aims at providing a road slope estimation scheme based on monocular camera can calculate the slope information of road based on the lane line information of the detection of monocular camera to can solve the unable low-cost of current sensor, the problem of the quick accurate prediction vehicle place ahead road slope.
According to an aspect of embodiments of the present application, an embodiment of a height determining method based on a monocular camera is provided. The height determining method based on the monocular camera can be executed by a server and a terminal. The terminal executing the monocular camera-based height determining method according to the embodiment of the present application may also be executed by a client installed thereon. Fig. 1 is a flowchart of an optional monocular camera-based height determining method according to an embodiment of the present application, and as shown in fig. 1, the method may include the following steps:
step S102, collecting a road image of a road on which the target vehicle runs.
And step S104, obtaining the height information of the first point according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system.
Optionally, before obtaining the height information of the first point according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the slope in the world coordinate system, the method further includes: obtaining an angle value corresponding to the longitudinal coordinate of the pixel point from the road image; and obtaining the longitudinal distance of the first point on the ramp under a world coordinate system according to the road image.
Optionally, obtaining an angle value corresponding to a longitudinal coordinate of a pixel point from the road image includes: determining the angular range of the camera of the target vehicle in the pitching direction according to the resolution of the road image
Figure BDA0003923631470000051
Wherein imgH is the pixel height of the road image, f is the focal length of the camera, atan () is an arctan function; and obtaining an angle value radPerPixel = VFOV/imgH corresponding to the longitudinal coordinate of the pixel in the road image according to the angle range VFOV.
Optionally, obtaining a longitudinal distance of a first point on the ramp in a world coordinate system according to the road image includes: carrying out lane line detection on the road image by using a lane line detection model to obtain lane line point cloud data; performing linear fitting on the point cloud data of the lane line of the target lane to obtain a lane line equation under a pixel coordinate system; according to the lane line equation, calculating the distance between a point on the lane line and the lane line, and determining the point with the distance value change larger than the distance threshold value as the starting point of the ramp; respectively fitting a left lane line and a right lane line of the ramp by taking the starting point of the ramp as a starting point to obtain a fitting equation of the left lane line and a fitting equation of the right lane line; determining coordinates (u) of a first point using the fitted equation of the left lane line and the fitted equation of the right lane line i ,v i ) And the coordinates (u) of the second point j ,v j ) Wherein the first point is an intersection of a horizontal line on the ramp and a left lane line, and the second point is an intersection of a horizontal line on the ramp and a right lane line; acquiring a lane pixel width value at the horizontal line by using the coordinates of the first point and the coordinates of the second point; and obtaining the longitudinal distance of the horizontal line under a world coordinate system according to the lane pixel width value by using a pinhole imaging principle.
Optionally, after obtaining the longitudinal distance at the horizontal line in the world coordinate system according to the lane pixel width value by using a pinhole imaging principle, the method further includes: mapping the calculated longitudinal distance to a pixel coordinate system through coordinate conversion to obtain a pixel coordinate corresponding to the first point; the pixel coordinate value v obtained by mapping x And the detected pixel coordinate value v i Subtracting to obtain a coordinate difference value v d
Optionally, obtaining height information of the first point according to an angle value corresponding to a longitudinal coordinate of a pixel point obtained from the road image and a longitudinal distance of the first point on the slope in a world coordinate system, where the angle value includes: according to the angle value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the first angle value radPerPixel on the rampLongitudinal distance L of point in world coordinate system x And coordinate difference v d And obtaining the height information H of the first point:
H=L x *tan(θ),θ=v d *radPerPixel。
optionally, a longitudinal distance L of a first point on a ramp in a world coordinate system is determined according to an angle value radPerPixel corresponding to a longitudinal coordinate of a pixel point obtained from the road image x And coordinate difference v d After obtaining the height information H of the first point, the method further includes: and according to the longitudinal distance of the first point on the ramp under the world coordinate system and the distance difference between the point on the lane line and the central axis of the picture, calculating the transverse position information of the point on the ramp under the world coordinate system.
Acquiring a road image of a road on which a target vehicle runs through the steps; according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system, the height information of the first point is obtained, slope identification can be completed through the camera, and the technical problem of high cost of slope identification in the related technology can be solved.
As an alternative embodiment, the following detailed description of the technical solution of the present application is provided with reference to fig. 2 and the detailed steps:
s1, calibrating internal and external parameters of the monocular camera, and acquiring lane line image information of a road surface.
Step S2, calculating the angle range of the camera in the pitching direction according to the resolution of the image, wherein the formula is as follows:
Figure BDA0003923631470000061
where VFOV is the angular range of pitch, imgH is the height of the image, and f is the focal length.
And S3, obtaining an angle value corresponding to each longitudinal pixel coordinate according to the calculated angle range VFOV, wherein the formula is as follows:
radPerPixel=VFOV/imgH。
and S4, carrying out lane line detection on the road image by using a lane line detection model according to the acquired image information to obtain lane line point cloud data.
Step S5, one lane line S of the lane is taken 1 And performing linear fitting on the point cloud of the lane line at the bottom of the picture to obtain a lane line equation under a pixel coordinate system.
And S6, calculating the distance from the point on the acquired lane line to the lane line according to the fitted lane line equation, and judging the point with the distance change larger than the distance threshold value as the starting point position of the ramp according to the distance numerical value change.
And S7, respectively fitting the left lane line and the right lane line by taking the starting point of the ramp as the starting point to obtain a fitting equation.
Step S8, starting from the starting point, finding S 1 First point (u) on i ,v i ) The horizontal line and the other lane line S 2 Point of intersection (u) j ,v j ) (i.e., the second point) and calculating the pixel width value between the two points, i.e., the pixel width value L of the lane line at the point p As shown in fig. 2.
Step S9: according to the pixel width obtained in the step S8 and the pinhole imaging principle, longitudinal distance information L under the world coordinate system can be obtained x The formula is as follows:
Figure BDA0003923631470000062
wherein L is w Is the true width of the lane line.
Step S10, mapping the calculated longitudinal distance to a pixel coordinate system through coordinate conversion to obtain a corresponding pixel coordinate (u) x ,v x ) The formula is as follows:
Figure BDA0003923631470000063
wherein R is a rotation matrix and T is a flatShift matrix, X w 、Y w 、Z w Which is the position of the target in the world coordinate system, lambda represents a scaling factor,
Figure BDA0003923631470000064
is an internal reference matrix, f x Is to use pixels to describe the length of the focal length in the x-axis direction, f y Is to describe the length of the focal length in the y-axis direction using pixels (u) 0 ,v 0 ) I.e. the actual position of the main point, the unit is also a pixel.
Step S11, the mapped pixel v x And detecting the resulting pixel v i Subtracting to obtain a difference value v d
Step S12, according to the radPerPixel obtained in step S3 and the L obtained in step S9 x V obtained in step S11 d The height information of the corresponding position can be obtained, and the formula is as follows:
θ=v d ·radPerPixel,
H=L x ·tan(θ)。
step S13: furthermore, L obtained from step S9 x Calculating the difference value of the distance between the lane line point and the middle axis of the picture, and calculating the transverse position information x of the point on the ramp under the world coordinate system w The formula is as follows:
Figure BDA0003923631470000071
x p =u-0.5·imgW,
where imgW is the image width.
By adopting the technical scheme, the gradient information under the straight road condition can be obtained in real time only by one monocular camera and less calculation force; in the actual driving process, the subsequent target detection and positioning can be corrected, and the perception capability of the monocular camera is improved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present application or portions thereof that contribute to the prior art may be embodied in the form of a software product, where the computer software product is stored in a storage medium (such as a ROM/RAM, a magnetic disk, and an optical disk), and includes several instructions for enabling a terminal device (which may be a mobile phone, a computer, a server, or a network device) to execute the method described in the embodiments of the present application.
According to another aspect of the embodiments of the present application, there is also provided a monocular camera based height determining apparatus for implementing the above monocular camera based height determining method. Fig. 3 is a schematic diagram of an alternative monocular camera-based height determining apparatus according to an embodiment of the present application, and as shown in fig. 3, the apparatus may include:
the acquisition unit 31 is used for acquiring a road image of a road on which a target vehicle runs; the determining unit 33 is configured to obtain height information of the first point according to an angle value corresponding to a longitudinal coordinate of the pixel point obtained from the road image and a longitudinal distance of the first point on the slope in the world coordinate system.
Optionally, the determining unit is further configured to: before obtaining the height information of a first point under a world coordinate system according to an angle value corresponding to a longitudinal coordinate of a pixel point obtained from the road image and the longitudinal distance of the first point on a ramp, obtaining an angle value corresponding to the longitudinal coordinate of the pixel point from the road image; and obtaining the longitudinal distance of the first point on the ramp under a world coordinate system according to the road image.
Optionally, the determining unit is further configured to: determining the angular range of the camera of the target vehicle in the pitching direction according to the resolution of the road image
Figure BDA0003923631470000081
Wherein imgH is the pixel height of the road image, f is the focal length of the camera, atan () is an arctan function; and obtaining an angle value radPerPixel = VFOV/imgH corresponding to the longitudinal coordinate of the pixel in the road image according to the angle range VFOV.
Optionally, the determining unit is further configured to: carrying out lane line detection on the road image by using a lane line detection model to obtain lane line point cloud data; performing linear fitting on the point cloud data of the lane line of the target lane to obtain a lane line equation under a pixel coordinate system; calculating the distance between a point on the lane line and the lane line according to the lane line equation, and determining the point with the distance value change larger than the distance threshold value as a ramp starting point; respectively fitting the left lane line and the right lane line of the ramp by taking the starting point of the ramp as a starting point to obtain a fitting equation of the left lane line and a fitting equation of the right lane line; determining coordinates (u) of a first point using the fitted equation of the left lane line and the fitted equation of the right lane line i ,v i ) And the coordinates (u) of the second point j ,v j ) Wherein the first point is an intersection of a horizontal line on the ramp and a left lane line, and the second point is an intersection of a horizontal line on the ramp and a right lane line; acquiring a lane pixel width value at the horizontal line by using the coordinates of the first point and the coordinates of the second point; and obtaining the longitudinal distance of the horizontal line under the world coordinate system according to the lane pixel width value by using a pinhole imaging principle.
Optionally, the determining unit is further configured to: obtaining the longitudinal distance of the horizontal line under the world coordinate system according to the lane pixel width value by using the pinhole imaging principle, mapping the calculated longitudinal distance under the pixel coordinate system through coordinate conversion to obtain the pixel corresponding to the first pointCoordinates; the pixel coordinate value v obtained by mapping x And the detected pixel coordinate value v i Subtracting to obtain a coordinate difference value v d
Optionally, the determining unit is further configured to: according to the angle value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance L of the first point on the ramp in the world coordinate system x And coordinate difference v d And obtaining the height information H of the first point:
H=L x *tan(θ),θ=v d *radPerPixel。
optionally, the determining unit is further configured to: according to the angle value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance L of the first point on the ramp in the world coordinate system x And coordinate difference v d And after the height information H of the first point is obtained, calculating the transverse position information of the point on the ramp under the world coordinate system according to the longitudinal distance of the first point on the ramp under the world coordinate system and the distance difference between the point on the lane line and the central axis of the picture.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above method through the computer program.
According to an aspect of the application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the steps of any of the embodiments of the method described above.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment is not described herein again.
Optionally, in this embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
The integrated unit in the above embodiments, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in the above computer-readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including instructions for causing one or more computer devices (which may be personal computers, servers, network devices, or the like) to execute all or part of the steps of the method described in the embodiments of the present application.
In the embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
In the several embodiments provided in the present application, it should be understood that the disclosed client may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The foregoing is only a preferred embodiment of the present application and it should be noted that, as will be apparent to those skilled in the art, numerous modifications and adaptations can be made without departing from the principles of the present application and such modifications and adaptations are intended to be considered within the scope of the present application.

Claims (10)

1. A height determination method based on a monocular camera is characterized by comprising the following steps:
acquiring a road image of a road on which a target vehicle runs;
and obtaining the height information of the first point according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system.
2. The method according to claim 1, wherein before obtaining the height information of the first point in the world coordinate system according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system, the method further comprises:
obtaining an angle value corresponding to the longitudinal coordinate of the pixel point from the road image;
and obtaining the longitudinal distance of the first point on the ramp under a world coordinate system according to the road image.
3. The method of claim 2, wherein obtaining the angle value corresponding to the vertical coordinate of the pixel point from the road image comprises:
determining the angular range of the camera of the target vehicle in the pitching direction according to the resolution of the road image
Figure FDA0003923631460000011
Figure FDA0003923631460000012
Wherein imgH is the pixel height of the road image, f is the focal length of the camera, atan () is an arctan function;
and obtaining an angle value radPerPixel = VFOV/imgH corresponding to the longitudinal coordinate of the pixel in the road image according to the angle range VFOV.
4. The method of claim 2, wherein deriving a longitudinal distance of a first point on the ramp in a world coordinate system from the road image comprises:
carrying out lane line detection on the road image by using a lane line detection model to obtain lane line point cloud data;
performing linear fitting on the point cloud data of the lane line of the target lane to obtain a lane line equation under a pixel coordinate system;
calculating the distance between a point on the lane line and the lane line according to the lane line equation, and determining the point with the distance value change larger than the distance threshold value as a ramp starting point;
respectively fitting a left lane line and a right lane line of the ramp by taking the starting point of the ramp as a starting point to obtain a fitting equation of the left lane line and a fitting equation of the right lane line;
determining coordinates (u) of a first point using the fitted equation of the left lane line and the fitted equation of the right lane line i ,v i ) And the coordinates (u) of the second point j ,v j ) Wherein the first point is an intersection of a horizontal line on the ramp and a left lane line, and the second point is an intersection of a horizontal line on the ramp and a right lane line;
acquiring a lane pixel width value at the horizontal line by using the coordinates of the first point and the coordinates of the second point;
and obtaining the longitudinal distance of the horizontal line under the world coordinate system according to the lane pixel width value by using a pinhole imaging principle.
5. The method of claim 4, wherein after deriving the longitudinal distance at the horizon in the world coordinate system from the lane pixel width values using pinhole imaging principles, the method further comprises:
mapping the calculated longitudinal distance to a pixel coordinate system through coordinate conversion to obtain a pixel coordinate corresponding to the first point;
the pixel coordinate value v obtained by mapping x And the detected pixel coordinate value v i Subtracting to obtain a coordinate difference value v d
6. The method according to any one of claims 1 to 5, wherein obtaining the height information of the first point on the slope according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point in the world coordinate system comprises:
according to the angle value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance L of the first point on the ramp in the world coordinate system x And coordinate difference v d And obtaining the height information H of the first point:
H=L x *tan(θ),θ=v d *radPerPixel。
7. method according to claim 6, characterized in that the longitudinal distance L in the world coordinate system of the first point on the ramp, according to the angular value radPerPixel corresponding to the longitudinal coordinate of the pixel point obtained from the road image x And coordinate difference v d After obtaining the height information H of the first point, the method further includes:
and calculating the transverse position information of the point on the ramp under the world coordinate system according to the longitudinal distance of the first point on the ramp under the world coordinate system and the distance difference between the point on the lane line and the central axis of the picture.
8. A monocular camera-based height determining apparatus, comprising:
the acquisition unit is used for acquiring a road image of a road on which the target vehicle runs;
and the determining unit is used for obtaining the height information of the first point according to the angle value corresponding to the longitudinal coordinate of the pixel point obtained from the road image and the longitudinal distance of the first point on the ramp in the world coordinate system.
9. A storage medium, comprising a stored program, wherein the program when executed performs the method of any of claims 1 to 7.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor executes the method of any of the preceding claims 1 to 7 by means of the computer program.
CN202211364431.7A 2022-11-02 2022-11-02 Height determining method and device based on monocular camera Pending CN115511938A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211364431.7A CN115511938A (en) 2022-11-02 2022-11-02 Height determining method and device based on monocular camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211364431.7A CN115511938A (en) 2022-11-02 2022-11-02 Height determining method and device based on monocular camera

Publications (1)

Publication Number Publication Date
CN115511938A true CN115511938A (en) 2022-12-23

Family

ID=84512376

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211364431.7A Pending CN115511938A (en) 2022-11-02 2022-11-02 Height determining method and device based on monocular camera

Country Status (1)

Country Link
CN (1) CN115511938A (en)

Similar Documents

Publication Publication Date Title
EP3751519B1 (en) Method, apparatus, device and medium for calibrating pose relationship between vehicle sensor and vehicle
KR102249769B1 (en) Estimation method of 3D coordinate value for each pixel of 2D image and autonomous driving information estimation method using the same
CN110869974A (en) Point cloud processing method, point cloud processing device and storage medium
CN112154445A (en) Method and device for determining lane line in high-precision map
CN110667474B (en) General obstacle detection method and device and automatic driving system
CN111295667B (en) Method for stereo matching of images and auxiliary driving device
CN113034586B (en) Road inclination angle detection method and detection system
CN112172797B (en) Parking control method, device, equipment and storage medium
CN114280582A (en) Calibration and calibration method and device for laser radar, storage medium and electronic equipment
CN112257539A (en) Method, system and storage medium for detecting position relation between vehicle and lane line
CN112802092A (en) Obstacle sensing method and device and electronic equipment
CN108319931B (en) Image processing method and device and terminal
CN110793441B (en) High-precision object geometric dimension measuring method and device
CN114919584A (en) Motor vehicle fixed point target distance measuring method and device and computer readable storage medium
CN111982132B (en) Data processing method, device and storage medium
US20200193184A1 (en) Image processing device and image processing method
CN113223064A (en) Method and device for estimating scale of visual inertial odometer
CN113284120B (en) Height-limiting measuring method and device
CN112381876B (en) Traffic sign marking method and device and computer equipment
CN114882115B (en) Vehicle pose prediction method and device, electronic equipment and storage medium
CN109600598B (en) Image processing method, image processing device and computer readable recording medium
CN115511938A (en) Height determining method and device based on monocular camera
CN113345087A (en) Monocular vision-based earth surface model fitting method and device
JP6492603B2 (en) Image processing apparatus, system, image processing method, and program
CN108416305B (en) Pose estimation method and device for continuous road segmentation object and terminal

Legal Events

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