Trailer Angle Recognition Method and Device

By posting QR codes on the outside of the trailer and using a camera to identify the image, calculating the trailer angle, the problem of inaccurate trailer angle recognition in the existing technology is solved, and the accurate detection of trailer angle is achieved, and the accuracy of autonomous driving is improved.

CN114140535BActive Publication Date: 2025-08-01BEIJING JINGWEI HIRAIN TECH CO INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111444926.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2025-08-01
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

The prior art is difficult to accurately obtain the angle of the trailer when turning, which affects the accuracy of automatic turning control.

Method used

Post multiple QR codes on the outside of the trailer body, and set up a camera on the rear window of the front and rear. By obtaining and analyzing the images taken by the camera, identifying the QR code position and calculating the trailer axle, and then determining the trailer angle.

Benefits of technology

It realizes accurate identification of trailer angles, expands the detection range, is suitable for most trailer turn scenarios, and improves the accuracy of autonomous driving.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140535B_ABST
    Figure CN114140535B_ABST
Patent Text Reader

Abstract

The present application provides a trailer angle recognition method and device. The method includes: obtaining a plurality of images captured by a camera during the turning of a trailer; recognizing the positions of two-dimensional codes in each image, and calibrating the position of the trailer axis according to the recognition results; determining a first image at the start moment of turning, a second image at the end moment of turning, and a first target two-dimensional code for trailer angle recognition in the first image and the second image among the plurality of images; calculating the trailer angle of the trailer according to the position of the first target two-dimensional code in the first image, the target of the first target two-dimensional code in the second image, and the position of the trailer axis. In the present application, a plurality of two-dimensional codes are pre-posted on the outer side of the trailer body, and a camera is arranged on the rear window of the vehicle head. The use of a plurality of two-dimensional codes can achieve the trailer angle during the turning of the trailer, which can make the detected angle range larger, ensure the accuracy of the trailer angle, and solve most trailer turning scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of port container trucks and other truck autonomous driving technologies, and more specifically, to a trailer angle recognition method and device. Background Art

[0002] When a large truck, especially a truck with a long trailer, turns, the front of the truck often forms a certain angle with the trailer. Refer to Figure 1 , this angle is called the trailer angle, which can be represented by the included angle formed by the central axis of the front of the truck and the central axis of the trailer. The trailer angle plays an important role in the automatic turning control of the vehicle.

[0003] Therefore, how to obtain an accurate trailer angle has become an urgent problem to be solved. Summary of the Invention

[0004] In view of this, to solve the above problems, this application provides a trailer angle recognition method and device, and the technical solutions are as follows:

[0005] A trailer angle recognition method, where a plurality of two-dimensional codes are posted on the outer side of the body of the trailer, and a camera is arranged on the rear window of the front of the truck. The method includes:

[0006] Obtain a plurality of images captured by the camera during the turning process of the trailer;

[0007] Identify the positions of the two-dimensional codes in each image, and calibrate the position of the trailer axis according to the recognition results;

[0008] Determine the first image at the start moment of turning, the second image at the end moment of turning, and the first target two-dimensional code for trailer angle recognition in the first image and the second image among the plurality of images;

[0009] Calculate the trailer angle of the trailer according to the position of the first target two-dimensional code in the first image, the position of the first target two-dimensional code in the second image, and the position of the trailer axis.

[0010] Optionally, the identifying the positions of the two-dimensional codes in each image includes:

[0011] Detect the two-dimensional code candidate frames in each image;

[0012] Determine the pixel positions of the two-dimensional codes in each image by decoding the two-dimensional code candidate frames;

[0013] Convert the pixel positions of the two-dimensional codes in each image to the world coordinate system.

[0014] Optionally, the calibrating the position of the trailer axis according to the recognition results includes:

[0015] Determine a second target two-dimensional code for curve fitting;

[0016] Perform curve fitting on the positions of the second target two-dimensional code in the multiple images to obtain the position of the trailer axis.

[0017] Optionally, calibrating the position of the trailer axis according to the recognition result includes:

[0018] Determine a third target two-dimensional code and a fourth target two-dimensional code for geometric operations, where the third target two-dimensional code and the fourth target two-dimensional code are symmetric about the trailer axis;

[0019] Determine at least two images where the third target two-dimensional code and the fourth target two-dimensional code are located;

[0020] For each of the at least two images, calculate the normal of the plane where the third target two-dimensional code and the fourth target two-dimensional code are located according to the positions of the third target two-dimensional code and the fourth target two-dimensional code in the image;

[0021] Determine the position of the trailer axis according to the intersection position of the normals corresponding to the at least two images.

[0022] Optionally, the method for determining the first target two-dimensional code includes:

[0023] Determine a plurality of candidate two-dimensional codes located in the first image and the second image;

[0024] For each of the plurality of candidate two-dimensional codes, determine the area of the image region occupied by the candidate two-dimensional code according to the positions of the candidate two-dimensional code in the first image and the second image;

[0025] Take the candidate two-dimensional code with the largest image region area among the plurality of candidate two-dimensional codes as the first target two-dimensional code.

[0026] Optionally, calculating the trailer angle of the trailer according to the position of the first target two-dimensional code in the first image, the position of the first target two-dimensional code in the second image, and the position of the trailer axis includes:

[0027] Calculate a first angle value of the first target two-dimensional code at the start moment of turning according to the position of the first target two-dimensional code in the first image and the position of the trailer axis;

[0028] Calculate a second angle value of the first target two-dimensional code at the end moment of turning according to the position of the first target two-dimensional code in the second image and the position of the trailer axis;

[0029] Take the difference between the first angle value and the second angle value as the trailer angle of the trailer.

[0030] A trailer angle recognition device, the device includes:

[0031] An image acquisition module, configured to acquire a plurality of images captured by a camera during the turning of the trailer, the camera is located at the rear window of the front of the trailer, and a plurality of two-dimensional codes are posted on the outer side of the body of the trailer;

[0032] An axis calibration module, configured to identify the positions of the two-dimensional codes in each image, and calibrate the position of the trailer axis according to the recognition results;

[0033] An angle calculation module, configured to determine a first image at the start moment of turning, a second image at the end moment of turning, and a first target two-dimensional code for trailer angle recognition in the first image and the second image among the plurality of images; According to the position of the first target two-dimensional code in the first image, the position of the first target two-dimensional code in the second image, and the position of the trailer axis, calculate the trailer angle of the trailer.

[0034] Optionally, the axis calibration module for calibrating the position of the trailer axis according to the recognition results is specifically configured to:

[0035] Determine a second target two-dimensional code for curve fitting; perform curve fitting on the positions of the second target two-dimensional code in the plurality of images to obtain the position of the trailer axis.

[0036] Optionally, the axis calibration module for calibrating the position of the trailer axis according to the recognition results is specifically configured to:

[0037] Determine a third target two-dimensional code and a fourth target two-dimensional code for geometric operations, the third target two-dimensional code and the fourth target two-dimensional code are symmetric about the trailer axis; determine at least two images where the third target two-dimensional code and the fourth target two-dimensional code are located; for each of the at least two images, calculate the normal of the plane where the third target two-dimensional code and the fourth target two-dimensional code are located according to the positions of the third target two-dimensional code and the fourth target two-dimensional code in the image; determine the position of the trailer axis according to the intersection position of the normals corresponding to the at least two images.

[0038] Optionally, the angle calculation module for calculating the trailer angle of the trailer according to the position of the first target two-dimensional code in the first image, the position of the first target two-dimensional code in the second image, and the position of the trailer axis is specifically configured to:

[0039] Calculate a first angle value of the first target two-dimensional code at the start moment of a turn according to the position of the first target two-dimensional code within the first image and the position of the trailer axis; calculate a second angle value of the first target two-dimensional code at the end moment of the turn according to the position of the first target two-dimensional code within the second image and the position of the trailer axis; and use the difference between the first angle value and the second angle value as the trailer angle of the trailer.

[0040] Compared with the prior art, the beneficial effects achieved by the present application are as follows:

[0041] The present application provides a method and device for identifying a trailer angle. Multiple two-dimensional codes are pre-pasted on the outer side of the vehicle body of the trailer, and a camera is arranged on the rear window of the vehicle head. The use of multiple two-dimensional codes can achieve the trailer angle during the turning of the trailer, which can increase the detected angle range, ensure the accuracy of the trailer angle, and solve most trailer turning scenarios. Description of the Drawings

[0042] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following-described drawings are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on the provided drawings without creative efforts.

[0043] Figure 1 It is a schematic diagram of the trailer angle;

[0044] Figure 2 It is a top view of the two-dimensional code pasting position provided by the embodiment of the present application;

[0045] Figure 3 It is another top view of the two-dimensional code pasting position provided by the embodiment of the present application;

[0046] Figure 4 It is a method flowchart of the trailer angle identification method provided by the embodiment of the present application;

[0047] Figure 5 It is a partial method flowchart of the trailer angle identification method provided by the embodiment of the present application;

[0048] Figure 6 It is a schematic diagram of the scenario provided by the embodiment of the present application;

[0049] Figure 7 It is a structural schematic diagram of the trailer angle identification device provided by the embodiment of the present application. Detailed Embodiments

[0050] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0051] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0052] In the embodiments of the present application, multiple two-dimensional codes are pre-pasted on the outer side of the trailer body, and a camera is set on the rear window of the vehicle head. Refer to Figure 2 and Figure 3 for the top view of the two-dimensional code pasting position shown. The two-dimensional codes are pasted on the outermost cross-section of the trailer. Generally, at least two two-dimensional codes (two in the figure) are pasted on the side of the vehicle body opposite to the vehicle head, and at least one two-dimensional code (one in the figure) is pasted on each of the other two opposite sides of the vehicle body. Ensure that the two-dimensional codes are within the field of view of the camera when pasting. Among them, Figure 2 represents an inner-axis trailer, that is, the axis of the trailer is located inside the vehicle body; Figure 3 represents an outer-axis trailer, that is, the axis of the trailer is located outside the vehicle body.

[0053] Refer to Figure 4 for the method flow chart of the trailer angle recognition method. The trailer angle recognition method provided by the embodiments of the present application includes the following steps:

[0054] S10, Obtain multiple images captured by the camera during the turning process of the trailer.

[0055] In the embodiments of the present application, during the automatic driving process of the trailer, it is necessary to control the turning angle of the trailer and the driving speed during the turning process through the control module to ensure that the trailer travels in a safe area. Therefore, the camera is started at the beginning of the turn to continuously capture multiple images during the turning process of the trailer, and each image has the corresponding two-dimensional code that can be observed by the camera.

[0056] S20, Identify the positions of the two-dimensional codes in each image, and calibrate the position of the trailer axis according to the recognition results.

[0057] In the embodiments of the present application, by performing two-dimensional code detection on the image using an algorithm such as the AprilTag algorithm, the positions of the four corner points of each two-dimensional code in the image can be obtained, and then the position of the two-dimensional code can be determined according to the positions of the four corner points. Furthermore, the position of the trailer axis is determined by using an online calibration method based on the recognition results of the positions of the two-dimensional codes in multiple images.

[0058] In the specific implementation process, the step of "identifying the position of the two-dimensional code in each image" in step S20 can be implemented by the following steps. The method flow chart is as Figure 5 shown:

[0059] S201, detect the two-dimensional code candidate boxes in each image.

[0060] In the embodiment of the present application, first, the image is preprocessed. For example, the image is binarized by the canny operator. After the image preprocessing is completed, contour detection is performed on it to obtain a plurality of two-dimensional code candidate boxes. Further, in order to retain the two-dimensional code candidate boxes with high precision and improve the accuracy of contour detection, filtering can be further added to filter the two-dimensional code candidate boxes, remove the redundant candidate boxes among them, and perform polygon approximation on the filtered two-dimensional code candidate boxes to retain the candidate box of the quadrilateral closest to the target (two-dimensional code).

[0061] S202, determine the pixel positions of the two-dimensional codes in each image by decoding the two-dimensional code candidate boxes.

[0062] In the embodiment of the present application, for the two-dimensional code candidate boxes obtained in step S201, they can be further decoded, and by detecting the encoded information contained therein, it can be further determined whether it is a two-dimensional code. If it is a two-dimensional code, the decoded information contains the two-dimensional code identifier. Thus, the area where the two-dimensional code is located in the image can be located.

[0063] Moreover, a two-dimensional code coordinate system is established for the area where the two-dimensional code is located. Assuming that the origin of the two-dimensional code coordinate system is located at the center position of the two-dimensional code, then at this time, the positions of the four corner points of the two-dimensional code in the two-dimensional code coordinate system can be obtained, that is, the pixel positions.

[0064] S203, convert the pixel positions of the two-dimensional codes in each image to the world coordinate system.

[0065] In the embodiment of the present application, in the two-dimensional code coordinate system, the pixel positions of the four corner points of the two-dimensional code are two-dimensional coordinates. At this time, the PNP algorithm is used to estimate the mapping relationship between the two-dimensional code coordinate system and the camera coordinate system. Furthermore, based on this mapping relationship, the pixel positions of the four corner points of the two-dimensional code can be converted to the camera coordinate system. The converted positions are three-dimensional coordinates. Finally, based on the mapping relationship between the camera coordinate system and the world coordinate system (which can be determined according to the internal and external parameters of the camera), the positions of the four corner points of the two-dimensional code in the camera coordinate system are converted to the world coordinates.

[0066] It should be noted that in the embodiments of the present application, the mapping relationship between the two-dimensional code coordinate system and the camera coordinate system is estimated by using the PNP algorithm in a calibration manner. The PNP algorithm is a method for solving the motion of 3D-2D point pairs. Briefly speaking, it is to estimate the relationship between the camera coordinate system and the two-dimensional code coordinate system when the coordinates of n three-dimensional space points relative to a specified coordinate system (the camera coordinate system in the present application) and their two-dimensional projection positions (the pixel positions of the corner points in the present application) are known, and obtain the rotation and translation (RT) matrix between the two coordinate systems. This rotation and translation matrix represents the mapping relationship between the two-dimensional code coordinate system and the camera coordinate system.

[0067] In addition, after the camera is calibrated, the conversion relationship between the camera coordinate system and the world coordinate system can be obtained, and then the representation of the two-dimensional code in the world coordinate system can be obtained.

[0068] In addition, in the specific implementation process, the step of "calibrating the position of the trailer axle center according to the recognition result" in step S20 can be implemented by the following steps:

[0069] Determine the second target two-dimensional code for curve fitting; perform curve fitting on the positions of the second target two-dimensional code in multiple images to obtain the position of the trailer axle center.

[0070] In the embodiments of the present application, the least squares method is used to perform online calibration on the position of the trailer axle center. The axle center of the trailer is the center position where the trailer rotates when turning. Therefore, for any two-dimensional code on the vehicle body, when the trailer turns, it moves in a circular path in space.

[0071] In this regard, any two-dimensional code in any one of the multiple images can be selected as the second target two-dimensional code for curve fitting. Of course, the two-dimensional code with the best clarity can also be selected. The embodiments of the present application do not make any limitations in this regard.

[0072] Furthermore, determine the image with the second target two-dimensional code, so as to obtain the position of the second target two-dimensional code in these determined images. Since the series of positions obtained have the same height in space, in the embodiments of the present application, two coordinates other than the height are used to determine a series of world coordinate points (x i , y i ) of the second target two-dimensional code. These world coordinate points are theoretically distributed in a circular shape. Therefore, these world coordinate points are used as inputs, and curve fitting is performed by the least squares method. The center position obtained by fitting is the position of the axle center. Specifically as follows:

[0073] According to the general equation of a circle x 2 + y 2 + ax + by + c = 0, the position of the axle center can be expressed as (A, B):

[0074]

[0075]

[0076] At this time, the fitting radius R:

[0077] Using the least squares method for fitting, the values of a, b, and c are obtained: According to the principle of the least squares method, an objective function is constructed:

[0078]

[0079] Taking the minimum value of the objective function as the goal, the values of a, b, and c are calculated, and thus the fitting radius R is determined, thereby determining the position of the axis center. Among them, N represents the number of images.

[0080] In addition, in the specific implementation process, "calibrating the position of the trailer axis center according to the recognition result" in step S20 can adopt the following steps:

[0081] Determine the third target two-dimensional code and the fourth target two-dimensional code for geometric operations. The third target two-dimensional code and the fourth target two-dimensional code are symmetric about the trailer axis center; determine at least two images where the third target two-dimensional code and the fourth target two-dimensional code are located; for each of the at least two images, calculate the normal line of the plane where the third target two-dimensional code and the fourth target two-dimensional code are located according to their positions in the image; determine the position of the trailer axis center according to the intersection position of the normal lines corresponding to the at least two images.

[0082] In the embodiment of the present application, geometric operations are used to perform online calibration of the position of the trailer axis center. Any two two-dimensional codes in any one of the multiple images can be selected as the third target two-dimensional code and the fourth target two-dimensional code for geometric operations, and it is required that the third target two-dimensional code and the fourth target two-dimensional code are symmetric about the trailer axis center. Of course, in practical applications, two two-dimensional codes with the best clarity can also be preferentially selected, and the embodiment of the present application does not limit this.

[0083] Further determine at least two images that simultaneously have the third target two-dimensional code and the fourth target two-dimensional code. Taking two images as an example for illustration, see Figure 6 the schematic diagram of the scene shown. Assume that the state at the start moment of the trailer turning is as shown in the solid line frame, and the state at the next moment is as shown in the dashed line frame. The third target two-dimensional code and the fourth target two-dimensional code are the two-dimensional code 1 and the two-dimensional code 2 respectively.

[0084] Without considering the height of the two-dimensional code, according to the position (x1, y1) of the two-dimensional code 1 at the start moment of turning and the position (x2, y2) of the two-dimensional code 2 at the start moment of turning, the midpoint position of the plane where the two two-dimensional codes are located can be determined

[0085] Furthermore, calculate the slope of the planes where the two QR codes are located according to the point-slope form:

[0086]

[0087] Thus, determine the slope of the normal line of the planes where the two QR codes are located:

[0088]

[0089] Then, substitute the midpoint position of the planes where the two QR codes are located into the equation y = k2x + b1 to determine b1, and thus the normal line equation of the planes where the two QR codes are located can be obtained:

[0090]

[0091] Similarly, according to the position (x3, y3) of QR code 1 at the next moment and the position (x4, y4) of QR code 2 at the start moment of turning, the midpoint position of the planes where the two QR codes are located can be determined

[0092]

[0093] Furthermore, calculate the slope of the planes where the two QR codes are located according to the point-slope form:

[0094]

[0095] Thus, determine the slope of the normal line of the planes where the two QR codes are located:

[0096]

[0097] Then, substitute the midpoint position of the planes where the two QR codes are located into the equation y = k4x + b2 to determine b2, and thus the normal line equation of the planes where the two QR codes are located can be obtained:

[0098]

[0099] Furthermore, solve the following system of equations:

[0100]

[0101] The solution of this system of equations is the position of the axis center. Of course, to make the result more accurate, multiple groups of images can be measured to obtain the positions of the intersections of multiple groups of normal lines, and then the average value is calculated as the position of the axis center.

[0102] S30. Determine the first image at the start moment of turning, the second image at the end moment of turning, and the first target QR code for trailer angle recognition located within the first image and the second image in multiple images.

[0103] In the embodiments of the present application, two images with the earliest and latest turning moments among multiple images are determined, namely the first image and the second image, and then a two-dimensional code that is simultaneously within the first image and the second image is used as the first target two-dimensional code for trailer angle recognition. Of course, if there are multiple two-dimensional codes that are simultaneously within the first image and the second image, one of them can be selected as the first target two-dimensional code.

[0104] During the driving of the vehicle, the pixel value size occupied by the two-dimensional code in the image also changes. To obtain a more stable and accurate trailer angle, the two-dimensional code with the largest pixel value in the image can be selected for subsequent calculations, and the pixel value occupied by the two-dimensional code in the image can be calculated based on the area of the region enclosed by the four corner points of the two-dimensional code.

[0105] Specifically, first, multiple candidate two-dimensional codes located within the first image and the second image are determined. Further, for each candidate two-dimensional code, the image region area occupied by the candidate two-dimensional code is determined according to its positions within the first image and the second image. Finally, the candidate two-dimensional code with the largest image region area among the multiple candidate two-dimensional codes is used as the first target two-dimensional code.

[0106] It should be noted that since the candidate two-dimensional code is simultaneously within the first image and the second image and has corresponding positions in the first image and the second image, the area of the region within the first image can be determined according to the positions of the four corner points of the candidate two-dimensional code in the first image. Similarly, the area of the region of the candidate two-dimensional code in the second image can also be determined.

[0107] At this time, the image region area occupied by the candidate two-dimensional code can be determined according to the two region areas of the candidate two-dimensional code within the first image and the second image. For example, the corresponding region area can be used as the image region area based on the first image or the second image. For another example, the average value of the two region areas can also be used as the image region area. The embodiments of the present application do not limit this.

[0108] S40. Calculate the trailer angle of the trailer according to the position of the first target two-dimensional code within the first image, the position of the first target two-dimensional code within the second image, and the position of the trailer axis.

[0109] In the embodiments of the present application, continue to refer to Figure 6 the scene schematic diagram shown. Assuming that the two-dimensional code 2 is used as the first target two-dimensional code, it can be seen that the rotation angle of the straight line where the two-dimensional code 2 and the axis are located is the trailer angle, that is, the trailer angle α = β = θ0 - θ1, where β is the rotation angle of the straight line where the two-dimensional code 2 and the axis are located, θ0 is the vector angle of the two-dimensional code 2 at the start moment of the turn, and θ1 is the vector angle of the two-dimensional code 2 at the next moment. Here, the next moment is also the end moment of the turn.

[0110] Specifically, based on the position of the first target two-dimensional code within the first image and the position of the trailer axle center, the first angular value of the first target two-dimensional code at the start moment of the turn can be calculated, and based on the position of the first target two-dimensional code within the second image and the position of the trailer axle center, the second angular value of the first target two-dimensional code at the end moment of the turn can be calculated. Further, the difference between the first angular value and the second angular value is used as the trailer angle of the trailer.

[0111] Continue to refer to Figure 6 the schematic diagram of the scenario shown. Since the height of the trailer axle center is the same as the height of the two-dimensional code, the height is not considered. Assuming the position of the trailer axle center is (x5, y5), then the vector angle of the two-dimensional code 2 at the start moment of the turn, that is, the first angular value the vector angle of the two-dimensional code 2 at the next moment, that is, the second angular value

[0112] In summary, the present application calculates the trailer angle based on multiple two-dimensional codes in multiple directions, enabling a larger detection angle range and capable of solving the trailer corner scenarios within [-90°, 90°]. Moreover, when using the axle center and a single two-dimensional code to calculate the trailer angle, for an outer-axle trailer, the distance between its axle center and the camera is relatively far, so a larger two-dimensional code detection error can be tolerated, and the trailer angle is more accurate and robust. Furthermore, using the position of the two-dimensional code to calculate the angle instead of the plane normal vector of the two-dimensional code also improves the robustness of the trailer angle calculation. Finally, using a single two-dimensional code can complete the calculation of the trailer angle, so that the occlusion of the container under large turning angles will not affect the angle recognition.

[0113] Based on the trailer angle recognition method provided in the above embodiments, an embodiment of the present application further provides a trailer angle recognition device. The structural schematic diagram of the device is as Figure 7 shown, including:

[0114] An image acquisition module 10, configured to acquire multiple images captured by a camera during the turning process of the trailer. The camera is located at the rear window of the trailer head, and multiple two-dimensional codes are posted on the outer side of the trailer body;

[0115] An axle center calibration module 20, configured to identify the position of the two-dimensional code in each image and calibrate the position of the trailer axle center according to the recognition result;

[0116] An angle calculation module 30, configured to determine the first image at the start moment of the turn, the second image at the end moment of the turn, and the first target two-dimensional code for trailer angle recognition located within the first image and the second image among the multiple images; calculate the trailer angle of the trailer according to the position of the first target two-dimensional code within the first image, the position of the first target two-dimensional code within the second image, and the position of the trailer axle center.

[0117] Optionally, the axis calibration module 20 for identifying the positions of the two-dimensional codes within each image is specifically configured to:

[0118] Detect the two-dimensional code candidate frames within each image; determine the pixel positions of the two-dimensional codes within each image by decoding the two-dimensional code candidate frames; and convert the pixel positions of the two-dimensional codes within each image to the world coordinate system.

[0119] Optionally, the axis calibration module 20 for calibrating the position of the trailer axis according to the recognition result is specifically configured to:

[0120] Determine the second target two-dimensional code for curve fitting; perform curve fitting on the positions of the second target two-dimensional code in multiple images to obtain the position of the trailer axis.

[0121] Optionally, the axis calibration module 20 for calibrating the position of the trailer axis according to the recognition result is specifically configured to:

[0122] Determine the third target two-dimensional code and the fourth target two-dimensional code for geometric operation, where the third target two-dimensional code and the fourth target two-dimensional code are symmetric about the trailer axis; determine at least two images where the third target two-dimensional code and the fourth target two-dimensional code are located; for each of the at least two images, calculate the normal line of the plane where the third target two-dimensional code and the fourth target two-dimensional code are located according to the positions of the third target two-dimensional code and the fourth target two-dimensional code within the image; and determine the position of the trailer axis according to the intersection position of the normal lines corresponding to the at least two images.

[0123] Optionally, the method for determining the first target two-dimensional code includes:

[0124] Determine multiple candidate two-dimensional codes located within the first image and the second image; for each of the multiple candidate two-dimensional codes, determine the area of the image region occupied by the candidate two-dimensional code according to the positions of the candidate two-dimensional code within the first image and the second image; and use the candidate two-dimensional code with the largest image region area among the multiple candidate two-dimensional codes as the first target two-dimensional code.

[0125] Optionally, the angle calculation module 30 for calculating the trailer angle of the trailer according to the position of the first target two-dimensional code within the first image, the position of the first target two-dimensional code within the second image, and the position of the trailer axis is specifically configured to:

[0126] Calculate a first angle value of the first target two-dimensional code at the start moment of turning according to the position of the first target two-dimensional code within the first image and the position of the trailer axis; calculate a second angle value of the first target two-dimensional code at the end moment of turning according to the position of the first target two-dimensional code within the second image and the position of the trailer axis; and use the difference between the first angle value and the second angle value as the trailer angle of the trailer.

[0127] The trailer angle recognition device provided by the embodiment of the present application pre-posts a plurality of two-dimensional codes on the outer side of the trailer body and sets a camera on the rear window of the vehicle head. The use of a plurality of two-dimensional codes can realize the trailer angle when the trailer turns, which can make the detected angle range larger, ensure the accuracy of the trailer angle, and solve most trailer turning scenarios.

[0128] The above has introduced in detail a trailer angle recognition method and device provided by the present application. Specific examples are used in this article to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to the present application.

[0129] It should be noted that the embodiments in this specification are all described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part.

[0130] It should also be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements inherent to the process, method, article or device, but also other elements inherent to these process, method, article or device. Without more limitations, the element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0131] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be obvious to those skilled in the art. The general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments shown herein, but will be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A trailer angle recognition method, characterized in that, There are multiple two-dimensional codes posted on the outer side of the trailer body, and a camera is set on the rear window of the trailer head. The method includes: Obtaining multiple images captured by the camera during the turning process of the trailer; Identifying the positions of the two-dimensional codes in each image, and calibrating the position of the trailer axis according to the recognition results; Determining a first image at the start moment of turning, a second image at the end moment of turning, and a first target two-dimensional code for trailer angle recognition located in the first image and the second image among the multiple images; Calculating a first angle value of the first target two-dimensional code at the start moment of turning according to the position of the first target two-dimensional code in the first image and the position of the trailer axis; Calculating a second angle value of the first target two-dimensional code at the end moment of turning according to the position of the first target two-dimensional code in the second image and the position of the trailer axis; Taking the difference between the first angle value and the second angle value as the trailer angle of the trailer; 2. The method according to claim 1, wherein The identifying the positions of the two-dimensional codes in each image includes: Detecting two-dimensional code candidate frames in each image; Determining the pixel positions of the two-dimensional codes in each image by decoding the two-dimensional code candidate frames; Converting the pixel positions of the two-dimensional codes in each image to the world coordinate system; 3. The method according to claim 1, wherein The calibrating the position of the trailer axis according to the recognition results includes: Determining a second target two-dimensional code for curve fitting; Performing curve fitting on the positions of the second target two-dimensional code in the multiple images to obtain the position of the trailer axis; 4. The method according to claim 1, wherein The calibrating the position of the trailer axis according to the recognition results includes: Determining a third target two-dimensional code and a fourth target two-dimensional code for geometric operation, where the third target two-dimensional code and the fourth target two-dimensional code are symmetric about the trailer axis; Determining at least two images where the third target two-dimensional code and the fourth target two-dimensional code are located; For each of the at least two images, calculating the normal line of the plane where the third target two-dimensional code and the fourth target two-dimensional code are located according to the positions of the third target two-dimensional code and the fourth target two-dimensional code in the image; Determining the position of the trailer axis according to the intersection position of the normal lines corresponding to the at least two images; 5. The method according to claim 1, wherein The determining method of the first target two-dimensional code includes: Determining multiple candidate two-dimensional codes located in the first image and the second image; For each candidate two-dimensional code among the multiple candidate two-dimensional codes, determining the image area occupied by the candidate two-dimensional code according to the positions of the candidate two-dimensional code in the first image and the second image; Taking the candidate two-dimensional code with the largest image area among the multiple candidate two-dimensional codes as the first target two-dimensional code; 6. A trailer angle recognition device, characterized in that, The device includes: An image acquisition module, configured to acquire multiple images captured by the camera during the turning process of the trailer, the camera is located on the rear window of the trailer head, and multiple two-dimensional codes are posted on the outer side of the trailer body; An axis calibration module, configured to identify the positions of the two-dimensional codes in each image, and calibrate the position of the trailer axis according to the recognition results; An angle calculation module, configured to determine a first image at the start moment of a turn, a second image at the end moment of the turn, and a first target two-dimensional code for trailer angle recognition within the first image and the second image among the multiple images; calculate a first angle value of the first target two-dimensional code at the start moment of the turn according to the position of the first target two-dimensional code within the first image and the position of the trailer axis; calculate a second angle value of the first target two-dimensional code at the end moment of the turn according to the position of the first target two-dimensional code within the second image and the position of the trailer axis; and use the difference between the first angle value and the second angle value as the trailer angle of the trailer.

7. The device according to claim 6, characterized in that, The axis calibration module for calibrating the position of the trailer axis according to the recognition result is specifically configured to: Determine a second target two-dimensional code for curve fitting; perform curve fitting on the positions of the second target two-dimensional code within the multiple images to obtain the position of the trailer axis.

8. The device according to claim 6, wherein The axis calibration module for calibrating the position of the trailer axis according to the recognition result is specifically configured to: Determine a third target two-dimensional code and a fourth target two-dimensional code for geometric operation, where the third target two-dimensional code and the fourth target two-dimensional code are symmetric about the trailer axis; determine at least two images where the third target two-dimensional code and the fourth target two-dimensional code are located; for each of the at least two images, calculate the normal line of the plane where the third target two-dimensional code and the fourth target two-dimensional code are located according to the positions of the third target two-dimensional code and the fourth target two-dimensional code within the image; and determine the position of the trailer axis according to the intersection position of the normal lines corresponding to the at least two images.

Citation Information

Patent Citations

  • Trailer angle identification method and device

    CN112308899A

  • Method for determining angle between towing vehicle e.g. car and trailer, involves determining color information for multitude of fields of detected image comprising drawbar movement between towing vehicle and trailer

    DE102011120814A1