An ultrasonic target detection method and device, an electronic device and a storage medium
By generating an ultrasonic diffusion arc surface and calculating the tangent and tangent point, combined with echo filtering, the diffusion problem of ultrasonic ranging in obstacle detection is solved, improving the obstacle detection accuracy and reliability of the automatic parking system, and reducing sensor dependence and mapping costs.
Patent Information
- Application Number
- CN202211136707.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-19
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-09-19
AI Technical Summary
Existing ultrasonic ranging methods fail to effectively consider the diffusion of ultrasonic waves when detecting obstacles, resulting in deviations in obstacle position when the angle is large. This is especially true in automatic parking scenarios, where the true location of obstacles cannot be accurately detected.
By acquiring the measurement distance and vehicle motion information of the ultrasonic probe, an ultrasonic diffusion arc surface is generated, the tangent and tangent point are calculated, the validity of the tangent point is judged, and the echo results are used for filtering to compensate for ultrasonic beam diffusion, filter invalid points, and improve obstacle detection accuracy.
This improves the obstacle detection accuracy of the automatic parking system, reduces reliance on other sensors, lowers obstacle mapping costs, and enhances the reliability of automatic parking.
Smart Images

Figure CN115597532B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of ultrasonic ranging, and particularly to an ultrasonic target detection method and device, electronic equipment and storage medium. BACKGROUND
[0002] Ultrasonic ranging sensors are increasingly used in automatic parking scenarios of vehicles. Vehicles with automatic parking functions can detect the contour of an obstacle and a parking space by combining the results of ultrasonic ranging with vehicle movement, thereby realizing the function of automatic parking.
[0003] Unlike laser ranging, the beam divergence of ultrasonic waves is much larger than that of laser beams. The trajectory of vehicle movement combined with the ranging results of the sensor can fit the contour of the surrounding obstacle. Existing algorithms do not consider the problem of ultrasonic divergence and directly use a single line to generate the contour, thereby causing deviations in the point cloud when the measured object and the vehicle have a certain angle. The larger the angle, the closer the obstacle appears. When the ultrasonic probe and the wall surface have a certain angle, the position of the echo is not directly in front of the ultrasonic probe. Simply using the laser model to back-propagate, the generated points will be closer to the probe. When detecting the outer contour of other vehicles, the contour of the vehicle will appear longer and the corner of the wall will appear larger.
[0004] The existing solution is to start from the ultrasonic probe and try to make the ultrasonic beam converge, and then use a 75MM PVC pipe for industry-standard testing to test the beam divergence of the ultrasonic probe. By placing the PVC pipe at different positions in front of the ultrasonic probe, the echo signal strength is detected to see if it is higher than the threshold to detect the object. However, this method does not mean that the object measured by the ultrasonic wave is necessarily within the range. In theory, as long as the object is large enough or has a special shape (90-degree triangular pyramid), it is possible to produce a strong enough echo at any angle to be detected by the ultrasonic probe. However, the diffusion of sound waves is different from that of laser beams. The diffusion of the ultrasonic probe is similar to that of a flashlight, which is stronger near the centerline. If the reflection of an object with a large side angle is strong enough, it can also be detected. If the reflection of an object with a large side angle is not strong enough or the side angle is small, it may not be illuminated. Therefore, the absence of an echo does not necessarily mean that there is no obstacle. There may be a small obstacle directly in front or an obstacle with a small angle similar to a wall. Therefore, the present disclosure uses the absence of an echo to filter obstacles in combination with FOV. SUMMARY
[0005] The present disclosure provides an ultrasonic target detection method and device, electronic equipment and storage medium, which can solve the technical problem of how to filter obstacles when there is no echo of ultrasonic waves, thereby realizing automatic parking.
[0006] In the preferred embodiment of the present disclosure, the application provides an ultrasonic target detection method, which comprises the following steps:
[0007] S1, obtaining a measurement distance of an ultrasonic probe and vehicle longitudinal yaw motion information, and generating a motion trajectory of the vehicle according to the vehicle longitudinal yaw motion information;
[0008] S2, generating a position and an angle of the ultrasonic probe relative to each motion trajectory point of the vehicle according to a position and an angle of the ultrasonic probe installation and the generated motion trajectory of the vehicle;
[0009] S3, generating an ultrasonic diffusion arc surface according to the measurement distance obtained in step S1 and the position and the angle of the ultrasonic probe relative to each motion trajectory point of the vehicle obtained in step S2, calculating a tangent and a tangent point according to adjacent ultrasonic diffusion arc surfaces, calculating a midpoint of the two tangent points as a result of ultrasonic beam diffusion compensation, and judging whether the tangent point is valid, and if valid, recording the tangent point as a valid point and finding all valid points.
[0010] Further, the step S3 further comprises the following step S4: filtering using a detection result of an echo.
[0011] Further, the step S1 specifically comprises the following steps:
[0012] obtaining a vehicle motion signal in a fixed period to obtain an angular velocity and a longitudinal driving distance;
[0013] initializing a trajectory point queue of the vehicle and a measurement distance of the ultrasonic probe to 0 for each trajectory point;
[0014] rotating the obtained trajectory point of the vehicle to obtain a new trajectory point.
[0015] Further, the step S2 specifically comprises the following steps:
[0016] if an ultrasonic measurement is triggered, discarding information of a last trajectory point in the vehicle trajectory point queue, and inserting a new trajectory point with an initial value of 0 at the front end of the vehicle trajectory point queue;
[0017] recording the measurement distance of the ultrasonic probe and storing it in an ultrasonic ranging queue;
[0018] initializing a valid number of ultrasonic probe detection to 0, and if the ultrasonic probe detects once, adding 1 to the valid number, wherein a maximum value of the valid number is a length of the vehicle trajectory point queue.
[0019] Further, the step S3 specifically comprises the following steps:
[0020] S31, if there are two available ultrasonic detection distances, generating an ultrasonic diffusion arc according to the detection distance results obtained in step S1, the position and angle of each motion trajectory point of the ultrasonic probe relative to the vehicle obtained in step S2;
[0021] S32, calculating the position of the ultrasonic diffusion arc in the vehicle coordinate system to generate a first diffusion arc;
[0022] S33, repeating steps S31 and S32 to generate a second diffusion arc for adjacent ultrasonic diffusion arcs;
[0023] S34, connecting the points of the first diffusion arc and the points of the second diffusion arc into line segments, and calculating the cosine values of the tangent angles of each line segment and the two arcs;
[0024] S35, taking the line segment with the smallest sum of cosine values as the tangent line, taking the two end points of the line segment as the tangent points, calculating the midpoint of the two tangent points, and taking the midpoint as the compensated point of the ultrasonic beam diffusion;
[0025] S36, determining whether the two cosine values constituting the sum of the smallest cosine values are less than a threshold value, if less than the threshold value, the tangent line is a valid tangent line, and the two tangent points constituting the tangent line are valid points;
[0026] S37, traversing all points in the first diffusion arc and the second diffusion arc, repeating step S36 to find all valid points in the first diffusion arc and the second diffusion arc, and recording all valid points and the direction of the line segment in which each valid point is located.
[0027] Further, the step S31 specifically comprises:
[0028] obtaining the installation position of the ultrasonic probe;
[0029] obtaining the position and heading of the vehicle relative to the current vehicle coordinate system when the ultrasonic probe is detected;
[0030] calculating the position of the ultrasonic probe relative to the current vehicle at the time of measurement according to the angle of the ultrasonic probe relative to the current vehicle;
[0031] rotating the ultrasonic detection point by -θ~+θ degrees, thereby expanding the unit discrete point generated by the laser single-point model into a unit diffusion arc of ultrasonic waves, and storing the unit discrete point in a sequence, denoted as a unit discrete point sequence, wherein θ is the ultrasonic beam diffusion angle, which changes according to the change of the measurement distance.
[0032] Further, the step S32 specifically comprises:
[0033] looking up the ultrasonic beam diffusion angle value corresponding to the measurement distance of the ultrasonic wave according to the test report table of the ultrasonic probe;
[0034] The obtained ultrasonic beam diffusion angle value point is multiplied by a unit discrete point sequence to obtain a rotation angle array of a point cloud constituting an ultrasonic diffusion arc surface;
[0035] According to the obtained rotation angle, the position of a single ultrasonic diffusion arc surface of the ultrasonic detection point in the vehicle coordinate system is calculated;
[0036] According to the position of the vehicle relative to the current vehicle coordinate during vehicle detection, the single ultrasonic diffusion arc surface is rotated and translated to obtain the position of the single ultrasonic diffusion arc in the current vehicle coordinate system, and a first diffusion arc surface is generated, wherein the first diffusion arc surface is represented by a first group of point clouds.
[0037] Further, the step S34 specifically includes:
[0038] A point is taken from each of the first group of point clouds and a second group of point clouds representing a second diffusion arc surface, one of the points and the ultrasonic probe position form a first vector, and the line segment formed by the two points forms a second vector; the cosine value of the included angle between the first vector and the second vector is calculated;
[0039] All points of the first group of point clouds and the second group of point clouds are traversed to obtain all first vectors and second vectors, and the cosine values of the included angles between all first vectors and second vectors are calculated.
[0040] Further, the step S36 specifically includes:
[0041] It is respectively judged whether the included angles between the tangent and the first vector and the tangent and the second vector are not less than 80 degrees, when the two included angles are not less than 80 degrees, the tangent is an effective tangent, and the tangent point is an effective point.
[0042] Further, the step S4 specifically includes:
[0043] If the tangent is an effective tangent, it is judged whether the midpoint of the tangent is within the current ultrasonic beam diffusion range, if it is within the current ultrasonic beam diffusion range, it is judged whether the reflection angle is within 0-30 degrees according to the angle of the midpoint and the angle of the ultrasonic probe, if it is within 0-30 degrees, the midpoint is filtered.
[0044] In the preferred embodiment of the present disclosure, the present disclosure also provides an ultrasonic target detection device, comprising:
[0045] A vehicle motion trajectory generation module is configured to acquire a measurement distance of an ultrasonic wave and vehicle longitudinal yaw motion information, and generate a motion trajectory of the vehicle according to the vehicle longitudinal yaw motion information;
[0046] The ultrasonic probe relative position generation module is configured to generate the position and angle of the ultrasonic probe relative to each motion trajectory point of the vehicle according to the position and angle of the ultrasonic probe installation and the generated vehicle motion trajectory;
[0047] The ultrasonic wave beam diffusion compensation module is configured to generate an ultrasonic diffusion arc surface according to the measured distance obtained by the vehicle motion trajectory generation module and the position and angle of the ultrasonic probe relative to each motion trajectory point of the vehicle obtained by the ultrasonic probe relative position generation module; calculate a tangent and a tangent point according to adjacent ultrasonic diffusion arc surfaces; calculate a midpoint of the two tangent points, and take the midpoint as a result of ultrasonic wave beam diffusion compensation; and determine whether the tangent point is valid, and if the tangent point is valid, record the tangent point as a valid point and find all valid points.
[0048] Further, the ultrasonic target detection device further comprises a filtering module configured to filter the detection result of the echo; if the tangent is a valid tangent, determine whether the midpoint of the tangent is within the current ultrasonic wave beam diffusion range; if the midpoint is within the current ultrasonic wave beam diffusion range, determine whether the reflection angle is within 0-30 degrees according to the angle of the midpoint and the angle of the ultrasonic probe; if the reflection angle is within 0-30 degrees, filter the midpoint.
[0049] The present disclosure further provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the ultrasonic target detection method described above when executing the computer program.
[0050] The present disclosure further provides a computer readable storage medium having a computer program stored thereon, wherein the program implements the steps of the ultrasonic target detection method described above when executed by a processor.
[0051] The beneficial effects of the present disclosure are: by compensating the ultrasonic wave diffusion angle, the points without echo in the ultrasonic wave detection area are filtered as noise points, thereby solving the technical problem that the existing technology cannot detect the square column when the vehicle reverses from the diagonal direction of the square column, so that the vehicle can detect and record the position of the square column when passing through the square column, so that the automatic parking system knows the position of the square column even when the ultrasonic wave cannot detect the square column, improves the accuracy of the square column and corner scanning results, reduces the vehicle profile, and improves the reliability of automatic parking. In addition, the present disclosure provides a possibility for ultrasonic mapping, greatly reduces the dependence on expensive sensors such as vision or lidar and the high-performance computing platform behind them, reduces the cost of obstacle mapping, and makes up for the defects of other sensors in mapping the surrounding environment, such as making up for the defect that although the laser radar has high accuracy and resolution, it cannot detect glass, and making up for the defect that in vision ranging, due to the dependence on the ground and the height and angle of the camera, when the obstacle is very close, the camera cannot detect the lower edge of the obstacle when using the lower edge for ranging. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 Flow chart for ultrasonic target detection
[0053] Figure 2 Schematic diagram for tangent and tangent point calculation
[0054] Figure 3 Composition diagram of each module in the ultrasonic target detection device DETAILED DESCRIPTION
[0055] The technical solutions in the embodiments of the present disclosure will be described clearly and completely in combination with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present disclosure.
[0056] Embodiment 1
[0057] Please refer to the accompanying Figure 1 , the implementation process of the ultrasonic target detection method as an example includes the following steps:
[0058] The measured distance of the ultrasonic probe and the longitudinal yawing motion information of the vehicle in a fixed period dt (usually 10 milliseconds) are obtained to obtain the angular velocity yawrate (usually obtained from a gyroscope) and the longitudinal driving distance ds, so as to obtain the angle change dh in the fixed period dt, wherein dh = yawrate*dt, the longitudinal driving distance ds is negative when reversing and positive when driving forward; the angle change dh is positive when looking down counterclockwise and negative when looking down clockwise.
[0059] According to the longitudinal yawing motion information of the vehicle, a coordinate system in which the vehicle trajectory is located is established, with the center of the rear axle of the vehicle as the coordinate origin, with the direction of the vehicle head as the X-axis direction, and with the direction of the left side of the vehicle as the Y-axis direction.
[0060] The trajectory points of the vehicle and the measured distances of the ultrasonic waves are respectively put into the queues X
[100] Y
[100] H
[100] and D
[100] , and the queues X
[100] Y
[100] H
[100] , D
[100] and the effective number V of ultrasonic probe detection are initialized to 0. The length of the queue is taken as 100 in the present disclosure, and the length of the queue can be set according to the specific circumstances of different projects.
[0061] The trajectory point queue of the vehicle is traversed, and all the trajectory points are rotated according to the following formula to obtain a new trajectory point queue X
[100] Y
[100] H
[100] ,
[0062] X i(k) =X i(k-1) -ds, H i(k) =H i(k-1) -dh,
[0063] wherein i is the i-th variable in the queue, is the trajectory point of the vehicle relative to the current vehicle coordinate system at the ultrasonic detection time k, is the trajectory point of the vehicle at the time one time before k, and Rt is a rotation matrix.
[0064] If the ultrasonic measurement is triggered (usually once every 40-100 milliseconds), the point at the end of the queue is discarded, and a new point with X1, Y1 and H1 all being 0 is inserted at the front end of the queue. After processing, X1 in the new queue is 0, X2 is X1 of the old queue, X3 is X2 of the old queue, and so on. The same method is used to obtain the new measured distance queue D
[100] . Once the ultrasonic wave is detected, the effective number V of ultrasonic probe detection is increased by 1. When the effective number V is greater than the length of the queue, the effective number V is set to the length of the queue.
[0065] If there are two available ultrasonic observation distances, the ultrasonic diffusion arc surface is generated. The diffusion arc surface of the present disclosure is represented by 21 points, and the number of points can be changed according to specific projects.
[0066] The position of the ultrasonic probe relative to the current vehicle at the time of two measurements is calculated:
[0067] wherein R0 is a rotation matrix, is the position of the ultrasonic probe relative to the current vehicle, is the position of the ultrasonic probe installation, is the trajectory point of the vehicle relative to the current vehicle coordinate system at the time of ultrasonic detection k.
[0068] According to the ultrasonic arc surface diffusion model, the position of the arc surface composed of point clouds relative to the vehicle at the time of measurement is calculated.
[0069] The position of the ultrasonic detection point laser model in the vehicle coordinate system is calculated:
[0070] wherein X Ui , Y Ui and H Ui are the installation positions of the ultrasonic probe in the vehicle coordinate system, X Oi and Y Oi are the positions of the detected points in the vehicle coordinate system based on the laser ranging model.
[0071] The laser single-point model is extended to an arc surface. The principle is to rotate the ultrasonic point by -θ~+θ degrees, wherein θ is the ultrasonic beam diffusion angle, which changes according to the distance. Here, the field of view FOV is applied to the ultrasonic wave, and the ultrasonic beam diffusion angle is denoted as FOV. In order to facilitate calculation, the present disclosure sets a sequence fov ba to represent a unit arc surface composed of unit discrete points, fov ba =[-1-0.9-0.8-0.7-0.6-0.5-0.4-0.3-0.2-0.100.10.20.30.40.50.60.70.80.91].
[0072] According to the measurement distance of the ultrasonic wave, the corresponding ultrasonic beam diffusion angle value FOV D is obtained by interpolation, wherein the table can be obtained according to the test report of the ultrasonic probe.
[0073] FOV D is obtained, and then FOV D is multiplied by the sequence fov baThis yields the deflection angle array fov, which describes the point cloud of the sound wave diffusion arc. a ,fov a =fov ba *FOV D / 2, where fov ba It is a unit arc surface composed of unit discrete points, FOV D The beam spread angle (fov) is calculated by interpolation from a table based on the distance and the ultrasonic probe test report provided by the supplier. a It is an arc surface composed of discrete points, and the diffusion angle is consistent with the beam diffusion angle.
[0074] According to fov a Point cloud P can be generated by rotating it by different angles. The calculation method for generating points on a single diffusion arc surface is as follows:
[0075] in, Let P be the generated point cloud.
[0076] Traversing fov a By examining all the angles within the circle, we can obtain the positions of all the points that make up the arc in the vehicle coordinate system.
[0077] Then, based on the vehicle's position relative to the current vehicle coordinates during detection, another rotation and translation are performed to obtain the positions of all points describing the diffusion arc in the current vehicle coordinate system, thus generating the first set of point clouds:
[0078] Where R2 is the rotation matrix, This is the first set of point clouds generated.
[0079] Iterate through the line segments formed by two or more sets of points that make up the arc surface, and calculate the cosine of the tangent angle between each line segment and the arc surface.
[0080] Using the same method, another set of points is calculated to describe the positions of all points in the current vehicle coordinate system, thus generating a second set of point clouds.
[0081] The first and second point clouds each contain 21 points. The number of points in each point cloud can be changed according to the specific project. Take the first point from the first point cloud and connect it to each point in the second point cloud to form a line segment. Then take the second point from the first point cloud and connect it to each point in the second point cloud to form a line segment.
[0082] As attached Figure 2The smaller the sum of the two cosine values, the better the tangency of the line segment between the two points on the two arc surfaces and the two arc surfaces.
[0083] Find the line segment with the smallest sum of cosine values, or the two points that form the line segment. Two sets of 21 points on the circular arcs, a total of 21x21=441 line segments, that is, 441 cosine value sums. Find the two points that form the line segment with the smallest cosine sum, and take the line segment as the tangent and the two endpoints of the line segment as the tangent points.
[0084] Directly add the two tangent points and divide by 2 to obtain the midpoint of the two tangent points, and take the midpoint as the point compensated by the ultrasound beam diffusion.
[0085] Determine whether the angles formed by the tangent and the first vector and the tangent and the second vector are not less than 80 degrees, respectively. When both angles are not less than 80 degrees, the tangent is an effective tangent and the tangent point is an effective point.
[0086] Iterate through all the points in the first diffusion arc surface and the second diffusion arc surface, repeat the above steps, find all the effective points in the first diffusion arc surface and the second diffusion arc surface, and record all the effective points and the direction of the line segment in which each effective point is located.
[0087] Filter all effective points using the detection results of the echoes. The absence of echo detection results means that the detection result is meaningless, which indicates that there is no PVC pipe obstacle greater than 75 mm in the ultrasound detection area. Using this information, some noise points can be removed. If the tangent is an effective tangent, determine whether the midpoint of the tangent is within the current ultrasound beam diffusion range. If it is within the current ultrasound beam diffusion range, determine whether the reflection angle is within 0-30 degrees according to the angle of the midpoint and the angle of the ultrasound probe. If it is within 0-30 degrees, filter the midpoint. The accuracy of removing noise points can be changed according to specific projects and needs, and the range of reflection angles can be changed.
[0088] Embodiment 2
[0089] As shown in Figure 3 An ultrasound target detection device as an example, comprising:
[0090] a vehicle motion trajectory generation module, configured to acquire the measured distance of the ultrasonic wave and vehicle longitudinal yaw motion information, and generate a motion trajectory of the vehicle according to the vehicle longitudinal yaw motion information;
[0091] an ultrasonic probe relative position generation module, configured to generate the position and angle of the ultrasonic probe relative to each motion trajectory point of the vehicle according to the position and angle of the ultrasonic probe installation and the generated motion trajectory of the vehicle;
[0092] an ultrasonic wave beam diffusion compensation module, configured to generate an ultrasonic wave diffusion arc surface according to the measured distance acquired by the vehicle motion trajectory generation module and the position and angle of the ultrasonic probe relative to each motion trajectory point of the vehicle acquired by the ultrasonic probe relative position generation module, calculate a tangent and a tangent point according to adjacent ultrasonic wave diffusion arc surfaces, calculate a midpoint of the two tangent points as a result of ultrasonic wave beam diffusion compensation, and determine whether the tangent point is valid, and if so, record the tangent point as a valid point and find all valid points.
[0093] Further, the ultrasonic target detection device further comprises a filtering module configured to filter the detection result of the echo, and if the tangent is a valid tangent, determine whether the midpoint of the tangent is within the current ultrasonic wave beam diffusion range, and if so, determine whether the reflection angle is within 0-30 degrees according to the angle of the midpoint and the angle of the ultrasonic probe, and if so, filter the midpoint.
[0094] Further, the vehicle motion trajectory generation module is specifically configured to:
[0095] acquire the measured distance of the ultrasonic probe and the vehicle longitudinal yaw motion information within a fixed period dt (generally 10 milliseconds), obtain an angular velocity yawrate (generally obtained from a gyroscope) and a longitudinal driving distance ds, so as to obtain an angle change dh within the fixed period dt, wherein dh=yawrate*dt, the longitudinal driving distance ds is negative when reversing and positive when driving forward; and the angle change dh is positive when looking down counterclockwise and negative when looking down clockwise;
[0096] establish a coordinate system in which the vehicle trajectory is located according to the vehicle longitudinal yaw motion information, with the center of the rear axle of the vehicle as a coordinate origin, with the direction of the vehicle head as an X-axis direction, and with the direction of the left side of the vehicle as a Y-axis direction;
[0097] Put the track points of the vehicle and the ultrasonic measurement distance into the queues X
[100] Y
[100] H
[100] and D
[100] respectively, and initialize the queues X
[100] Y
[100] H
[100] , D
[100] and the effective number of ultrasonic probe detection V to 0. The length of the queue is taken as 100 in the present disclosure, and the length of the queue can be set according to the specific circumstances of different projects;
[0098] Traverse the track point queue of the vehicle, rotate all the track points according to the following formula to obtain a new track point queue X
[100] Y
[100] H
[100] ,
[0099] X i(k) =X i(k-1) -ds,H i(k) =H i(k-1) -dh,
[0100] Where i is the i th variable in the queue, is the track point of the vehicle relative to the current vehicle coordinate system at the ultrasonic detection time k, is the track point of the vehicle at the time one before k, and Rt is a rotation matrix.
[0101] Further, the vehicle motion trajectory generation module is specifically configured to:
[0102] If the ultrasonic measurement is triggered (generally once every 40-100 milliseconds), the point at the end of the queue is discarded, and a new point with X1, Y1 and H1 all being 0 is inserted at the front end of the queue. After processing, X1 in the new queue is 0, X2 is X1 of the old queue, X3 is X2 of the old queue, and so on. The same method is used to obtain a new measurement distance queue D
[100] ; once the ultrasonic detection is performed, the effective number of ultrasonic probe detection V is increased by 1, and when the effective number V is greater than the length of the queue, the effective number V is set to the length of the queue.
[0103] The ultrasonic beam diffusion compensation module is specifically configured to:
[0104] If there are two available ultrasonic observation distances, a diffusion arc surface of the ultrasonic wave is generated. The diffusion arc surface of the present disclosure is represented by 21 points, and the number of points can be changed according to specific projects;
[0105] The position of the ultrasonic probe relative to the current vehicle at the time of twice measurement is calculated:
[0106] Where R0 is a rotation matrix, is the position of the ultrasonic probe relative to the current vehicle, is the position of the ultrasonic probe installation, The trajectory point of the vehicle relative to the current vehicle coordinate system at the ultrasonic detection moment k;
[0107] According to the ultrasonic arc surface diffusion model, the position of the arc surface composed of the point cloud relative to the vehicle at the measurement time is calculated;
[0108] The position of the ultrasonic detection point laser model in the vehicle coordinate system is calculated:
[0109] Wherein, X Ui , Y Ui and H Ui are the installation positions of the ultrasonic probe in the vehicle coordinate system, X Oi and Y Oi are the positions of the detected points in the vehicle coordinate system based on the laser ranging model;
[0110] The laser single-point model is extended to an arc surface; the principle is to rotate the ultrasonic point by-θ~+θ degrees, wherein θ is the ultrasonic beam diffusion angle, which changes according to the distance; here, the field of view FOV is applied to the ultrasonic wave, and the ultrasonic beam diffusion angle is denoted as FOV; in order to facilitate calculation, the present disclosure sets a number series fov ba from-1 to 1, with an interval of 0.1, to represent a unit arc surface composed of unit discrete points, fov ba =[-1-0.9-0.8-0.7-0.6-0.5-0.4-0.3-0.2-0.100.10.20.30.40.50.60.70.80.91];
[0111] According to the measurement distance of the ultrasonic wave, the corresponding ultrasonic beam diffusion angle value FOV D is obtained by interpolation, wherein the table can be obtained according to the test report of the ultrasonic probe;
[0112] FOV D is obtained, and FOV D is multiplied by the number series fov ba , so that the deflection angle array fov a of the point cloud describing the sound wave diffusion arc surface is obtained, fov a =fov ba *FOV D / 2, wherein fov ba is a unit arc surface composed of unit discrete points, FOV D is the beam diffusion angle obtained by table lookup and interpolation according to the distance and the test report of the ultrasonic probe provided by the supplier, and fov a is an arc surface composed of discrete points, and the diffusion angle is consistent with the beam diffusion angle;
[0113] According to fova Point cloud P can be generated by rotating it by different angles. The calculation method for generating points on a single diffusion arc surface is as follows:
[0114] in, The generated point cloud P;
[0115] Traversing fov a By examining all the angles within the circle, we can obtain the positions of all the points that make up the arc in the vehicle coordinate system.
[0116] Then, based on the vehicle's position relative to the current vehicle coordinates during detection, another rotation and translation are performed to obtain the positions of all points describing the diffusion arc in the current vehicle coordinate system, thus generating the first set of point clouds:
[0117] Where R2 is the rotation matrix, This is the first set of point clouds generated;
[0118] Iterate through the line segments formed by two or more sets of points that make up the arc surface, and calculate the cosine of the tangent angle between each line segment and the arc surface.
[0119] Using the same method, another set of points describing the positions of all points in the current vehicle coordinate system is calculated to generate a second set of point clouds.
[0120] The first and second point clouds each contain 21 points. The number of points in the point cloud can be changed according to the specific project. Take the first point from the first point cloud and form a line segment with each point in the second point cloud. Then take the second point from the first point cloud and connect it with each point in the second point cloud to form a line segment.
[0121] Find the line segment with the smallest sum of cosine values, or the two points that form the line segment; each of the two sets of arcs has 21 points, which can form a total of 21 x 21 = 441 line segments, which is the sum of 441 cosine values; find the two points that have the smallest sum of cosine values after forming the line segment, take the line segment as the tangent, and take the two endpoints of the line segment as the points of tangency.
[0122] Add the two tangent points together and divide by 2 to get the midpoint between them. Use the midpoint as the point where the ultrasonic beam has been compensated for.
[0123] Determine whether the angles formed by the tangent line and the first vector and the tangent line and the second vector are not less than 80 degrees. When both angles are not less than 80 degrees, the tangent line is a valid tangent line and the point of tangency is a valid point.
[0124] Repeat the above steps to find all the effective points in the first diffusion arc surface and the second diffusion arc surface, and record all the effective points and the direction of the line segment where each effective point is located.
[0125] Further, the filtering module is specifically used for:
[0126] All the effective points are filtered by using the detection result of the echo, and the detection result without echo means that the detection result is meaningless, which indicates that there is no obstacle of the PVC pipe greater than 75mm in the ultrasonic detection area; using this information can remove some noise points, if the tangent is an effective tangent, whether the midpoint of the tangent is in the current ultrasonic beam diffusion range is judged, if the midpoint is in the current ultrasonic beam diffusion range, whether the reflection angle is within 0-30 degrees is judged according to the angle of the midpoint and the angle of the ultrasonic probe, if the reflection angle is within 0-30 degrees, the midpoint is filtered, and the range of the reflection angle can be changed according to the specific project and the required noise removal accuracy.
[0127] Embodiment 3
[0128] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the ultrasonic target detection method in embodiment 1 when executing the computer program.
[0129] Embodiment 3 of the present disclosure is only an example, and should not limit the functions and use range of the present disclosure.
[0130] The electronic device can be in the form of a general computing device, for example, it can be a server device. The components of the electronic device can include but are not limited to: at least one processor, at least one memory, a bus connecting different system components including the memory and the processor.
[0131] The bus includes a data bus, an address bus, and a control bus.
[0132] The memory can include volatile memory, such as random access memory (RAM) and / or cache memory, and can further include read-only memory (ROM).
[0133] The memory can also include program tools with a set of (at least one) program modules, such program modules include but are not limited to: an operating system, one or more application programs, other program modules, and program data, each of these examples or some combination thereof can include the implementation of a network environment.
[0134] The processor performs various functional applications and data processing by running the computer program stored in the memory.
[0135] The electronic device can also communicate with one or more external devices such as a keyboard or a pointing device, through an I / O interface. Also, the electronic device can communicate with one or more networks, such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet, through a network adapter. The network adapter can communicate with the other modules of the electronic device through the bus. It should be appreciated that, although not shown in the figure, other hardware and / or software modules could be used in conjunction with the electronic device. For example, a microcode, a device driver, a redundant processing unit, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc., can be used in conjunction with the electronic device.
[0136] It should be noted that, although the above detailed description refers to several units / modules or sub-units / modules of the electronic device, such a division is merely exemplary and not mandatory. Indeed, according to the embodiments of the present application, the features and functionalities of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functionalities of one unit / module described above can be further divided into several units / modules embodied by.
[0137] Embodiment 4
[0138] A computer readable storage medium, the readable storage medium stores a computer program, the program is executed by a processor to implement the steps of the ultrasonic target detection method in embodiment 1.
[0139] More specifically, the readable storage medium can include, but is not limited to, a portable disc, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0140] In possible embodiments, the present disclosure can also be implemented in the form of a program product, which includes program code for causing an end device to perform the steps of the ultrasonic target detection method described in embodiment 1 when the program product is run on the end device.
[0141] The program code for performing the present disclosure can be written in any combination of one or more programming languages, and can be executed entirely on the user device, partly on the user device and partly on a remote device, or entirely on a remote device, as a stand-alone software package, or partly on the user device and partly on a remote device.
[0142] While embodiments of the present disclosure have been shown and described, it is to be understood that the embodiments can be varied, modified, substituted and otherwise changed by those skilled in the art without departing from the principles and spirit of the present disclosure, the scope of which is to be determined by the following claims and their equivalents.
Claims
1. An ultrasonic object detection method, characterized by, The method comprises the following steps: S1, obtaining the measured distance of the ultrasonic wave and the vehicle longitudinal yaw motion information, and generating the motion trajectory of the vehicle according to the vehicle longitudinal yaw motion information; S2, generating the position and angle of the ultrasonic probe relative to each motion trajectory point of the vehicle according to the position and angle of the ultrasonic probe installation and the generated motion trajectory of the vehicle; S3, generating the ultrasonic wave diffusion arc surface according to the measured distance obtained in step S1 and the position and angle of the ultrasonic probe relative to each motion trajectory point of the vehicle obtained in step S2; calculating the tangent and tangent point according to adjacent ultrasonic wave diffusion arc surfaces; calculating the midpoint of the two tangent points as the result of the ultrasonic wave beam diffusion compensation; judging whether the tangent point is valid, and if valid, recording the tangent point as a valid point and finding all valid points.
2. The ultrasonic object detection method of claim 1, wherein, Step S3 specifically comprises: S31, if there are two available ultrasonic measurement distances, generating the ultrasonic wave diffusion arc surface according to the measured distance obtained in step S1 and the position and angle of the ultrasonic probe relative to each motion trajectory point of the vehicle obtained in step S2; S32, calculating the position of the ultrasonic wave diffusion arc surface in the vehicle coordinate system to generate a first diffusion arc surface; S33, repeating steps S31 and S32 to generate a second diffusion arc surface from adjacent ultrasonic wave diffusion arc surfaces; S34, connecting the points of the first diffusion arc surface and the points of the second diffusion arc surface into a line segment, and calculating the cosine values of the tangent angles of each line segment and the two arc surfaces; S35, taking the line segment with the smallest sum of cosine values as the tangent, and taking the two end points of the line segment as the tangent points; calculating the midpoint of the two tangent points, and taking the midpoint as the point compensated by the ultrasonic wave beam diffusion; S36, judging whether the two cosine values constituting the sum of the smallest cosine values are smaller than a threshold value, and if smaller than the threshold value, the tangent is a valid tangent, and the two tangent points constituting the tangent are valid points; S37, traversing all points in the first diffusion arc surface and the second diffusion arc surface, repeating step S36 to find all valid points in the first diffusion arc surface and the second diffusion arc surface, and recording all valid points and the direction of the line segment where each valid point is located.
3. The ultrasonic object detection method of claim 2, wherein, Step S31 specifically comprises: obtaining the installation position of the ultrasonic probe; obtaining the position and heading of the vehicle relative to the current vehicle coordinate system when the ultrasonic probe is detected; calculating the position of the ultrasonic probe relative to the current vehicle at the time of measurement according to the angle of the ultrasonic probe relative to the current vehicle; rotating the ultrasonic detection point by -θ~+θ degrees, thereby expanding the unit discrete point generated by the laser single-point model into a unit diffusion arc surface of the ultrasonic wave, and storing the unit discrete point in a sequence, denoted as a unit discrete point sequence, wherein θ is the ultrasonic wave beam diffusion angle and changes according to the change of the measured distance; and / or Step S32 specifically comprises: looking up the ultrasonic wave beam diffusion angle value corresponding to the measured distance of the ultrasonic wave according to the test report table of the ultrasonic probe; point-multiplying the obtained ultrasonic wave beam diffusion angle value with the unit discrete point sequence to obtain a rotation angle array of the point cloud constituting the ultrasonic wave diffusion arc surface; calculating the position of the single ultrasonic wave diffusion arc surface of the ultrasonic detection point in the vehicle coordinate system according to the obtained rotation angle; and / or Step S32 specifically comprises: looking up the ultrasonic wave beam diffusion angle value corresponding to the measured distance of the ultrasonic wave according to the test report table of the ultrasonic probe; point-multiplying the obtained ultrasonic wave beam diffusion angle value with the unit discrete point sequence to obtain a rotation angle array of the point cloud constituting the ultrasonic wave diffusion arc surface; calculating the position of the single ultrasonic wave diffusion arc surface of the ultrasonic detection point in the vehicle coordinate system according to the obtained rotation angle. According to a position of the vehicle relative to a current vehicle coordinate when the vehicle is detected, the single ultrasonic diffusion arc surface is rotated and translated to obtain a position of the single ultrasonic diffusion arc in a current vehicle coordinate system, and a first diffusion arc surface is generated, wherein the first diffusion arc surface is represented by a first set of point clouds.
4. The ultrasonic object detection method of claim 3, wherein, Step S34 specifically includes: A point is taken from each of the first set of point clouds and a second set of point clouds representing a second diffusion arc surface, one of the points and the position of the ultrasonic probe form a first vector, and a line segment formed by the two points forms a second vector; a cosine value of an included angle between the first vector and the second vector is calculated; All points of the first set of point clouds and the second set of point clouds are traversed to obtain all first vectors and second vectors, and cosine values of included angles between all the first vectors and the second vectors are calculated.
5. The ultrasonic object detection method of claim 4, wherein, Step S36 specifically includes: It is respectively judged whether the included angles between the tangent and the first vector and between the tangent and the second vector are not less than 80 degrees, and when the two included angles are not less than 80 degrees, the tangent is an effective tangent and the tangent point is an effective point.
6. The ultrasonic object detection method of claim 1, wherein, The step S3 further includes: S4, filtering is performed by using the detection result of the echo, specifically: if the tangent is an effective tangent, it is judged whether a midpoint of the tangent is in a current ultrasonic beam diffusion range, if the midpoint is in the current ultrasonic beam diffusion range, it is judged whether a reflection angle is in 0-30 degrees according to an angle of the midpoint and an angle of the ultrasonic probe, if the reflection angle is in 0-30 degrees, the midpoint is filtered.
7. The ultrasonic object detection method of claim 1, wherein, Step S1 specifically includes: Vehicle motion signals in a fixed period are obtained to obtain an angular velocity and a longitudinal driving distance; A trajectory point queue of the vehicle and a measured distance of the ultrasonic wave for each trajectory point are initialized to 0; The obtained trajectory point of the vehicle is rotated to obtain a new trajectory point; and / or Step S2 specifically includes: If the ultrasonic wave measurement is triggered, information of a last trajectory point in the vehicle trajectory point queue is discarded, and a new trajectory point with an initial value of 0 is inserted at a front end of the vehicle trajectory point queue; A measured distance of the ultrasonic probe is recorded and stored in a ranging queue of the ultrasonic wave; An effective number of times of detection of the ultrasonic probe is initialized to 0, and if the ultrasonic probe detects once, the effective number of times is increased by 1, wherein a maximum value of the effective number of times is a length of the vehicle trajectory point queue.
8. An ultrasonic object detection apparatus, characterized by comprising: It includes: A vehicle motion trajectory generation module is configured to obtain a measured distance of an ultrasonic wave and vehicle longitudinal yaw motion information, and generate a motion trajectory of the vehicle according to the vehicle longitudinal yaw motion information; An ultrasonic probe relative position generation module is configured to generate a position and an angle of the ultrasonic probe relative to each motion trajectory point of the vehicle according to a position and an angle at which the ultrasonic probe is installed and the generated motion trajectory of the vehicle; and An ultrasonic wave reflection point detection module is configured to generate a reflection point of the ultrasonic wave on the vehicle according to the position and the angle of the ultrasonic probe relative to each motion trajectory point of the vehicle. An ultrasonic wave beam diffusion compensation module is configured to generate an ultrasonic wave diffusion arc surface according to the measured distance obtained by the vehicle motion trajectory generation module, and the position and angle of the ultrasonic wave probe relative to each motion trajectory point of the vehicle obtained by the ultrasonic wave probe relative position generation module; calculate a tangent and a tangent point according to adjacent ultrasonic wave diffusion arc surfaces; calculate a midpoint of the two tangent points, and take the midpoint as a result of ultrasonic wave beam diffusion compensation; and determine whether the tangent point is valid, and if valid, record the tangent point as a valid point and find all valid points.
9. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the ultrasonic target detection method of any one of claims 1 to 7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to implement the steps of the ultrasonic target detection method of any one of claims 1 to 7.
Citation Information
Patent Citations
Method of and device for ultrasonic inspection
JP2006138672A
Ultrasonic sensor and ultrasonic measurement device
JP2015166024A