Vehicle bottom detection method, system, device and storage medium based on machine vision
Through machine vision technology, robots are used to obtain images and depth data around the vehicle, perform denoising and point cloud processing, and identify the characteristics of the vehicle bottom. This solves the data accuracy and noise problems in the existing vehicle bottom detection, and improves the accuracy of foreign object identification under the vehicle. Accuracy and detection stability.
Patent Information
- Application Number
- CN202410895447.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-05
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-07-05
AI Technical Summary
Existing vehicle underbody detection technology is difficult to efficiently extract accurate data, and the data fusion noise is high, resulting in low foreign object recognition accuracy and poor stability, which reduces the quality of underbody safety inspection.
Using the vehicle bottom detection method based on machine vision, the robot rotates around the vehicle to obtain a circle of images, adjusts the pose to obtain the initial driving route, obtains depth and RGB images along the road, performs denoising processing and point cloud data conversion, and fits the ground plane. Segment point cloud clusters, identify vehicle bottom features, remove foreign objects, and generate navigation paths to improve detection accuracy.
It achieves high accuracy and good stability in identifying foreign objects under the vehicle, and improves the quality of safety inspection under the vehicle.
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of under-vehicle detection, and in particular to a method, system, device and storage medium for under-vehicle detection based on machine vision. Background Art
[0002] Vehicle underbody inspection is of great significance in ensuring safety, improving performance, extending service life, ensuring comfort, and improving maintenance efficiency. By regularly inspecting the underbody of the vehicle and removing foreign objects after identification, the safety of the underbody of the vehicle can be ensured, thus providing users with a safe, reliable, and comfortable driving experience.
[0003] Existing technologies often integrate multiple sensors such as GPS, inertial navigation system (INS), geomagnetic sensors, etc., and use data fusion algorithms (such as Kalman filter, particle filter, etc.) to analyze the fusion data of multiple sensors to perform vehicle underbody safety detection. However, in the above methods, it is difficult to efficiently extract accurate underbody data from the underbody. Even after extracting the underbody data, it is difficult to achieve data fusion. Even if data fusion can be achieved, the noise of the fused data is difficult to eliminate, and the data purity and reliability are low, which leads to low accuracy and poor stability in the final underbody foreign object recognition, reducing the quality of underbody safety detection. Summary of the invention
[0004] The purpose of the present invention is to provide a vehicle underbody detection method, system, device and storage medium based on machine vision with high foreign body recognition accuracy and good stability.
[0005] The technical solution of the present invention is as follows:
[0006] A vehicle bottom detection method based on machine vision includes the following operations:
[0007] S1. The robot rotates around its own vertical center line for one circle to obtain a one-circle image of the robot containing the vehicle; the vehicle wheels are identified in the one-circle image of the robot, and the vehicle transverse center line is obtained based on the vehicle wheels; the robot is adjusted according to the positions of the vehicle transverse center line and the robot vertical center line in the one-circle image of the robot, so that the robot vertical center line and the vehicle transverse center line are in the same plane, and the robot faces the vehicle; the intersection of the plane where the adjusted robot vertical center line and the vehicle transverse center line are located and the ground is used as the initial driving route;
[0008] S2, the robot drives along the initial driving route through the bottom of the vehicle to obtain the bottom depth image and the bottom RGB image of the vehicle; based on the comparison result of the peak signal-to-noise ratio of the bottom RGB image of the vehicle and the first peak signal-to-noise ratio threshold, the bottom RGB image of the vehicle is denoised to obtain the bottom denoised RGB image of the vehicle; based on the camera matrix of the robot, the bottom depth image of the vehicle is converted into three-dimensional point cloud data, and then down-sampled to obtain down-sampled point cloud data; the normal of the down-sampled point cloud data is obtained, and the down-sampled point cloud data is processed by the least square method and the nearest neighbor interpolation based on the normal to obtain the depth point cloud data; the bottom denoised RGB image of the vehicle is projected onto the depth point cloud data to obtain the bottom point cloud data of the vehicle;
[0009] S3, fitting the ground plane based on the bottom point cloud data, deleting the ground plane from the bottom point cloud data, and obtaining fine bottom point cloud data; segmenting the fine bottom point cloud data based on the Euclidean distance between point clouds, and obtaining a number of point cloud clusters; and identifying each point cloud cluster according to the geometric features and point cloud pixels of the point cloud cluster, and obtaining the bottom vehicle identification result;
[0010] S4, judging whether there is a foreign object in the vehicle bottom recognition result, if there is a foreign object, after removing the foreign object, delete the point cloud corresponding to the foreign object in the refined vehicle bottom point cloud data, and obtain updated vehicle bottom point cloud data for executing S5; if there is no foreign object, use the refined vehicle bottom point cloud data as updated vehicle bottom point cloud data for executing S5;
[0011] S5, taking the key parts of the bottom of the vehicle in the bottom vehicle recognition result as the target point, performing path planning based on the updated bottom vehicle point cloud data, obtaining the bottom vehicle navigation path, and associating it with the vehicle model;
[0012] When performing under-vehicle inspection at a later stage, after replacing the initial driving route in S2 with the under-vehicle navigation path associated with the vehicle model, the operations of S2 and S3 are executed to perform under-vehicle safety inspection.
[0013] The specific operations for adjusting the posture of the robot in S1 are as follows: based on the vehicle wheels in the robot's one-circle image, obtain the vehicle orientation and the vehicle's lateral center line; obtain the angle difference between the vehicle orientation and the robot orientation, and the lateral offset between the vehicle's lateral center line and the vertical center line of the starting image; the vertical center line of the starting image is the robot's vertical center line; control the robot to move left and right according to the lateral displacement, so that the robot's vertical center line and the vehicle's lateral center line are in the same plane; control the robot to rotate according to the angle difference until the robot is facing the vehicle.
[0014] The operation of obtaining the denoised RGB image of the vehicle bottom in S2 is specifically as follows: determining whether the peak signal-to-noise ratio of the denoised RGB image of the vehicle bottom exceeds a first peak signal-to-noise ratio threshold; if the peak signal-to-noise ratio is not less than the first peak signal-to-noise ratio threshold, replacing each pixel value in the vehicle bottom RGB image with the average value of its own neighborhood pixel value to obtain the vehicle bottom denoised RGB image; if the peak signal-to-noise ratio is between the first peak signal-to-noise ratio threshold and the second peak signal-to-noise ratio threshold, the vehicle bottom RGB image is processed by bilateral filtering to obtain the vehicle bottom denoised RGB image; if the peak signal-to-noise ratio is not greater than the second peak signal-to-noise ratio threshold, the vehicle bottom RGB image is processed by non-local mean filtering to obtain the vehicle bottom denoised RGB image.
[0015] The specific operation of the non-local mean filtering process is as follows: the vehicle bottom RGB image is evenly divided into several RGB blocks; each RGB block is sequentially subjected to the similar block denoising operation according to the position order in the vehicle bottom RGB image to obtain the vehicle bottom denoised RGB image; the specific operation of the similar block denoising is as follows: based on the previous vehicle bottom denoised RGB image, an RGB block whose brightness similarity with the current RGB block is greater than the similarity threshold within the current RGB block search range is obtained as the current similar RGB block to obtain several current similar RGB blocks; the similarity weight between each current similar RGB block and the current block is obtained to obtain several similarity weights; all similarity weights are normalized to obtain several normalized weights; based on the several normalized weights, all corresponding similar RGB blocks of the current RGB block are subjected to weighted averaging to obtain the current vehicle bottom denoised RGB image denoising block, which is used to perform the similar block denoising operation of the next RGB block.
[0016] The similarity weight is obtained based on the pixel square difference between the current RGB block and the target current similar RGB block, and the Euclidean distance between the current RGB block and the target current similar RGB block.
[0017] The operation of fitting the ground plane in S3 is as follows: in each iteration, a number of points are randomly selected from the bottom point cloud data to determine a current plane model; the distances from all point clouds to the current plane model are obtained, and the point clouds with distances less than the distance threshold are regarded as inliers to obtain the number of inliers; if the number of inliers of the current plane model exceeds the number of inliers of the previous plane model, the current plane model group is used as the current best plane model; after the iteration is completed, the best plane model is obtained; based on the index information of the point cloud, the ground plane points are obtained in the best plane model, and all the ground plane points form a ground plane.
[0018] The operation of obtaining the navigation path under the vehicle in S5 is specifically as follows: after the updated point cloud data under the vehicle is converted into a two-dimensional plane map, grid division is performed to obtain a vehicle under grid map consisting of several grid areas, each grid area containing the information of the projection of the point cloud under the vehicle; according to the vehicle under recognition result, the key parts of the vehicle under the vehicle are marked in the vehicle under grid map and used as target points to obtain several target points; according to the distances from the several target points to the navigation starting point from near to far, the several target points are sequenced from small to large to obtain a vehicle under grid sequence map consisting of several grid areas, each grid area containing the information of the projection of the point cloud under the vehicle and the existence information of the target point sequence number; according to the order of the target point sequence numbers from small to large in the vehicle under grid sequence map, the target point path is planned according to the distance between the navigation starting point and the target point or the distance between the target points, to obtain several partial paths; all partial paths are connected to obtain the navigation path under the vehicle.
[0019] A vehicle bottom detection system based on machine vision, used to implement the above vehicle bottom detection method based on machine vision, comprising:
[0020] The initial driving route generation module is used for the robot to rotate around its own vertical center line for one cycle to obtain a robot image containing the vehicle; identify the vehicle wheels in the robot image, and obtain the vehicle transverse center line based on the vehicle wheels; adjust the robot's posture according to the positions of the vehicle transverse center line and the robot's vertical center line in the robot image, so that the robot's vertical center line and the vehicle's transverse center line are in the same plane, and the robot faces the vehicle; the intersection of the plane where the adjusted robot's vertical center line and the vehicle's transverse center line are located and the ground is used as the initial driving route;
[0021] The vehicle bottom point cloud data generation module is used for the robot to drive along the initial driving route through the vehicle bottom to obtain the vehicle bottom depth image and the vehicle bottom RGB image; based on the comparison result of the peak signal-to-noise ratio of the vehicle bottom RGB image and the first peak signal-to-noise ratio threshold, the vehicle bottom RGB image is denoised to obtain the vehicle bottom denoised RGB image; based on the robot's camera matrix, the vehicle bottom depth image is converted into three-dimensional point cloud data, and then down-sampled to obtain down-sampled point cloud data; the normal of the down-sampled point cloud data is obtained, and the down-sampled point cloud data is processed by the least square method and the nearest neighbor interpolation based on the normal to obtain the depth point cloud data; the vehicle bottom denoised RGB image is projected onto the depth point cloud data to obtain the vehicle bottom point cloud data;
[0022] The vehicle bottom recognition result generation module is used to fit the ground plane based on the vehicle bottom point cloud data, delete the ground plane from the vehicle bottom point cloud data, and obtain the refined vehicle bottom point cloud data; based on the Euclidean distance between the point clouds, the refined vehicle bottom point cloud data is segmented to obtain a number of point cloud clusters; according to the geometric features and point cloud pixels of the point cloud cluster, each point cloud cluster is recognized and processed to obtain the vehicle bottom recognition result;
[0023] The vehicle bottom point cloud data generation module is updated to determine whether there is a foreign object in the vehicle bottom recognition result. If there is a foreign object, the foreign object is removed and the corresponding point cloud of the foreign object is deleted in the fine vehicle bottom point cloud data to obtain the updated vehicle bottom point cloud data for executing the vehicle bottom navigation path generation and safety detection module; if there is no foreign object, the fine vehicle bottom point cloud data is used as the updated vehicle bottom point cloud data for executing the vehicle bottom navigation path generation and safety detection module;
[0024] The under-vehicle navigation path generation and safety detection module is used to take the key under-vehicle parts in the under-vehicle recognition results as target points, perform path planning based on the updated under-vehicle point cloud data, obtain the under-vehicle navigation path, and associate it with the vehicle model; when performing under-vehicle detection in the later stage, the under-vehicle navigation path associated with the vehicle model replaces the initial driving route in the under-vehicle point cloud data generation module, and then executes the operations of the under-vehicle point cloud data generation module and the under-vehicle recognition result generation module to perform under-vehicle safety detection.
[0025] A vehicle bottom detection device based on machine vision comprises a processor and a memory, wherein the processor implements the above-mentioned vehicle bottom detection method based on machine vision when executing a computer program stored in the memory.
[0026] A computer-readable storage medium is used to store a computer program, wherein the computer program implements the above-mentioned vehicle bottom detection method based on machine vision when executed by a processor.
[0027] The beneficial effects of the present invention are:
[0028] The present invention provides a vehicle bottom detection method based on machine vision. First, based on a robot's one-circle image, the robot's vertical center line and the vehicle's lateral center line are in the same plane, and the robot faces the vehicle, so as to obtain an initial driving route that is convenient for quickly obtaining complete vehicle bottom information in the future; then, the robot drives along the initial driving route and passes under the vehicle to obtain a vehicle bottom depth image and a vehicle bottom RGB image, and after denoising the vehicle bottom RGB image according to the peak signal-to-noise ratio characteristics of the vehicle bottom RGB image, the vehicle bottom RGB image is projected onto the depth point cloud data obtained based on the vehicle bottom depth image, so as to realize the combination of the denoised RGB image and the depth point cloud data, so as to obtain vehicle bottom point cloud data with rich details and accurate information, which is convenient for subsequent identification and detection; then, based on the vehicle bottom point cloud data, the ground plane is fitted, and the ground plane is deleted from the vehicle bottom point cloud data, so as to obtain fine vehicle bottom point cloud data with small calculation amount and convenient for quickly identifying foreign objects under the vehicle, and based on the point cloud data, the ground plane is fitted, and the ground plane is deleted from the vehicle bottom point cloud data, so as to obtain fine vehicle bottom point cloud data with small calculation amount and convenient for quickly identifying foreign objects under the vehicle The Euclidean distance of the underbody point cloud data is used to segment the fine underbody point cloud data to obtain several point cloud clusters, and each point cloud cluster is identified based on the geometric features of the point cloud cluster and the pixel features of the point cloud cluster to obtain a high-accuracy underbody recognition result; subsequently, if there is a foreign object in the underbody recognition result, the corresponding foreign object is removed and the corresponding point cloud of the deleted foreign object in the fine underbody point cloud data is deleted to update the underbody point cloud data and obtain the updated underbody point cloud data; if there is no foreign object, the fine underbody point cloud data is used as the updated underbody point cloud data; finally, the key parts of the underbody in the underbody recognition result are used as target points, and the path planning is carried out for the underbody based on the updated underbody point cloud data to obtain the underbody navigation path, and then the underbody safety detection is directly carried out on the corresponding vehicle according to the association result between the underbody navigation path and the vehicle model; the underbody foreign object recognition of this method is high in accuracy and good in stability, so the underbody safety detection quality of this method is good. DETAILED DESCRIPTION
[0029] A vehicle bottom detection method based on machine vision includes the following operations:
[0030] S1. The robot rotates around its own vertical center line for one circle to obtain a one-circle image of the robot containing the vehicle; the vehicle wheels are identified in the one-circle image of the robot, and the vehicle transverse center line is obtained based on the vehicle wheels; the robot is adjusted according to the positions of the vehicle transverse center line and the robot vertical center line in the one-circle image of the robot, so that the robot vertical center line and the vehicle transverse center line are in the same plane, and the robot faces the vehicle; the intersection of the plane where the adjusted robot vertical center line and the vehicle transverse center line are located and the ground is used as the initial driving route;
[0031] S2, the robot drives along the initial driving route through the bottom of the vehicle to obtain the bottom depth image and the bottom RGB image of the vehicle; based on the comparison result of the peak signal-to-noise ratio of the bottom RGB image of the vehicle and the first peak signal-to-noise ratio threshold, the bottom RGB image of the vehicle is denoised to obtain the bottom denoised RGB image of the vehicle; based on the camera matrix of the robot, the bottom depth image of the vehicle is converted into three-dimensional point cloud data, and then down-sampled to obtain down-sampled point cloud data; the normal of the down-sampled point cloud data is obtained, and the down-sampled point cloud data is processed by the least square method and the nearest neighbor interpolation based on the normal to obtain the depth point cloud data; the bottom denoised RGB image of the vehicle is projected onto the depth point cloud data to obtain the bottom point cloud data of the vehicle;
[0032] S3, fitting the ground plane based on the bottom point cloud data, deleting the ground plane from the bottom point cloud data, and obtaining fine bottom point cloud data; segmenting the fine bottom point cloud data based on the Euclidean distance between point clouds, and obtaining a number of point cloud clusters; and identifying each point cloud cluster according to the geometric features and point cloud pixels of the point cloud cluster, and obtaining the bottom vehicle identification result;
[0033] S4, judging whether there is a foreign object in the vehicle bottom recognition result, if there is a foreign object, after removing the foreign object, delete the point cloud corresponding to the foreign object in the refined vehicle bottom point cloud data, and obtain updated vehicle bottom point cloud data for executing S5; if there is no foreign object, use the refined vehicle bottom point cloud data as updated vehicle bottom point cloud data for executing S5;
[0034] S5, taking the key parts of the bottom of the vehicle in the bottom vehicle recognition result as the target point, performing path planning based on the updated bottom vehicle point cloud data, obtaining the bottom vehicle navigation path, and associating it with the vehicle model;
[0035] When performing under-vehicle inspection at a later stage, after replacing the initial driving route in S2 with the under-vehicle navigation path associated with the vehicle model, the operations of S2 and S3 are executed to perform under-vehicle safety inspection.
[0036] S1. The robot rotates around its own vertical center line for one circle to obtain a one-circle image of the robot containing the vehicle; the vehicle wheels are identified in the one-circle image of the robot, and the vehicle transverse center line is obtained based on the vehicle wheels; the robot is adjusted according to the positions of the vehicle transverse center line and the robot vertical center line in the one-circle image of the robot, so that the robot vertical center line and the vehicle transverse center line are in the same plane, and the robot faces the vehicle; the intersection of the plane where the adjusted robot vertical center line and the vehicle transverse center line are located and the ground is used as the initial driving route.
[0037] The robot rotates around its own vertical center line for one circle and obtains a circle image of the robot including the vehicle, which is used to adjust the robot's posture so that the robot's vertical center line and the vehicle's horizontal center line are in the same plane and the robot faces the vehicle, thereby obtaining an initial driving route that is convenient for subsequent robots to pass through the middle of the vehicle and quickly obtain complete vehicle bottom information.
[0038] First, use a robot with a camera that is facing the front of the robot, rotate it around its own vertical midline, and obtain an image of the robot containing the vehicle to obtain the vehicle's position.
[0039] Then, the vehicle wheels are identified in the robot's one-circle image, and the vehicle's lateral centerline is obtained based on the vehicle wheels. Specifically, the left and right front wheels of the vehicle, and / or the left and right rear wheels of the vehicle, and / or the front and rear wheels on the left side of the vehicle, and / or the front and rear wheels on the right side of the vehicle are identified in the robot's one-circle image, and the midpoint between the left and right front wheels of the vehicle, and / or the left and right rear wheels of the vehicle, and / or the front and rear wheels on the left side of the vehicle, and / or the front and rear wheels on the right side of the vehicle is taken as the vehicle's midpoint; the straight line in the straight line where the vehicle's midpoint is located and facing the same direction as the vehicle is taken as the vehicle's lateral centerline.
[0040] The operation of identifying the vehicle wheels can be achieved by manually marking the wheels or by using an image target detection method. The operation of the image target detection method is as follows: a detection frame is spread over the robot's image around the robot, and the classification label of the real frame corresponding to the minimum distance between the center point and the center point of the detection frame is used as the detection result of the corresponding detection frame to obtain the vehicle wheel recognition result.
[0041] Finally, according to the positions of the robot's vertical centerline and the vehicle's transverse centerline in the robot's one-circle image, the robot's posture is adjusted so that the robot's vertical centerline and the vehicle's transverse centerline are in the same plane and the robot is facing the vehicle. The plane where the adjusted robot's vertical centerline is aligned with the vehicle's transverse centerline and the intersection line with the ground is used as the robot's initial driving route for subsequent acquisition of vehicle bottom information.
[0042] The specific operation of adjusting the robot's posture is as follows: based on the vehicle wheels in the robot's one-circle image, obtain the vehicle's orientation and the vehicle's lateral centerline; obtain the angle difference between the vehicle's orientation and the robot's orientation, as well as the lateral offset between the vehicle's lateral centerline and the vertical centerline of the starting image; control the robot to move left and right according to the lateral displacement, so that the robot's vertical centerline and the vehicle's lateral centerline are in the same plane; control the robot to rotate according to the angle difference until the robot faces the vehicle. The vertical centerline of the starting image (the robot's one-circle image is composed of images at several angles, and there is an image vertical centerline in each image) is the vertical centerline of the robot.
[0043] S2. The robot drives along the initial driving route and passes under the vehicle to obtain a depth image and an RGB image of the vehicle bottom; based on the comparison result of the peak signal-to-noise ratio of the RGB image of the vehicle bottom and the first peak signal-to-noise ratio threshold, the RGB image of the vehicle bottom is denoised to obtain a denoised RGB image of the vehicle bottom; based on the camera matrix of the robot, the depth image of the vehicle bottom is converted into three-dimensional point cloud data, and then down-sampled to obtain down-sampled point cloud data; the normal of the down-sampled point cloud data is obtained, and the down-sampled point cloud data is processed by the least squares method and the nearest neighbor interpolation based on the normal to obtain the depth point cloud data; the denoised RGB image of the vehicle bottom is projected onto the depth point cloud data to obtain the point cloud data of the vehicle bottom.
[0044] The robot drives along the initial driving route and passes under the vehicle to obtain the vehicle bottom depth image and vehicle bottom RGB image; after denoising the vehicle bottom RGB image according to the peak signal-to-noise ratio characteristics of the vehicle bottom RGB image, it projects the image onto the depth point cloud data obtained based on the vehicle bottom depth image, thereby realizing the combination of the denoised RGB image and the depth point cloud data to obtain vehicle bottom point cloud data with rich details and accurate information, which is convenient for subsequent identification and detection.
[0045] First, the robot drives along the initial driving route and passes under the vehicle, and obtains the vehicle bottom depth image and vehicle bottom RGB image through the RGBD depth camera.
[0046] Then, based on the comparison result of the peak signal-to-noise ratio of the vehicle bottom RGB image and the first peak signal-to-noise ratio threshold, the vehicle bottom RGB image is denoised to remove the noise while retaining the image details, thereby obtaining a vehicle bottom denoised RGB image.
[0047] The operation of obtaining the denoised RGB image of the vehicle bottom is specifically as follows: determining whether the peak signal-to-noise ratio of the denoised RGB image of the vehicle bottom exceeds a first peak signal-to-noise ratio threshold; if the peak signal-to-noise ratio is not less than the first peak signal-to-noise ratio threshold, the noise of the RGB image of the vehicle bottom is relatively small, and each pixel value in the RGB image of the vehicle bottom is replaced by the average value of its own neighborhood pixel value, and simple and fast denoising is performed to obtain the denoised RGB image of the vehicle bottom; if the peak signal-to-noise ratio is between the first peak signal-to-noise ratio threshold and the second peak signal-to-noise ratio threshold, the noise of the RGB image of the vehicle bottom is medium, and the RGB image of the vehicle bottom is processed by bilateral filtering to obtain the denoised RGB image of the vehicle bottom that retains edge feature noise and has small noise; if the peak signal-to-noise ratio is not greater than the second peak signal-to-noise ratio threshold, the noise of the RGB image of the vehicle bottom is relatively large, and the RGB image of the vehicle bottom is processed by non-local mean filtering to retain image details while denoising, and obtain the denoised RGB image of the vehicle bottom.
[0048] Bilateral filtering is an existing technology and will not be described in detail here to save space.
[0049] The specific operation of the non-local mean filtering process is as follows: the vehicle bottom RGB image is evenly divided into a number of RGB blocks; each RGB block is sequentially subjected to a similar block denoising operation according to the position order in the vehicle bottom RGB image to obtain a vehicle bottom denoised RGB image.
[0050] The specific operation of similar block denoising is as follows: based on the previous vehicle bottom denoised RGB image, obtain the RGB block within the current RGB block search range, whose brightness similarity with the current RGB block is greater than the similarity threshold, as the current similar RGB block, and obtain several current similar RGB blocks; obtain the similarity weight between each current similar RGB block and the current block, and obtain several similarity weights; all similarity weights are normalized to obtain several normalized weights; based on several normalized weights, all corresponding similar RGB blocks of the current RGB block are weighted averaged to obtain the current vehicle bottom denoised RGB image denoising block, which is used to perform the similar block denoising operation of the next RGB block.
[0051] The similarity weight is obtained based on the pixel square difference between the current RGB block and the target current similar RGB block, and the Euclidean distance between the current RGB block and the target current similar RGB block.
[0052] The similarity weight can be obtained by the following formula:
[0053] ,
[0054] w i,j For the current RGB block i RGB block similar to the target j The similarity weight of p i For the current RGB block i Pixels, p j The target current similar RGB block j Pixels ,h For the current RGB block i RGB block similar to the target j The Euclidean distance.
[0055] At the same time, based on the robot's camera matrix, the vehicle bottom depth image is converted into three-dimensional point cloud data, and then downsampled to obtain downsampled point cloud data; the normal of the downsampled point cloud data is obtained, and the downsampled point cloud data is processed by the least square method and the nearest neighbor interpolation based on the normal to obtain the depth point cloud data. The operation of obtaining the depth point cloud data can be achieved by using the deep learning network PointNet network or PointCNN network.
[0056] Finally, the denoised RGB image of the vehicle bottom is projected into the depth point cloud data to realize the combination of the denoised RGB image and the depth point cloud data. This combination can enhance the understanding and analysis of the vehicle bottom environment, improve the accuracy of navigation and detection, and obtain the vehicle bottom point cloud data. In the process of projecting the denoised RGB image of the vehicle bottom into the depth point cloud data, the color information of the RGB image is mapped to the corresponding point cloud, so that each point cloud point contains not only spatial position information but also color information. Color mapping enhances the visual effect of the point cloud, helps to distinguish different objects and surface materials, and can enhance the accuracy of identifying parts or foreign objects of specific colors.
[0057] S3. Fit the ground plane based on the bottom vehicle point cloud data, delete the ground plane from the bottom vehicle point cloud data, and obtain fine bottom vehicle point cloud data; segment the fine bottom vehicle point cloud data based on the Euclidean distance between point clouds to obtain several point cloud clusters; identify each point cloud cluster according to the geometric features and point cloud pixels of the point cloud cluster to obtain the bottom vehicle recognition result.
[0058] The ground plane is fitted based on the point cloud data of the bottom of the vehicle, and the ground plane is deleted from the point cloud data of the bottom of the vehicle to obtain fine point cloud data of the bottom of the vehicle with small calculation amount, which is convenient for quickly identifying foreign objects under the vehicle; and based on the Euclidean distance between the point clouds, the fine point cloud data of the bottom of the vehicle is segmented to obtain several point cloud clusters that are easy to identify categories; by analyzing the geometric features and pixel features of the point cloud clusters, each point cloud cluster is identified and processed to obtain the bottom vehicle recognition result.
[0059] Firstly, the ground plane is fitted based on the bottom point cloud data, and the ground plane is deleted from the bottom point cloud data to obtain the refined bottom point cloud data.
[0060] The operation of fitting the ground plane is as follows: in each iteration, randomly select several points from the bottom point cloud data to determine a current plane model; obtain the distance from all point clouds to the current plane model, regard the point clouds with a distance less than the distance threshold as inliers, and obtain the number of inliers; if the number of inliers of the current plane model exceeds the number of inliers of the previous plane model, use the current plane model group as the current best plane model; after the iteration, obtain the best plane model; based on the index information of the point cloud, obtain the ground plane points in the best plane model, and all the ground plane points form the ground plane. The index information of the point cloud can be obtained by manual annotation, or by using a trained neural network to process the bottom point cloud data.
[0061] Then, based on the Euclidean distance between point clouds, the refined underbody point cloud data is segmented and processed to obtain several point cloud clusters. Specifically, step a, randomly select several point clouds from the refined underbody point cloud data as cluster centers to obtain several cluster centers; step b, randomly select several remaining point clouds from the remaining point clouds, calculate the distances between several remaining point clouds and the cluster centers respectively, and assign each remaining point cloud to the cluster center with the closest Euclidean distance to itself to form a point cloud cluster; repeat steps a and b until the change value of the cluster center is less than the change threshold, and obtain several point cloud clusters. The cluster center is the mean of the Euclidean distances of all point clouds in the point cloud cluster. Obtaining several point cloud clusters can be achieved by the K-means method or the DBSCAN method.
[0062] Finally, according to the geometric features and point cloud pixels of the point cloud cluster, each point cloud cluster is identified and processed to obtain the vehicle bottom recognition result. The geometric features and point cloud pixels (preferably the pixel mean of the point cloud cluster) of the standard vehicle bottom structure components are converted into vectors and then spliced to obtain the standard vehicle bottom structure component vectors; several standard vehicle bottom structure component vectors form a standard vehicle bottom structure vector data set; the standard vehicle bottom structure vector data set is used to train the neural network to obtain the trained neural network; the trained neural network processes the geometric features of the point cloud cluster and the point cloud feature vectors corresponding to the point cloud pixels to obtain the point cloud cluster recognition result; all the point cloud cluster recognition results are used to obtain the vehicle bottom recognition result.
[0063] S4. Determine whether there is a foreign object in the vehicle bottom recognition result. If there is a foreign object, remove the foreign object and delete the point cloud corresponding to the foreign object in the refined vehicle bottom point cloud data to obtain updated vehicle bottom point cloud data for executing S5. If there is no foreign object, use the refined vehicle bottom point cloud data as updated vehicle bottom point cloud data for executing S5.
[0064] If there are foreign objects (stones, plastic bags, sludge, etc.) in the vehicle bottom recognition result, the corresponding foreign objects are removed, and the corresponding point cloud of the foreign objects is deleted in the refined vehicle bottom point cloud data (this can be achieved by deleting the corresponding point cloud cluster of the foreign objects), and the vehicle bottom point cloud data is updated to obtain updated vehicle bottom point cloud data for executing path planning and subsequent vehicle bottom detection in S5; if there are no foreign objects, the refined vehicle bottom point cloud data is used as updated vehicle bottom point cloud data for executing path planning and subsequent vehicle bottom detection in S5.
[0065] S5. Take the key parts of the vehicle bottom in the vehicle bottom recognition result as the target point, perform path planning based on the updated vehicle bottom point cloud data, obtain the vehicle bottom navigation path, and associate it with the vehicle model; when performing vehicle bottom detection in the later stage, replace the initial driving route in S2 with the vehicle bottom navigation path associated with the vehicle model, execute the operations of S2 and S3, and perform vehicle bottom detection.
[0066] The key parts of the vehicle bottom (chassis, suspension system, braking system, exhaust system, fuel tank, etc.) in the vehicle bottom recognition results are taken as target points, and the path planning of the vehicle bottom is carried out based on the updated vehicle bottom point cloud data to obtain the vehicle bottom navigation path and associate it with the vehicle model; when performing vehicle bottom detection in the later stage, the vehicle bottom navigation path associated with the vehicle model replaces the initial driving route in S2, and the robot executes the operations of S2 and S3 to carry out subsequent vehicle bottom detection, which can be performed repeatedly periodically.
[0067] The operation of obtaining the navigation path under the vehicle is specifically as follows: after the updated point cloud data under the vehicle is converted into a two-dimensional plane map, grid division is performed to obtain a vehicle under grid map consisting of several grid areas, each grid area containing the information of the projection of the point cloud under the vehicle; according to the vehicle under recognition result, the key parts of the vehicle under the vehicle are marked in the vehicle under grid map, and used as target points to obtain several target points; according to the distances from the several target points to the navigation starting point from near to far, the several target points are sequenced from small to large to obtain a vehicle under grid sequence map consisting of several grid areas, each grid area containing the information of the projection of the point cloud under the vehicle and the information of the target point sequence number; according to the order of the target point sequence numbers from small to large in the vehicle under grid sequence map, the target point path is planned in turn according to the distance between the navigation starting point and the target point or the distance between the target points, to obtain several partial paths; all partial paths are connected (all partial paths are connected end to end in sequence) to obtain the navigation path under the vehicle.
[0068] In the process of target point path planning, after the current target point completes the target point path planning, the current target point is used as the navigation starting point for the next target point path planning.
[0069] In the process of target point path planning, the partial path is the candidate path with the shortest length among several candidate paths from the navigation starting point to the target point formed by connecting grids without vehicle bottom point cloud projection information and without target point sequence number information.
[0070] This embodiment further provides a vehicle bottom detection system based on machine vision, which is used to implement the above vehicle bottom detection method based on machine vision, including:
[0071] The initial driving route generation module is used for the robot to rotate around its own vertical center line for one cycle to obtain a robot image containing the vehicle; identify the vehicle wheels in the robot image, and obtain the vehicle transverse center line based on the vehicle wheels; adjust the robot's posture according to the positions of the vehicle transverse center line and the robot's vertical center line in the robot image, so that the robot's vertical center line and the vehicle's transverse center line are in the same plane, and the robot faces the vehicle; the intersection of the plane where the adjusted robot's vertical center line and the vehicle's transverse center line are located and the ground is used as the initial driving route;
[0072] The vehicle bottom point cloud data generation module is used for the robot to drive along the initial driving route through the vehicle bottom to obtain the vehicle bottom depth image and the vehicle bottom RGB image; based on the comparison result of the peak signal-to-noise ratio of the vehicle bottom RGB image and the first peak signal-to-noise ratio threshold, the vehicle bottom RGB image is denoised to obtain the vehicle bottom denoised RGB image; based on the robot's camera matrix, the vehicle bottom depth image is converted into three-dimensional point cloud data, and then down-sampled to obtain down-sampled point cloud data; the normal of the down-sampled point cloud data is obtained, and the down-sampled point cloud data is processed by the least square method and the nearest neighbor interpolation based on the normal to obtain the depth point cloud data; the vehicle bottom denoised RGB image is projected onto the depth point cloud data to obtain the vehicle bottom point cloud data;
[0073] The vehicle bottom recognition result generation module is used to fit the ground plane based on the vehicle bottom point cloud data, delete the ground plane from the vehicle bottom point cloud data, and obtain the refined vehicle bottom point cloud data; based on the Euclidean distance between the point clouds, the refined vehicle bottom point cloud data is segmented to obtain a number of point cloud clusters; according to the geometric features and point cloud pixels of the point cloud cluster, each point cloud cluster is recognized and processed to obtain the vehicle bottom recognition result;
[0074] The vehicle bottom point cloud data generation module is updated to determine whether there is a foreign object in the vehicle bottom recognition result. If there is a foreign object, the foreign object is removed and the corresponding point cloud of the foreign object is deleted in the fine vehicle bottom point cloud data to obtain the updated vehicle bottom point cloud data for executing the vehicle bottom navigation path generation and safety detection module; if there is no foreign object, the fine vehicle bottom point cloud data is used as the updated vehicle bottom point cloud data for executing the vehicle bottom navigation path generation and safety detection module;
[0075] The under-vehicle navigation path generation and safety detection module is used to take the key under-vehicle parts in the under-vehicle recognition results as target points, perform path planning based on the updated under-vehicle point cloud data, obtain the under-vehicle navigation path, and associate it with the vehicle model; when performing under-vehicle detection in the later stage, the under-vehicle navigation path associated with the vehicle model replaces the initial driving route in the under-vehicle point cloud data generation module, and then executes the operations of the under-vehicle point cloud data generation module and the under-vehicle recognition result generation module to perform under-vehicle safety detection.
[0076] This embodiment also provides a vehicle bottom detection device based on machine vision, including a processor and a memory, wherein the processor implements the above-mentioned vehicle bottom detection method based on machine vision when executing a computer program stored in the memory.
[0077] This embodiment further provides a computer-readable storage medium for storing a computer program, wherein the computer program implements the above-mentioned vehicle bottom detection method based on machine vision when executed by a processor.
[0078] The present embodiment provides a vehicle bottom detection method based on machine vision. First, based on the robot's one-circle image, the robot's vertical center line and the vehicle's lateral center line are in the same plane, and the robot faces the vehicle, so as to obtain an initial driving route that is convenient for quickly obtaining complete vehicle bottom information in the future; then, the robot drives along the initial driving route and passes under the vehicle to obtain a vehicle bottom depth image and a vehicle bottom RGB image, and after denoising the vehicle bottom RGB image according to the peak signal-to-noise ratio characteristics of the vehicle bottom RGB image, it projects the image onto the depth point cloud data obtained based on the vehicle bottom depth image, realizes the combination of the denoised RGB image and the depth point cloud data, and obtains vehicle bottom point cloud data with rich details and accurate information, which is convenient for subsequent identification and detection; then, based on the vehicle bottom point cloud data, the ground plane is fitted, and the ground plane is deleted from the vehicle bottom point cloud data, so as to obtain fine vehicle bottom point cloud data with small calculation amount and convenient for quickly identifying foreign objects under the vehicle, and based on the point cloud data, the ground plane is fitted. The Euclidean distance between the clouds is used to segment the fine vehicle bottom point cloud data to obtain several point cloud clusters, and each point cloud cluster is identified based on the geometric features of the point cloud cluster and the pixel features of the point cloud to obtain a high-accuracy vehicle bottom recognition result; then, if there is a foreign object in the vehicle bottom recognition result, the corresponding foreign object is removed and the corresponding point cloud of the foreign object is deleted in the fine vehicle bottom point cloud data to update the vehicle bottom point cloud data and obtain the updated vehicle bottom point cloud data; if there is no foreign object, the fine vehicle bottom point cloud data is used as the updated vehicle bottom point cloud data; finally, the key parts of the vehicle bottom in the vehicle bottom recognition result are used as the target points, and the path planning is carried out for the vehicle bottom based on the updated vehicle bottom point cloud data to obtain the vehicle bottom navigation path, and then the corresponding vehicle is detected according to the correlation between the vehicle bottom navigation path and the vehicle model; the method has high accuracy and good stability in identifying foreign objects under the vehicle, so the method has good quality of vehicle bottom safety detection.
Claims
1. A vehicle bottom detection method based on machine vision, characterized in that: The following operations are included: S1. The robot rotates around its own vertical center line for one circle to obtain a one-circle image of the robot containing the vehicle; the vehicle wheels are identified in the one-circle image of the robot, and the vehicle transverse center line is obtained based on the vehicle wheels; the robot is adjusted according to the positions of the vehicle transverse center line and the robot vertical center line in the one-circle image of the robot, so that the robot vertical center line and the vehicle transverse center line are in the same plane, and the robot faces the vehicle; the intersection of the plane where the adjusted robot vertical center line and the vehicle transverse center line are located and the ground is used as the initial driving route; S2, the robot drives along the initial driving route through the bottom of the vehicle to obtain a bottom depth image and a bottom RGB image of the vehicle; based on a comparison result of the peak signal-to-noise ratio of the bottom RGB image of the vehicle and a first peak signal-to-noise ratio threshold, the bottom RGB image of the vehicle is denoised to obtain a bottom denoised RGB image of the vehicle; based on the camera matrix of the robot, the bottom depth image of the vehicle is converted into three-dimensional point cloud data, and then down-sampled to obtain down-sampled point cloud data; Acquire the normal of the downsampled point cloud data, perform least square method processing and nearest neighbor interpolation processing on the downsampled point cloud data based on the normal to obtain depth point cloud data; project the vehicle bottom denoised RGB image onto the depth point cloud data to obtain vehicle bottom point cloud data; S3, fitting a ground plane based on the vehicle bottom point cloud data, deleting the ground plane from the vehicle bottom point cloud data, and obtaining refined vehicle bottom point cloud data; segmenting the refined vehicle bottom point cloud data based on the Euclidean distance between point clouds, and obtaining a plurality of point cloud clusters; and identifying each point cloud cluster according to the geometric features and point cloud pixels of the point cloud cluster, and obtaining a vehicle bottom identification result; S4, judging whether there is a foreign object in the vehicle bottom recognition result, if there is a foreign object, after removing the foreign object, deleting the point cloud corresponding to the foreign object in the refined vehicle bottom point cloud data, and obtaining updated vehicle bottom point cloud data for executing S5; if there is no foreign object, the refined vehicle bottom point cloud data is used as the updated vehicle bottom point cloud data for executing S5; S5, taking the key parts of the vehicle bottom in the vehicle bottom recognition result as the target point, performing path planning based on the updated vehicle bottom point cloud data, obtaining the vehicle bottom navigation path, and associating it with the vehicle model; When performing under-vehicle inspection at a later stage, after replacing the initial driving route in S2 with the under-vehicle navigation path associated with the vehicle model, the operations of S2 and S3 are executed to perform under-vehicle safety inspection.
2. The vehicle bottom detection method based on machine vision according to claim 1, characterized in that: The operation of adjusting the posture of the robot in S1 is specifically as follows: Based on the vehicle wheels in the robot's one-circle image, obtaining the vehicle orientation and the vehicle lateral centerline; Obtaining the angular difference between the vehicle orientation and the robot orientation, and the lateral offset between the vehicle lateral centerline and the vertical centerline of the starting image; the vertical centerline of the starting image is the vertical centerline of the robot; Control the robot to move left and right according to the lateral displacement, so that the vertical center line of the robot and the lateral center line of the vehicle are in the same plane; The robot is controlled to rotate according to the angle difference until it faces the vehicle.
3. The vehicle bottom detection method based on machine vision according to claim 1, characterized in that: In S2, the operation of obtaining the denoised RGB image of the vehicle bottom is specifically as follows: Determining whether the peak signal-to-noise ratio of the vehicle bottom denoised RGB image exceeds a first peak signal-to-noise ratio threshold; If the peak signal-to-noise ratio is not less than a first peak signal-to-noise ratio threshold, each pixel value in the vehicle bottom RGB image is replaced with an average value of its own neighborhood pixel values to obtain a vehicle bottom denoised RGB image; If the peak signal-to-noise ratio is between a first peak signal-to-noise ratio threshold and a second peak signal-to-noise ratio threshold, the vehicle bottom RGB image is processed by bilateral filtering to obtain a vehicle bottom denoised RGB image; If the peak signal-to-noise ratio is not greater than a second peak signal-to-noise ratio threshold, the vehicle bottom RGB image is processed by non-local mean filtering to obtain a vehicle bottom denoised RGB image.
4. The vehicle bottom detection method based on machine vision according to claim 3 is characterized in that: The specific operation of the non-local mean filtering process is: The vehicle bottom RGB image is evenly divided into a plurality of RGB blocks; each RGB block is sequentially subjected to a similar block denoising operation according to the position order in the vehicle bottom RGB image, so as to obtain a vehicle bottom denoised RGB image; The operation of similar block denoising is specifically as follows: based on the previous vehicle bottom denoising RGB image, an RGB block whose brightness similarity with the current RGB block is greater than a similarity threshold within the current RGB block search range is obtained as a current similar RGB block, and a plurality of current similar RGB blocks are obtained; Obtain the similarity weights between each current similar RGB block and the current block, and obtain several similarity weights; All similarity weights are normalized to obtain a number of normalized weights; based on the normalized weights, all corresponding similar RGB blocks of the current RGB block are weighted averaged to obtain the current vehicle bottom denoised RGB image denoising block, which is used to perform a similar block denoising operation on the next RGB block.
5. The vehicle bottom detection method based on machine vision according to claim 4 is characterized in that: The similarity weight is obtained based on the pixel square difference between the current RGB block and the target current similar RGB block, and the Euclidean distance between the current RGB block and the target current similar RGB block.
6. The vehicle bottom detection method based on machine vision according to claim 1, characterized in that: The operation of fitting the ground plane in S3 is specifically as follows: In each iteration, a number of points are randomly selected from the vehicle bottom point cloud data to determine a current plane model; Get the distance from all point clouds to the current plane model, regard the point clouds with distances less than the distance threshold as inliers, and get the number of inliers; If the number of inliers of the current plane model exceeds the number of inliers of the previous plane model, the current plane model group is used as the current best plane model; after the iteration is completed, the best plane model is obtained; Based on the index information of the point cloud, ground plane points are obtained in the optimal plane model, and all the ground plane points form a ground plane.
7. The vehicle bottom detection method based on machine vision according to claim 1, characterized in that: The operation of obtaining the navigation path under the vehicle in S5 is specifically as follows: The updated vehicle bottom point cloud data is converted into a two-dimensional plane map and then meshed to obtain a vehicle bottom mesh map consisting of a plurality of mesh areas, each of which contains information on the presence of the vehicle bottom point cloud projection; According to the vehicle bottom recognition result, the key positions of the vehicle bottom are marked in the vehicle bottom grid map and used as target points to obtain a plurality of target points; According to the distances from the navigation starting point to the target points, the target points are marked from small to large, and a vehicle bottom grid sequence diagram consisting of several grid areas is obtained, each of which contains the information of the projection of the vehicle bottom point cloud and the existence of the target point sequence number. According to the order of the target point numbers in the vehicle bottom grid sequence diagram from small to large, target point path planning is performed according to the distance between the navigation starting point and the target point or the distance between the target points to obtain several partial paths; all partial paths are connected to obtain the vehicle bottom navigation path.
8. A vehicle bottom detection system based on machine vision, used to implement the vehicle bottom detection method based on machine vision according to claim 1, characterized in that: include: The initial driving route generation module is used for the robot to rotate around its own vertical center line for one circle and obtain a circle image of the robot including the vehicle; Identify the vehicle wheels in the robot's one-circle image, and obtain the vehicle's transverse centerline based on the vehicle wheels; adjust the robot's posture according to the positions of the vehicle's transverse centerline and the robot's vertical centerline in the robot's one-circle image, so that the robot's vertical centerline and the vehicle's transverse centerline are in the same plane, and the robot faces the vehicle; and use the intersection of the plane where the adjusted robot's vertical centerline and the vehicle's transverse centerline are located and the ground as the initial driving route; The vehicle bottom point cloud data generation module is used for the robot to drive along the initial driving route through the vehicle bottom to obtain the vehicle bottom depth image and the vehicle bottom RGB image; based on the comparison result of the peak signal-to-noise ratio of the vehicle bottom RGB image and the first peak signal-to-noise ratio threshold, the vehicle bottom RGB image is denoised to obtain the vehicle bottom denoised RGB image; based on the camera matrix of the robot, the vehicle bottom depth image is converted into three-dimensional point cloud data, and then down-sampled to obtain down-sampled point cloud data; Acquire the normal of the downsampled point cloud data, and perform least square method processing and nearest neighbor interpolation processing on the downsampled point cloud data based on the normal to obtain depth point cloud data; Projecting the vehicle bottom denoised RGB image onto the depth point cloud data to obtain vehicle bottom point cloud data; The vehicle bottom recognition result generation module is used to fit the ground plane based on the vehicle bottom point cloud data, delete the ground plane from the vehicle bottom point cloud data, and obtain fine vehicle bottom point cloud data; based on the Euclidean distance between point clouds, the fine vehicle bottom point cloud data is segmented to obtain a plurality of point cloud clusters; according to the geometric features and point cloud pixels of the point cloud cluster, each point cloud cluster is recognized and processed to obtain the vehicle bottom recognition result; The vehicle bottom point cloud data generation module is updated to determine whether there is a foreign object in the vehicle bottom recognition result. If there is a foreign object, the foreign object is removed and the point cloud corresponding to the foreign object is deleted from the refined vehicle bottom point cloud data to obtain updated vehicle bottom point cloud data for executing the vehicle bottom navigation path generation and safety detection module; If there is no foreign object, the refined underbody point cloud data is used as updated underbody point cloud data to execute underbody navigation path generation and safety detection modules; The under-vehicle navigation path generation and safety detection module is used to take the key under-vehicle parts in the under-vehicle recognition results as target points, perform path planning based on the updated under-vehicle point cloud data, obtain the under-vehicle navigation path, and associate it with the vehicle model; When performing under-vehicle detection in the later stage, the under-vehicle navigation path associated with the vehicle model replaces the initial driving route in the under-vehicle point cloud data generation module, and then the operations of the under-vehicle point cloud data generation module and the under-vehicle recognition result generation module are executed to perform under-vehicle safety detection.
9. A vehicle bottom detection device based on machine vision, characterized in that: The system comprises a processor and a memory, wherein the processor implements the vehicle bottom detection method based on machine vision as described in any one of claims 1 to 7 when executing the computer program stored in the memory.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, wherein when the computer program is executed by a processor, the vehicle bottom detection method based on machine vision as described in any one of claims 1 to 7 is implemented.
