Zero calibration method and device for vehicle angle sensor
By acquiring the vehicle tire and central target images and calculating the deviation angle, the problem of low zero calibration efficiency of vehicle angle sensor is solved, and efficient zero calibration without the need for rearrangement tools is achieved.
Patent Information
- Application Number
- CN202411237349.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2024-12-06
AI Technical Summary
The efficiency of zero-position calibration of existing vehicle angle sensors is inefficient, and measurement tools need to be rearranged, resulting in inefficient batch calibration.
By acquiring multiple tire images and central target images of the vehicle, performing linear detection and binarization of tire edges, determining the steering deviation angle of the tire and the rotation angle of the reference baseline, calculating the deviation angle, and using it for the pair The angle sensor performs zero calibration.
The zero calibration of steering systems of different vehicles can be achieved without rearranging the measurement tools, improving the zero calibration efficiency of the angle sensor.
Smart Images

Figure CN119085576A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automotive electronic technology, and in particular to a method and device for zero-position calibration of a vehicle steering angle sensor. Background Art
[0002] The steering angles of the four wheels of a four-wheel independent steering vehicle are controlled by the electronic power steering system. The accuracy of the zero position of the four wheel angle sensors is related to whether the vehicle will deviate when driving in a straight line, and also affects the steering control performance of the four-wheel steering vehicle. Therefore, it is very important to be able to accurately calibrate the zero position of the wheel angle sensor.
[0003] At present, special devices and measuring tools are generally used to measure the steering angle of the wheel and the angle of the steering system angle sensor, calculate the deviation between the two angles, and calibrate the zero position of the steering system angle sensor according to the deviation angle. When the steering system angle sensor is at zero position, the actual steering angle of the wheel is not zero, and there is a certain error. It is necessary to obtain the error angle through the measuring tool, and adjust the zero position of the steering system angle sensor according to the error angle. Since the measuring tool needs to be rearranged each time the zero position of the steering system angle sensor of different vehicles is calibrated, if the zero position of the vehicle steering system angle sensor needs to be calibrated in batches, each vehicle needs to rearrange the measuring tool, which will lead to low efficiency in zero position calibration of the vehicle angle sensor.
[0004] Therefore, how to improve the zero-position calibration efficiency of vehicle corner sensors has become an urgent problem to be solved in this field. Summary of the invention
[0005] The present application provides a method and device for zero-position calibration of a vehicle steering angle sensor, aiming to improve the zero-position calibration efficiency of the vehicle steering angle sensor.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] A zero position calibration method for a vehicle rotation angle sensor, comprising:
[0008] Acquire multiple tire images and a center target image of the vehicle; the multiple tire images include: a left front wheel image, a right front wheel image, a left rear wheel image, and a right rear wheel image;
[0009] For each tire image, performing tire edge straight line detection and extraction on the tire image to obtain a straight line image;
[0010] Binarizing the straight line image to obtain a binary straight line image;
[0011] Traversing the pixel values of the binary straight line image to determine a first coordinate, a second coordinate, and a third coordinate;
[0012] Calculating a steering deviation angle of the tire according to the first coordinate, the second coordinate and the third coordinate;
[0013] When the central target of the central target image and the camera are in the same straight line, the central target image is binarized to obtain the pixel positions of the two end points of the reference baseline in the central target image; the camera is arranged above the vehicle;
[0014] Calculating the rotation angle of the reference baseline according to the pixel positions of the two endpoints;
[0015] Determining a deviation angle according to the steering deviation angle of the tire and the rotation angle of the reference baseline;
[0016] The deviation angle is sent to a control unit so that the control unit performs zero position calibration on the rotation angle sensor according to the deviation angle.
[0017] Optionally, the acquiring of multiple tire images and a central target image of the vehicle includes:
[0018] Acquire a vehicle image taken by a camera located above the vehicle;
[0019] Performing denoising processing on the vehicle image to obtain a denoised vehicle image;
[0020] Performing image enhancement processing on the denoised vehicle image to obtain an enhanced vehicle image;
[0021] graying the enhanced vehicle image to obtain a target vehicle image;
[0022] The target vehicle image is instance segmented using a clustering algorithm to obtain a plurality of tire images and a central target point image of the vehicle.
[0023] Optionally, for each tire image, performing tire edge straight line detection and extraction on the tire image to obtain a straight line image includes:
[0024] For each of the tire images, extract the tire image using an edge detection operator to obtain a tire image carrying edge information;
[0025] De-noising the tire image carrying edge information by using mean filtering to obtain a de-noised tire image;
[0026] Using Hough transform, performing edge straight line detection on the tire in the denoised tire image, and marking the denoised tire image carrying the edge straight line to obtain a detected image;
[0027] The edge straight lines in the detected image are extracted to obtain a straight line image.
[0028] Optionally, traversing the pixel values of the binary straight line image to determine the first coordinate, the second coordinate, and the third coordinate includes:
[0029] Traversing the pixel origin coordinates of the binary straight line image in the row direction until the pixel value is a non-zero value, marking the position of the non-zero value as the first coordinate; the binary straight line image is composed of a plurality of pixels, each of which has a binary pixel value and a pixel coordinate;
[0030] When the binary straight line image is a left wheel image, traverse the binary straight line image column by column until the binary pixel value is a non-zero value, and mark the position of the non-zero value as a second coordinate;
[0031] When the binary straight line image is the right wheel image, traverse the binary straight line image from the position where the number of columns is the largest and the number of rows is 0, until the binary pixel value is non-zero, and mark the position where the non-zero value is located as the second coordinate;
[0032] Traverse from the position with the largest number of rows of the binary straight line image to the direction with the smallest number of rows until the binary pixel value is a non-zero value, and mark the position of the non-zero value as the third coordinate.
[0033] Optionally, calculating the steering deviation angle of the tire according to the first coordinate, the second coordinate, and the third coordinate includes:
[0034] Substituting the first coordinate and the second coordinate into a distance calculation formula to calculate a first distance;
[0035] Substituting the second coordinate and the third coordinate into a distance calculation formula to calculate a second distance;
[0036] When the binarized straight line image is the left front wheel image, detecting whether the second distance is smaller than the first distance;
[0037] If the second distance is less than the first distance, substituting the first coordinate and the second coordinate into the first slope formula to calculate the steering deviation angle of the left front wheel;
[0038] If the second distance is not less than the first distance, substituting the second coordinate and the third coordinate into the first slope formula to calculate the steering deviation angle of the left front wheel;
[0039] When the binary straight line image is the left rear wheel image, detecting whether the second distance is smaller than the first distance;
[0040] If the second distance is less than the first distance, substituting the first coordinate and the second coordinate into a second slope formula to calculate the steering deviation angle of the left front wheel;
[0041] If the second distance is not less than the first distance, substituting the second coordinate and the third coordinate into the second slope formula to calculate the steering deviation angle of the left front wheel;
[0042] When the binary straight line image is the right front wheel image, detecting whether the second distance is smaller than the first distance;
[0043] If the second distance is less than the first distance, substituting the first coordinate and the second coordinate into the second slope formula to calculate the steering deviation angle of the right front wheel;
[0044] If the second distance is not less than the first distance, substituting the second coordinate and the third coordinate into the second slope formula to calculate the steering deviation angle of the right front wheel;
[0045] When the binary straight line image is the right rear wheel image, detecting whether the second distance is smaller than the first distance;
[0046] If the second distance is less than the first distance, substituting the first coordinate and the second coordinate into the first slope formula to calculate the steering deviation angle of the right front wheel;
[0047] If the second distance is not less than the first distance, the second coordinate and the third coordinate are substituted into the first slope formula to calculate the steering deviation angle of the right front wheel.
[0048] Optionally, calculating the rotation angle of the reference baseline according to the pixel positions of the two endpoints includes:
[0049] Substituting the pixel positions of the two endpoints into the straight line slope formula to calculate the slope of the reference baseline;
[0050] The slope of the reference baseline is substituted into the inverse tangent function formula to calculate the rotation angle of the reference baseline.
[0051] Optionally, determining the deviation angle according to the steering deviation angle of the tire and the rotation angle of the reference baseline includes:
[0052] When the rotation angle of the reference baseline is 0 degrees, determining the steering deviation angle of the tire as the deviation angle;
[0053] When the rotation angle of the reference reference line is not 0 degrees, a difference between the steering deviation angle of the tire and the rotation angle of the reference reference line is calculated, and the difference is determined as the deviation angle.
[0054] A zero position calibration device for a vehicle rotation angle sensor, comprising:
[0055] An acquisition unit, used to acquire multiple tire images and a center target image of the vehicle; the multiple tire images include: a left front wheel image, a right front wheel image, a left rear wheel image, and a right rear wheel image;
[0056] An extraction unit, configured to perform tire edge straight line detection and extraction on each tire image to obtain a straight line image;
[0057] A first processing unit is used to perform a binarization process on the straight line image to obtain a binarized straight line image;
[0058] A first determining unit, configured to traverse the pixel values of the binary straight line image to determine a first coordinate, a second coordinate, and a third coordinate;
[0059] A first calculation unit, configured to calculate a steering deviation angle of the tire according to the first coordinate, the second coordinate and the third coordinate;
[0060] A second processing unit is used for performing binarization processing on the central target image to obtain pixel positions of two end points of a reference baseline in the central target image when the central target of the central target image and the camera are in the same straight line; the camera is arranged above the vehicle;
[0061] A second calculation unit, used for calculating the rotation angle of the reference baseline according to the pixel positions of the two endpoints;
[0062] A second determining unit, configured to determine a deviation angle according to the steering deviation angle of the tire and the rotation angle of the reference baseline;
[0063] The calibration unit is used to send the deviation angle to the control unit so that the control unit performs zero position calibration on the rotation angle sensor according to the deviation angle.
[0064] Optionally, the acquiring unit is specifically used for:
[0065] Acquire a vehicle image taken by a camera located above the vehicle;
[0066] Performing denoising processing on the vehicle image to obtain a denoised vehicle image;
[0067] Performing image enhancement processing on the denoised vehicle image to obtain an enhanced vehicle image;
[0068] graying the enhanced vehicle image to obtain a target vehicle image;
[0069] The target vehicle image is instance segmented using a clustering algorithm to obtain a plurality of tire images and a central target point image of the vehicle.
[0070] Optionally, the extraction unit is specifically used for:
[0071] For each of the tire images, extract the tire image using an edge detection operator to obtain a tire image carrying edge information;
[0072] De-noising the tire image carrying edge information by using mean filtering to obtain a de-noised tire image;
[0073] Using Hough transform, performing edge straight line detection on the tire in the denoised tire image, and marking the denoised tire image carrying the edge straight line to obtain a detected image;
[0074] The edge straight lines in the detected image are extracted to obtain a straight line image.
[0075] The technical solution provided by the present application obtains multiple tire images and a center target point image of a vehicle; for each tire image, performs tire edge straight line detection and extraction on the tire image to obtain a straight line image; performs binarization processing on the straight line image to obtain a binary straight line image; traverses the pixel values of the binary straight line image to determine a first coordinate, a second coordinate, and a third coordinate; calculates the steering deviation angle of the tire based on the first coordinate, the second coordinate, and the third coordinate; when the center target point of the center target point image is in the same straight line as the camera, performs binarization processing on the center target point image to obtain the pixel positions of the two end points of a reference baseline in the center target point image; calculates the rotation angle of the reference baseline based on the pixel positions of the two end points; determines the deviation angle based on the steering deviation angle of the tire and the rotation angle of the reference baseline; and sends the deviation angle to a control unit so that the control unit performs zero position calibration on the steering angle sensor based on the deviation angle. The actual deviation angle of the wheel can be determined by the steering deviation angle of the tire and the deviation angle of the reference baseline. The zero position calibration of the steering sensor can be completed through the actual deviation angle of the wheel. The above method can be used for the steering systems of different vehicles. There is no need to rearrange the measuring tools to obtain the deviation angle of the vehicle, thereby improving the zero position calibration efficiency of the steering angle sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0077] Figure 1 A flowchart of a zero position calibration method for a vehicle angle sensor provided in an embodiment of the present application;
[0078] Figure 2 A flowchart of an image acquisition method provided in an embodiment of the present application;
[0079] Figure 3 A schematic diagram of the relationship between a camera and a vehicle provided in an embodiment of the present application;
[0080] Figure 4 A schematic diagram of a vehicle image provided in an embodiment of the present application;
[0081] Figure 5 A flowchart of a method for extracting a straight line image provided in an embodiment of the present application;
[0082] Figure 6 A flowchart of a coordinate determination method provided in an embodiment of the present application;
[0083] Figure 7 A flowchart of a method for determining a steering deviation angle provided in an embodiment of the present application;
[0084] Figure 8 A schematic diagram of a steering deviation angle provided in an embodiment of the present application;
[0085] Fig. 9 An architectural diagram of a zero-position calibration device for a vehicle steering angle sensor provided in an embodiment of the present application. DETAILED DESCRIPTION
[0086] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0087] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0088] like Figure 1 FIG. 1 is a flow chart of a method for zero position calibration of a vehicle angle sensor provided in an embodiment of the present application, comprising the following steps:
[0089] S101: Acquire multiple tire images and a center target image of a vehicle.
[0090] The multiple tire images include: a left front wheel image, a right front wheel image, a left rear wheel image, and a right rear wheel image.
[0091] Optionally, the center target point image refers to an image of the center position of the vehicle, and the center target point image includes the center target point.
[0092] It is understandable that multiple tire images and center target point images of the vehicle are acquired so that the steering angle sensor can be zero-calibrated according to the multiple tire images and center target point images of the vehicle.
[0093] Optionally, in another embodiment of the present application, the specific implementation of step S101 is as follows: Figure 2 As shown, the following steps are included:
[0094] S201: Acquire a vehicle image taken by a camera located above the vehicle.
[0095] Optionally, the camera includes but is not limited to: a CCD camera (referring to a camera using a charge-coupled device (CCD) as an image sensor).
[0096] The camera is pre-set to be directly above the vehicle. The schematic diagram of the relationship between the camera and the vehicle can be seen in Figure 3 , a schematic diagram of the vehicle image can be found in Figure 4 .
[0097] S202: De-noising the vehicle image to obtain a de-noised vehicle image.
[0098] It is understandable that vehicle images may be affected by factors such as ambient light and camera sensor noise, resulting in noise or artifacts in the image, reducing the clarity and quality of the image. De-noising can effectively reduce these interferences and improve the quality and clarity of the image.
[0099] S203: performing image enhancement processing on the denoised vehicle image to obtain an enhanced vehicle image.
[0100] It can be understood that by performing image enhancement on the denoised vehicle image, the image can be made clearer and brighter, with the details and features highlighted, so that the computer can process the image more accurately and the accuracy of the deviation angle can be improved.
[0101] S204: grayscale the enhanced vehicle image to obtain a target vehicle image.
[0102] It is understandable that grayscale processing of the enhanced vehicle image, that is, converting the color image into a grayscale image, can remove color information and retain only brightness information. This can reduce redundant information in the image, simplify image data, and facilitate subsequent processing and analysis.
[0103] S205: Perform instance segmentation on the target vehicle image using a clustering algorithm to obtain multiple tire images and a central target point image of the vehicle.
[0104] Optionally, the clustering algorithm includes but is not limited to: K-Means clustering algorithm.
[0105] The center target image includes a reference baseline and a center target consistent with the vehicle heading, and the center target is used to align with the camera.
[0106] S102: For each tire image, perform tire edge straight line detection and extraction on the tire image to obtain a straight line image.
[0107] It can be understood that the tire edge straight line detection and extraction is performed on the tire image. Specifically, the tire edge straight line detection is performed on the tire image first, and then the detected straight line is extracted to obtain a straight line image.
[0108] Optionally, in another embodiment of the present application, the specific implementation of step S102 is as follows: Figure 5 As shown, the following steps are included:
[0109] S501: For each tire image, use an edge detection operator to extract the tire image to obtain a tire image carrying edge information.
[0110] It can be understood that since the color of the wheel image and the baseline reference line is black, which is quite different from the grayscale image background, the edge features are more obvious. Therefore, the edge of the tire image can be extracted through the edge detection operator (Laplacian of the Gaussian, LOG) to obtain a tire image carrying edge information.
[0111] S502: De-noising the tire image carrying edge information by using mean filtering to obtain a de-noised tire image.
[0112] It can be understood that since the tire image carrying edge information extracted by the edge detection operator is prone to noise, in order to make the tire image carrying edge information clearer and the image edge more reasonable, the tire image carrying edge information is denoised using mean filtering to obtain a denoised tire image.
[0113] Optionally, the mean filtered image (ie, the tire image after denoising) is binarized to highlight the image edge. The binarization process can clearly reflect the image edge by setting a threshold, making it easy to extract the edge by a transformation extraction algorithm.
[0114] S503: Using Hough transform, edge straight line detection is performed on the tire in the denoised tire image, and the denoised tire image carrying the edge straight line is marked to obtain a detected image.
[0115] Among them, Hough transform is used to first detect the edge straight line of the tire in the denoised tire image. After the edge straight line is detected, the darker color in the denoised tire image is used to mark the denoised tire image carrying the edge straight line to obtain the image after tire straight line detection.
[0116] S504: extract edge straight lines in the detected image to obtain a straight line image.
[0117] It can be understood that the edge straight lines have been marked with darker colors in the denoised tire image, which facilitates the subsequent extraction of edge straight lines in the detected image to obtain a straight line image.
[0118] S103: Binarization processing is performed on the straight line image to obtain a binary straight line image.
[0119] It can be understood that the straight line image is binarized. Specifically, since the image is constructed by pixels, each pixel has a corresponding pixel value. For each pixel value, the pixel value greater than the preset threshold is set to the first threshold (for example, 1); the pixel value less than the preset threshold is set to the second threshold (for example, 0), and a binary straight line image is obtained.
[0120] S104: traverse the pixel values of the binary straight line image to determine the first coordinate, the second coordinate and the third coordinate.
[0121] It can be understood that the pixel values of the binary straight line image are traversed, specifically, the pixel values of the binary straight line image are traversed according to the preset traversal direction until the pixel values meet the preset requirements, and the positions of the pixel values are recorded as the first coordinate, the second coordinate and the third coordinate respectively.
[0122] The preset traversal direction includes but is not limited to: a row direction and a column direction.
[0123] Optionally, in another embodiment of the present application, the specific implementation of step S104 is as follows: Figure 6 As shown, the following steps are included:
[0124] S601: Traverse the pixel origin coordinates of the binary straight line image in the row direction until the pixel value is non-zero, and mark the position of the non-zero value as the first coordinate.
[0125] The binary straight line image is composed of a plurality of pixels, and each pixel has a binary pixel value and a pixel coordinate.
[0126] It can be understood that, starting from the pixel origin coordinate of the binary straight line image, the pixel values are traversed in the row direction (i.e., row by row), until the pixel value is non-zero, the position where the non-zero value is located is marked as the first coordinate (for example (x 0 ,y 0 )). For example, the pixel origin coordinate is in the first row, and the pixel values are traversed from the first row. If the pixel values traversed in the first row are zero, the pixel values traversed in the second row are continued until a non-zero value is found. The position of the non-zero value is marked as the first coordinate.
[0127] S602: When the binary straight line image is the left wheel image, traverse the binary straight line image column by column until the binary pixel value is non-zero, and mark the position of the non-zero value as the second coordinate.
[0128] It can be understood that when the binary straight line image is the left wheel image, the pixel values are traversed from the pixel origin coordinates of the binary straight line image in the column direction (row by row) until the binary pixel value is non-zero, and the position of the non-zero value is marked as the second coordinate (for example, (x 1 ,y 1 )). For example, if the pixel coordinate is in the third column, we start traversing the pixel values from the third column. If the pixel value in the third column is zero, we continue traversing the pixel values in the second column until we find a binary pixel value that is non-zero. Then we mark the position of the non-zero value as the first coordinate.
[0129] S603: When the binary straight line image is the right wheel image, traverse the binary straight line image from the position where the number of columns is the largest and the number of rows is 0, until the binary pixel value is non-zero, and mark the position where the non-zero value is located as the second coordinate.
[0130] For example, the binary straight line image is the right wheel image, with a maximum of 2000 columns and a maximum of 1000 rows. The traversal is performed column by column from the position where the number of columns of the binary straight line image is the largest and the number of rows is 0, so the traversal is performed from (0, 1999) (1, 1999)...(999, 2000); (0, 1998), (1, 1998)...(999, 1998) until the binary pixel value is non-zero, and the position of the non-zero value is marked as the second coordinate.
[0131] S604: Traverse the binary straight line image from the position with the largest number of rows to the direction with the smallest number of rows until the traversed binary pixel value is a non-zero value, and mark the position where the non-zero value is located as the third coordinate.
[0132] The pixel values are traversed from the maximum row position of the binary straight line image to the minimum row direction in the row direction until the binary pixel value is non-zero, and the position of the non-zero value is marked as the third coordinate (for example (x 2 ,y 2 )). For example, the position with the largest number of rows is the third row, and pixel values are traversed from the third row to the direction with the smallest number of rows. The binary pixel value of the third row is zero, and the pixel values of the second row are traversed until the binary pixel value is non-zero, and the position of the non-zero value is marked as the first coordinate.
[0133] S105: Calculate the steering deviation angle of the tire according to the first coordinate, the second coordinate and the third coordinate.
[0134] It can be understood that the steering deviation angle of the tire is calculated based on the first coordinate, the second coordinate and the third coordinate. Specifically, the first distance is calculated based on the first coordinate and the second coordinate; the second distance is calculated based on the second coordinate and the third coordinate; and the steering deflection angle of the tire is calculated based on the first distance and the second distance.
[0135] Optionally, in another embodiment of the present application, the specific implementation of step S105 is as follows: Figure 7 As shown, the following steps are included:
[0136] S701: Substitute the first coordinate and the second coordinate into a distance calculation formula to calculate a first distance.
[0137] The specific expression of the distance calculation formula is shown in formula (1).
[0138]
[0139] In formula (1), F len1 is the first distance, (x 0 ,y 0 ) is the first coordinate, (x 1 ,y 1 ) is the second coordinate.
[0140] S702: Substitute the second coordinate and the third coordinate into a distance calculation formula to calculate a second distance.
[0141] The specific form of substituting the second coordinate and the third coordinate into the distance calculation formula is shown in formula (2).
[0142]
[0143] In formula (2), F len2 is the second distance, (x 2 ,y 2 ) is the third coordinate.
[0144] S703: When the binarized straight line image is a left front wheel image, detect whether the second distance is smaller than the first distance.
[0145] If the second distance is smaller than the first distance, then step S704 is performed; if the second distance is not smaller than the first distance, then step S705 is performed.
[0146] When step S703 is executed, steps S706, S709 and S712 are executed concurrently.
[0147] Specifically, assuming that the second distance is 3 and the first distance is 2, it is detected whether the second distance is greater than the first distance. Obviously, the second distance is greater than the first distance, so step S704 is continued.
[0148] Specifically, assuming that the second distance is 1 and the first distance is 2, it is detected whether the second distance is greater than the first distance. Obviously, the second distance is not greater than the first distance, so step S705 is continued.
[0149] S704: Substitute the first coordinate and the second coordinate into the first slope formula to calculate the steering deviation angle of the left front wheel.
[0150] The first coordinate and the second coordinate are substituted into the distance expression of the first slope formula, as shown in formula (3).
[0151]
[0152] In formula (3), θFL is the steering deviation angle of the left front wheel.
[0153] It should be noted that when the second distance is smaller than the first distance, the first coordinate and the second coordinate are substituted into the first slope formula, and the steering deviation angle of the left front wheel is calculated to be a negative number.
[0154] S705: Substitute the second coordinate and the third coordinate into the first slope formula to calculate the steering deviation angle of the left front wheel.
[0155] The specific expression of substituting the second coordinate and the third coordinate into the first slope formula is shown in formula (4).
[0156]
[0157] It should be noted that when the second distance is not less than the first distance, the second coordinate and the third coordinate are substituted into the first slope formula, and the steering deviation angle of the left front wheel is calculated to be a positive value.
[0158] S706: When the binarized straight line image is a left rear wheel image, detect whether the second distance is smaller than the first distance.
[0159] If the second distance is smaller than the first distance, step S707 is executed; if the second distance is not smaller than the first distance, step S708 is executed.
[0160] S707: Substitute the first coordinate and the second coordinate into the second slope formula to calculate the steering deviation angle of the left front wheel.
[0161] The first coordinate and the second coordinate are substituted into the distance expression of the second slope formula, as shown in formula (5).
[0162]
[0163] In formula (5), θ RL is the steering deviation angle of the left rear wheel.
[0164] S708: Substitute the second coordinate and the third coordinate into the second slope formula to calculate the steering deviation angle of the left front wheel.
[0165] The specific expression of substituting the second coordinate and the third coordinate into the second slope formula is as shown in formula (6).
[0166]
[0167] S709: When the binary straight line image is the right front wheel image, detect whether the second distance is smaller than the first distance.
[0168] If the second distance is smaller than the first distance, step S710 is executed; if the second distance is not smaller than the first distance, step S711 is executed.
[0169] It should be noted that the specific implementation of step S709 may refer to step S703 accordingly, which will not be repeated here.
[0170] S710: Substitute the first coordinate and the second coordinate into the second slope formula to calculate the steering deviation angle of the right front wheel.
[0171] The specific expression of substituting the first coordinate and the second coordinate into the second slope formula is shown in formula (7).
[0172]
[0173] In formula (7), θ FR is the steering deviation angle of the right front wheel.
[0174] S711: Substitute the second coordinate and the third coordinate into the second slope formula to calculate the steering deviation angle of the right front wheel.
[0175] The specific expression of substituting the second coordinate and the third coordinate into the second slope formula is shown in formula (8).
[0176]
[0177] S712: When the binary straight line image is a right rear wheel image, detect whether the second distance is smaller than the first distance.
[0178] If the second distance is smaller than the first distance, step S713 is executed; if the second distance is not smaller than the first distance, step S714 is executed.
[0179] S713: Substitute the first coordinate and the second coordinate into the first slope formula to calculate the steering deviation angle of the right front wheel.
[0180] The specific expression of substituting the first coordinate and the second coordinate into the first slope formula is as shown in formula (9).
[0181]
[0182] In formula (9), θ RR is the steering deviation angle of the right rear wheel.
[0183] S714: Substitute the second coordinate and the third coordinate into the first slope formula to calculate the steering deviation angle of the right front wheel.
[0184] The specific expression of substituting the second coordinate and the third coordinate into the second slope formula is shown in formula (10).
[0185]
[0186] Optionally, the steering deviation angle of the left front wheel, the steering deviation angle of the left rear wheel, the steering deviation angle of the right front wheel and the steering deviation angle of the right rear wheel are specifically expressed in the form of: Figure 8 shown.
[0187] S106: When the central target of the central target image and the camera are in the same straight line, binarization is performed on the central target image to obtain pixel positions of two end points of the reference baseline in the central target image.
[0188] Wherein, the camera is arranged on the top of the vehicle.
[0189] Among them, the central target image is binarized to obtain the pixel positions of the two endpoints of the reference baseline in the central target image. Specifically, the central target image is binarized to obtain a binarized central target image, the pixel values of the two endpoints of the reference baseline are screened out from the binarized central target image, and the positions of the pixel values of the two endpoints are determined as the pixel positions of the two endpoints.
[0190] It should be noted that when the center target in the center target image is in the same straight line as the camera (that is, the center target is aligned with the camera), coordinate changes are required (the camera is located in a fixed coordinate system, and the angle calculated in the coordinate system of the center target of the vehicle is transformed to the fixed coordinate system relative to the camera). The rotation angle relationship of the vehicle to the camera can be obtained through the rotation angle of the reference baseline of the center target image.
[0191] S107: Calculate the rotation angle of the reference baseline according to the pixel positions of the two endpoints.
[0192] It can be understood that, since there is a certain relationship between the rotation angle of the reference reference line and the slope of the reference reference line, the rotation angle of the reference reference line can be calculated by the slope of the reference reference line.
[0193] Optionally, in another embodiment of the present application, the specific implementation of step S107 includes the following steps:
[0194] Substitute the pixel positions of the two endpoints into the straight line slope formula to calculate the slope of the reference baseline.
[0195] The specific expression of substituting the pixel positions of the two endpoints into the straight line slope formula is shown in formula (11).
[0196]
[0197] In formula (11), (x 3 ,y 3 ) and (x 4 ,y 4 ) are the pixel positions of the two endpoints, and k is the slope of the reference baseline.
[0198] Substitute the slope of the reference baseline into the inverse tangent function formula to calculate the rotation angle of the reference baseline.
[0199] The specific expression of substituting the slope of the reference baseline into the inverse tangent function formula is shown in formula (12).
[0200]
[0201] In formula (12), θ c The rotation angle of the reference line.
[0202] S108: Determine a deviation angle according to the steering deviation angle of the tire and the rotation angle of the reference baseline.
[0203] It is understandable that different rotation angles of the reference baseline result in different deviation angles determined according to the steering deviation angle of the tire, and the deviation angle needs to be specifically analyzed according to the rotation angle of the reference baseline.
[0204] Optionally, in another embodiment of the present application, the specific implementation of step S108 includes the following steps:
[0205] When the rotation angle of the reference reference line is 0 degrees, the steering deviation angle of the tire is determined as the deviation angle.
[0206] The deviation angle is the wheel steering deviation angle when the steering angle sensor position of the steering system is at zero.
[0207] It is understood that in the vehicle's steering system, the steering deviation angle of the tire generally refers to the angle between the wheel and the vehicle's driving direction when the wheel is turning. When the rotation angle of the reference baseline is 0 degrees, the steering deviation angle of the wheel can be defined as the deviation angle.
[0208] It should be noted that when the rotation angle of the reference baseline is 0 degrees, the steering deviation angle of the left front wheel, the deviation angle of the left rear wheel, the steering deviation angle of the right front wheel and the steering deviation angle of the right rear wheel are determined as the deviation angles of the steering angle sensor.
[0209] When the rotation angle of the reference reference line is not 0 degrees, the difference between the steering deviation angle of the tire and the rotation angle of the reference reference line is calculated and determined as the deviation angle.
[0210] It can be understood that when the rotation angle of the reference reference line is not 0 degrees, the difference between the steering deviation angle of the tire and the rotation angle of the reference reference line is calculated. Specifically, the difference between the steering deviation angle of the left front wheel and the rotation angle of the reference reference line is calculated, the difference between the steering deviation angle of the left rear wheel and the rotation angle of the reference reference line is calculated, the difference between the steering deviation angle of the right front wheel and the rotation angle of the reference reference line is calculated, and the difference between the steering deviation angle of the right rear wheel and the rotation angle of the reference reference line is calculated, and the four differences are determined as deviation angles.
[0211] S109: Send the deviation angle to the control unit so that the control unit performs zero position calibration on the rotation angle sensor according to the deviation angle.
[0212] Among them, the deviation angle is sent to the control unit so that the control unit can calibrate the zero position of the steering angle sensor according to the deviation angle. Specifically, the deviation angles of the four tires are first sent to the vehicle domain controller through wireless transmission; after receiving the deviation angles of the four tires, the vehicle domain controller sends the deviation angles of the four tires to the ECU of the steering system through CAN communication.
[0213] When the steering system's steering angle sensor is at zero position and receives a zero position calibration command, the steering system's ECU receives the deviation angles of the four tires and automatically calibrates the zero position of the wheel steering system's steering angle sensor based on the deviation angles of the four tires.
[0214] In summary, the actual deviation angle of the wheel can be determined through the steering deviation angle of the tire and the deviation angle of the reference baseline. The zero position calibration of the steering sensor can be completed through the actual deviation angle of the wheel. The above method can be used for the steering systems of different vehicles. There is no need to rearrange the measuring tools to obtain the deviation angle of the vehicle, thereby improving the zero position calibration efficiency of the steering angle sensor.
[0215] like Fig. 9 As shown, it is an architectural diagram of a zero-position calibration device of a vehicle angle sensor provided in an embodiment of the present application, and the zero-position calibration device includes: an acquisition unit 100, an extraction unit 200, a first processing unit 300, a first determination unit 400, a first calculation unit 500, a second processing unit 600, a second calculation unit 700, a second determination unit 800 and a calibration unit 900.
[0216] The acquisition unit 100 is used to acquire multiple tire images and a center target image of the vehicle; the multiple tire images include: a left front wheel image, a right front wheel image, a left rear wheel image, and a right rear wheel image.
[0217] The acquisition unit 100 is specifically used to: acquire a vehicle image taken by a camera located above the vehicle; perform denoising on the vehicle image to obtain a denoised vehicle image; perform image enhancement on the denoised vehicle image to obtain an enhanced vehicle image; perform grayscale processing on the enhanced vehicle image to obtain a target vehicle image; perform instance segmentation on the target vehicle image using a clustering algorithm to obtain multiple tire images and a central target point image of the vehicle.
[0218] The extraction unit 200 is used to detect and extract the straight line of the tire edge of each tire image to obtain a straight line image.
[0219] The extraction unit 200 is specifically used for: for each tire image, extracting the tire image using an edge detection operator to obtain a tire image carrying edge information; denoising the tire image carrying edge information using a mean filter to obtain a denoised tire image; performing edge straight line detection on the tire in the denoised tire image using a Hough transform, and marking the denoised tire image carrying edge straight lines to obtain a detected image; extracting edge straight lines in the detected image to obtain a straight line image.
[0220] The first processing unit 300 is used to perform binarization processing on the straight line image to obtain a binarized straight line image.
[0221] The first determining unit 400 is used to traverse the pixel values of the binary straight line image to determine the first coordinate, the second coordinate and the third coordinate.
[0222] The first determination unit 400 is specifically used for: traversing from the pixel origin coordinates of the binary straight line image in the direction of rows until the pixel value is non-zero, and marking the position of the non-zero value as the first coordinate; the binary straight line image is composed of a plurality of pixels, and each pixel has a binary pixel value and a pixel coordinate; when the binary straight line image is a left wheel image, traversing from the binary straight line image in columns until the binary pixel value is non-zero, and marking the position of the non-zero value as the second coordinate; when the binary straight line image is a right wheel image, traversing from the position where the number of columns of the binary straight line image is the largest and the number of rows is 0 in columns until the binary pixel value is non-zero, and marking the position of the non-zero value as the second coordinate; traversing from the position with the largest number of rows of the binary straight line image to the direction with the smallest number of rows until the binary pixel value is non-zero, and marking the position of the non-zero value as the third coordinate.
[0223] The first calculation unit 500 is used to calculate the steering deviation angle of the tire according to the first coordinate, the second coordinate and the third coordinate.
[0224] The first calculation unit 500 is specifically used for: substituting the first coordinate and the second coordinate into the distance calculation formula to calculate the first distance; substituting the second coordinate and the third coordinate into the distance calculation formula to calculate the second distance; when the binary straight line image is the left front wheel image, detecting whether the second distance is less than the first distance; if the second distance is less than the first distance, substituting the first coordinate and the second coordinate into the first slope formula to calculate the steering deviation angle of the left front wheel; if the second distance is not less than the first distance, substituting the second coordinate and the third coordinate into the first slope formula to calculate the steering deviation angle of the left front wheel; when the binary straight line image is the left rear wheel image, detecting whether the second distance is less than the first distance; if the second distance is less than the first distance, substituting the first coordinate and the second coordinate into the second slope formula to calculate the steering deviation angle of the left front wheel; if the second distance is not less than the first distance, Substitute the second coordinate and the third coordinate into the second slope formula to calculate the steering deviation angle of the left front wheel; when the binary straight line image is the right front wheel image, detect whether the second distance is less than the first distance; if the second distance is less than the first distance, substitute the first coordinate and the second coordinate into the second slope formula to calculate the steering deviation angle of the right front wheel; if the second distance is not less than the first distance, substitute the second coordinate and the third coordinate into the second slope formula to calculate the steering deviation angle of the right front wheel; when the binary straight line image is the right rear wheel image, detect whether the second distance is less than the first distance; if the second distance is less than the first distance, substitute the first coordinate and the second coordinate into the first slope formula to calculate the steering deviation angle of the right front wheel; if the second distance is not less than the first distance, substitute the second coordinate and the third coordinate into the first slope formula to calculate the steering deviation angle of the right front wheel.
[0225] The second processing unit 600 is used to perform binarization processing on the central target image when the central target of the central target image is in the same straight line with the camera to obtain the pixel positions of the two end points of the reference baseline in the central target image; the camera is set above the vehicle.
[0226] The second calculation unit 700 is used to calculate the rotation angle of the reference baseline according to the pixel positions of the two endpoints.
[0227] The second calculation unit 700 is specifically used to: substitute the pixel positions of the two endpoints into the straight line slope formula to calculate the slope of the reference baseline; substitute the slope of the reference baseline into the inverse tangent function formula to calculate the rotation angle of the reference baseline.
[0228] The second determining unit 800 is used to determine the deviation angle according to the steering deviation angle of the tire and the rotation angle of the reference baseline.
[0229] The second determination unit 800 is specifically used to: when the rotation angle of the reference baseline is 0 degrees, determine the steering deviation angle of the tire as the deviation angle; when the rotation angle of the reference baseline is not 0 degrees, calculate the difference between the steering deviation angle of the tire and the rotation angle of the reference baseline, and determine the difference as the deviation angle.
[0230] The calibration unit 900 is used to send the deviation angle to the control unit so that the control unit performs zero-position calibration on the rotation angle sensor according to the deviation angle.
[0231] In summary, the actual deviation angle of the wheel can be determined through the steering deviation angle of the tire and the deviation angle of the reference baseline. The zero position calibration of the steering sensor can be completed through the actual deviation angle of the wheel. The above method can be used for the steering systems of different vehicles. There is no need to rearrange the measuring tools to obtain the deviation angle of the vehicle, thereby improving the zero position calibration efficiency of the steering angle sensor.
[0232] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative work.
[0233] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0234] 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 apparent to those skilled in the art, and the general principles defined herein may 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 the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A zero position calibration method for a vehicle angle sensor, characterized in that: include: Acquire multiple tire images and a center target image of the vehicle; The multiple tire images include: a left front wheel image, a right front wheel image, a left rear wheel image, and a right rear wheel image; For each tire image, performing tire edge straight line detection and extraction on the tire image to obtain a straight line image; performing binarization processing on the straight line image to obtain a binarized straight line image; Traversing the pixel values of the binary straight line image to determine a first coordinate, a second coordinate, and a third coordinate; Calculating a steering deviation angle of the tire according to the first coordinate, the second coordinate, and the third coordinate; When the central target of the central target image and the camera are in the same straight line, binarizing the central target image to obtain pixel positions of two end points of a reference baseline in the central target image; the camera is set above the vehicle; Calculating the rotation angle of the reference baseline according to the pixel positions of the two endpoints; determining a deviation angle according to the steering deviation angle of the tire and the rotation angle of the reference reference line; The deviation angle is sent to a control unit so that the control unit performs zero position calibration on the rotation angle sensor according to the deviation angle.
2. The method according to claim 1, characterized in that The step of acquiring multiple tire images and a center target image of a vehicle includes: Acquire a vehicle image taken by a camera located above the vehicle; performing denoising processing on the vehicle image to obtain a denoised vehicle image; performing image enhancement processing on the denoised vehicle image to obtain an enhanced vehicle image; grayscale processing is performed on the enhanced vehicle image to obtain a target vehicle image; The target vehicle image is instance segmented using a clustering algorithm to obtain multiple tire images and a central target point image of the vehicle.
3. The method according to claim 1, characterized in that For each tire image, performing tire edge straight line detection and extraction on the tire image to obtain a straight line image includes: For each of the tire images, extract the tire image using an edge detection operator to obtain a tire image carrying edge information; performing denoising on the tire image carrying edge information by using a mean filter to obtain a denoised tire image; Using Hough transform, performing tire edge line detection on the denoised tire image, and marking the denoised tire image with the edge lines to obtain a detected image; Extract edge lines from the detected image to obtain a straight line image.
4. The method according to claim 1, wherein The traversing the pixel values of the binary straight line image to determine the first coordinate, the second coordinate, and the third coordinate includes: Traversing the binary straight line image from the pixel origin coordinates in the row direction until the pixel value is non-zero, marking the position of the non-zero value as the first coordinate; the binary straight line image is composed of a plurality of pixels, each of which has a binary pixel value and a pixel coordinate; When the binary straight line image is the left wheel image, traverse the binary straight line image column by column until the binary pixel value is non-zero, and mark the position of the non-zero value as the second coordinate; When the binary straight line image is an image of the right wheel, traverse the binary straight line image column by column from the position where the number of columns is the largest and the number of rows is 0 until the binary pixel value is non-zero, and mark the position where the non-zero value is located as the second coordinate; Traverse from the position with the largest number of rows of the binary straight line image to the direction with the smallest number of rows until the binary pixel value is non-zero, and mark the position of the non-zero value as the third coordinate.
5. The method according to claim 1, wherein The calculating the steering deviation angle of the tire according to the first coordinate, the second coordinate, and the third coordinate includes: Substituting the first coordinate and the second coordinate into a distance calculation formula to calculate a first distance; Substituting the second coordinate and the third coordinate into a distance calculation formula to calculate a second distance; When the binarized straight line image is the left front wheel image, detecting whether the second distance is smaller than the first distance; If the second distance is less than the first distance, substituting the first coordinate and the second coordinate into the first slope formula to calculate the steering deviation angle of the left front wheel; If the second distance is not less than the first distance, substituting the second coordinate and the third coordinate into the first slope formula to calculate the steering deviation angle of the left front wheel; When the binarized straight line image is the left rear wheel image, detecting whether the second distance is smaller than the first distance; If the second distance is less than the first distance, substituting the first coordinate and the second coordinate into a second slope formula to calculate the steering deviation angle of the left front wheel; If the second distance is not less than the first distance, substituting the second coordinate and the third coordinate into the second slope formula to calculate the steering deviation angle of the left front wheel; When the binarized straight line image is the right front wheel image, detecting whether the second distance is smaller than the first distance; If the second distance is less than the first distance, substituting the first coordinate and the second coordinate into the second slope formula to calculate the steering deviation angle of the right front wheel; If the second distance is not less than the first distance, substituting the second coordinate and the third coordinate into the second slope formula to calculate the steering deviation angle of the right front wheel; When the binarized straight line image is the right rear wheel image, detecting whether the second distance is smaller than the first distance; If the second distance is less than the first distance, substituting the first coordinate and the second coordinate into the first slope formula to calculate the steering deviation angle of the right front wheel; If the second distance is not less than the first distance, the second coordinate and the third coordinate are substituted into the first slope formula to calculate the steering deviation angle of the right front wheel.
6. The method according to claim 1, characterized in that The step of calculating the rotation angle of the reference baseline according to the pixel positions of the two endpoints includes: Substituting the pixel positions of the two endpoints into the straight line slope formula to calculate the slope of the reference baseline; The slope of the reference baseline is substituted into the inverse tangent function formula to calculate the rotation angle of the reference baseline.
7. The method according to claim 1, characterized in that The determining of the deviation angle according to the steering deviation angle of the tire and the rotation angle of the reference reference line includes: When the rotation angle of the reference baseline is 0 degrees, determining the steering deviation angle of the tire as the deviation angle; When the rotation angle of the reference reference line is not 0 degrees, a difference between the steering deviation angle of the tire and the rotation angle of the reference reference line is calculated and the difference is determined as the deviation angle.
8. A zero position calibration device for a vehicle angle sensor, characterized in that: include: an acquisition unit, configured to acquire a plurality of tire images and a center target image of the vehicle; The multiple tire images include: a left front wheel image, a right front wheel image, a left rear wheel image, and a right rear wheel image; an extraction unit, configured to perform tire edge straight line detection and extraction on each tire image to obtain a straight line image; a first processing unit, configured to perform binarization processing on the straight line image to obtain a binarized straight line image; A first determining unit, configured to traverse pixel values of the binary straight line image to determine a first coordinate, a second coordinate, and a third coordinate; a first calculation unit, configured to calculate a steering deviation angle of the tire according to the first coordinate, the second coordinate, and the third coordinate; a second processing unit, configured to perform binarization processing on the central target image when the central target and the camera are in a straight line, to obtain pixel positions of two end points of a reference baseline in the central target image; the camera being disposed above the vehicle; A second calculation unit is used to calculate the rotation angle of the reference baseline according to the pixel positions of the two endpoints; a second determining unit, configured to determine a deviation angle according to the steering deviation angle of the tire and the rotation angle of the reference reference line; The calibration unit is used to send the deviation angle to the control unit so that the control unit performs zero position calibration on the rotation angle sensor according to the deviation angle.
9. The device according to claim 8, characterized in that The acquisition unit is specifically configured to: Acquire a vehicle image taken by a camera located above the vehicle; performing denoising processing on the vehicle image to obtain a denoised vehicle image; performing image enhancement processing on the denoised vehicle image to obtain an enhanced vehicle image; grayscale processing is performed on the enhanced vehicle image to obtain a target vehicle image; The target vehicle image is instance segmented using a clustering algorithm to obtain multiple tire images and a central target point image of the vehicle.
10. The device according to claim 8, characterized in that The extraction unit is specifically used for: For each of the tire images, extract the tire image using an edge detection operator to obtain a tire image carrying edge information; performing denoising on the tire image carrying edge information by using a mean filter to obtain a denoised tire image; Using Hough transform, performing tire edge line detection on the denoised tire image, and marking the denoised tire image with the edge lines to obtain a detected image; Extract edge lines from the detected image to obtain a straight line image.
Citation Information
Cited By
Steering angle sensor calibration method, device and equipment and storage medium
CN119984154A
