Vehicle posture determination method, device and electronic equipment based on monocular camera
By segmenting the network and geometric principles, processing monocular camera images and calculating vehicle attitudes, the problem that monocular cameras cannot calculate vehicle attitudes is solved, and the dual advantages of safety and cost are achieved.
Patent Information
- Application Number
- CN202111640074.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-12-29
AI Technical Summary
The prior art cannot calculate the vehicle posture through a monocular camera, and requires the introduction of binocular cameras, lidar and other equipment, which is relatively expensive.
By processing single-frame images collected by a single-eye camera through the segmentation network, the pixel coordinates corresponding to the lower edge of the target vehicle's body are determined, and the real location coordinates are calculated based on the principle of geometry, and the vehicle posture is determined.
On the basis of ensuring the safety of vehicle driving, determining the vehicle posture through a monocular camera avoids the high cost of introducing binocular cameras, lidar and other equipment.
Smart Images

Figure CN114299466B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of autonomous driving, and in particular to a vehicle posture determination method, device and electronic equipment based on a monocular camera. Background Art
[0002] With the development of vehicle technology, autonomous driving is being used more and more widely. At the same time, the driving safety and reliability in autonomous driving scenarios has become a major concern.
[0003] Currently, vehicles can identify the posture of other vehicles and make more reliable control decisions. However, it is not possible to calculate the vehicle posture through the monocular camera that is mainly equipped on the vehicle. It is necessary to introduce additional equipment such as binocular cameras and laser radars to obtain the vehicle posture, which is costly. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a vehicle posture determination method, device and electronic device based on a monocular camera, which determines the vehicle posture by a monocular camera, and solves the problem of high introduction cost of binocular cameras, lidar and other equipment while ensuring the safety of vehicle driving.
[0005] In a first aspect, an embodiment provides a vehicle posture determination method based on a monocular camera, the method comprising:
[0006] Processing the single-frame image captured by the monocular camera through a segmentation network to obtain a segmented image corresponding to the single-frame image, wherein the segmented image includes at least one segmentation category, and the segmentation category includes pixel point coordinates corresponding to the lower edge line of the vehicle body of the target vehicle;
[0007] Determine the actual landing point coordinates of the target vehicle based on the pixel point coordinates corresponding to the lower edge of the vehicle body;
[0008] The posture of the target vehicle is determined based on the real landing point coordinates, wherein the posture includes the position and angle of the target vehicle relative to the current vehicle.
[0009] In an optional embodiment, the step of determining the coordinates of the actual landing point of the target vehicle based on the coordinates of the pixel points corresponding to the lower edge of the vehicle body includes:
[0010] Determining the virtual landing point coordinates of the target vehicle corresponding to the segmented image based on the pixel point coordinates corresponding to the lower edge of the vehicle body;
[0011] The real landing point coordinates of the target vehicle are determined according to the distance from the monocular camera to the ground, the distance from the lower edge line of the vehicle body of the target vehicle to the ground, and the virtual landing point coordinates.
[0012] In an optional embodiment, the step of determining the coordinates of the virtual landing point of the target vehicle corresponding to the segmented image based on the coordinates of the pixel points corresponding to the lower edge of the vehicle body includes:
[0013] Selecting the pixel coordinates of the target pixel point from the pixel coordinates corresponding to the lower edge of the vehicle body according to a preset rule;
[0014] Based on the internal and external parameters of the monocular camera, the pixel coordinates of the target pixel point are converted into real coordinates;
[0015] The virtual landing point coordinates of the target vehicle are determined based on the real coordinates.
[0016] In an optional embodiment, the step of determining the coordinates of the actual landing point of the target vehicle according to the distance from the monocular camera to the ground, the distance from the lower edge of the body of the target vehicle to the ground, and the coordinates of the virtual landing point includes:
[0017] Determine a proportional relationship between the distances to the ground according to the distance to the ground of the monocular camera and the distance to the ground of the lower edge line of the vehicle body of the target vehicle;
[0018] Based on the proportional relationship and the virtual landing point coordinates, the real landing point coordinates of the target vehicle are determined.
[0019] In an optional embodiment, the step of determining the posture of the target vehicle based on the real landing point coordinates includes:
[0020] Determining the angle of the target vehicle relative to the current vehicle based on the angle of the lower edge of the vehicle body obtained by fitting the real coordinates corresponding to the lower edge of the vehicle body;
[0021] The position of the target vehicle relative to the current vehicle is determined according to the real landing point coordinates of the target vehicle.
[0022] In an optional implementation, the single frame image is acquired by the monocular camera from four channels respectively, and the segmentation category further includes a license plate category; the method further includes:
[0023] Obtaining the lower edge line of the vehicle body of the target vehicle corresponding to the single-frame image of each channel;
[0024] Based on the pixel position of the license plate category, determining the setting direction of the lower edge line of the vehicle body corresponding to the single-frame image of each channel relative to the target vehicle;
[0025] Based on the lower edge line of the vehicle body in each setting direction, a target top view centered on the current vehicle is generated, and the target top view includes the distribution of the target vehicle relative to the current vehicle.
[0026] In an optional embodiment, the method further comprises:
[0027] The speed and displacement of the target vehicle are determined based on the multiple frames of images captured by the monocular camera.
[0028] In a second aspect, an embodiment provides a vehicle posture determination device based on a monocular camera, the device comprising:
[0029] A processing module, which processes the single-frame image captured by the monocular camera through a segmentation network to obtain a segmented image corresponding to the single-frame image, wherein the segmented image includes at least one segmentation category, and the segmentation category includes the pixel point coordinates corresponding to the lower edge line of the vehicle body of the target vehicle;
[0030] A first determination module determines the coordinates of the actual landing point of the target vehicle based on the coordinates of the pixel points corresponding to the lower edge of the vehicle body;
[0031] The second determination module determines the posture of the target vehicle based on the real landing point coordinates, wherein the posture includes the position and angle of the target vehicle relative to the current vehicle.
[0032] In a third aspect, an embodiment provides an electronic device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the computer program, the steps of the method described in any of the aforementioned implementation methods are implemented.
[0033] In a fourth aspect, an embodiment provides a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the steps of the method described in any one of the aforementioned implementations.
[0034] The embodiments of the present invention provide a method, device and electronic device for determining the vehicle posture based on a monocular camera. The single-frame image captured by the monocular camera is segmented, and based on the geometric principle, the coordinates of the actual landing point of the target vehicle are determined according to the pixel coordinates of the lower edge of the vehicle body parallel to the landing point shown in the segmented image, thereby obtaining the posture of the target vehicle relative to the current vehicle. The embodiments of the present invention obtain the image depth information corresponding to the target vehicle that cannot be captured by the monocular camera through the geometric principle. On the basis of ensuring the driving safety of the vehicle, there is no need to introduce binocular cameras, laser radars and other equipment, thereby saving costs.
[0035] Other features and advantages of the present disclosure will be set forth in the following description, or some features and advantages may be inferred or unambiguously determined from the description, or may be learned by implementing the above-mentioned technology of the present disclosure.
[0036] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] 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.
[0038] Figure 1 A flow chart of a vehicle posture determination method based on a monocular camera provided in an embodiment of the present invention;
[0039] Figure 2 A schematic diagram of the perspective relationship between the lower edge line of a vehicle body and the landing point provided by an embodiment of the present invention;
[0040] Figure 3 A top view of the lower edge line and landing point of a vehicle body provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of a lower edge line of a vehicle body and a landing point provided by an embodiment of the present invention;
[0042] Figure 5 A top view of a target provided by an embodiment of the present invention;
[0043] Figure 6 A functional module diagram of a vehicle posture determination device based on a monocular camera provided in an embodiment of the present invention;
[0044] Figure 7 A schematic diagram of the hardware architecture of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] 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.
[0046] In the current field of autonomous driving, the inventors have found that monocular cameras cannot calculate vehicle posture because the monocular images they collect lack depth information. In order to ensure vehicle driving safety, it is generally necessary to introduce binocular cameras, laser radars and other equipment to provide depth information, thereby accurately identifying vehicle postures to ensure the safety and reliability of vehicle driving. However, this method is costly and is not suitable for widespread use.
[0047] Based on this, the embodiments of the present invention provide a vehicle posture determination method, device and electronic device based on a monocular camera, which determines the vehicle posture through a monocular camera, and solves the problem of high cost of introducing binocular cameras, lidar and other equipment while ensuring the safety of vehicle driving.
[0048] To facilitate understanding of this embodiment, a vehicle posture determination method based on a monocular camera disclosed in an embodiment of the present invention is first introduced in detail. This method can be applied to intelligent devices for autonomous driving control, such as vehicle controllers.
[0049] Figure 1 A flow chart of a vehicle posture determination method based on a monocular camera provided in an embodiment of the present invention.
[0050] like Figure 1 As shown, the method comprises the following steps:
[0051] Step S102: Processing the single-frame image captured by the monocular camera through a segmentation network to obtain a segmented image corresponding to the single-frame image.
[0052] The segmentation network may be ERFNet, which is pre-trained. In addition, the segmented image includes at least one segmentation category, and the segmentation category includes pixel point coordinates corresponding to the lower edge of the vehicle body of the target vehicle.
[0053] Step S104, determining the actual landing point coordinates of the target vehicle based on the pixel point coordinates corresponding to the lower edge of the vehicle body.
[0054] It should be noted that the lower edge of the vehicle body can be understood as the lower bottom edge of the vehicle body, such as Figure 4 The line segment Pu1Pu2 in the figure can be considered as the lower edge line of the vehicle body. The vehicle includes four directions, that is, the vehicle includes four lower edge lines of the vehicle body in total, front, back, left, and right.
[0055] It is understandable that the lower edge of the vehicle body in the segmentation image is composed of multiple pixel points. Generally speaking, the vehicle landing point can be understood as the point where the wheel contacts the ground, but the actual landing point in this application is Figure 4 The landing points Pd1 and Pd2 in the figure are the intersection points of the two end points Pu1 and Pu2 of the lower edge line of the vehicle body projected onto the ground.
[0056] Step S106, determining the posture of the target vehicle based on the real landing point coordinates, wherein the posture includes the position and angle of the target vehicle relative to the current vehicle.
[0057] The landing point in the segmentation image is converted into a real landing point, and then the distance and direction angle between the target vehicle and the current vehicle are determined according to the real landing point of the target vehicle.
[0058] In a preferred embodiment of practical application, a single frame image captured by a monocular camera is segmented, and based on geometric principles, the coordinates of the actual landing point of the target vehicle are determined according to the pixel coordinates of the lower edge of the vehicle body parallel to the landing point shown in the segmented image, thereby obtaining the posture of the target vehicle relative to the current vehicle. The embodiment of the present invention obtains image depth information corresponding to the target vehicle that cannot be captured by a monocular camera through geometric principles, and on the basis of ensuring the driving safety of the vehicle, there is no need to introduce binocular cameras, laser radars and other equipment, thereby saving costs.
[0059] In some embodiments, the coordinates of the actual landing point that cannot be collected by a monocular camera can be obtained through geometric principles. For example, step S104 may include the following steps:
[0060] Step 1.1), based on the pixel coordinates corresponding to the lower edge of the vehicle body, determine the virtual landing point coordinates of the target vehicle corresponding to the segmented image.
[0061] Among them, Figure 2 As shown in , the image generated by the camera C projecting light onto the target vehicle may have a certain error with the real image. Figure 4 As shown, the lower edge of the vehicle body is Pu1Pu2, and the virtual landing point corresponds to O1O2 ( Figure 4 (not shown), but the actual landing point of the target vehicle is Pd1 and Pd2 obtained by projecting the lower edge of the vehicle body Pu1Pu2 onto the ground. Figure 2 It can be seen that O1O2 and Pd1Pd2 are located in the same plane AO1O2, so Figure 4 From the angle of observation, O1 and O2 are equivalent to coincide with Pd1 and Pd2 respectively.
[0062] Step 1.2), according to the distance CA from the monocular camera to the ground, the distance Pu2Pd2 from the lower edge of the body of the target vehicle to the ground and the coordinates of the virtual landing points O1 and O2, the coordinates of the real landing points Pd1 and Pd2 of the target vehicle are determined.
[0063] Depend on Figure 2It can be seen that if Pu1 and Pu2 are of the same height, according to the solid geometric relationship, triangle CPu1Pu2 is similar to triangle CO1O2, that is, O1O2 / / Pu1Pu2 / / Pd1Pd2. Assuming that Pd1 and Pd2 are the real landing points, the coordinates of the two points Pu1 and Pu2 on the lower edge line of the vehicle body with the same height can be calculated, and the positions of the virtual landing points O1 and O2 can be obtained based on the coordinates of Pu1 and Pu2. Finally, the parallel relationship is used to obtain the postures of Pd1 and Pd2.
[0064] in, Figure 3 It can be understood as Figure 2 Top view of the .
[0065] In some embodiments, the virtual landing point may be determined by the lower edge line of the vehicle body using geometric relationships. Step 1.1) may include:
[0066] Step 1.1.1), selecting the pixel coordinates of the target pixel point from the pixel coordinates corresponding to the lower edge line of the vehicle body according to a preset rule.
[0067] Among them, the preset rules may include selecting the two endpoints of the lower edge line of the vehicle body as the target pixel points, or selecting the two endpoints and the midpoint of the lower edge line of the vehicle body as the target pixel point, or traversing and selecting each pixel point of the lower edge line of the vehicle body as the target pixel point, etc., which can be set according to actual conditions or business needs.
[0068] Step 1.1.2), based on the internal and external parameters of the monocular camera, the pixel coordinates of the target pixel point are converted into real coordinates.
[0069] Among them, according to the conversion principle, the pixel coordinate system is converted into the real world coordinate system, which can be known by those skilled in the art.
[0070] Step 1.1.3), determining the virtual landing point coordinates of the target vehicle based on the real coordinates.
[0071] Among them, Figure 2 As shown, according to the similarity relationship between triangle CPu1Pu2 and triangle CO1O2, the world coordinates of virtual landing points O1 and O2 are obtained according to the real coordinates Pu1 and Pu2.
[0072] It should be noted that, according to the internal and external parameter information of the camera, the position of any virtual landing point in the segmented image in the real world coordinate system can be calculated, and then the posture of the target vehicle can be inferred. However, in actual application, since the monocular camera generally uses a fisheye lens, the virtual landing point collected by a single frame image may have a large distortion error. In order to obtain the lower edge line of the vehicle body regardless of the posture of the target vehicle in the image, the embodiment of the present invention preferably estimates the virtual landing point based on two equal-height non-landing points of the lower edge line of the vehicle body, and then calculates the posture of the target vehicle.
[0073] In some embodiments, the geometric relationship may be used to determine the real landing point through the virtual landing point coordinates, wherein step 1.2) may include:
[0074] Step 1.2.1), according to the distance CA from the monocular camera to the ground and the distance from the lower edge line of the target vehicle to the ground, determine the distance to the ground Pu2Pd2, and the proportional relationship between the two.
[0075] Among them, Figure 2 As shown, there is a similar relationship between triangle O2Pu2Pd2 and triangle O2CA, and the proportional relationship between CA and Pu2Pd2 is also consistent with the line segment O2Pd2 and line segment O2A.
[0076] Step 1.2.2), based on the proportional relationship and the coordinates of the virtual landing points O1, O2, determine the coordinates of the real landing points Pd1, Pd2 of the target vehicle.
[0077] Among them, the embodiment of the present invention determines the coordinates of the virtual landing point through the coordinates of the lower edge line of the vehicle body in the image, and then determines the coordinates of the real landing point based on the virtual landing point coordinates, so as to realize the solution of obtaining the posture of the target vehicle with a monocular camera.
[0078] In some embodiments, step S106 includes:
[0079] Step 2.1), determining the angle of the target vehicle relative to the current vehicle based on the angle of the lower edge of the vehicle body obtained by fitting the real coordinates corresponding to the lower edge of the vehicle body.
[0080] For example, since the points on the bottom edge of the vehicle (the lower edge line of the vehicle body) are of equal height, the pixel points on the lower edge line of the vehicle body can be traversed and their world coordinate system positions can be calculated using the internal and external parameters of the camera, and then these scattered points can be fitted into a lower edge line L of the vehicle body using a straight line fitting method. The inclination angle of the lower edge line L of the vehicle body is the angle of the target vehicle relative to the current vehicle.
[0081] Step 2.2), determining the position of the target vehicle relative to the current vehicle based on the actual landing point coordinates of the target vehicle.
[0082] For example, Figure 4 As shown, assuming that the height Pu2Pd2 between the lower edge line Pu1Pu2 of the vehicle body and the line connecting the virtual landing point O1O2 is 200mm, this height can be used to perform distance correction on the above-mentioned straight line segment L, and then the position of the vehicle in the world coordinate system can be obtained, as described in step 1.2.2).
[0083] It should be noted that the detection range of the monocular camera can be set to 6m, and the target vehicle that is more than 6m away from the current vehicle is not calculated. The target vehicle can be understood as another vehicle within the detection range of the monocular camera.
[0084] In some embodiments, the single frame image is collected by the monocular camera from four channels (four paths), such as the front left, front right, rear left, and rear right of the vehicle. In the autonomous driving scenario, the target vehicle posture can be calculated based on the image captured by the self-vehicle surround camera, and then a top view centered on the current vehicle can be generated, which is beneficial for subsequent decision-making and self-vehicle control planning.
[0085] Exemplarily, the above method further includes:
[0086] Step 3.1), obtaining the lower edge line of the body of the target vehicle corresponding to the single-frame image of each channel.
[0087] It should be noted that the image captured by the monocular camera in each direction is determined according to the above steps to determine the lower edge line of the vehicle body in the image.
[0088] Step 3.2), based on the pixel position of the license plate category, determine the setting direction of the lower edge line of the vehicle body corresponding to the single-frame image of each channel relative to the target vehicle.
[0089] The segmentation category may also include a license plate category and a background. The license plate category may be used to confirm the vehicle orientation. If the segmented image contains a license plate category, the lower sideline of the vehicle body obtained in the segmented image is located in the front or rear direction of the target vehicle. If the segmented image does not contain a license plate category, the lower sideline of the vehicle body obtained in the segmented image is located in the left or right direction of the target vehicle. In addition, the lower sideline of the vehicle body may be further confirmed to be located in the front or rear direction of the target vehicle based on the number content of the license plate.
[0090] Step 3.3), based on the lower edge line of the vehicle body in each of the set directions, generate a target top view centered on the current vehicle, wherein the target top view includes the distribution of the target vehicle relative to the current vehicle.
[0091] The four images collected by the surround fisheye camera (monocular camera) are processed as above, and then the target vehicle within the detection range of 6m from the current vehicle is fused and projected into the top view, as shown in Figure 2. Figure 5 As shown. It should be noted that the bold line indicates the current vehicle, and the remaining vehicles are target vehicles. For example, for the target vehicle A, a lower edge line of the vehicle body is obtained in each image, and the direction of the lower edge line is known based on the license plate category, that is, whether the lower edge line belongs to the long side or the short side, and is drawn in the top view according to its real coordinates to display the target vehicle A composed of four edge lines. Among them, the position of the target vehicle A relative to the current vehicle is generally considered to be the position point of the four edge lines of the target vehicle A that is closest to the current vehicle.
[0092] In some embodiments, in actual application, the speed and displacement of the target vehicle may also be obtained so that the current vehicle can implement a safer and more reliable driving control strategy based on the top view. The above method further includes:
[0093] Step 4.1), determining the speed and displacement of the target vehicle based on the multiple frames of images captured by the monocular camera.
[0094] Among them, the position and angle of the target vehicle at each moment are determined based on the single-frame image at each moment, so that the current vehicle can obtain the displacement and speed information of each target vehicle, so that the current vehicle is safer in practical applications such as parking or obstacle avoidance.
[0095] The embodiment of the present invention can calculate the depth information of the target vehicle in the image captured by the monocular camera based on the geometric information, and then obtain the vehicle posture based on the bottom edge of the vehicle body obtained by deep learning and the principle of solid geometry, and then calculate the top view centered on the vehicle, without the need for laser radar and other information to provide additional information, thereby reducing costs. It effectively solves the problem that the vehicle posture cannot be calculated due to the lack of depth information in the monocular image. The embodiment of the present invention can only input a single frame image of the vehicle's front, back, left, and right four-way surround view, calculate the vehicle posture in each image, and then project and generate a top view centered on the vehicle.
[0096] like Figure 6 As shown, the embodiment of the present invention further provides a vehicle posture determination device 200 based on a monocular camera, the device comprising:
[0097] The processing module 201 processes the single frame image captured by the monocular camera through a segmentation network to obtain a segmented image corresponding to the single frame image, wherein the segmented image includes at least one segmentation category, and the segmentation category includes the pixel point coordinates corresponding to the lower edge line of the vehicle body of the target vehicle;
[0098] A first determination module 202 determines the coordinates of the actual landing point of the target vehicle based on the coordinates of the pixel points corresponding to the lower edge of the vehicle body;
[0099] The second determination module 203 determines the posture of the target vehicle based on the real landing point coordinates, wherein the posture includes the position and angle of the target vehicle relative to the current vehicle.
[0100] Figure 7 Schematic diagram of the hardware architecture of the electronic device 300 provided in an embodiment of the present invention. Figure 7 As shown, the electronic device 300 includes: a machine-readable storage medium 301 and a processor 302, and may also include a non-volatile storage medium 303, a communication interface 304 and a bus 305; wherein the machine-readable storage medium 301, the processor 302, the non-volatile storage medium 303 and the communication interface 304 communicate with each other through the bus 305. The processor 302 can execute the method described in the above embodiment by reading and executing the machine-executable instructions in the machine-readable storage medium 301.
[0101] The machine-readable storage medium mentioned in this article can be any electronic, magnetic, optical or other physical storage device that can contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium can be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0102] The non-volatile medium may be a non-volatile memory, a flash memory, a storage drive (such as a hard drive), any type of storage disk (such as a CD, DVD, etc.), or a similar non-volatile storage medium, or a combination thereof.
[0103] It can be understood that the specific operation methods of each functional module in this embodiment can refer to the detailed description of the corresponding steps in the above method embodiment, and will not be repeated here.
[0104] The computer-readable storage medium provided in the embodiment of the present invention stores a computer program. When the computer program code is executed, the method described in any of the above embodiments can be implemented. For specific implementation, please refer to the method embodiment, which will not be described in detail here.
[0105] 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.
[0106] 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.
[0107] 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.
[0108] Finally, it should be noted that the above-described embodiments are only specific implementation methods 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 has been described in detail with reference to the aforementioned embodiments, those of ordinary skill in the art should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the aforementioned embodiments within the technical scope disclosed by the present invention, or can easily conceive of changes, or make equivalent replacements for some of the technical features therein. Such modifications, changes or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered within the protection scope of the present invention.
Claims
1. A vehicle posture determination method based on a monocular camera, characterized in that: The method comprises: Processing the single-frame image captured by the monocular camera through a segmentation network to obtain a segmented image corresponding to the single-frame image, wherein the segmented image includes at least one segmentation category, and the segmentation category includes pixel point coordinates corresponding to the lower edge line of the vehicle body of the target vehicle; Determine the coordinates of the actual landing point of the target vehicle based on the coordinates of the pixel points corresponding to the lower edge of the vehicle body; wherein the coordinates of the actual landing point are the coordinates of the intersection point generated by projecting the two end points of the lower edge of the vehicle body onto the ground; Determining the posture of the target vehicle based on the real landing point coordinates, wherein the posture includes the position and angle of the target vehicle relative to the current vehicle; The step of determining the coordinates of the actual landing point of the target vehicle based on the coordinates of the pixel points corresponding to the lower edge of the vehicle body comprises: Determining the virtual landing point coordinates of the target vehicle corresponding to the segmented image based on the pixel point coordinates corresponding to the lower edge of the vehicle body; Determine the real landing point coordinates of the target vehicle according to the distance from the monocular camera to the ground, the distance from the lower edge of the body of the target vehicle to the ground, and the virtual landing point coordinates; The step of determining the coordinates of the virtual landing point of the target vehicle corresponding to the segmented image based on the coordinates of the pixel points corresponding to the lower edge of the vehicle body comprises: Selecting the pixel coordinates of the target pixel point from the pixel coordinates corresponding to the lower edge of the vehicle body according to a preset rule; Based on the internal and external parameters of the monocular camera, the pixel coordinates of the target pixel point are converted into real coordinates; Determine the virtual landing point coordinates of the target vehicle based on the real coordinates; The step of determining the real landing point coordinates of the target vehicle according to the distance from the monocular camera to the ground, the distance from the lower edge of the vehicle body of the target vehicle to the ground, and the virtual landing point coordinates comprises: Determine a proportional relationship between the distances to the ground according to the distance to the ground of the monocular camera and the distance to the ground of the lower edge line of the vehicle body of the target vehicle; Based on the proportional relationship and the virtual landing point coordinates, the real landing point coordinates of the target vehicle are determined.
2. The method according to claim 1, characterized in that The step of determining the posture of the target vehicle based on the real landing point coordinates comprises: Determining the angle of the target vehicle relative to the current vehicle based on the angle of the lower edge of the vehicle body obtained by fitting the real coordinates corresponding to the lower edge of the vehicle body; The position of the target vehicle relative to the current vehicle is determined according to the real landing point coordinates of the target vehicle.
3. The method according to claim 1, characterized in that The single-frame image is acquired by the monocular camera from four channels respectively, and the segmentation category also includes a license plate category; the method further includes: Obtaining the lower edge line of the vehicle body of the target vehicle corresponding to the single-frame image of each channel; Based on the pixel position of the license plate category, determining the setting direction of the lower edge line of the vehicle body corresponding to the single-frame image of each channel relative to the target vehicle; Based on the lower edge line of the vehicle body in each setting direction, a target top view centered on the current vehicle is generated, and the target top view includes the distribution of the target vehicle relative to the current vehicle.
4. The method according to claim 1, characterized in that: The method further comprises: The speed and displacement of the target vehicle are determined based on the multiple frames of images captured by the monocular camera.
5. A vehicle posture determination device based on a monocular camera, characterized in that: The device comprises: A processing module, which processes the single-frame image captured by the monocular camera through a segmentation network to obtain a segmented image corresponding to the single-frame image, wherein the segmented image includes at least one segmentation category, and the segmentation category includes the pixel point coordinates corresponding to the lower edge line of the vehicle body of the target vehicle; A first determination module determines the coordinates of the actual landing point of the target vehicle based on the coordinates of the pixel points corresponding to the lower edge of the vehicle body; wherein the coordinates of the actual landing point are the coordinates of the intersection point generated by projecting the two end points of the lower edge of the vehicle body onto the ground; A second determination module determines the posture of the target vehicle based on the real landing point coordinates, wherein the posture includes the position and angle of the target vehicle relative to the current vehicle; The first determination module is further used to determine the virtual landing point coordinates of the target vehicle corresponding to the segmented image based on the pixel point coordinates corresponding to the lower edge of the vehicle body; determine the real landing point coordinates of the target vehicle according to the distance from the monocular camera to the ground, the distance from the lower edge of the vehicle body to the ground and the virtual landing point coordinates; The first determination module is further used to select the pixel coordinates of the target pixel point from the pixel coordinates corresponding to the lower edge line of the vehicle body according to a preset rule; based on the internal and external parameters of the monocular camera, the pixel coordinates of the target pixel point are converted into real coordinates; based on the real coordinates, the virtual landing point coordinates of the target vehicle are determined; The first determination module is also used to determine the proportional relationship between the distances to the ground based on the distance to the ground of the monocular camera and the distance to the ground of the lower edge line of the body of the target vehicle; based on the proportional relationship and the virtual landing point coordinates, determine the real landing point coordinates of the target vehicle.
6. An electronic device comprising a memory and a processor, wherein the memory stores a computer program that can be run on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
7. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the steps of the method described in any one of claims 1 to 4.
Citation Information
Patent Citations
Car lane change early warning method based on continuous image constraint pose estimation
CN110745140A
Front vehicle detection method and device
CN110991264A