Target Location Method and System Based on the Collaboration of Dynamic Color Threshold and Laser Depth
By using a method of dynamic color threshold and laser depth coordination in the object detection and positioning system, high-precision target positioning in different lighting environments is achieved, solving the problem of low positioning accuracy in existing systems under light changes and reducing deployment costs.
Patent Information
- Application Number
- CN202510336303.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-03-21
AI Technical Summary
The existing object detection and positioning systems are difficult to achieve high-precision positioning under different lighting environments, and are costly to deploy, and lack feedback verification for object recognition, which easily leads to irreversible positioning drift.
A target positioning method based on dynamic color threshold and laser depth is adopted, through real-time feedback verification of laser point cloud and visual depth, combined with adaptive threshold recalibration, robust perception and high-precision positioning in different lighting environments are achieved.
It significantly improves positioning accuracy and environmental adaptability, especially in environments of uncertain lighting, the target recognition accuracy is stable at more than 95.7% and the positioning error is within 2cm. It is suitable for mobile platforms such as drones and unmanned vehicles.
Smart Images

Figure CN119863524B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of image recognition and target positioning, and particularly relates to a target positioning method and system based on the cooperation of dynamic color threshold and laser depth. Background Art
[0002] With the rapid development of fields such as autonomous driving and intelligent transportation, people's living standards in daily life have been continuously improved, and the demand for target detection and high-precision positioning technology has become increasingly urgent. However, the existing target detection and positioning systems still have defects to varying degrees: the Chinese patent with the publication number CN109634279B and the invention name of "Object Positioning Method Based on Lidar and Monocular Vision" uses a deep learning algorithm to identify targets and locates targets through lidar. This method requires a large amount of data to be labeled and trained, has a high deployment cost, and cannot achieve target positioning in different lighting environments; the Chinese patent with the publication number CN118392151B and the invention name of "An Indoor and Outdoor Positioning Method Based on Multi-Sensor Fusion Algorithm" fuses and corrects the reference positioning information and multi-sensor positioning data to achieve target positioning. This method lacks feedback verification for target recognition, and once incorrect data enters the fusion process, it will lead to irreversible positioning drift. Summary of the Invention
[0003] The purpose of the present invention is to provide a target positioning method and system based on the cooperation of dynamic color threshold and laser depth, and through real-time feedback verification of laser point cloud and visual depth, as well as adaptive threshold recalibration, to achieve robust perception and high-precision positioning in different lighting environments. The present invention has achieved significant improvements in positioning accuracy and environmental adaptability, and is particularly suitable for target recognition and positioning of unmanned aerial vehicles, unmanned vehicles, etc. in environments with uncertain lighting.
[0004] The present invention adopts the following technical solutions: A target positioning method based on the cooperation of dynamic color threshold and laser depth, comprising the following steps:
[0005] S1. Collect the left and right views of the detection environment through a binocular camera, take the objects that meet the set threshold color, set area, and aspect ratio threshold in the left and right views as targets, extract the color features of the targets using the HSV color space, filter and analyze the extracted target bounding boxes using area / aspect ratio, and calculate the center coordinates of the targets in the pixel coordinate system under the binocular camera.
[0006] S2. Obtain the depth of the target according to the camera internal parameter matrix. If the depth is abnormal, perform threshold recalibration. If the depth is normal, use matrix transformation to convert the center coordinates of the target in the pixel coordinate system into camera coordinates, convert the camera coordinates into polar coordinates, and use the polar coordinates as the rough positioning result of the target.
[0007] S3. Subscribe to the lidar data, align the lidar data with the left and right views in time, extract the target distance information in the laser array according to the rough positioning result of the target, use the anomaly assessment factor to perform spatial consistency check, if there is no matching point cloud, perform threshold recalibration, if there is a matching point cloud, calculate the target position after laser calibration.
[0008] S4. Use bimodal confidence driving to optimize the Kalman filter gain, dynamically update the target coordinate estimate according to the optimized Kalman filter gain, and complete target positioning.
[0009] Furthermore, in step S1, calculating the center coordinates of the target in the pixel coordinate system includes the following:
[0010] S101. Use ROS to collect the left and right views of the detection environment through a binocular camera, use cv_bridge to convert the view into an OpenCV BGR image, convert the BGR image into an HSV color space, use the hue, saturation, and brightness channels to separate the color features of the target, dynamically load the threshold ranges of the five colors of red, blue, green, brown, and white through the ROS parameter server, generate the corresponding binary mask, and complete the extraction of color features.
[0011] S102, using an opening operation method of first corroding and then dilating to eliminate isolated noise points of the binary mask, and then superimposing the mask and performing a dilation operation to obtain a fused mask.
[0012] S103, using findContours to detect the contour of the fused mask, retaining the outermost contour, traversing the outermost contour, and using a double filtering mechanism to eliminate contours that are smaller than an area threshold and are not within an aspect ratio threshold range, to obtain a target bounding box.
[0013] S104, using the priority strategy of red, blue, green, brown, and white from high to low priority to classify the overlapping color areas of the target bounding box, obtain the corresponding color block color, and calculate the pixel coordinates of the center point of the target under the binocular camera. The specific formula is:
[0014] left_xzhong=(left_self.x+left_self.x+left_self.w) / 2;
[0015] left_yzhong=(left_self.y+left_self.y-left_self.h) / 2;
[0016] right_xzhong=(right_self.x+right_self.x+right_self.w) / 2;
[0017] right_yzhong=(right_self.y+right_self.y-right_self.h) / 2;
[0018] Among them, left_xzhong and left_yzhong respectively represent the horizontal and vertical coordinates of the target center pixel under the left camera; right_xzhong and right_yzhong respectively represent the horizontal and vertical coordinates of the target center pixel under the right camera; left_self.x and left_self.y respectively represent the horizontal and vertical coordinates of the upper left vertex of the target bounding box of the left camera, left_self.w and left_self.h respectively represent the width and height of the target bounding box of the left camera, right_self.x and right_self.y respectively represent the horizontal and vertical coordinates of the upper left vertex of the target bounding box of the right camera, and right_self.w and right_self.h respectively represent the width and height of the target bounding box of the right camera.
[0019] Furthermore, in step S2, obtaining the rough positioning result of the target includes the following contents:
[0020] S201. According to the horizontal difference of the target center in the left and right views and combined with the baseline distance, obtain the depth Z of the target. The specific formula is:
[0021] ;
[0022] Among them, b represents the distance between the optical centers of the two cameras, f represents the camera focal length, X L represents the pixel coordinates of the target on the left camera, X R represents the pixel coordinates of the target on the right camera.
[0023] If Z is not between 0.5m and 20m, it indicates that the depth is abnormal and threshold recalibration is performed; if Z is between 0.5m and 20m, it indicates that the depth is normal.
[0024] S202. When the depth is normal, using the principle of equal proportion magnification of similar triangles, convert the center point coordinates of the target under the binocular camera from the pixel coordinate system to the camera coordinate system to obtain the preliminary coordinates of the target. The specific formula is:
[0025] ;
[0026] Among them, represents the mean value of the horizontal coordinates of the target pixels under the binocular camera, ; represents the mean value of the vertical coordinates of the target pixels under the binocular camera, ; X C represents the target horizontal coordinate in the camera coordinate system; YC Represents the ordinate of the target in the camera coordinate system; Z C Represents the vertical distance between the camera and the plane where the target is located, Z C =Z; f x 、f y Both represent the camera focal length.
[0027] S203. Convert the preliminary coordinates of the target into polar coordinates to obtain the rough target positioning result. The specific formula is:
[0028] A = atan(X C / Z);
[0029] S = Z / cos(A);
[0030] Among them, A represents the first horizontal deflection angle of the target relative to the forward direction of the lidar; S represents the horizontal distance between the target and the lidar.
[0031] Furthermore, in step S3, obtaining the target position after laser calibration includes the following content:
[0032] S301. Perform linear interpolation on the point cloud data in the lidar data to obtain new point cloud data. The specific formula is:
[0033] ;
[0034] Among them, P virtual represents the new point cloud data; P0 represents the point cloud data of the previous frame; P1 represents the point cloud data of the current frame; t m represents the inserted new time, , t0 represents the time of the previous frame, and t1 represents the time of the current frame.
[0035] Store the new point cloud data and the corresponding ROS timestamp in the scan array, and compare the ROS timestamp with the timestamp corresponding to the rough target positioning result, and select the point cloud data closest to the rough target positioning result in time to complete time registration.
[0036] S302. Calculate the corresponding lidar scan index according to the first horizontal deflection angle of the target relative to the forward direction of the lidar. The specific formula is:
[0037] ;
[0038] Among them, zhong represents the lidar data index value matching A; represents the angle increment, , length represents the length of the array storing the new point cloud data.
[0039] S303. Calculate the polar coordinates of the target relative to the lidar according to the lidar scan index. The specific formula is as follows:
[0040] ;
[0041] ;
[0042] ;
[0043] where number represents the lidar target index value, median represents the median function, error represents the measurement error range of S set according to experience, N represents the lidar index array after time registration, i represents the lidar index corresponding to the laser distance within the range of S - error and S + error, M represents the lidar distance array after time registration, B represents the second horizontal deflection angle of the target relative to the front direction of the lidar, and distance represents the target distance information in the lidar distance array.
[0044] If the difference between distance and S is within 1m, the distance is normal, indicating that there are matching point clouds; otherwise, record the number of anomalies and further determine the abnormal situation. The specific formula is as follows:
[0045] ;
[0046] where represents the anomaly evaluation factor, Q represents the number of times of distance anomalies occurring at least continuously twice, and k represents the total number of scans.
[0047] If is greater than the empirical threshold , it indicates that there are no point clouds matching the target bounding box, confirming that an abnormal situation has occurred and performing threshold recalibration; if is not greater than the empirical threshold , it indicates that there are point clouds matching the target bounding box.
[0048] S304. When there are matching point clouds, convert the polar coordinates obtained in step S303 into rectangular coordinates to obtain the laser point cloud target positioning coordinates in the camera coordinate system. The specific formula is as follows:
[0049] x 1 = distance * cos(B);
[0050] y1 = distance * sin(B);
[0051] Among them, x1 represents the abscissa of the laser point cloud target positioning in the camera coordinate system, y1 represents the ordinate of the laser point cloud target positioning in the camera coordinate system, cos represents the cosine function, and sin represents the sine function.
[0052] S305. Convert the laser point cloud target positioning coordinates in the camera coordinate system into the laser point cloud target positioning coordinates in the global coordinate system to obtain the target position after laser calibration. The specific formula is:
[0053] ;
[0054] Among them, X and Y represent the abscissa and ordinate of the target in the global coordinate system; R represents the rotation matrix, , 、 、 respectively represent the yaw angle, pitch angle, and roll angle of the robot.
[0055] Furthermore, in step S4, the completion of target positioning includes the following contents:
[0056] S401. Dynamically calculate the Kalman gain using the weight assignment mechanism, and use the dual-modal confidence-driven to assist in calculating the Kalman gain. The calculation formula is:
[0057] ;
[0058] K_x = K adaptive *Eesti_x / (Emea_x + Esti_x);
[0059] K_y = K adaptive *Eesti_y / (Emea_y + Esti_y);
[0060] Among them, K adaptive represents the Kalman gain correction coefficient, C color represents the binocular vision color confidence, C laster represents the laser calibration confidence, represents the visual-laser positioning difference attenuation coefficient, represents the Euclidean distance difference between binocular vision positioning and laser positioning, K_x represents the Kalman gain of the target abscissa, K_y represents the Kalman gain of the target ordinate, Esti_x represents the estimated error of the target abscissa, Esti_y represents the estimated error of the target ordinate, Emea_x represents the measurement error of the target abscissa, Emea_y represents the measurement error of the target ordinate, represents the modal dominant factor.
[0061] S402. According to the Kalman gain, continuously perform weighted averaging of the predicted value and the measured value through iteration to obtain the optimal estimated value after filtering, which is the target coordinate estimated value. The specific formula is as follows:
[0062] ;
[0063] ;
[0064] Among them, represents the optimal estimated abscissa of the target after the -th iteration, represents the optimal estimated value of the abscissa of the target after the -th iteration, represents the optimal estimated ordinate of the target after the -th iteration, represents the optimal estimated value of the abscissa of the target after the -th iteration.
[0065] S403. Dynamically update the estimation error. The formula is as follows:
[0066] Eesti_xg=(1.0-K_x)*Eesti_x;
[0067] Eesti_yg=(1.0-K_y)*Eesti_y;
[0068] Among them, Eesti_xg represents the estimated error of the updated target abscissa, and Eesti_yg represents the estimated error of the updated target ordinate.
[0069] S404. Based on the updated estimation error, repeat steps S401 - S403 to complete the iteration for dynamic optimization.
[0070] Furthermore, the threshold recalibration includes the following:
[0071] Convert the BGR image to the HSV color space and extract the value channel. The specific formula is:
[0072] ;
[0073] ;
[0074] ;
[0075] Among them, represents the predicted value change of value, represents the arithmetic mean of all pixels in the V channel, , both represent adjustable parameters, Represents the absolute value of the brightness gradient, Represents the decrease value of the brightness threshold, Represents the local contrast, Represents the increase value of the brightness threshold, Represents the average brightness of the 5% brightest regions of the view.
[0076] Convert and into the range of 0 - 255 through linear mapping respectively, and , Represents the decrease amount of the pixel brightness threshold, Represents the increase amount of the pixel brightness threshold.
[0077] Calculate the arithmetic mean of all pixels in the brightness channel and normalize the result to the range of 0 - 2 to obtain the global brightness; when the global brightness is lower than 0.7, decrease the pixel brightness threshold by ; when the global brightness is higher than 1.3, increase the pixel brightness threshold by .
[0078] Furthermore, the present invention also proposes a target positioning system based on the cooperation of dynamic color threshold and laser depth, including:
[0079] A module for obtaining the central pixel coordinates of the target, which is used to collect the left and right views of the detection environment through a binocular camera, take the object that meets the set threshold color, set area, and aspect ratio threshold in the left and right views as the target, extract the color features of the target using the HSV color space, filter and analyze the extracted target bounding box using the area / aspect ratio, and calculate the central coordinates of the target in the pixel coordinate system under the binocular camera.
[0080] A module for obtaining the rough positioning result of the target, which is used to obtain the depth of the target according to the camera internal parameter matrix. If the depth is abnormal, perform threshold recalibration. If the depth is normal, use matrix transformation to convert the central coordinates of the target in the pixel coordinate system into camera coordinates, transform the camera coordinates into polar coordinates, and use the polar coordinates as the rough positioning result of the target.
[0081] A module for obtaining the target position after laser calibration, which is used to subscribe to the lidar data, perform time registration on the lidar data and the left and right views, extract the target distance information in the laser array according to the rough positioning result of the target, perform spatial consistency verification using the abnormal evaluation factor. If there is no matching point cloud, perform threshold recalibration. If there is a matching point cloud, calculate the target position after laser calibration.
[0082] A target positioning module, which is used to optimize the Kalman filter gain using bimodal confidence drive, dynamically update the target coordinate estimate value according to the optimized Kalman filter gain, and complete the target positioning.
[0083] Furthermore, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the target positioning method based on the cooperation of dynamic color threshold and laser depth are implemented.
[0084] Furthermore, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is run by a processor, the target positioning method based on the cooperation of dynamic color threshold and laser depth is executed.
[0085] Compared with the prior art, the present invention adopts the above technical solutions and has the following technical effects:
[0086] Based on the ROS parameter server, the present invention realizes the dynamic loading of color thresholds, can complete the robust recognition of targets under different illuminations, and greatly improves the accuracy of target recognition through the cooperation and verification of laser and depth.
[0087] The present invention adopts dual-modal confidence drive, reconstructs the Kalman gain calculation formula, realizes the adaptive suppression of measurement noise, and significantly improves the target positioning accuracy.
[0088] The correct rate of target recognition of the present invention under different illuminations is stable above 95.7%, and the positioning accuracy of the target is improved to the quasi-millimeter level (the positioning error is within 2 cm). At the same time, the modular design of the present invention supports the rapid deployment of mobile platforms such as unmanned aerial vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] Figure 1 is the overall implementation flowchart of the present invention.
[0090] Figure 2 is the target image recognized by the binocular camera through the dual filtering mechanism in the embodiment of the present invention.
[0091] Figure 3 is the pixel coordinate map obtained by the target detection of the binocular camera in the embodiment of the present invention.
[0092] Figure 4 is the schematic diagram of the stereo vision depth calculation principle in the embodiment of the present invention.
[0093] Figure 5 is the depth map obtained for the same target continuously for 20 s in the embodiment of the present invention.
[0094] Figure 6 is the schematic diagram of the conversion of the target from the pixel coordinate system to the camera coordinate system in the embodiment of the present invention.
[0095] Figure 7It is the polar coordinate graph of the target rough positioning in the embodiment of the present invention.
[0096] Figure 8 It is the horizontal and vertical coordinate graph of the target obtained by combining laser data in the embodiment of the present invention.
[0097] Figure 9 It is the horizontal and vertical coordinate graph of the target obtained after Kalman filtering in the embodiment of the present invention.
[0098] Figure 10 It is the horizontal and vertical coordinate error graph of the positioning of 100 different targets in the embodiment of the present invention.
[0099] Figure 11 It is a schematic diagram of the lidar and binocular camera required in the patent carried by the UAV in the embodiment of the present invention. Specific embodiments
[0100] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention, and cannot be used to limit the protection scope of the present invention.
[0101] To achieve the above object, the present invention proposes a target positioning method based on the cooperation of dynamic color threshold and laser depth. First, the color threshold of the binocular camera image is calibrated, and the morphological denoising is used to calibrate the target candidate area. The target contour is obtained by using the geometric constraints of the aspect ratio and area, and the preliminary target recognition is completed; according to the pixel coordinates of the target in the contour, the preliminary target positioning is completed by combining the binocular target depth formula; after aligning the time stamps of the lidar and visual data, the laser point cloud is used to verify the preliminary recognition result of the binocular vision, and the final high-precision positioning result is obtained. The present invention significantly improves the recognition accuracy and robustness of the system, ensuring that the system can efficiently and reliably complete target recognition and precise positioning in different lighting environments. As Figure 1 shown, the specific steps are as follows:
[0102] S1. Collect the left and right views of the detection environment through the binocular camera. Take the objects that meet the set threshold color, set area, and aspect ratio threshold in the left and right views as the targets. Use the HSV (Hue-Saturation-Value) color space to extract the color features of the targets, use morphological denoising to obtain the fused mask, use area / aspect ratio filtering analysis to extract the target bounding box, and calculate the center coordinates of the targets in the pixel coordinate system of the binocular camera. The specific content is as follows:
[0103] S101. Use ROS (Robot Operating System) to collect left and right views of the detection environment through a binocular camera, use cv_bridge (OpenCV ROS Bridge, a library for converting image data in the robot operating system) to convert the view into a BGR (Blue-Green-Red) image of OpenCV (Open Source Computer Vision Library), convert the BGR image into an HSV color space, use the three channels of hue, saturation, and brightness to separate the color features of the target, dynamically load the threshold ranges of the five colors of red, blue, green, brown, and white through the ROS parameter server, generate the corresponding binary mask, and complete the extraction of color features.
[0104] S102, using an opening operation of first corroding and then dilating to eliminate isolated noise points of the binary mask, and then superimposing the mask and performing a dilation operation to obtain a fused mask, thereby enhancing the connectivity of the target area and avoiding mask breakage caused by uneven illumination.
[0105] S103, use findContours (a function in Opencv used to detect the contour of an object) to detect the contour of the fused mask, retain the outermost contour, traverse the outermost contour, and use a double filtering mechanism to remove contours that are smaller than the area threshold and are not within the aspect ratio threshold range, which is used to exclude small area noise and non-target shapes such as slender or flat, ensure that the target shape is close to a rectangle, and obtain a rectangular target bounding box, such as Figure 2 As shown, Figure 2 (a) is the target bounding box recognized by the left camera. Figure 2 (b) is the target bounding box recognized by the right camera. The red box represents the recognized target, and the green words represent the recognized target color.
[0106] S104, such as Figure 3 As shown in the figure, the overlapping color areas of the target bounding box are classified using a priority strategy of red, blue, green, brown, and white from high to low to avoid conflicts between multi-color targets, obtain the corresponding color blocks, and calculate the pixel coordinates of the center point of the target under the binocular camera. The specific formula is:
[0107] left_xzhong=(left_self.x+left_self.x+left_self.w) / 2;
[0108] left_yzhong=(left_self.y+left_self.y-left_self.h) / 2;
[0109] right_xzhong = (right_self.x + right_self.x + right_self.w) / 2;
[0110] right_yzhong = (right_self.y + right_self.y - right_self.h) / 2;
[0111] Among them, left_xzhong and left_yzhong respectively represent the horizontal and vertical coordinates of the target center pixel under the left camera; right_xzhong and right_yzhong respectively represent the horizontal and vertical coordinates of the target center pixel under the right camera; left_self.x and left_self.y respectively represent the horizontal and vertical coordinates of the upper left vertex of the target bounding box of the left camera, left_self.w and left_self.h respectively represent the width and height of the target bounding box of the left camera, right_self.x and right_self.y respectively represent the horizontal and vertical coordinates of the upper left vertex of the target bounding box of the right camera, and right_self.w and right_self.h respectively represent the width and height of the target bounding box of the right camera.
[0112] Among them, the set threshold colors are as follows: the upper and lower HSV thresholds for red are set to [0, 240, 70] and [10, 255, 190], the upper and lower HSV thresholds for blue are set to [110, 210, 50] and [120, 240, 90], the upper and lower HSV thresholds for green are set to [50, 170, 40] and [60, 190, 90], the upper and lower HSV thresholds for brown are set to [5, 190, 30] and [10, 220, 70], and the upper and lower HSV thresholds for white are set to [100, 10, 90] and [110, 30, 220].
[0113] The area threshold is 500 pixels, and the threshold range of the aspect ratio is 0.3 to 1.6.
[0114] Figure 3 (a) of... is the horizontal coordinate graph of the target center pixel under the left camera obtained for the same target continuously for 20 s. It can be seen from the figure that the horizontal coordinate of the target center pixel of the left camera is stable at around 152 pixels. Figure 3 (b) of... is the relationship graph of the horizontal and vertical coordinates of the target center pixel under the left camera obtained for the same target continuously for 20 s. It can be seen from the figure that the vertical coordinate corresponding to the horizontal coordinate of 152 of the target center pixel of the left camera is 179. Figure 3 (c) of... is the horizontal coordinate graph of the target center pixel under the right camera obtained within 20 s for the same target. It can be seen from the figure that the horizontal coordinate of the target center pixel of the right camera is stable at around 143 pixels.Figure 3 Figure (d) is the relationship graph of the abscissa and ordinate of the target center pixel obtained by the right camera for the same target continuously for 20 s. It can be seen from the figure that when the abscissa of the target center pixel of the right camera is 143, the corresponding ordinate is 176. Therefore, from Figure 3 it can be seen that the target recognition of the binocular camera is relatively stable. There is a 9-pixel difference in the abscissa of the target center pixel of the binocular camera, but the ordinate of the target center pixel is almost the same.
[0115] S2. Obtain the depth of the target according to the camera internal parameter matrix. If the depth is abnormal, perform threshold recalibration. If the depth is normal, use matrix transformation to convert the center coordinates of the target in the pixel coordinate system into camera coordinates, convert the camera coordinates into polar coordinates, and use the polar coordinates as the rough positioning result of the target; the specific content is as follows:
[0116] S201. Stereo vision depth calculation: As Figure 4 shown, the imaging points of the same target on the binocular camera will have a certain deviation. According to the horizontal difference of the target center in the left and right views and combined with the baseline distance, the depth Z of the target is obtained. The specific formula is:
[0117] ;
[0118] Among them, b represents the distance between the optical centers of the two cameras, also called the baseline, which is generally obtained by consulting the camera sensor parameter configuration; f represents the camera focal length, which can be obtained by consulting the camera internal parameter matrix; X L represents the pixel coordinates of the target on the left camera, and X R represents the pixel coordinates of the target on the right camera, which are obtained through step S104.
[0119] In the figure, P represents the target, which is the imaging point of the target on the left camera; L represents the length of the camera pixel horizontal axis; P L represents the imaging point of the target on the left camera; P R represents the imaging point of the target on the right camera; O L represents the shooting point of the left camera; O R represents the shooting point of the right camera.
[0120] If Z is not between 0.5 m and 20 m, it indicates that the depth is abnormal and threshold recalibration is performed; if Z is between 0.5 m and 20 m, it indicates that the depth is normal.
[0121] The calculation results are as Figure 5 shown, Figure 5 which shows the target depth map obtained for the same target continuously for 20 s. It can be seen from the figure that the calculated target depth fluctuates around 5 m, and the fluctuation range is relatively large. Therefore, the target depth is sometimes calculated inaccurately and needs to be accurately positioned in combination with laser data in step S3 later.
[0122] S202. When the depth is normal, using the principle of proportional magnification of similar triangles, convert the center point coordinates of the target under the binocular camera from the pixel coordinate system to the camera coordinate system to obtain the preliminary coordinates of the target. As shown below, the specific formula is: Figure 6 As shown below, the specific formula is:
[0123] ;
[0124] Among them, represents the average value of the horizontal pixel coordinates of the target under the binocular camera, ; represents the average value of the vertical pixel coordinates of the target under the binocular camera, ; X C represents the horizontal coordinate of the target in the camera coordinate system; Y C represents the vertical coordinate of the target in the camera coordinate system; Z C represents the vertical distance between the camera and the plane where the target is located, Z C = Z; f x and f y both represent the camera focal length.
[0125] In the figure, O C represents the midpoint of the line segment where the shooting points of the left and right cameras are located. O represents the midpoint of the line segment where the imaging points of the target on the left camera and the right camera are located, and p represents the average pixel coordinates.
[0126] S203. Convert the preliminary coordinates of the target into polar coordinates to obtain the rough positioning result of the target. The specific formula is:
[0127] A = atan(X C / Z);
[0128] S = Z / cos(A);
[0129] Among them, A represents the first horizontal deflection angle of the target relative to the forward direction of the lidar; S represents the horizontal distance between the target and the lidar.
[0130] Figure 7 is the polar coordinate diagram of the rough positioning of the target. It can be seen from the figure that the rough positioning polar angle is stable at 0.546 radians, and the polar radius fluctuates around 5.8 m with a large fluctuation. Therefore, the inaccurate calculated target depth affects the rough positioning accuracy of the target, and subsequent precise positioning needs to be combined with lidar data in step S3.
[0131] S3. Subscribe to lidar data, perform time registration on the lidar data and the left and right views, extract the target distance information in the laser array according to the rough positioning result of the target, filter the effective distance information through median filtering, and perform spatial consistency verification using the anomaly evaluation factor. If there is no matching point cloud, it is determined that the recognition is abnormal and the threshold is recalibrated. If there is a matching point cloud, calculate the target position after laser calibration. The specific content is as follows:
[0132] S301. Multi-sensor time registration: Perform linear interpolation on the point cloud data in the lidar data to obtain new point cloud data with a higher frequency. The specific formula is:
[0133] ;
[0134] where, P virtual represents the new point cloud data; P0 represents the point cloud data of the previous frame; P1 represents the point cloud data of the current frame; t m represents the inserted new time, , t0 represents the time of the previous frame, and t1 represents the time of the current frame.
[0135] Store the new point cloud data and the corresponding ROS timestamp in the scan array, and compare the ROS timestamp with the timestamp corresponding to the rough positioning result of the target, and select the point cloud data closest to the rough positioning result time of the target to complete the time registration.
[0136] S302. The two-dimensional lidar point cloud data is stored in a floating-point array. The length of this array varies depending on the type of lidar. The array stores the distance values measured by the two-dimensional lidar at each scanning angle, which is used to describe the distribution of obstacles in the surrounding environment. Define this array, and calculate the corresponding lidar scan index according to the first horizontal deflection angle of the target relative to the front direction of the lidar. The specific formula is:
[0137] ;
[0138] where, zhong represents the lidar data index value matching A; represents the angle increment, , and length represents the length of the array storing the new point cloud data.
[0139] S303. Since the target is usually a three-dimensional object, while the laser data corresponding to the calculated laser index value is a point, to achieve precise positioning, more points need to be collected for data processing. Here, the index value and the five points before and after it are selected for scanning. Define the measurement error of the distance S between the target and the lidar. Record the laser indices with distances in the range of S-error and S+error in a new array cun. Calculate the polar coordinates of the target relative to the lidar according to the lidar scan index. The specific formula is:
[0140] ;
[0141] ;
[0142] ;
[0143] Among them, number represents the lidar target index value, median represents the median function, error represents the measurement error range of S set according to experience, N represents the lidar index array after time registration, i represents the laser index corresponding to the laser distance within the range of S-error and S+error, M represents the lidar distance array after time registration, B represents the second horizontal deflection angle of the target relative to the forward direction of the lidar, and distance represents the target distance information in the lidar distance array.
[0144] If the difference between distance and S is within 1m, the distance is normal, indicating the existence of matching point clouds; otherwise, record the number of anomalies and make a further determination of the abnormal situation. The specific formula is:
[0145] ;
[0146] Among them, represents the anomaly evaluation factor, Q represents the number of times of distance anomalies occurring at least continuously twice, and k represents the total number of scans.
[0147] If is greater than the empirical threshold , it indicates that there are no point clouds matching the target bounding box, confirming the occurrence of an abnormal situation and performing threshold recalibration; if is not greater than the empirical threshold , it indicates that there are point clouds matching the target bounding box.
[0148] S304. When there are matching point clouds, convert the polar coordinates obtained in step S303 into rectangular coordinates to obtain the target positioning coordinates of the laser point cloud in the camera coordinate system. The specific formula is:
[0149] x1 = distance * cos(B);
[0150] y1 = distance * sin(B);
[0151] Where x1 represents the abscissa of the laser point cloud target positioning in the camera coordinate system, y1 represents the ordinate of the laser point cloud target positioning in the camera coordinate system, cos represents the cosine function, and sin represents the sine function.
[0152] S305. Since lidar is usually installed on a robot, and the robot usually has attitude changes. Since the lidar sensor is solidly connected to the robot, the problem caused by non - overlapping coordinate systems needs to be considered. For a two - dimensional robot, the influence of the yaw angle is mainly considered, but for a three - dimensional robot, the positioning errors caused by the pitch angle, roll angle, and yaw angle need to be comprehensively considered. Considering the case where this algorithm is deployed on an unmanned aerial vehicle, the laser point cloud target positioning coordinates in the camera coordinate system are converted into the laser point cloud target positioning coordinates in the global coordinate system to obtain the target position after laser calibration. The specific formula is:
[0153] ;
[0154] Where X and Y represent the abscissa and ordinate of the target in the global coordinate system; R represents the rotation matrix, , , , respectively represent the yaw angle, pitch angle, and roll angle of the robot.
[0155] Figure 8 is the graph of the abscissa and ordinate of the target calculated by combining laser data. It can be seen from the graph that the calculated abscissa of the target is stable at 5m, with a fluctuation less than 0.3m, and the ordinate of the target is stable at 3m, with a fluctuation less than 0.15m. This shows that by combining laser data in step S3, the positioning error of the target rough positioning is greatly reduced, and the accurate positioning of the target is achieved.
[0156] S4. Optimize the traditional Kalman filter gain using dual - mode confidence drive, and dynamically update the target coordinate estimate value according to the optimized Kalman filter gain to complete target positioning; the specific content is:
[0157] S401. Use the weight distribution mechanism to dynamically calculate the Kalman gain, and use dual - mode confidence drive to assist in calculating the Kalman gain. The calculation formula is:
[0158] ;
[0159] K_x = K adaptive *Eesti_x / (Emea_x + Esti_x);
[0160] Ky = K adaptive *Eesti_y / (Emea_y + Eesti_y);
[0161] Wherein, K adaptive represents the Kalman gain correction coefficient, C color represents the binocular vision color confidence, C laster represents the laser calibration confidence, represents the vision-laser positioning difference attenuation coefficient, represents the Euclidean distance difference between binocular vision positioning and laser positioning, Kx represents the Kalman gain of the target abscissa, Ky represents the Kalman gain of the target ordinate, Eesti_x represents the estimated error of the target abscissa, Eesti_y represents the estimated error of the target ordinate, Emea_x represents the measured error of the target abscissa, and Emea_y represents the measured error of the target ordinate, represents the modal dominant factor.
[0162] S402. According to the Kalman gain, continuously weighted average and fuse the predicted value and the measured value through iteration to obtain the filtered optimal estimated value, which is the target coordinate estimated value. The specific formula is as follows:
[0163] ;
[0164] ;
[0165] Wherein, represents the optimal estimated value of the target abscissa after the th iteration, represents the optimal estimated value of the target abscissa after the th iteration, represents the optimal estimated value of the target ordinate after the th iteration, represents the optimal estimated value of the target abscissa after the th iteration.
[0166] S403. Dynamically update the estimated error. The formula is as follows:
[0167] Eesti_xg = (1.0 - K_x) * Eesti_x;
[0168] Eesti_yg = (1.0 - K_y) * Eesti_y;
[0169] Wherein, Eesti_xg represents the updated estimated error of the target abscissa, and Eesti_yg represents the updated estimated error of the target ordinate.
[0170] S404. Based on the updated estimation error, repeat steps S401 - S403 to complete the iteration for dynamic optimization.
[0171] Threshold recalibration includes the following:
[0172] Convert the BGR image to the HSV color space and extract the value channel. The specific formula is:
[0173] ;
[0174] ;
[0175] ;
[0176] Where, represents the predicted change in value, represents the arithmetic mean of all pixels in the V channel, , both represent adjustable parameters, represents the absolute value of the value gradient, represents the decrease value of the value threshold, represents the local contrast, represents the increase value of the value threshold, represents the mean value of the value in the brightest 5% area of the view.
[0177] Convert and linearly into and in the range of 0 - 255 respectively. represents the decrease amount of the pixel value threshold, represents the increase amount of the pixel value threshold.
[0178] Calculate the arithmetic mean of all pixels in the value channel, use 128 as the reference value, and normalize the result to the range of 0 - 2 to obtain the global brightness. When the global brightness is lower than 0.7, decrease the pixel value threshold by to capture the targets in the dark area; when the global brightness is higher than 1.3, increase the pixel value threshold by to avoid false alarms in the overexposed area.
[0179] Figure 9 is the target horizontal and vertical coordinate graph calculated after Kalman filtering. It can be seen from the graph that the calculated target horizontal coordinate is stable at 4.967m, with a fluctuation of no more than 0.002m, and the calculated target vertical coordinate is stable at 3.02m, with a fluctuation of no more than 0.002m, indicating that the target positioning accuracy is further improved through the Kalman filtering in step S4.
[0180] Figure 10For the horizontal and vertical coordinate error maps of 100 target localizations using the method proposed in the present invention, it can be seen from the figure that the error of the method proposed in the present invention for the target horizontal coordinate localization is less than 0.946 cm, and the error of the method for the target vertical coordinate localization is less than 0.73 cm. Therefore, the method proposed in the present invention can achieve high-precision localization of the target.
[0181] Figure 11 The figure shows a schematic diagram of a drone carrying the lidar and binocular camera required in the patent. Figure 11 Figure (a) is the front view of the drone after carrying. Figure 11 Figure (b) is the top view of the drone after carrying. It can be seen from the figure that the lidar and binocular camera can be simply carried on the drone, and the method proposed in the present invention can be very conveniently deployed.
[0182] The embodiment of the present invention also proposes a target localization system based on the collaboration of dynamic color threshold and laser depth, including a central point pixel coordinate acquisition module of the target, a rough localization result acquisition module of the target, a target position acquisition module after laser calibration, a target localization module, and a computer program that can run on a processor. It should be noted that each module in the above system corresponds to the specific steps of the method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in this embodiment, reference can be made to the method provided in the embodiment of the present invention.
[0183] The embodiment of the present invention also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. It should be noted that when the processor executes the computer program, it corresponds to the specific steps of the method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in this embodiment, reference can be made to the method provided in the embodiment of the present invention.
[0184] The embodiment of the present invention also proposes a computer-readable storage medium, which stores a computer program. It should be noted that when the computer program is run by a processor, it corresponds to the specific steps of the method provided in the embodiment of the present invention, and has the corresponding functional modules and beneficial effects for executing the method. For the technical details not described in detail in this embodiment, reference can be made to the method provided in the embodiment of the present invention.
[0185] The above are only the preferred embodiments of the present invention. It should be pointed out that for those of ordinary skill in the art, without departing from the technical principle of the present invention, several improvements and deformations can be made, and these improvements and deformations should also be regarded as the protection scope of the present invention.
Claims
1. A target positioning method based on dynamic color threshold and laser depth coordination, characterized in that: include: S1. The left and right views of the detection environment are collected by a binocular camera. Objects that meet the set threshold color and the set area and aspect ratio thresholds in the left and right views are taken as targets. The color features of the targets are extracted using the HSV color space. The target bounding box is extracted using the area / aspect ratio filtering analysis. The center coordinates of the target in the pixel coordinate system under the binocular camera are calculated. S2. Obtain the depth of the target according to the camera intrinsic parameter matrix. If the depth is abnormal, perform threshold recalibration. If the depth is normal, use matrix transformation to convert the center coordinates of the target in the pixel coordinate system into camera coordinates, convert the camera coordinates into polar coordinates, and use the polar coordinates as the rough positioning result of the target. S3, subscribe to the laser radar data, perform temporal registration of the laser radar data with the left and right views, extract the target distance information in the laser array according to the rough positioning result of the target, use the anomaly assessment factor to perform spatial consistency check, if there is no matching point cloud, perform threshold recalibration, if there is a matching point cloud, calculate the target position after laser calibration; S4. Use bimodal confidence driving to optimize the Kalman filter gain, dynamically update the target coordinate estimate according to the optimized Kalman filter gain, and complete target positioning.
2. The target positioning method based on dynamic color threshold and laser depth coordination according to claim 1 is characterized in that: In step S1, calculating the center coordinates of the target in the pixel coordinate system includes the following: S101, using ROS to obtain the left and right views of the detection environment collected by the binocular camera, using cv_bridge to convert the view into a BGR image of OpenCV, converting the BGR image into an HSV color space, using the three channels of hue, saturation, and brightness to separate the color features of the target, dynamically loading the set red, blue, green, brown, and white threshold ranges through the ROS parameter server, generating a corresponding binary mask, and completing the extraction of color features; S102, using an opening operation method of first corroding and then dilating to eliminate isolated noise points of the binary mask, and then superimposing the mask and performing a dilation operation to obtain a fused mask; S103, using findContours to detect the contour of the fused mask, retaining the outermost contour, traversing the outermost contour, and using a double filtering mechanism to remove contours that are smaller than an area threshold and are not within an aspect ratio threshold range, to obtain a target bounding box; S104, using the priority strategy of red, blue, green, brown, and white from high to low priority to classify the overlapping color areas of the target bounding box, obtain the corresponding color block color, and calculate the pixel coordinates of the center point of the target under the binocular camera. The specific formula is: left_xzhong=(left_self.x+left_self.x+left_self.w) / 2; left_yzhong=(left_self.y+left_self.y-left_self.h) / 2; right_xzhong=(right_self.x+right_self.x+right_self.w) / 2; right_yzhong=(right_self.y+right_self.y-right_self.h) / 2; Among them, left_xzhong and left_yzhong represent the horizontal and vertical coordinates of the center pixel of the target under the left camera respectively; right_xzhong and right_yzhong represent the horizontal and vertical coordinates of the center pixel of the target under the right camera respectively; left_self.x and left_self.y represent the horizontal and vertical coordinates of the upper left corner vertex of the target bounding box of the left camera respectively, left_self.w and left_self.h represent the width and height of the target bounding box of the left camera respectively, right_self.x and right_self.y represent the horizontal and vertical coordinates of the upper left corner vertex of the target bounding box of the right camera respectively, right_self.w and right_self.h represent the width and height of the target bounding box of the right camera respectively.
3. The target positioning method based on dynamic color threshold and laser depth coordination according to claim 1 is characterized in that: In step S2, the rough positioning result of the target is obtained, including the following contents: S201, according to the horizontal difference of the target center in the left and right views, combined with the baseline distance, the depth Z of the target is obtained. The specific formula is: ; Where b is the distance between the optical centers of the two cameras, f is the focal length of the camera, and X L Indicates the pixel coordinates of the target on the left camera, X R Indicates the pixel coordinates of the target on the right camera; If Z is not between 0.5m and 20m, it indicates that the depth is abnormal and the threshold should be recalibrated; if Z is between 0.5m and 20m, it indicates that the depth is normal; S202, when the depth is normal, the center point coordinates of the target under the binocular camera are converted from the pixel coordinate system to the camera coordinate system by using the principle of proportional magnification of similar triangles, and the preliminary coordinates of the target are obtained. The specific formula is: ; in, represents the mean value of the horizontal coordinate of the target pixel under the binocular camera, , left_xzhong and right_xzhong represent the horizontal coordinates of the center pixel of the target under the left and right cameras respectively; Represents the mean value of the ordinate of the target pixel under the binocular camera, , left_yzhong and right_yzhong represent the ordinates of the center pixels of the target under the left and right cameras respectively; X C Indicates the horizontal coordinate of the target in the camera coordinate system; Y C Indicates the target vertical coordinate in the camera coordinate system; Z C Indicates the vertical distance between the camera and the target plane, Z C =Z;f x 、f y Both represent the focal length of the camera; S203, converting the preliminary coordinates of the target into polar coordinates to obtain a rough positioning result of the target. The specific formula is: <h2 style=";text-align:left;direction:ltr">A=atan(X<h2 style=";text-align:left;direction:ltr"> C <h2 style=";text-align:left;direction:ltr"> / Z); S = Z / cos(A); Wherein, A represents the first horizontal deflection angle of the target relative to the front direction of the laser radar; S represents the horizontal distance between the target and the laser radar.
4. The target positioning method based on dynamic color threshold and laser depth coordination according to claim 1 is characterized in that: In step S3, obtaining the target position after laser calibration includes the following contents: S301, linearly interpolate the point cloud data in the laser radar data to obtain new point cloud data. The specific formula is: ; Among them, P virtual represents new point cloud data; P0 represents the point cloud data of the previous frame; P1 represents the point cloud data of the current frame; t m Indicates inserting a new time. , t0 represents the previous frame time, t1 represents the current frame time; The new point cloud data and the corresponding ROS timestamp are stored in the scan array, and the ROS timestamp is compared with the timestamp corresponding to the target coarse positioning result, and the point cloud data closest to the target coarse positioning result is selected to complete the time alignment; S302, according to the first horizontal deflection angle of the target relative to the front direction of the laser radar, the corresponding laser radar scanning index is calculated, and the specific formula is: ; Where A represents the first horizontal deflection angle of the target relative to the front direction of the laser radar; zhong represents the laser radar data index value matching A; represents the angle increment, , length represents the length of the array storing the new point cloud data; S303, calculating the polar coordinates of the target relative to the laser radar according to the laser radar scanning index, the specific formula is: ; ; ; Wherein, number represents the laser radar target index value, median represents the median function, S represents the horizontal distance between the target and the laser radar, error represents the measurement error range of S set according to experience, N represents the laser radar index array after time registration, i represents the laser index corresponding to the laser distance in the range of S-error and S+error, M represents the laser radar distance array after time registration, B represents the second horizontal deflection angle of the target relative to the front direction of the laser radar, and distance represents the target distance information in the laser radar distance array; If the difference between distance and S is within 1m, the distance is normal, indicating that there is a matching point cloud; otherwise, the number of abnormalities is recorded and the abnormal situation is further judged. The specific formula is: ; in, represents the anomaly assessment factor, Q represents the number of times that distance anomalies occur at least twice in a row, and k represents the total number of scans; like Greater than the empirical threshold , indicating that there is no point cloud matching the target bounding box, confirming an abnormality and recalibrating the threshold; if Not greater than the empirical threshold , indicating that there is a point cloud that matches the target bounding box; S304. When there is a matching point cloud, the polar coordinates obtained in step S303 are converted into rectangular coordinates to obtain the laser point cloud target positioning coordinates in the camera coordinate system. The specific formula is: x1=distance*cos(B); y1=distance*sin(B); Among them, x1 represents the horizontal coordinate of the laser point cloud target positioning in the camera coordinate system, y1 represents the vertical coordinate of the laser point cloud target positioning in the camera coordinate system, cos represents the cosine function, and sin represents the sine function; S305, converting the laser point cloud target positioning coordinates in the camera coordinate system into the laser point cloud target positioning coordinates in the global coordinate system to obtain the target position after laser calibration. The specific formula is: ; Among them, X and Y represent the horizontal and vertical coordinates of the target in the global coordinate system; Z represents the depth of the target; R represents the rotation matrix, , , , They represent the yaw angle, pitch angle, and roll angle of the robot respectively.
5. The target positioning method based on dynamic color threshold and laser depth coordination according to claim 1 is characterized in that: In step S4, completing target positioning includes the following: S401, using the weight distribution mechanism to dynamically calculate the Kalman gain, using the dual-mode confidence drive to assist in calculating the Kalman gain, the calculation formula is: ; K_x=K adaptive *Estonia_x / (Emea_x+Estonia_x); K_y=K adaptive *Estonia_y / (Emea_y+Estonia_y); Among them, K adaptive represents the Kalman gain correction coefficient, C color Represents binocular vision color confidence, C laster Indicates the confidence level of laser calibration, Represents the visual-laser positioning difference attenuation coefficient, represents the Euclidean distance difference between binocular vision positioning and laser positioning, K_x represents the Kalman gain of the target horizontal coordinate, K_y represents the Kalman gain of the target vertical coordinate, Eesti_x represents the estimated error of the target horizontal coordinate, Eesti_y represents the estimated error of the target vertical coordinate, Emea_x represents the measurement error of the target horizontal coordinate, Emea_y represents the measurement error of the target vertical coordinate, represents the modal dominant factor; S402, according to the Kalman gain, the predicted value and the measured value are continuously weighted averaged through iteration to obtain the optimal estimated value after filtering, which is the estimated value of the target coordinates. The specific formula is as follows: ; ; in, Indicates The optimal target horizontal coordinate estimate after iterations is: Indicates The optimal target horizontal coordinate estimate after iterations is: Indicates The optimal target ordinate estimate after iterations is: Indicates The optimal target horizontal coordinate estimate after iteration, X, Y represent the target horizontal and vertical coordinates in the global coordinate system; S403, dynamically update the estimated error, the formula is as follows: Eesti_xg=(1.0-K_x)*Eesti_x; Eesti_yg=(1.0-K_y)*Eesti_y; Among them, Eesti_xg represents the estimated error of the updated target horizontal coordinate, and Eesti_yg represents the estimated error of the updated target vertical coordinate; S404. Based on the updated estimation error, repeat steps S401-S403 to complete iteration and realize dynamic optimization.
6. The target positioning method based on dynamic color threshold and laser depth coordination according to claim 2 is characterized in that: Threshold recalibration includes the following: Convert the BGR image to HSV color space and extract the brightness channel. The specific formula is: ; ; ; in, represents the predicted brightness change, Represents the arithmetic mean of all pixels in the V channel, , All represent adjustment parameters. represents the absolute value of the brightness gradient, Indicates the decrease value of the brightness threshold, represents the local contrast, Indicates the increase in brightness threshold, Indicates the average brightness of the brightest 5% area of the view; Will and Linearly mapped into the range of 0-255 and , Indicates the pixel brightness threshold reduction amount, Indicates the increase in pixel brightness threshold; Calculate the arithmetic mean of all pixels in the brightness channel and normalize the result to the range of 0-2 to obtain the global brightness; when the global brightness is lower than 0.7, reduce the pixel brightness threshold ; When the global brightness is higher than 1.3, increase the pixel brightness threshold .
7. A system for the target positioning method based on dynamic color threshold and laser depth coordination as claimed in claim 1, characterized in that: include: The target center pixel coordinate acquisition module is used to collect the left and right views of the detection environment through the binocular camera, take the objects that meet the set threshold color and the set area and aspect ratio thresholds in the left and right views as the target, use the HSV color space to extract the color features of the target, use the area / aspect ratio filtering analysis to extract the target bounding box, and calculate the center coordinates of the target in the pixel coordinate system under the binocular camera; The module for obtaining the rough positioning result of the target is used to obtain the depth of the target according to the camera intrinsic parameter matrix. If the depth is abnormal, the threshold is recalibrated. If the depth is normal, the center coordinates of the target in the pixel coordinate system are converted to camera coordinates by matrix transformation, and the camera coordinates are transformed into polar coordinates, which are used as the rough positioning result of the target. The target position acquisition module after laser calibration is used to subscribe to the laser radar data, perform time registration of the laser radar data with the left and right views, extract the target distance information in the laser array according to the rough positioning result of the target, use the anomaly assessment factor to perform spatial consistency verification, and perform threshold recalibration if there is no matching point cloud. If there is a matching point cloud, the target position after laser calibration is calculated; The target positioning module is used to optimize the Kalman filter gain using dual-modal confidence driving, dynamically update the target coordinate estimation value according to the optimized Kalman filter gain, and complete the target positioning.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the target positioning method based on dynamic color threshold and laser depth coordination as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the target positioning method based on dynamic color threshold and laser depth coordination described in any one of claims 1 to 6 is executed.
Citation Information
Patent Citations
Object localization method based on lidar and monocular vision
CN109634279B
A method for indoor and outdoor positioning based on multi-sensor fusion algorithm
CN118392151B
Detection method and system, based on laser radar and binocular camera, for pedestrian in front of vehicle
CN104573646A
All-weather vehicle-mounted sensing system based on multiple millimeter wave radars
CN118485992A