Semitrailer sideslip detection method, system and equipment based on CMS and medium
Through the calibration module and image processing technology of the CMS system, combined with the vehicle motion model, the rear boundary and height are accurately positioned, and the side slip volume is calculated, which solves the problem of difficulty in accurately judging the side slip of semi-trailer under complex road conditions in the existing technology, and improves the problem of improving The accuracy and reliability of side-slip detection are achieved, and effective side-slip monitoring is achieved under different conditions.
Patent Information
- Application Number
- CN202411016536.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-28
- Publication Date
- 2024-11-12
AI Technical Summary
The prior art is difficult to accurately judge the side slip condition of a semi-trailer under complex road conditions, and the measurement accuracy is affected in bad weather or light conditions, which cannot fully reflect the side slip condition of the vehicle.
The calibration module and image processing technology based on the CMS system are used to accurately locate the rear boundary and height of the vehicle, combine the vehicle motion model, and calculate the side slip amount using the dual positioning method, which improves the accuracy of side slip detection.
Through the calibration module and image processing technology of the CMS system, the rear edge and height are accurately positioned, and combined with the vehicle motion model, the rear position is accurately calculated and predicted, and the side slip volume is calculated using the dual positioning method, which improves the accuracy of side slip detection and Reliability can promptly reflect the current status of the vehicle and reduce side slip hazards.
Smart Images

Figure CN118928437A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of sideslip detection, and in particular to a method, system, equipment and medium for detecting sideslip of a semitrailer based on CMS. Background Art
[0002] With the development of China's economy, the volume of highway freight has been rising year by year, and the number of semi-trailers has also increased significantly. Correspondingly, the number of accidents involving semi-trailers has also shown an upward trend. The main accidents are traffic accidents caused by traffic violations such as speeding and failure to give way as required. Although the number of accidents caused by semi-trailer skidding is lower than these major accidents, the consequences of such accidents are very serious. When a semi-trailer skids (also known as tail-swinging), the rear trailer moves laterally, and the body is long and has a large mass, which causes the inertia of the lateral sliding to cause a large impact force, which is a "catastrophe" for vehicles in the opposite direction. Just scratching or contacting with the oncoming vehicle can cause the oncoming vehicle to be destroyed, causing injuries, or even death. There are also many cases of major accidents caused by the vehicle overturning due to skidding.
[0003] In the prior art, patent CN115071345A discloses a towing mechanism and a method for preventing a trailer from skidding, but it is mainly aimed at preventing skidding when driving on a slope, cannot cope with other complex road conditions, and relies on a specific towing mechanism; patent CN115339462A discloses an estimation method and electronic equipment for the lateral skidding of a trailer in a trailer, which estimates the lateral skidding amount of the trailer based on the speed of a specified point, but requires the installation of two additional optical flow sensors, which may be affected in severe weather or light conditions, affecting the measurement accuracy, and only relies on the speed and position information of two specified points, and cannot fully reflect the skidding state of the vehicle.
[0004] Therefore, finding a method that can adapt to complex road conditions, accurately determine the occurrence of sideslip, and respond immediately to reduce the harm of sideslip is a technical problem that needs to be solved urgently by technical personnel in this field. Summary of the invention
[0005] In view of this, the present invention proposes a semi-trailer sideslip detection method, system, device and medium based on CMS, which can accurately locate the boundary and height of the rear end of the vehicle through the calibration module and image processing technology of the CMS system, and accurately calculate and predict the rear end position in combination with the vehicle motion model, and use a dual positioning method to calculate the sideslip amount, thereby improving the accuracy of sideslip detection.
[0006] The technical solution of the present invention is achieved in this way:
[0007] In a first aspect, the present invention provides a method for detecting sideslip of a semi-trailer based on a CMS, comprising the following steps:
[0008] S1. Use the calibration module of the CMS system to initialize the rear detection template, and perform image detection and recognition on the CMS image of the semi-trailer to obtain the rear boundary and rear height in the CMS image, and use the rear boundary and rear height to determine the actual rear position;
[0009] S2, using the vehicle motion model to constrain the rear position of the vehicle and calculate the predicted rear position of the vehicle;
[0010] S3. Calculate the side slip of the semitrailer based on the actual rear position and the predicted rear position, and determine whether a danger warning is required based on the side slip of the semitrailer:
[0011] If the side slip of the semi-trailer exceeds the threshold, a side slip danger signal will be issued.
[0012] On the basis of the above technical solution, preferably, step S1 specifically includes:
[0013] S11, using the calibration module of the CMS system to calculate the position of the rear end of the semi-trailer in the CMS image, and cropping the rear end of the semi-trailer according to the position in the CMS image, and using the cropped image as the rear end image;
[0014] S12, preprocessing the rear image of the vehicle, and performing line detection to obtain the rear boundary features of the rear image of the vehicle;
[0015] S13, generating an initial template for vehicle rear detection according to the vehicle rear boundary features, and recording an initial actual vehicle rear position according to the vehicle rear boundary features.
[0016] On the basis of the above technical solution, preferably, the position clipping specifically includes:
[0017] The length of the rear of the vehicle and the width of the marking point are calculated based on the calibration module of the CMS system;
[0018] Calculate the boundary points of the cropping area based on the length of the rear of the vehicle, the width of the marking point, and the height of the rear of the vehicle;
[0019] The rear image of the vehicle is cropped from the CMS image according to the boundary points of the cropping area.
[0020] Based on the above technical solution, preferably, step S12 specifically includes:
[0021] Select a pixel point at random from the lower left corner of the image, and calculate the weighted sum of the lengths of the horizontal line to the left of the pixel point and the vertical line to the bottom of the pixel point in the image; the calculation formula for the weighted sum is:
[0022] L m =a×line0+b×line1;
[0023] Among them, Lm represents the weighted sum, line0 represents the length of the horizontal line segment, a represents the weight of line0, line1 represents the length of the vertical line segment, and b represents the weight of line1;
[0024] Find the image pixel point corresponding to the maximum value of the weighted sum as the rear boundary of the vehicle;
[0025] The calibration module of the CMS system calculates the three-dimensional coordinates corresponding to the rear boundary of the semi-trailer based on the width of the semi-trailer;
[0026] The fixed-size CMS image is cropped with the rear boundary as the center to obtain the rear template image.
[0027] On the basis of the above technical solution, preferably, step S2 specifically includes:
[0028] S21, obtaining the vehicle width, the distance from the front wheel to the rear wheel of the tractor, the distance from the rear wheel of the tractor to the attachment point, the distance from the attachment point to the rear wheel of the trailer, and the distance from the rear wheel of the trailer to the rear of the trailer, and using the CMS system to obtain in real time the angle between the trailer and the tractor along the directions of their respective bodies;
[0029] S22, calculating and predicting the X coordinate of the rear position of the vehicle according to the lateral offset caused by the steering and the projection of the trailer length on the X axis;
[0030] S23, calculating and predicting the Y coordinate of the rear position of the vehicle according to the distance from the front axle of the tractor to the hitch point, the projection of the trailer length on the Y axis, and the longitudinal offset caused by the steering;
[0031] S24, obtaining the coordinates of the predicted position of the rear end of the vehicle according to the predicted X coordinate of the rear end of the vehicle and the predicted Y coordinate of the rear end of the vehicle.
[0032] Based on the above technical solution, preferably, the calculation formula for predicting the rear position of the vehicle is:
[0033] X pos =-(cosα×W / 2+(L2+L3)×sinα)
[0034] Y pos =-(L1+M+(L2+L3)×cosα)-sinα×W / 2
[0035] Among them, X pos Indicates the X coordinate of the predicted rear position, Y pos represents the Y coordinate of the predicted rear position, α represents the angle between the trailer and the tractor along their respective body directions, W represents the vehicle width, L1 represents the distance from the front wheel to the rear wheel of the tractor, L2 represents the distance from the coupling point to the rear wheel of the trailer, L3 represents the distance from the rear wheel of the trailer to the rear of the trailer, and M represents the distance from the rear wheel of the tractor to the coupling point.
[0036] More preferably, the calculation formula of the sideslip amount of the semi-trailer is:
[0037] slipe value =|w s |-|X pos
[0038] Among them, slipe value Indicates the side slip of the semitrailer, w s Indicates the X coordinate of the actual rear position of the vehicle.
[0039] In a second aspect, the present invention provides a semi-trailer sideslip detection system based on CMS, which adopts the semi-trailer sideslip detection method as described above, including:
[0040] A vehicle rear detection module is configured to use a calibration module of the CMS system to initialize a vehicle rear detection template, and perform image detection and recognition on the CMS image of the semitrailer to obtain a vehicle rear boundary and a vehicle rear height in the CMS image, and determine an actual vehicle rear position using the vehicle rear boundary and the vehicle rear height;
[0041] a motion constraint module configured to constrain a rear position of the vehicle using a vehicle motion model and calculate a predicted rear position of the vehicle;
[0042] A side slip calculation module configured to calculate the side slip of the semitrailer according to the actual rear position and the predicted rear position;
[0043] The early warning module is configured to determine whether a danger warning is required based on the side slip amount of the semi-trailer:
[0044] If the side slip of the semi-trailer exceeds the threshold, a side slip danger signal will be issued.
[0045] In a third aspect, the present invention provides an electronic device, comprising: at least one processor, at least one memory, a communication interface and a bus; wherein:
[0046] The processor, memory, and communication interface communicate with each other via the bus;
[0047] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the semi-trailer sideslip detection method as described above.
[0048] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to implement the semi-trailer sideslip detection method as described above.
[0049] The semi-trailer sideslip detection method of the present invention has the following beneficial effects compared with the prior art:
[0050] (1) Through the calibration module and image processing technology of the CMS system, the boundary and height of the rear of the vehicle are accurately located, and combined with the vehicle motion model, the rear position of the vehicle is accurately calculated and predicted. The side slip amount is calculated using a dual positioning method, which improves the accuracy of side slip detection.
[0051] (2) The position of the rear of the vehicle in the CMS image is obtained through the calibration module of the CMS system, and the CMS image is cropped to obtain the rear image. By processing the rear image, the rear position of the vehicle is accurately located to improve the driving safety of the vehicle. An initial detection template is generated based on the extracted boundary features of the rear of the vehicle, and the initial actual rear position is recorded, which provides a comparison benchmark for subsequent sideslip analysis and improves the accuracy and reliability of sideslip detection.
[0052] (3) The vehicle motion model is used to accurately predict the theoretical position of the rear of the vehicle at different steering angles. The CMS system is used to obtain the angle between the trailer and the tractor in real time, so that the prediction can timely reflect the current state of the vehicle. The predicted rear position is calculated using the lateral and longitudinal effects of steering on the rear position, making the prediction more comprehensive and accurate, improving the reliability of the prediction results, and enabling the predicted rear position to more accurately reflect the actual motion state of the vehicle. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 It is a flow chart of the semi-trailer detection method of the present invention;
[0055] Figure 2 is a block diagram of a semi-trailer detection method of the present invention;
[0056] Figure 3 It is a schematic diagram of the coordinate system of the calibration module of the semi-trailer detection method of the present invention;
[0057] Figure 4 A schematic diagram of the motion model constraining the rear position of a semi-trailer detection method of the present invention;
[0058] Figure 5 It is a schematic diagram of the execution line detection of the semi-trailer detection method of the present invention. DETAILED DESCRIPTION
[0059] The following will be combined with the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0060] As those skilled in the art can understand, the CMS system is an advanced system that replaces traditional rearview mirrors with cameras and displays, including cameras, display screens and processing units, wherein cameras are installed on both sides of the vehicle to replace traditional rearview mirrors, the display screens are installed inside the vehicle to display images captured by the cameras, and the processing unit processes image data and performs various functions.
[0061] The CMS system also has a calibration module to ensure that the CMS system can accurately present the vehicle's surroundings, especially distance and location information.
[0062] like Figure 1 and Figure 2 As shown, the present invention provides a method for detecting sideslip of a semi-trailer based on CMS, comprising the following steps:
[0063] S1. Use the calibration module of the CMS system to initialize the rear detection template, and perform image detection and recognition on the CMS image of the semi-trailer to obtain the rear boundary and rear height in the CMS image, and use the rear boundary and rear height to determine the actual rear position.
[0064] Specifically, step S1 specifically includes:
[0065] S11, using the calibration module of the CMS system to calculate the position of the rear end of the semi-trailer in the CMS image, and cropping the rear end of the semi-trailer according to the position in the CMS image, and using the cropped image as the rear end image;
[0066] Specifically, the position clipping specifically includes:
[0067] The length of the rear of the vehicle and the width of the marking point are calculated based on the calibration module of the CMS system;
[0068] Calculate the boundary points of the cropping area based on the length of the rear of the vehicle, the width of the marking point, and the height of the rear of the vehicle;
[0069] The rear image of the vehicle is cropped from the CMS image according to the boundary points of the cropping area.
[0070] In one embodiment of the present application, the length of the rear of the vehicle is L, the width of the marking point is W0, and the height H of the rear of the vehicle is 5 meters. For the right CMS:
[0071] Calculate the position (u1, v1) of the point (W0+0.5, L, H) in the image;
[0072] Calculate the position (u2, v2) of the point (W0-0.5, L, H) in the image;
[0073] Determine the upper-left and lower-right corners of the crop region:
[0074] Um=min(u0,u1); where (u0,v0) represents the position of the rear of the vehicle in the CMS image;
[0075] The coordinates of the upper left corner are: (u2, v2);
[0076] The coordinates of the lower right corner are: (um, v0);
[0077] Then the clipping area is (u2, v2, um, v0).
[0078] S12, preprocessing the rear image of the vehicle, and performing line detection to obtain the rear boundary features of the rear image of the vehicle;
[0079] S13, generating an initial template for vehicle rear detection according to the vehicle rear boundary features, and recording an initial actual vehicle rear position according to the vehicle rear boundary features.
[0080] It can be understood that since the rear of the vehicle is mostly a line feature group (with only a small deviation near the vertical and horizontal directions), line detection is performed on the rear image to remove oblique lines with slightly larger angles and shorter lengths. At the same time, since the width of the rear of the vehicle is limited, for the right CMS, the horizontal lines touching the right edge are removed, and if it is the left CMS, the horizontal lines touching the left edge are removed.
[0081] The position of the rear of the vehicle in the CMS image is obtained through the calibration module of the CMS system, and the CMS image is cropped to obtain the rear image. Through the above processing of the rear image, the position of the rear of the vehicle is accurately located to improve the driving safety of the vehicle. An initial detection template is generated based on the extracted boundary features of the rear of the vehicle, and the initial actual rear position is recorded to facilitate the positioning of the rear of the vehicle in the rear image when the rear of the vehicle moves and the update of the initial template for rear detection, which provides a comparison benchmark for subsequent sideslip analysis and improves the accuracy and reliability of sideslip detection.
[0082] S2, using the vehicle motion model to constrain the rear position of the vehicle and calculate the predicted rear position of the vehicle;
[0083] like Figure 3 and Figure 4As shown, O is the position of the center of the front axle of the tractor, the positive direction of the x-axis is perpendicular to the vehicle's travel direction and points to the right, the positive direction of the y-axis is along the vehicle's travel direction, and the positive direction of the z-axis is the height direction, vertically upward. Specifically, step S2 specifically includes:
[0084] S21, obtaining the vehicle width, the distance from the front wheel to the rear wheel of the tractor, the distance from the rear wheel of the tractor to the attachment point, the distance from the attachment point to the rear wheel of the trailer, and the distance from the rear wheel of the trailer to the rear of the trailer, and using the CMS system to obtain in real time the angle between the trailer and the tractor along the directions of their respective bodies;
[0085] S22, calculating and predicting the X coordinate of the rear position of the vehicle according to the lateral offset caused by the steering and the projection of the trailer length on the X axis;
[0086] S23, calculating and predicting the Y coordinate of the rear position of the vehicle according to the distance from the front axle of the tractor to the hitch point, the projection of the trailer length on the Y axis, and the longitudinal offset caused by the steering;
[0087] S24, obtaining the coordinates of the predicted position of the rear end of the vehicle according to the predicted X coordinate of the rear end of the vehicle and the predicted Y coordinate of the rear end of the vehicle.
[0088] Furthermore, the calculation formula for predicting the rear position of the vehicle is:
[0089] X pos =-(cosα×W / 2+(L2+L3)×sinα)
[0090] Y pos =-(L1+M+(L2+L3)×cosα)-sinα×W / 2
[0091] Among them, X pos Indicates the X coordinate of the predicted rear position, Y pos represents the Y coordinate of the predicted rear position, α represents the angle between the trailer and the tractor along their respective body directions, W represents the vehicle width, L1 represents the distance from the front wheel to the rear wheel of the tractor, L2 represents the distance from the coupling point to the rear wheel of the trailer, L3 represents the distance from the rear wheel of the trailer to the rear of the trailer, and M represents the distance from the rear wheel of the tractor to the coupling point.
[0092] The vehicle motion model is used to accurately predict the theoretical position of the rear of the vehicle at different steering angles. The CMS system is used to obtain the angle between the trailer and the tractor in real time, so that the prediction can timely reflect the current state of the vehicle. Multiple geometric parameters of the vehicle (vehicle width, wheelbase, hitch point position, etc.) are taken into account to make the prediction more comprehensive and accurate, and improve the reliability of the prediction results. The predicted rear position is calculated using the lateral and longitudinal effects of steering on the rear position of the vehicle, so that the predicted rear position can more accurately reflect the actual motion state of the vehicle.
[0093] S3. Calculate the side slip of the semitrailer based on the actual rear position and the predicted rear position, and determine whether a danger warning is required based on the side slip of the semitrailer:
[0094] If the side slip of the semi-trailer exceeds the threshold, a side slip danger signal will be issued.
[0095] Specifically, the calculation formula for the side slip of the semi-trailer is:
[0096] slipe value =||w s |-|X pos ||
[0097] Among them, slipe value Indicates the side slip of the semitrailer, w s Indicates the X coordinate of the actual rear position of the vehicle.
[0098] The CMS system provides continuous safety monitoring, compares the actual rear position of the vehicle with the predicted rear position, detects the side slip of the semi-trailer in real time, and quantifies the degree of side slip, which helps to detect potential dangers in a timely manner. When the side slip exceeds the threshold, the CMS system sends a side slip danger signal to provide timely warnings to the driver, helping to prevent accidents.
[0099] In one embodiment of the present application, when |w s |>1.1*|X pos |, at this time, the side slip amount is greater than the threshold value K, and the CMS system sends a side slip danger signal, allowing the external controller to adjust the body posture of the trailer. For example, when it is detected that there is no vehicle in front of the vehicle, the controller can reduce the side slip by accelerating, or try to ensure the timing of braking of the tractor and trailer during braking to prevent the side slip from increasing too quickly and reduce the risk. Among them, the external controller can be allowed to adjust the body posture of the trailer according to actual conditions, and this application does not make specific limitations on this.
[0100] like Figure 5 As shown, in one embodiment of the present application, step S12 specifically includes:
[0101] Select a pixel point at random from the lower left corner of the rear image, and calculate the weighted sum of the lengths of the horizontal line on the left side of the pixel point and the vertical line on the bottom side of the pixel point in the image; the calculation formula for the weighted sum is:
[0102] L m =a×line0+b×line1;
[0103] Among them, L m represents the weighted sum, line0 represents the length of the horizontal line segment, a represents the weight of line0, line1 represents the length of the vertical line segment, and b represents the weight of line1;
[0104] Find the image pixel point corresponding to the maximum value of the weighted sum as the rear boundary of the vehicle;
[0105] The calibration module of the CMS system calculates the three-dimensional coordinates corresponding to the rear boundary of the semi-trailer based on the width of the semi-trailer;
[0106] The fixed-size CMS image is cropped with the rear boundary as the center to obtain the rear template image.
[0107] like Figure 5 As shown, specifically, a specific embodiment is used to illustrate:
[0108] Take the CMS on the right as an example, the left side is a mirror image:
[0109] Take S2(x2, y2) as an example, start searching the entire graph from the lower left corner, and calculate the weighted sum of the lengths of all horizontal lines on its left and vertical lines on its bottom at that point;
[0110] Find the pixel point S(x, y) corresponding to the maximum value of the weighted sum, then the rear boundary of the vehicle is S(x, y);
[0111] The three-dimensional coordinates (W / 2, Ls, Hs) corresponding to the rear boundary of the vehicle are calculated using the rear boundary S (x, y) and the vehicle width W through the calibration module of the CMS system;
[0112] The rear edge S(x, y) is used as the center for cropping, and the cropping area is 64*64 to obtain the rear template image. When used later, based on the position S(x, y) of the current frame in the rear template image, the rear template is searched within its 128*128 range. In order to ensure the accuracy and robustness of the search, gradient (line) feature matching or neural network image matching methods can be used for search. After finding the rear template image and the rear edge position S(x, y), update the rear template image.
[0113] This application uses the calibration module and image processing technology of the CMS system to accurately locate the boundary and height of the rear of the vehicle, and combines it with the vehicle motion model to accurately calculate and predict the position of the rear of the vehicle. The dual positioning method is used to calculate the sideslip amount, thereby improving the accuracy of sideslip detection.
[0114] The present invention provides a semi-trailer sideslip detection system based on CMS, which adopts the semi-trailer sideslip detection method as described above, including:
[0115] A vehicle rear detection module is configured to use a calibration module of the CMS system to initialize a vehicle rear detection template, and perform image detection and recognition on the CMS image of the semitrailer to obtain a vehicle rear boundary and a vehicle rear height in the CMS image, and determine an actual vehicle rear position using the vehicle rear boundary and the vehicle rear height;
[0116] a motion constraint module configured to constrain a rear position of the vehicle using a vehicle motion model and calculate a predicted rear position of the vehicle;
[0117] A side slip calculation module configured to calculate the side slip of the semitrailer according to the actual rear position and the predicted rear position;
[0118] The early warning module is configured to determine whether a danger warning is required based on the side slip amount of the semi-trailer:
[0119] If the side slip of the semi-trailer exceeds the threshold, a side slip danger signal will be issued.
[0120] The present application provides an electronic device, comprising: at least one processor, at least one memory, a communication interface and a bus; wherein the processor, the memory, and the communication interface communicate with each other through the bus; the memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the semi-trailer sideslip detection method as described above.
[0121] The present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to implement the semi-trailer sideslip detection method as described above.
[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A semi-trailer side slip detection method based on CMS, It is characterized in that The following steps are involved: S1. Use the calibration module of the CMS system to initialize the rear detection template, and perform image detection and recognition on the CMS image of the semi-trailer to obtain the rear boundary and rear height in the CMS image, and use the rear boundary and rear height to determine the actual rear position; S2, using the vehicle motion model to constrain the rear position of the vehicle and calculate the predicted rear position of the vehicle; S3. Calculate the side slip of the semitrailer based on the actual rear position and the predicted rear position, and determine whether a danger warning is required based on the side slip of the semitrailer: If the side slip of the semi-trailer exceeds the threshold, a side slip danger signal will be issued.
2. A method for detecting sideslip of a semitrailer based on CMS as claimed in claim 1, It is characterized in that Step S1 specifically includes: S11, using the calibration module of the CMS system to calculate the position of the rear end of the semi-trailer in the CMS image, and cropping the rear end of the semi-trailer according to the position in the CMS image, and using the cropped image as the rear end image; S12, preprocessing the rear image of the vehicle, and performing line detection to obtain the rear boundary features of the rear image of the vehicle; S13, generating an initial template for vehicle rear detection according to the vehicle rear boundary features, and recording an initial actual vehicle rear position according to the vehicle rear boundary features.
3. A method for detecting sideslip of a semitrailer based on CMS as claimed in claim 2, It is characterized in that The position clipping specifically includes: The length of the rear of the vehicle and the width of the marking point are calculated based on the calibration module of the CMS system; Calculate the boundary points of the cropping area based on the length of the rear of the vehicle, the width of the marking point, and the height of the rear of the vehicle; The rear image of the vehicle is cropped from the CMS image according to the boundary points of the cropping area.
4. A method for detecting sideslip of a semitrailer based on CMS as claimed in claim 2, It is characterized in that Step S12 specifically includes: Select a pixel point at random from the lower left corner of the image, and calculate the weighted sum of the lengths of the horizontal line to the left of the pixel point and the vertical line to the bottom of the pixel point in the image; the calculation formula for the weighted sum is: L m =a×line 0 +b×line 1 ; Among them, L m represents the weighted sum, line 0 Indicates the length of the horizontal line segment, a represents line 0 The weight of line 1 Indicates the length of the vertical line segment, b means line 1 The weight of Find the image pixel point corresponding to the maximum value of the weighted sum as the rear boundary of the vehicle; The calibration module of the CMS system calculates the three-dimensional coordinates corresponding to the rear boundary of the semi-trailer based on the width of the semi-trailer; The fixed-size CMS image is cropped with the rear boundary as the center to obtain the rear template image.
5. A method for detecting sideslip of a semitrailer based on CMS as claimed in claim 1, It is characterized in that Step S2 specifically includes: S21, obtaining the vehicle width, the distance from the front wheel to the rear wheel of the tractor, the distance from the rear wheel of the tractor to the attachment point, the distance from the attachment point to the rear wheel of the trailer, and the distance from the rear wheel of the trailer to the rear of the trailer, and using the CMS system to obtain in real time the angle between the trailer and the tractor along the directions of their respective bodies; S22, calculating and predicting the X coordinate of the rear position of the vehicle according to the lateral offset caused by the steering and the projection of the trailer length on the X axis; S23, calculating and predicting the Y coordinate of the rear position of the vehicle according to the distance from the front axle of the tractor to the hitch point, the projection of the trailer length on the Y axis, and the longitudinal offset caused by the steering; S24, obtaining the coordinates of the predicted position of the rear end of the vehicle according to the predicted X coordinate of the rear end of the vehicle and the predicted Y coordinate of the rear end of the vehicle.
6. A method for detecting sideslip of a semitrailer based on CMS as claimed in claim 5, It is characterized in that The calculation formula for predicting the rear position of the vehicle is: X pos =-(cosα×W / 2+(L 2 +L 3 )×sinα) Y pos =-(L 1 +M+(L 2 +L 3 )×cosα)-sinα×W / 2 Among them, X pos Indicates the X coordinate of the predicted rear position, Y pos represents the Y coordinate of the predicted rear position, α represents the angle between the trailer and the tractor along their respective body directions, W represents the vehicle width, and L 1 Indicates the distance from the front wheel to the rear wheel of the tractor, L 2 Indicates the distance from the hitch point to the rear wheel of the trailer, L 3 It indicates the distance from the rear wheel of the trailer to the end of the trailer, and M indicates the distance from the rear wheel of the tractor to the hitch point.
7. A method for detecting sideslip of a semitrailer based on CMS as claimed in claim 6, It is characterized in that The calculation formula of the semi-trailer side slip is: slipe value =|w s |-|X pos Among them, slipe value Indicates the side slip of the semitrailer, w s Indicates the X coordinate of the actual rear position of the vehicle.
8. A semi-trailer side slip detection system based on CMS, It is characterized in that The method for detecting sideslip of a semitrailer according to any one of claims 1 to 7 comprises: A vehicle rear detection module is configured to use a calibration module of the CMS system to initialize a vehicle rear detection template, and perform image detection and recognition on the CMS image of the semitrailer to obtain a vehicle rear boundary and a vehicle rear height in the CMS image, and determine an actual vehicle rear position using the vehicle rear boundary and the vehicle rear height; a motion constraint module configured to constrain a rear position of the vehicle using a vehicle motion model and calculate a predicted rear position of the vehicle; A side slip calculation module configured to calculate the side slip of the semitrailer according to the actual rear position and the predicted rear position; The early warning module is configured to determine whether a danger warning is required based on the side slip amount of the semi-trailer: If the side slip of the semi-trailer exceeds the threshold, a side slip danger signal will be issued.
9. An electronic device, It is characterized in that include: At least one processor, at least one memory, a communication interface and a bus; wherein, The processor, memory, and communication interface communicate with each other via the bus; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to implement the semi-trailer sideslip detection method according to any one of claims 1-7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to implement the semi-trailer sideslip detection method according to any one of claims 1-7.
