Method and device for measuring rotation angle of trailer

By acquiring the trailer car image and detecting the target edge profile, combined with the vehicle body coordinate system, the precise measurement of the trailer rotation angle is achieved, solving the problems of complex installation and low measurement accuracy of the lidar device in the prior art.

CN114494200BActive Publication Date: 2025-03-28SUZHOU ZHITU TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210099821.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-27
Publication Date
2025-03-28
Estimated Expiration
2042-01-27

AI Technical Summary

Technical Problem

When measuring the rotation angle of the trailer, the installation of a lidar device is complicated and the signal error is large, resulting in low measurement accuracy.

Method used

By acquiring the image of the trailer car, the image acquisition device is used to set it on both sides of the trailer car's front to detect the target edge contour of the car, and the rotation angle of the trailer is determined based on the target edge contour of the car and the vehicle body coordinate system.

Benefits of technology

This method can measure the rotation angle of the trailer in real time and accurately, improve measurement accuracy, and avoid the installation complexity and signal error of the lidar device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114494200B_ABST
    Figure CN114494200B_ABST
Patent Text Reader

Abstract

The present invention provides a method and device for measuring the rotation angle of a trailer, comprising: obtaining a compartment image of the trailer; wherein the compartment image is obtained by photographing an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer; based on the compartment image, detecting the target edge contour of the compartment of the trailer; the target edge contour includes the rear edge contour and / or the side edge contour of the compartment; determining the rotation angle of the trailer according to the target edge contour of the compartment and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin. The method can measure the rotation angle of the trailer in real time by acquiring the edge contour of the compartment, so as to improve the measurement accuracy of the rotation angle of the trailer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of automatic driving, and in particular to a method and device for measuring the rotation angle of a trailer. Background Art

[0002] A truck is mainly composed of a truck head and a trailer. When a truck turns at an intersection, the truck head will form a certain angle with the trailer. When the truck is turned and the speed is controlled, the swing posture of the trailer needs to be obtained according to the change of the angle between the truck head and the trailer, so as to prevent the trailer from colliding with the curb or other non-road obstacles and causing damage. Therefore, the rotation angle of the trailer plays an important role in the automatic turning control of the truck, and the measurement of the rotation angle of the trailer is essential in the process of automatic driving of the truck.

[0003] Currently, when calculating the rotation angle of a trailer, it is mostly necessary to install a detection device on the truck. The detection device is generally a laser radar device. The installation of the laser radar is relatively complicated, and it is easy for defects in the installation position or the signal error of the laser radar itself (the time lag of the laser signal) to cause large errors in the measurement accuracy of the rotation angle of the trailer obtained by the prior art. Summary of the invention

[0004] The object of the present invention is to provide a method and device for measuring the rotation angle of a trailer, so as to improve the measurement accuracy of the rotation angle of the trailer.

[0005] In a first aspect, an embodiment of the present invention provides a method for measuring the rotation angle of a trailer, which comprises: acquiring an image of a trailer compartment; wherein the image of the compartment is captured by an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer; based on the image of the compartment, detecting a target edge contour of the trailer compartment; the target edge contour includes a rear edge contour and / or a side edge contour of the compartment; determining the rotation angle of the trailer according to the target edge contour of the compartment and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin.

[0006] In combination with the first aspect, an embodiment of the present invention provides a first possible implementation of the first aspect, wherein, based on the car compartment image, the step of detecting the target edge contour of the trailer's car compartment includes: extracting the initial car body contour of the car compartment image through a pre-trained image detector; de-distorting the initial car body contour through a preset de-distortion function, and detecting the target edge contour of the trailer's car compartment.

[0007] In combination with the first possible implementation of the first aspect, an embodiment of the present invention provides a second possible implementation of the first aspect, wherein, if the target edge contour detected is: the rear edge contour of the vehicle body; based on the target edge contour of the vehicle body and the body coordinate system of the trailer, the step of determining the rotation angle of the trailer includes: projecting the bottom endpoint of the rear edge contour into the body coordinate system to obtain the first vehicle body coordinate system corresponding to the bottom endpoint of the rear edge contour; and determining the rotation angle of the trailer based on the first vehicle body coordinate system.

[0008] In combination with the first possible implementation of the first aspect, an embodiment of the present invention provides a third possible implementation of the first aspect, wherein, if the target edge contour detected is: the side edge contour of the car body; based on the target edge contour of the car body and the body coordinate system of the trailer, the step of determining the rotation angle of the trailer includes: projecting the bottom endpoint of the side edge contour into the body coordinate system to obtain a second vehicle body coordinate system corresponding to the bottom endpoint of the side edge contour; and determining the rotation angle of the trailer based on the second vehicle body coordinate system.

[0009] In combination with the second possible implementation manner of the first aspect, the embodiment of the present invention provides a fourth possible implementation manner of the first aspect, wherein the step of projecting the bottom endpoint of the rear edge contour into the vehicle body coordinate system to obtain the first vehicle body coordinate system corresponding to the bottom endpoint of the rear edge contour comprises: calculating the first vehicle body coordinate system corresponding to the rear edge contour by the following formula; Among them, s represents the preset parameter, represents the intrinsic parameter matrix of the image acquisition device, Represents the preset camera coordinates, represents the first vehicle body coordinate system, u is the coordinate value of the bottom endpoint of the tail edge contour in the horizontal direction, v is the coordinate value of the bottom endpoint of the tail edge contour in the vertical direction, R represents the rotation matrix of the image coordinate system corresponding to the preset image acquisition device to the vehicle body coordinate system, t represents the translation matrix of the image coordinate system corresponding to the preset image acquisition device to the vehicle body coordinate system, f x represents the focal length in the u direction, f y represents the focal length in the v direction, c x represents the horizontal coordinate of the intersection of the principal optical axis and the physical imaging plane, c y Represents the ordinate of the intersection of the principal optical axis and the physical imaging plane, X c Indicates the X-axis coordinate of the camera system, Y c Indicates the Y-axis coordinate of the camera system, Z c Indicates the Z-axis coordinate of the camera system, X v Indicates the X-axis coordinate of the first vehicle system, Y v Indicates the Y-axis coordinate of the first vehicle system, Zv Indicates the Z-axis coordinate of the first vehicle system.

[0010] In combination with the fourth possible implementation of the first aspect, an embodiment of the present invention provides a fifth possible implementation of the first aspect, wherein the step of determining the rotation angle of the trailer based on the first vehicle system coordinates includes: determining the first parameter of a preset arccosine formula based on the first vehicle system coordinates; determining the rotation angle of the trailer based on the first parameter of the arccosine formula.

[0011] In combination with the third possible implementation of the first aspect, an embodiment of the present invention provides a sixth possible implementation of the first aspect, wherein the step of projecting the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain the second vehicle body coordinate corresponding to the bottom endpoint of the side edge contour includes: projecting the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain the equation of a straight line connecting the image acquisition device and the outermost bottom endpoint of the vehicle side contour line corresponding to the image acquisition device; establishing the equation of a circle with the radius being the line connecting the image acquisition device and the outermost bottom endpoint of the vehicle side contour line corresponding to the image acquisition device; and determining the second vehicle body coordinate corresponding to the bottom endpoint of the side edge contour based on the equation of the straight line and the equation of the circle.

[0012] In combination with the sixth possible implementation of the first aspect, an embodiment of the present invention provides a seventh possible implementation of the first aspect, wherein the step of determining the rotation angle of the trailer based on the second vehicle system coordinates includes: determining the second parameter of a preset arccosine formula based on the second vehicle system coordinates; determining the rotation angle of the trailer based on the second parameter of the arccosine formula.

[0013] In combination with the first possible implementation of the first aspect, the embodiment of the present invention provides an eighth possible implementation of the first aspect, wherein the preset dedistortion function includes: an undistortPoints function of openCV.

[0014] In a second aspect, an embodiment of the present invention provides a device for measuring the rotation angle of a trailer, which includes: an image acquisition module, used to acquire an image of the trailer's cabin; wherein the cabin image is obtained by taking an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer; an edge contour detection module, used to detect the target edge contour of the trailer's cabin based on the cabin image; the target edge contour includes the rear edge contour and / or side edge contour of the cabin; a trailer rotation angle measurement module, used to determine the rotation angle of the trailer according to the target edge contour of the cabin and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin.

[0015] The embodiments of the present invention bring the following beneficial effects:

[0016] The present invention provides a method and device for measuring the rotation angle of a trailer, which includes: obtaining a compartment image of the trailer; wherein the compartment image is obtained by taking an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer; based on the compartment image, detecting the target edge contour of the compartment of the trailer; the target edge contour includes the rear edge contour and / or the side edge contour of the compartment; according to the target edge contour of the compartment and the body coordinate system of the trailer, determining the rotation angle of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin. The method can measure the rotation angle of the trailer in real time by acquiring the edge contour of the compartment, so as to improve the measurement accuracy of the rotation angle of the trailer.

[0017] Other features and advantages disclosed in this embodiment will be described in the subsequent description, or some features and advantages can be inferred or determined without doubt from the description, or can be learned by implementing the above-mentioned technology of the present disclosure.

[0018] 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

[0019] 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.

[0020] Figure 1 A schematic flow chart of a method for measuring a rotation angle of a trailer provided by an embodiment of the present invention;

[0021] Figure 2 A schematic flow chart of another method for measuring the rotation angle of a trailer provided by an embodiment of the present invention;

[0022] Figure 3 A schematic diagram of a bottom endpoint of a rear edge contour projected onto the vehicle body coordinate system provided by an embodiment of the present invention;

[0023] Figure 4 A schematic structural diagram of a device for measuring the rotation angle of a trailer is provided for an embodiment of the present invention;

[0024] Figure 5 A schematic diagram of the structure of an electronic device is provided for an embodiment of the present invention.

[0025] Icons: 41 - image acquisition module; 42 - edge contour detection module; 43 - trailer rotation angle measurement module; 51 - memory; 52 - processor; 53 - bus; 54 - communication interface. DETAILED DESCRIPTION

[0026] 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.

[0027] When calculating the rotation angle of a trailer, traditional technology mostly requires installing a detection device on the truck. The detection device is generally a laser radar device. The installation of the laser radar is relatively complicated and is prone to large errors in the measurement accuracy of the rotation angle of the trailer obtained by the prior art due to defects in the installation position or the signal error of the laser radar itself (time lag of the laser signal).

[0028] Based on this, an embodiment of the present invention provides a method and device for measuring the rotation angle of a trailer, which can alleviate the above technical problems and improve the measurement accuracy of the rotation angle of the trailer. To facilitate understanding of the embodiment of the present invention, a method for measuring the rotation angle of a trailer disclosed in an embodiment of the present invention is first introduced in detail.

[0029] Example 1

[0030] like Figure 1 , which is a flow chart of a method for measuring a rotation angle of a trailer provided by an embodiment of the present invention.

[0031] like Figure 1 As can be seen, the method comprises the following steps:

[0032] Step S101: Acquire a compartment image of a trailer; wherein the compartment image is captured by an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer.

[0033] In this embodiment, the image acquisition device is a binocular camera.

[0034] Step S102: Based on the carriage image, a target edge contour of the carriage of the trailer is detected; the target edge contour includes a rear edge contour and / or a side edge contour of the carriage.

[0035] In this embodiment, when the rotation angle of the trailer is within 0° to 10°, the image acquisition device can capture the side edge contour and the rear edge contour of the vehicle body; when the rotation angle of the trailer is within 10° to 90°, the image acquisition device can capture the side edge contour of the vehicle body.

[0036] After the edge contour of the trailer's compartment is detected, an image processing method, such as image de-distortion processing, is used to detect the target edge contour of the trailer's compartment.

[0037] Step S103: determining the rotation angle of the trailer according to the target edge contour of the carriage and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin.

[0038] In this embodiment, the target edge contour of the carriage is projected onto the body coordinate system of the trailer to obtain the coordinate points of the target edge contour in the body coordinate system, thereby determining the rotation angle of the trailer through a spatial distance calculation method.

[0039] This embodiment provides a method for measuring the rotation angle of a trailer, which includes: obtaining a compartment image of the trailer; wherein the compartment image is obtained by taking an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer; based on the compartment image, detecting the target edge contour of the compartment of the trailer; the target edge contour includes the rear edge contour and / or the side edge contour of the compartment; determining the rotation angle of the trailer according to the target edge contour of the compartment and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin. The method can measure the rotation angle of the trailer in real time by acquiring the edge contour of the compartment, so as to improve the measurement accuracy of the rotation angle of the trailer.

[0040] Example 2

[0041] exist Figure 1 Based on the method shown, the present invention also provides another method for measuring the rotation angle of a trailer. Figure 2 A flow chart of another method for measuring the rotation angle of a trailer provided by an embodiment of the present invention is shown as follows: Figure 2 As can be seen, the method comprises the following steps:

[0042] Step S201: Acquire a compartment image of a trailer; wherein the compartment image is captured by an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer.

[0043] Step S202: extracting the initial vehicle body contour of the vehicle compartment image by using a pre-trained image detector.

[0044] In this embodiment, the pre-trained image detector includes: a yolov5 image detector, and then the initial vehicle body contour of the vehicle compartment image is extracted by the yolov5 image detector.

[0045] Step S203: Dedistorting the initial vehicle body contour using a preset dedistortion function to detect the target edge contour of the trailer compartment.

[0046] The target edge profile includes a rear edge profile and / or a side edge profile of the carriage.

[0047] The preset dedistortion function includes: undistortPoints function of openCV.

[0048] Step S204: determining the rotation angle of the trailer according to the target edge contour of the carriage and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin.

[0049] In one embodiment, if the detected target edge contour is: the rear edge contour of the carriage.

[0050] The above step S204 includes the following steps A1-A2:

[0051] Step A1: Based on the target edge contour of the carriage and the body coordinate system of the trailer, the step of determining the rotation angle of the trailer includes: projecting the bottom endpoint of the tail edge contour into the body coordinate system to obtain the first body coordinate system corresponding to the bottom endpoint of the tail edge contour.

[0052] The first vehicle system coordinates corresponding to the tail edge contour are calculated by the following formula: Among them, s represents the preset parameter, represents the intrinsic parameter matrix of the image acquisition device, Represents the preset camera coordinates, represents the first vehicle body coordinate system, u is the coordinate value of the bottom endpoint of the tail edge contour in the horizontal direction, v is the coordinate value of the bottom endpoint of the tail edge contour in the vertical direction, R represents the rotation matrix of the image coordinate system corresponding to the preset image acquisition device to the vehicle body coordinate system, t represents the translation matrix of the image coordinate system corresponding to the preset image acquisition device to the vehicle body coordinate system, f x represents the focal length in the u direction, f y represents the focal length in the v direction, c x represents the horizontal coordinate of the intersection of the principal optical axis and the physical imaging plane, c y Represents the ordinate of the intersection of the principal optical axis and the physical imaging plane, X cIndicates the X-axis coordinate of the camera system, Y c Indicates the Y-axis coordinate of the camera system, Z c Indicates the Z-axis coordinate of the camera system, X v Indicates the X-axis coordinate of the first vehicle system, Y v Indicates the Y-axis coordinate of the first vehicle system, Z v Indicates the Z-axis coordinate of the first vehicle system.

[0053] Step A2: Determine the rotation angle of the trailer according to the first vehicle system coordinates.

[0054] For ease of understanding, Figure 3 A schematic diagram of a bottom endpoint of a tail edge contour projected onto the vehicle body coordinate system provided by an embodiment of the present invention.

[0055] Depend on Figure 3 It can be seen that, point O' is the rotation center of the trailer and the front of the vehicle, point B is the bottom end point of the rear edge contour, point A is the bottom end point of the rear edge contour after the trailer rotates a certain angle, and ∠AO'B is the angle of rotation of the trailer around point O'. When the rotation angle of the trailer is within 0° to 10°, the image acquisition device can capture the side edge contour and the rear edge contour of the vehicle body, and the rotation angle of the trailer is calculated through the rear edge contour.

[0056] In actual operation, the above step A2 specifically includes: firstly, determining the first parameter of the preset arccosine formula according to the first vehicle system coordinates, and then determining the rotation angle of the trailer according to the first parameter of the arccosine formula.

[0057] by Figure 3 For example, through step A1, first determine the coordinates of point A (the bottom end point of the tail edge contour) in the vehicle body coordinate system, and the coordinates of point O' and point B are measured in advance, and then the trailer body rotation angle ∠AO'B can be calculated according to the following formula:

[0058]

[0059] in,<O′A,O′B> , the inner product of O'A and O'B; |O'A| represents the modulus of vector O'A; |O'B| represents the modulus of vector O'B.

[0060] here,<O’A,O‘B> , |O'A| and |O'B| are the first parameters; ∠AO'B is the trailer rotation angle calculated at this time.

[0061] In another embodiment, if the detected target edge contour is: the side edge contour of the carriage.

[0062] The above step S204 includes the following steps B1-B2:

[0063] Step B1: Based on the target edge contour of the carriage and the body coordinate system of the trailer, the step of determining the rotation angle of the trailer includes: projecting the bottom endpoint of the side edge contour into the body coordinate system to obtain a second body coordinate system corresponding to the bottom endpoint of the side edge contour.

[0064] In this embodiment, the above step B1 specifically includes:

[0065] First, the bottom endpoint of the side edge contour is projected into the vehicle body coordinate system to obtain a straight line equation connecting the image acquisition device and the outermost bottom endpoint of the vehicle side contour line corresponding to the image acquisition device.

[0066] Then, an equation of a circle with a radius of the image acquisition device and a line connecting the outermost bottom end points of the vehicle side contour line corresponding to the image acquisition device is established.

[0067] Finally, according to the equation of the straight line and the equation of the circle, the second vehicle system coordinate corresponding to the bottom endpoint of the side edge contour is determined.

[0068] For ease of understanding, Figure 3 Let's take this as an example to further explain:

[0069] First, the pixel coordinates of the outermost bottom endpoint of the vehicle side contour line are converted into the vehicle body coordinate system, so that the equation of the straight line formed by point C1 and point A is obtained: y=ax+b.

[0070] Then, point B rotates around point O' to point A after a certain angle. Assuming the trailer size is: 12.39 meters long, 2.43 meters wide, and 4.2 meters high, the equation of the circle with O' as the center and O'B as the radius is obtained based on the trailer size (xa) 2 +(yb) 2 =r 2 , where (a, b) are the coordinates of the rotation center O' of the trailer body in the body coordinate system, r is the distance from the rotation center O' of the trailer body to point B at the lower left corner of the trailer body, and point A is the intersection of the straight line C1A and the circle O'. By combining the equation of the straight line and the equation of the circle O', the coordinates of point A can be solved.

[0071] Step B2: Determine the rotation angle of the trailer according to the second vehicle system coordinates.

[0072] In actual operation, the above step B2 specifically includes: firstly, determining the second parameter of the preset arccosine formula according to the coordinate system of the second vehicle, and then determining the rotation angle of the trailer according to the second parameter of the arccosine formula.

[0073] For ease of understanding, Figure 3For example, through step B1, first determine the coordinates of point A (the bottom end point of the tail edge contour) in the vehicle body coordinate system, and the coordinates of point O' and point B are measured in advance, and then the trailer body rotation angle ∠AO'B can be calculated according to the following formula:

[0074]

[0075] in,<O′A,O′B> , the inner product of O'A and O'B; |O'A| represents the modulus of vector O'A; |O'B| represents the modulus of vector O'B.

[0076] here,<O’A,O‘B> , |O'A| and |O'B| are the second parameters; ∠AO'B is the trailer rotation angle calculated at this time.

[0077] This embodiment provides a method for measuring the rotation angle of a trailer, which includes: obtaining a trailer compartment image; wherein the compartment image is obtained by taking an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer; extracting the initial body contour of the compartment image by a pre-trained image detector; de-distorting the initial body contour by a preset de-distortion function, and detecting the target edge contour of the compartment of the trailer; determining the rotation angle of the trailer according to the target edge contour of the compartment and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin. This method further improves the measurement accuracy of the rotation angle of the trailer by de-distorting the edge contour of the compartment.

[0078] Example 3

[0079] The embodiment of the present invention also provides a device for measuring the rotation angle of a trailer, such as Figure 4 The present invention provides a schematic diagram of a device for measuring the rotation angle of a trailer, including:

[0080] The image acquisition module 41 is used to acquire the image of the compartment of the trailer; wherein the image of the compartment is captured by an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer.

[0081] The edge contour detection module 42 is used to detect the target edge contour of the trailer compartment based on the compartment image; the target edge contour includes the rear edge contour and / or the side edge contour of the compartment.

[0082] The trailer rotation angle measurement module 43 is used to determine the rotation angle of the trailer according to the target edge contour of the carriage and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin.

[0083] The image acquisition module 41, the edge contour detection module 42 and the trailer rotation angle measurement module 43 are connected in sequence.

[0084] In one embodiment, the edge contour detection module 42 is also used to extract the initial body contour of the vehicle compartment image through a pre-trained image detector; the initial body contour is dedistorted by a preset dedistortion function to detect the target edge contour of the trailer compartment.

[0085] In one embodiment, the trailer rotation angle measurement module 43 is also used to project the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain the first vehicle body coordinate corresponding to the bottom endpoint of the side edge contour; and determine the rotation angle of the trailer based on the first vehicle body coordinate.

[0086] In one embodiment, the trailer rotation angle measurement module 43 is also used to project the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain a second vehicle body coordinate system corresponding to the bottom endpoint of the side edge contour; and determine the rotation angle of the trailer based on the second vehicle body coordinate system.

[0087] In one embodiment, the trailer rotation angle measurement module 43 is further used to calculate the first vehicle system coordinates corresponding to the rear edge contour by the following formula: Among them, s represents the preset parameter, represents the intrinsic parameter matrix of the image acquisition device, Represents the preset camera coordinates, represents the first vehicle body coordinate system, u is the coordinate value of the bottom endpoint of the tail edge contour in the horizontal direction, v is the coordinate value of the bottom endpoint of the tail edge contour in the vertical direction, R represents the rotation matrix of the image coordinate system corresponding to the preset image acquisition device to the vehicle body coordinate system, t represents the translation matrix of the image coordinate system corresponding to the preset image acquisition device to the vehicle body coordinate system, f x represents the focal length in the u direction, f y represents the focal length in the v direction, c x represents the horizontal coordinate of the intersection of the principal optical axis and the physical imaging plane, c y Represents the ordinate of the intersection of the principal optical axis and the physical imaging plane, X c Indicates the X-axis coordinate of the camera system, Y c Indicates the Y-axis coordinate of the camera system, Z c Indicates the Z-axis coordinate of the camera system, X v Indicates the X-axis coordinate of the first vehicle system, Y v Indicates the Y-axis coordinate of the first vehicle system, Z v Indicates the Z-axis coordinate of the first vehicle system.

[0088] In one embodiment, the trailer rotation angle measurement module 43 is further used to determine a first parameter of a preset arccosine formula according to the first vehicle system coordinates; and determine the rotation angle of the trailer according to the first parameter of the arccosine formula.

[0089] In one embodiment, the trailer rotation angle measurement module 43 is also used to project the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain the straight line equation of the line connecting the image acquisition device and the outermost bottom endpoint of the vehicle side contour line corresponding to the image acquisition device; establish the equation of a circle with the image acquisition device and the outermost bottom endpoint of the vehicle side contour line corresponding to the image acquisition device as the radius; and determine the second vehicle body coordinate corresponding to the bottom endpoint of the side edge contour based on the straight line equation and the circle equation.

[0090] In one embodiment, the trailer rotation angle measurement module 43 is further used to determine a second parameter of a preset arccosine formula according to the second vehicle system coordinates; and determine the rotation angle of the trailer according to the second parameter of the arccosine formula.

[0091] The trailer rotation angle measuring device provided in the embodiment of the present invention has the same technical features as the trailer rotation angle measuring method provided in the above embodiment, so it can also solve the same technical problems and achieve the same technical effects. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the above method embodiment, and will not be repeated here.

[0092] Example 4

[0093] This embodiment provides an electronic device, including a processor and a memory, wherein the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of a method for measuring a rotation angle of a trailer.

[0094] This embodiment provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of measuring the rotation angle of the trailer are implemented.

[0095] See also Figure 5 The schematic diagram of the structure of an electronic device shown in the figure comprises: a memory 51 and a processor 52. The memory 51 stores a computer program that can be run on the processor 52. When the processor executes the computer program, the steps provided for measuring the rotation angle of the trailer are implemented.

[0096] like Figure 5As shown, the device further includes: a bus 53 and a communication interface 54, a processor 52, a communication interface 54 and a memory 51 are connected via the bus 53; the processor 52 is used to execute executable modules stored in the memory 51, such as computer programs.

[0097] The memory 51 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 54 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0098] The bus 53 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 5 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0099] Among them, the memory 51 is used to store the program, and the processor 52 executes the program after receiving the execution instruction. The method performed by the trailer rotation angle measuring device disclosed in any embodiment of the present invention can be applied to the processor 52, or implemented by the processor 52. The processor 52 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit in the processor 52 or the instruction in the form of software. The above processor 52 can be a general processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present invention can be implemented or executed. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 51, and the processor 52 reads the information in the memory 51 and completes the steps of the above method in combination with its hardware.

[0100] Furthermore, an embodiment of the present invention also provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor 52, the machine-executable instructions prompt the processor 52 to implement the above-mentioned method for measuring the rotation angle of the trailer.

[0101] The electronic device and computer-readable storage medium provided by the embodiments of the present invention have the same technical features, and therefore can solve the same technical problems and achieve the same technical effects.

[0102] 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.

[0103] 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.

Claims

1. A method for measuring the rotation angle of a trailer, characterized in that: include: Acquire a compartment image of the trailer; wherein the compartment image is obtained by taking an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer; Based on the carriage image, detecting a target edge contour of the carriage of the trailer; the target edge contour includes a rear edge contour and / or a side edge contour of the carriage; Determining the rotation angle of the trailer according to the target edge contour of the carriage and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin; Based on the carriage image, the step of detecting the target edge contour of the carriage of the trailer comprises: Extracting an initial vehicle body contour of the vehicle compartment image by using a pre-trained image detector; De-distorting the initial vehicle body contour by using a preset de-distortion function to detect the target edge contour of the trailer compartment; If the detected target edge contour is: the side edge contour of the carriage; according to the target edge contour of the carriage and the body coordinate system of the trailer, the step of determining the rotation angle of the trailer comprises: Projecting the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain a second vehicle body coordinate system corresponding to the bottom endpoint of the side edge contour; Determining a rotation angle of the trailer according to the second vehicle system coordinates; The step of projecting the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain a second vehicle body coordinate system corresponding to the bottom endpoint of the side edge contour comprises: Projecting the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain a straight line equation connecting the image acquisition device and the outermost bottom endpoint of the vehicle side contour line corresponding to the image acquisition device; Establishing an equation of a circle with a radius of a line connecting the outermost bottom endpoints of the image acquisition device and the vehicle side contour line corresponding to the image acquisition device; According to the straight line equation and the circle equation, a second vehicle system coordinate corresponding to the bottom endpoint of the side edge contour is determined.

2. The method for measuring the rotation angle of a trailer according to claim 1, characterized in that: If the detected target edge contour is: the rear edge contour of the carriage; according to the target edge contour of the carriage and the body coordinate system of the trailer, the step of determining the rotation angle of the trailer comprises: Projecting the bottom endpoint of the tail edge contour into the vehicle body coordinate system to obtain a first vehicle body coordinate system corresponding to the bottom endpoint of the tail edge contour; The rotation angle of the trailer is determined according to the first vehicle system coordinates.

3. The method for measuring the rotation angle of a trailer according to claim 2, characterized in that: The step of projecting the bottom endpoint of the tail edge contour into the vehicle body coordinate system to obtain the first vehicle body coordinate system corresponding to the bottom endpoint of the tail edge contour comprises: The first vehicle system coordinates corresponding to the tail edge contour are calculated by the following formula; ; ; Among them, s represents the preset parameter, represents the intrinsic parameter matrix of the image acquisition device, Represents the preset camera coordinates, represents the first vehicle body coordinate system, u is the coordinate value of the bottom endpoint of the tail edge contour in the horizontal direction, v is the coordinate value of the bottom endpoint of the tail edge contour in the vertical direction, R represents the rotation matrix of the image coordinate system corresponding to the preset image acquisition device to the vehicle body coordinate system, t represents the translation matrix of the image coordinate system corresponding to the preset image acquisition device to the vehicle body coordinate system, represents the focal length in the u direction, represents the focal length in the v direction, Represents the horizontal coordinate of the intersection of the principal optical axis and the physical imaging plane, Represents the ordinate of the intersection of the principal optical axis and the physical imaging plane, Indicates the X-axis coordinate of the camera system. Indicates the Y-axis coordinate of the camera system. Indicates the Z-axis coordinate of the camera system. Indicates the X-axis coordinate of the first vehicle system, Indicates the Y-axis coordinate of the first vehicle system, Indicates the Z-axis coordinate of the first vehicle system.

4. The method for measuring the rotation angle of a trailer according to claim 3, characterized in that: The step of determining the rotation angle of the trailer according to the first vehicle system coordinates comprises: Determining a first parameter of a preset arccosine formula according to the first vehicle system coordinates; The rotation angle of the trailer is determined according to the first parameter of the arc cosine formula.

5. The method for measuring the rotation angle of a trailer according to claim 1, characterized in that: The step of determining the rotation angle of the trailer according to the second vehicle system coordinates comprises: Determining a second parameter of a preset arccosine formula according to the second vehicle system coordinates; The rotation angle of the trailer is determined according to the second parameter of the arc cosine formula.

6. The method for measuring the rotation angle of a trailer according to claim 1, characterized in that: The preset dedistortion function includes: undistortPoints function of openCV.

7. A device for measuring the rotation angle of a trailer, characterized in that: include: An image acquisition module, used to acquire the image of the compartment of the trailer; wherein the image of the compartment is obtained by taking pictures of an image acquisition device, and the image acquisition device is arranged on both sides of the corresponding front of the trailer; An edge contour detection module, configured to detect a target edge contour of the trailer compartment based on the compartment image; the target edge contour includes a rear edge contour and / or a side edge contour of the compartment; The trailer rotation angle measurement module is used to determine the rotation angle of the trailer according to the target edge contour of the carriage and the body coordinate system of the trailer; the body coordinate system is used to indicate a three-dimensional coordinate system established with the center of the rear axle of the trailer as the origin; based on the carriage image, the step of detecting the target edge contour of the carriage of the trailer comprises: extracting the initial body contour of the carriage image by a pre-trained image detector; de-distorting the initial body contour by a preset de-distortion function to detect the target edge contour of the carriage of the trailer; if the detected target edge contour is: the side edge contour of the carriage; according to the target edge contour of the carriage and the body coordinate system of the trailer, the step of determining the rotation angle of the trailer comprises: projecting the bottom endpoint of the side edge contour to the In the vehicle body coordinate system, a second vehicle system coordinate corresponding to the bottom endpoint of the side edge contour is obtained; according to the second vehicle system coordinate, the rotation angle of the trailer is determined; the bottom endpoint of the side edge contour is projected into the vehicle body coordinate system to obtain the second vehicle system coordinate corresponding to the bottom endpoint of the side edge contour, the steps include: projecting the bottom endpoint of the side edge contour into the vehicle body coordinate system to obtain the straight line equation of the line connecting the image acquisition device and the outermost bottom endpoint of the vehicle side contour line corresponding to the image acquisition device; establishing the equation of a circle with the image acquisition device and the outermost bottom endpoint of the vehicle side contour line corresponding to the image acquisition device as the radius; and determining the second vehicle system coordinate corresponding to the bottom endpoint of the side edge contour according to the straight line equation and the circle equation.

Citation Information

Patent Citations

  • Method for determining an operating angle between a tractor and a trailer of said tractor

    CN113874914A