Multi-camera SLAM method and device in dynamic scene
Using multi-camera modules and improved YOLOv5s models to perform SLAM in dynamic scenes solves the problems of insufficient feature points and mismatching of dynamic objects, achieves accuracy and robustness of positioning and mapping in complex environments, and ensures Stability and efficiency of autonomous vehicle visual navigation.
Patent Information
- Application Number
- CN202410569613.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-09
- Publication Date
- 2024-09-06
AI Technical Summary
Existing SLAM technology fails in positioning and mapping due to insufficient feature points and mismatching of dynamic objects in dynamic scenes, making it difficult to maintain accuracy and robustness in complex environments.
Use multi-camera modules for simultaneous positioning and mapping, extract and classify feature points through the improved YOLOv5s model, combine the APAP algorithm and Seam Finding method for image registration and splicing, use the Multi-Band Bleing method to achieve image fusion, and use the target Detect, identify and classify dynamic feature points to eliminate them and ensure that static feature points are used for mapping.
In the case of insufficient feature points and many dynamic objects, the integrity and accuracy of positioning and mapping information can be maintained, the accuracy and robustness of unmanned vehicle visual navigation can be improved, and the stability and efficiency of the mapping process can be ensured.
Smart Images

Figure CN118609071A
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of synchronous positioning and mapping, and specifically discloses a multi-camera SLAM method and device in a dynamic scene. Background Art
[0002] Simultaneous Localization and Mapping (SLAM) is a key technology for mobile robots to perform autonomous positioning and navigation when entering unknown environments. It has been widely used in many fields such as autonomous driving, biomedicine, logistics, and drones. The current SLAM system uses a variety of sensors to obtain information, mainly cameras, inertial measurement units (IMUs), lidars, and ultrasonic radars.
[0003] At present, the most commonly used module for visual perception of unmanned vehicles mainly uses a single radar or camera. This perception method is prone to cause the entire module to drift due to a certain data collection error. In addition, the previous single module is no longer suitable for the increasingly complex application environment, and its single device parameters cannot cover the various elements in the actual scene. Therefore, the perception of the environment and subsequent mapping and navigation can be completed by adopting the method of multi-machine data fusion. In addition, most of the previous SLAM technologies are based on static environments, assuming that the images in the actual mapping environment are stationary, which is extremely unrealistic for actual mapping and navigation scenarios, and is prone to inaccurate positioning, ghosting and other problems.
[0004] Chinese patent application CN113959435A proposes a multi-camera vehicle-mounted surround view online SLAM method, which processes the received images through four cameras installed on the vehicle, constructs visual models in four directions, and then combines the inertial measurement unit IMU and wheel speed meter to fuse visual information to achieve online real-time surround view camera visual SLAM and spatial motion tracking. However, this method does not take into account the reality that there are a large number of dynamic objects in actual application scenarios.
[0005] Chinese patent application CN114898062A proposes a SLAM method in dynamic scenes, which uses the PSPnet semantic segmentation algorithm deployed based on TensorRT to obtain the segmented image from the acquired RGB image, then removes the feature points of the segmented dynamic image, and matches the ORB (Oriented FAST and Rotated BRIEF) feature points of the remaining image with the previous frame image to establish a map. However, this method does not consider the situation when the feature points are insufficient;
[0006] Chinese patent application CN116429089A proposes a method to enhance the accuracy and robustness of SLAM systems in dynamic scenes, using dynamic clustering to determine the energy threshold, thereby distinguishing dynamic objects and removing dynamic targets. However, the mapping process of this method is also limited by the influence of insufficient feature points, and the addition of clustering clusters can easily reduce the robustness and anti-interference of the mapping system. Summary of the invention
[0007] In view of the above problems, a multi-camera SLAM method and device based on dynamic scenes is proposed, which can better solve the problem of positioning and mapping failure in actual application scenes due to insufficient feature points, mismatching of dynamic invalid feature points, or drastic changes in the posture of the mobile robot, so as to be applied to the collection of data in actual scenes, thereby improving the accuracy and robustness of visual navigation of intelligent mobile carriers such as unmanned vehicles. For indoor and outdoor scenes, in the case of insufficient feature points and excessive mismatching of dynamic objects, the positioning and mapping information can still be kept from drifting and being lost, and the final positioning accuracy and mapping efficiency can be guaranteed.
[0008] A multi-camera SLAM method in a dynamic scene, comprising: using a multi-camera module for synchronous positioning and mapping, wherein ORB feature points for positioning and mapping are extracted from image data through a feature point extraction and classification model, and target detection, recognition and classification are performed;
[0009] According to the target detection, recognition and classification results, the feature points corresponding to the pedestrian target are regarded as dynamic feature points and removed, and the remaining feature points are regarded as static feature points for simultaneous positioning and mapping.
[0010] Furthermore, the feature point extraction and classification model is an improved YOLOv5s model, in which the backbone feature extraction network Backbone is replaced by the C3 network to the PP-LCNet network.
[0011] Furthermore, a SE module is added to the convolutional layer with a convolution kernel of 5×5 in the PP-LCNET network to obtain a channel attention mechanism.
[0012] Furthermore, it also includes, before target detection, recognition and classification, using the APAP algorithm to perform multi-camera image registration, combining the Seam Finding method to generate seam lines between multi-camera images, and using the Multi-Band Bleing method to achieve multi-camera image fusion to obtain a complete multi-camera image stitching;
[0013] And the obtained complete image is sent to the improved YOLOv5s model for target detection, recognition and classification.
[0014] Furthermore, the APAP algorithm includes:
[0015] First, the SIFT feature point detection algorithm is used to extract the specific features of corner points and high curvature points in the image, and they are expressed as a set of feature vectors to describe the image information. The Euclidean distance and Hamming distance between the feature vectors are calculated to measure the similarity of changes at different scales and viewing angles. Possible image matching pairs are screened out, and the transformation relationship between images is obtained by calculating the matching rotation, translation, and scaling parameters to achieve image registration, and generate descriptors for all feature points.
[0016] The BF exhaustive method is used to match the features extracted by SIFT to obtain matching pairs, including calculating the distance or similarity between the descriptors of all feature points in two or more images, selecting the feature point pair with the smallest distance or the largest similarity as the initial matching point pair, and then sorting these matching point pairs according to the similarity between them, and selecting the one with the highest similarity as the best matching point pair;
[0017] The RANSAC algorithm is used to eliminate the erroneous matches in the feature points affected by noise interference and accurately estimate the model parameters, including randomly selecting four pairs of non-collinear matching point pairs from the initial matching pairs, and using these matching point pairs to estimate the global homography matrix; then substituting the remaining matching point pairs into the matrix, and calculating the Euclidean distance between the corresponding points after substitution and the original matched feature points, and calling the matching points less than the set threshold "inliers", otherwise "outliers"; then iterating a certain number of times to meet the inliers number condition as the final global estimation result;
[0018] MDLT is used to estimate the linear transformation, and the image after global rough alignment is divided into a certain number of sub-regions of equal size and shape. The coordinates of the center point of the sub-region are used as the reference, and the weight is assigned according to the distance from all matching points in each sub-region to the center point of the image block. The smaller the distance, the greater the weight. The local homography matrix is calculated to perform coordinate transformation to complete the local registration.
[0019] Furthermore, the process of generating seam lines between multi-camera images in combination with the Seam Finding method includes:
[0020] Each pixel in the image is regarded as a common node. In addition, the terminal points on both sides of the overlapping area with infinite weights are set as the source point and the sink point. Search trees are created from the source point and the sink point respectively, and the two search trees search in opposite directions.
[0021] After that, the node enters the exploration growth phase until two search tree nodes are connected, and the growth phase ends;
[0022] Then the search tree is split into subtrees to find a feasible path from the source point to the sink point, and the maximum flow or indentation flow on the path is calculated. When at least one edge in the path reaches saturation and cannot be augmented, the edge is truncated to obtain the maximum flow data. After the maximum flow of the network is obtained by the maximum flow minimum cut algorithm, the pixel points in the overlapping area of the entire image are divided into a source point partial set and a sink point partial set. At this time, the edge between adjacent pixel points in each set constitutes one of the edges in the minimum cut set, and the set of these edges constitutes the seam line to be found.
[0023] Furthermore, the process of realizing multi-camera image fusion by the Multi-Band Bleing method includes firstly calculating the overlapping part of the current image to be stitched and the synthesized stitched image, and constructing the Laplacian pyramid and Gaussian pyramid of the two images respectively;
[0024] Decompose the original image into sub-images of different scales, perform weighted averaging on each sub-image, and obtain the weighted fusion result of each layer of the pyramid;
[0025] Finally, the pyramid is reversely reconstructed to obtain a complete image stitched from multiple camera images.
[0026] Furthermore, the feature point elimination process includes generating complete image feature anchor frame position data corresponding to the pedestrian through object detection of the complete image;
[0027] The complete image feature anchor frame position data is resolved to the corresponding position points of each camera's independent image, and the dynamic feature points corresponding to the anchor frame are removed at the corresponding positions in the original camera data.
[0028] The present invention also proposes a multi-camera SLAM device, comprising a multi-camera data input module and a SLAM calculation module carried on a carrier, wherein the multi-camera data input module and the SLAM calculation module are electrically connected, wherein the SLAM calculation module is configured to perform synchronous positioning and mapping according to the aforementioned method steps.
[0029] Furthermore, the carrier is a mobile robot.
[0030] Furthermore, it also includes an IMU fast posture calculation inertial navigation module electrically connected to the SLAM calculation module, which is used to calculate the position and posture of the carrier in real time.
[0031] Furthermore, it also includes a synchronization trigger module electrically connected to the SLAM calculation multi-camera data input module, which is used to synchronize the data acquisition of multiple camera units in the multi-camera data input module by hard triggering.
[0032] The present invention designs a method based on multi-camera SLAM in dynamic scenes, which can better solve the problems of positioning and mapping failure in actual application scenarios due to insufficient feature points, mismatching of dynamically invalid feature points, or drastic changes in the posture of the mobile robot; when used for data collection in actual scenes, it can improve the accuracy and robustness of unmanned vehicle visual navigation.
[0033] The present invention is tested in indoor and outdoor scenes, multi-camera module replacement, and (de)distortion situations to test its feasibility of mapping under a combination of various different situations. In indoor scenes, the three-camera module used can meet the indoor mapping needs, and the application of the improved YOLOv5 algorithm in SLAM can well solve the problem of too many dynamic feature points in indoor scenes, especially the problem of human factors affecting the mapping accuracy. In addition, the dynamic detection frame will not cover the priority of static feature points, which can ensure the number of feature points in the field of view and ensure that no acquisition drift occurs. In outdoor scenes, it is mainly for the elimination of artificial dynamic feature points, which improves the accuracy of the original single panoramic mapping.
[0034] The present invention adopts the fusion of multi-camera module and target detection feature elimination, and the two form complementary properties. Regardless of whether the image is dedistorted or not, indoor or outdoor scene, it can successfully realize mapping and ensure that there is no loss in the mapping process and the final mapping accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Schematic diagram of an outdoor multi-camera panoramic imaging model in an embodiment of the present invention.
[0036] Figure 2 Schematic diagram of an indoor multi-camera model in an embodiment of the present invention.
[0037] Figure 3 It is a schematic diagram of replacing the backbone C3 network with PP-LCNet in the improved YOLOv5s model in an embodiment of the present invention.
[0038] Figure 4 The present invention provides a flowchart of dynamic feature point recognition and elimination to prevent incomplete pedestrian features from being missed.
[0039] Figure 5 Schematic diagram of multi-camera images before and after stitching in an embodiment of the present invention.
[0040] Figure 6 It is the position of the incomplete dynamic feature points of the single-camera pedestrian after the complete image is solved in the embodiment of the present invention. DETAILED DESCRIPTION
[0041] The multi-camera SLAM method in a dynamic environment proposed by the present invention can be applied to a variety of module platforms, and the camera configuration can be increased or decreased according to different changes of indoor and outdoor scenes. The camera model in the multi-camera SLAM can be but is not limited to a pinhole camera model, an OPENCV fisheye camera model, a fisheye camera model, a Scala Muzza camera model or a Cannara Brandt camera model.
[0042] The basic modules of the multi-camera SLAM device in this example include a multi-camera data input module, an IMU fast posture calculation inertial navigation module and a synchronization trigger module.
[0043] For outdoor scenes, the following are examples: Figure 1 As shown in the figure, the multi-camera module in this example uses five independent and fixed fisheye cameras to form a panoramic image for positioning and mapping. Each camera uses a wide field of view (220°). Since each camera has its own projection center C, it is necessary to find the center position of the camera module, which is the basis for forming a spherical model of the panoramic camera. Therefore, it is necessary to convert the projection center of each camera into the overall center of the camera module, that is, the physical three points are collinear. The camera center C, the imaging pixel coordinate u c , the real coordinates P are unified into three collinear points S, u, P′ in the panoramic coordinate system, so as to realize the image pixel coordinate u c Project it onto a sphere of a specified radius to get u. The most important task is to obtain the error deviation between the imaging coordinates P′ and the real coordinates P, that is, the coordinate pose x′ of P′, which can be obtained by calibration to obtain the rotation vector matrix R in the panoramic coordinate system i,i=1,2,3...... and the translation vector matrix T i,i=1,2,3...... Make corrections.
[0044] Assuming that there is a world coordinate point P, it is necessary to obtain the imaging coordinate point P′ of the actual world coordinate point P on the camera, that is, the object coordinate system is converted into the multi-camera coordinate system through calibration correction. The specific conversion relationship is shown in the following formula:
[0045] x′=R i K(X)+T i (1)
[0046] In the formula, x′ is the coordinate of the corresponding imaging coordinate point P′ with the center of the sphere as the coordinate origin, and K(x) is the standard calibration function. The coordinate x of the real-world coordinate point P of the fisheye is projected by the correction function K(x) to generate a corrected image, and then the rotation matrix R is used to calculate the corrected image. i With the translation matrix T i The transformation obtains the coordinate position x′ in the spherical center coordinate system.
[0047] In indoor scenes, due to scene restrictions, a large number of feature points are easily lost in the multi-camera panoramic platform, resulting in failure of positioning and initial mapping pairing. Therefore, the camera ratio needs to be reduced as appropriate. For indoor situations, three fisheye cameras are selected to form a multi-camera module in this example. Figure 2 The main framework of the indoor multi-camera model is shown in the figure. The coordinate transformation model function of the multi-camera model in the indoor scene is as follows:
[0048]
[0049] In the formula, c is the center position of the module camera, i is the serial number of each camera, They are all homogeneous transformation matrices, obtained by coordinate transformation calibration, through the general camera function Realize the world point coordinates p itc The coordinates of the image point corresponding to the camera at time t are m itc transformation and projection.
[0050] In addition to the multi-camera module used to capture surrounding images to obtain data information, the IMU inertial measurement unit is highly complementary to the visual module and can assist the visual module in initialization positioning. Moreover, during operation, even if there are extreme problems such as drastic changes in illumination or texture loss that cause visual tracking to be lost, the IMU can also provide better positioning results in a short time. Therefore, the IMU (inertial measurement unit) is used to measure the acceleration and angular velocity of the multi-camera module during the mapping process. After continuous integration, the position and attitude of the carrier can be calculated in real time.
[0051] In addition, when there is a hardware delay or a delay caused by software operation during the operation of multiple cameras, adding a hardware synchronization trigger module can provide trigger pulses of the same frequency to all cameras, ensuring the synchronization of image data set acquisition and reducing positioning and mapping errors caused by information asynchrony. During the module construction process, multiple cameras are on the same plane to avoid the error caused by changes in initial posture.
[0052] The IMU is placed at the bottom of the center coordinate system of the multi-camera module, and is as close to the multi-camera module as possible to ensure that the rotation vector direction is not offset and only one direction of the translation vector changes. The synchronous trigger module is placed at the bottom of the entire module to ensure signal transmission while not being easily covered by the wide field of view of the multi-fisheye camera.
[0053] Sensor calibration in the multi-camera fusion module system mainly includes the calibration of camera internal parameters and external parameters between cameras to achieve the mapping of the world coordinates of the actual object in the data scene to the imaging coordinates. For the camera internal parameter calibration, Zhang Zhengyou's chessboard calibration scheme is used to determine the internal parameters and achieve point-by-point mapping from world coordinates to imaging coordinates. Assume that the calibration plate is in the world coordinate system OX W YW On the plane, that is, the Z coordinate of the calibration plate on the plane of the world coordinate system W = 0. Assume that the coordinates of a point M on the calibration plate in the world coordinate system are (X W , Y W , Z W ), the corresponding coordinates of point m in the image pixel coordinate system are (u, v). The camera parameter model is as follows:
[0054]
[0055] in is the camera internal parameter matrix, where a x is the x-axis focal length, a y is the focal length of the y-axis, s is the distortion parameter, and (u0, v0) is the coordinate of the camera center point. is the external parameter matrix of the camera and the multi-camera center coordinate system, R is the rotation matrix, and T is the transfer matrix. The corresponding internal and external parameter matrix can be obtained through calibration, and the relevant points in the image pixel coordinate system corresponding to the world coordinate in the scene can be obtained.
[0056] After obtaining the internal and external parameters of each camera, the corresponding distortion parameters also need to be obtained. Compared with ordinary pinhole cameras, fisheye cameras are usually composed of multiple imaging lenses, that is, the incident light is projected onto an imaging plane of limited size after being refracted to varying degrees, thereby making the imaging field of view larger. At the same time, the errors of each lens will continue to accumulate, resulting in a wide range of distortion in the fisheye lens. Generally, the first five terms of the Taylor expansion of r with respect to θ are taken to approximate the actual projection function of the fisheye lens:
[0057] x 畸变 ≈x(1+k1*r 2 +k2*r 4 +k3*r 6 )
[0058] y 畸变 ≈y(1+k1*r 2 +k2*r 4 +k3*r 6 )
[0059] r 2 =x 2 +y 2
[0060] Where (x, y) is the original imaging coordinate position, k1~k3 are radial distortion coefficients, which need to be obtained through the projection model. The essence of fisheye camera distortion correction is to obtain the corrected imaging coordinate position through distortion correction parameters.
[0061] After obtaining the internal and external parameters and distortion parameters of multiple cameras, the camera reprojection error is used to select a parameter group suitable for distortion removal. At the same time, when selecting the calibration plate data, the x, y, z three-axis transformation, R x , R y , R z The data is acquired using three rotational degrees of freedom to ensure that the corner points in all directions on the calibration plate can be acquired. The calibration results are screened by the reprojection error. In order to ensure the high-precision SLAM mapping standard for multiple cameras, the calibration reprojection error of each camera needs to be within 1 pixel.
[0062] Based on the aforementioned multi-camera module and calibration and de-distortion, when acquiring data sets, since the multi-machine fusion SLAM in dynamic scenes is based on the collaborative operation of multiple cameras, and the power-on time of each camera is different, the internal counting time and time drift are asynchronous, and the data acquisition frequency is different, the resulting asynchronous data set shooting will directly lead to map failure or image source mismatch problems. In this case, combined with the gigabit network port industrial camera used, due to the network frame rate limitation, the hard trigger method is selected to solve the problem of synchronous data acquisition of multiple cameras. The external frequency trigger is mainly used to keep the device directly connected to the camera through the I / O interface. The trigger pulse signal is given by the external device to the device for direct image acquisition, that is, directly read and write the internal register of the device.
[0063] In this example, a synchronous rectangular pulse trigger device MVM-B-0008 with adjustable width, amplitude, and repetition frequency is used as an example. It can output different signal forms according to the actual needs of multiple cameras, and is also compatible with processing or converting signals of various different input forms into required signals for output. It not only ensures the synchronization of each device when it starts, but also corrects its own clock once each time a pulse wave arrives to eliminate the accumulated error after each device data acquisition. In order to meet the different operating frame rates and data size requirements of multiple cameras. Through this synchronous pulse trigger device, the working timing of multiple cameras can be effectively synchronized to ensure that they collect data with a unified time reference, thereby improving the mapping accuracy and stability of the SLAM system.
[0064] For each Gigabit Ethernet port industrial camera, the non-isolated input GPI signal pin is connected to the TTL signal output terminal of the synchronization trigger device, and the 5V output level rising edge of the unified trigger device TTL terminal is connected, and the consistent pulse source and pulse frequency, number of pulses or cyclic pulses are set according to the data set collection amount. In this way, the synchronous collection of multi-camera data sets is completed, and the real-time data and feature registration of different cameras in the multi-camera fusion SLAM process are guaranteed to meet the final mapping accuracy.
[0065] For multi-camera fusion SLAM, due to the large number of feature points of each camera, the feature fusion calculation is large, which greatly occupies the system operation computing power. If the target detection and recognition scheme is introduced to realize dynamic feature removal, it is easy to cause the system to solve too much, affecting the generation of SLAM key frames and thus affecting the accuracy of mapping. Therefore, the introduced target detection scheme should not occupy too much system computing power, and can realize dynamic feature removal to improve the accuracy of multi-camera SLAM. YOLOv5 is a one-stage target detection algorithm, which includes four parts: Input, Backbone, Neck, and Prediction. It is widely used in the field of target positioning and recognition. Compared with other YOLO series algorithms, YOLOv5 has better effects in the overall network lightweight structure and pedestrian detection. For the input end, Mosaic-based data enhancement is used, and adaptive anchor frame calculation and adaptive image scaling can be realized. For Backbone, Focus structure and CSP structure are used to reduce the amount of calculation. The Neck part adopts FPN+PAN structure to strengthen feature fusion. CIOU_LOSS is used as the loss function of Bounding Bos in the Prediction network. The YOLOv5 series includes four different network models, namely YOLOv5s, YOLOv5m, YOLOv5l, and YOLOv5x. Among these models, YOLOv5s is the model with the smallest depth and the smallest feature map width. Although this model performs well in terms of running speed and has the least number of parameters, it can still identify dynamic targets and potential dynamic targets with prior information in image frames with high accuracy, and can meet the accuracy requirements of the target detection dynamic elimination network of the multi-camera SLAM system. Therefore, this example selects YOLOv5 for algorithm improvement, and uses the YOLOv5s model for data set retraining and detection implementation.
[0066] This example is based on the YOLOv5 target detection algorithm to upgrade the network structure to a lightweight level. The backbone feature extraction network Backbone of YOLOv5 adopts the C3 network structure, which brings a large number of parameters, slow detection speed, and limited application. In some real application scenarios such as mobile or multi-sensor fusion devices, such a large and complex model is difficult to be applied. First, the model is too large and faces the problem of insufficient memory. Secondly, these scenarios require low latency, or fast response speed. For scenes with a huge number of multi-camera SLAM feature points, it is difficult to achieve real-time and accuracy of target detection integration. Researching small and efficient CNN models is crucial in these scenarios. In this example, the backbone feature extraction C3 network is replaced with a lighter PP-LCNet network to achieve lightweight network models and balance speed and accuracy.
[0067] like Figure 3As shown in the figure, the original Backbone structure of YOLOv5 consists of the Focus module, C3 module, and SPP module. The Focus module is used to slice the image, expand the input channel, and obtain the double down-sampled feature map without information loss. The C3 module consists of three Conv blocks, which increases the depth and receptive field of the network and then extracts features based on the feature maps obtained above. The SPP module is a pooling module, which is usually used in convolutional neural networks. It aims to achieve spatial invariance and position invariance of input data in order to improve the recognition ability of neural networks.
[0068] Compared with the traditional C3 convolution of YOLOv5 itself, the introduced PP-LCNET is mainly replaced by multiple depth-separable convolutions, combining the depth-wise convolution and point-by-point convolution to extract feature maps. Compared with conventional convolution operations, the number of parameters and computational costs are relatively low. At the same time, in order to enhance significant features and suppress unimportant features, an SE module is added to the convolution layer with a convolution kernel of 5×5 in the PP-LCNET network. Through this channel attention mechanism obtained from SENet, the accuracy of the model can be effectively improved to obtain a larger convolution kernel for stronger reasoning capabilities.
[0069] In the lightweight improved detection scheme based on YOLOv5, if the feature points in the anchor frame area of the dynamic target are directly removed, some static feature points in the scene will also be removed synchronously, which will cause the number of feature points to decrease and tracking to fail when the multi-machine SLAM system extracts feature points in the tracking thread, resulting in the loss of the entire positioning and the failure of mapping. This is especially true for situations where there are a large number of solid-color backgrounds in the scene, resulting in insufficient feature points, too many dynamic objects covering the scene feature points, resulting in mismatches, and some static targets moving due to the movement of dynamic targets. In addition, because the target detection categories targeted by the traditional YOLOv5s training model are complex, it is easy to cause dynamic targets to be identified as other categories when detecting them, resulting in misdetection.
[0070] Regarding the dynamic and static detection of each camera and solving the problem of false detection, considering that in the actual SLAM process, especially in indoor scenes, the main problems affecting SLAM accuracy mostly come from the movement of pedestrians in the scene.
[0071] This example mainly classifies dynamic feature removal and static feature removal. Dynamic feature points only retain YOLOv5 pedestrian feature detection, while other detection categories are classified as static feature points to ensure that dynamic feature points in each camera scene are removed and valid static feature points are retained to improve the feature accuracy of multi-camera SLAM and retain valid static features for map construction. At the same time, since only pedestrian dynamics need to be detected, the possibility of pedestrian dynamics being misdetected as other categories is eliminated.
[0072] There are still cases of missed detections when detecting dynamic features of pedestrians in the data of each camera, especially in the edge area of the field of view, and incomplete features of pedestrians cannot be detected in the data of a single camera. The training model of YOLOv5s can only detect complete pedestrian features, and it is easy to miss or misdetect in the detection of incomplete pedestrian features, which will cause the dynamic feature points to be unable to be completely removed, thus affecting the mapping effect.
[0073] In this example, multiple cameras are used to implement a multi-machine SLAM solution in a dynamic environment. In the case where a single camera misses incomplete pedestrian features, multi-camera data can be spliced to obtain complete pedestrian dynamic features at the camera data connection. The specific process is as follows: Figure 4 shown.
[0074] In this example, the APAP (As-Projective-As-Possible Image Stitching) algorithm is used for multi-camera image registration and combined with the Seam Finding method to generate stitching lines. Multi-Band Bleing is used to achieve multi-camera image fusion to obtain the complete pedestrian features at the connection between each camera.
[0075] Firstly, SIFT (Scale-invariant feature transform) feature point detection algorithm is used to extract specific features such as corner points and high curvature points in the image, and represent them as a set of feature vectors to calculate Euclidean distance and Hamming distance to describe the image information and measure the similarity of changes at different scales and viewing angles, screen out possible image matching pairs, and obtain the image transformation relationship by calculating the rotation, translation and scaling parameters of the matching pairs to achieve image registration and generate descriptors.
[0076] The BF (Brute Force) exhaustive method is used to match the features extracted by SIFT to obtain matching pairs, including: calculating the distance or similarity between the descriptors of all feature points in two or more images, selecting the feature point pairs with the smallest distance or the largest similarity as the initial matching point pairs, and then sorting them according to the similarity between these matching point pairs, and selecting the one with the highest similarity as the best matching point pair.
[0077] The RANSAC (Random Sample Consensus) algorithm is used to eliminate the erroneous matches in the feature points affected by noise interference, and the model parameters are accurately estimated. Four pairs of non-collinear matching points are randomly selected from the initial matching pairs, and the global homography matrix is estimated using these matching point pairs; the remaining matching point pairs are then substituted into the matrix, and the Euclidean distance between the corresponding points after substitution and the original matched feature points is calculated. The matching points that are less than the set threshold are called "inliers", otherwise they are "outliers"; then iterate a certain number of times to meet the number of inliers, as the final global estimation result. Afterwards, the MDLT (Moving Direct Linear Transformation) method is used to estimate the linear transformation, and the image after global rough alignment is divided into a certain number of sub-regions of equal size and shape. The coordinates of the center point of the sub-region are used as the reference, and the weights are assigned according to the distance from all matching points in each sub-region to the center point of the image block. The smaller the distance, the greater the weight. The local homography matrix is calculated to perform coordinate transformation to complete local registration and reduce image registration deviation.
[0078] The Seam Finding algorithm is used for image fusion to obtain the splicing graph structure. Each pixel in the image is regarded as a common node. In addition, the terminal points on both sides of the overlapping area with infinite weights are set as the source point and the sink point. Search trees are created from the source point and the sink point respectively, and the two search trees search in opposite directions. After that, the node enters the exploration growth stage until the two search tree nodes are connected and the growth stage is terminated. Then the search tree is split into subtrees to find a feasible path from the source point to the sink point, and the maximum flow or indentation flow on the path is calculated. When at least one edge in the path reaches saturation and cannot be augmented, the edge is truncated to obtain the maximum flow data. After the maximum flow of the network is obtained by the maximum flow minimum cut algorithm, the pixel points in the overlapping area of the entire image are divided into a partial set of source points and a partial set of sink points. At this time, the edge between adjacent pixels in each set constitutes one of the edges in the minimum cut set. The set of these edges constitutes the best seam line to be found in the graph cut problem.
[0079] Finally, image fusion is performed to eliminate the stitching. The Multi-Band bleing method is used to first calculate the overlapping part of the current image to be stitched and the synthesized stitching image, and then construct the Laplacian pyramid and Gaussian pyramid of the two images respectively. The original image is decomposed into sub-images of different scales, and each sub-image is weighted averaged to obtain the weighted fusion result of each layer of the pyramid. Finally, the pyramid is reversely reconstructed to obtain the complete image of multi-camera image stitching. Figure 5 exemplarily shows multi-camera images before and after stitching (patch A, patch B, patch C and patch D).
[0080] The acquired complete image is used to improve the YOLOv5 model for target detection and generate the complete image feature anchor frame position data. Figure 6 As shown in the figure, the complete image feature anchor frame position data is solved to the corresponding position points of each camera's independent image, and the dynamic feature points of the anchor frame are removed at the corresponding positions in the original camera data to reduce the probability of missed detection of pedestrian dynamic feature points in each camera data, ensure the effective removal of dynamic feature points, and improve SLAM accuracy and efficiency.
[0081] In order to evaluate the feasibility of the improved algorithm and its actual operation effect in indoor and outdoor scenes, and avoid the sparse feature points of the self-collected data set affecting the algorithm effect, the experiment used the Lafida multi-fisheye camera dataset for the three-camera indoor scene. This is a multi-camera synchronous benchmark dataset captured by a head-mounted multi-fisheye camera system and a mobile laser scanner provided by Karlsruhe Institute; the five-camera outdoor panoramic scene uses the OSV dataset Kashiwa sequence of the multi-camera panoramic street view fisheye dataset provided by Wuhan University. This dataset uses the outdoor panoramic street view synchronized fisheye images captured by the ladybug-3 sensor, which is often used for multi-camera fisheye image algorithm evaluation. The experimental equipment used in the experiment is a Shenzhou laptop, whose CPU model is Intel i5-9400, the main frequency is 2.9GHZ, the graphics card is NVIDIA Geforce GTX 1650, and the system environment is Ubuntu 18.04. The experiment selected different multi-camera modules for both indoor and outdoor scenarios, and compared the mapping effects with and without distortion removal. The results showed that the method and device in this example can effectively solve the problem of too many dynamic feature points in indoor scenes, especially the problem of human factors affecting the mapping accuracy. In addition, the dynamic detection frame will not cover the priority of static feature points, which can ensure the number of feature points in the field of view and prevent drifting. In outdoor scenes, the elimination of artificial dynamic feature points also improves the accuracy of the original single panoramic map.
[0082] In summary, this example proposes a multi-camera SLAM method for dynamic environments based on a multi-camera module. The improved method based on YOLOv5 is used to preprocess the data set, and the ORB feature points in the image are removed by exclusive semantic segmentation. The remaining feature points are paired with the ORB feature points of the previous frame to obtain key frame information for positioning and mapping. This method uses multiple cameras to stitch and complement the incomplete features of pedestrians to form complete features of pedestrians to solve the problem of missed detection due to incomplete pedestrian features when YOLOv5 performs single-camera pedestrian detection, especially the problem of missing features at the connection of each camera data. Moreover, this method can maintain positioning accuracy and mapping efficiency when feature points are insufficient and dynamic feature points are mismatched, and can normally locate and map for different indoor and outdoor scenes and when the single image coverage of feature points is high.
Claims
1. A multi-camera SLAM method in dynamic scenes, include, A multi-camera module is used for synchronous positioning and mapping, wherein ORB feature points for positioning and mapping are extracted from image data through a feature point extraction and classification model, and target detection, recognition and classification are performed; According to the target detection, recognition and classification results, the feature points corresponding to the pedestrian target are regarded as dynamic feature points and removed, and the remaining feature points are regarded as static feature points for simultaneous positioning and mapping.
2. The method according to claim 1, It is characterized in that The feature point extraction and classification model is an improved YOLOv5s model, in which the backbone feature extraction network Backbone is replaced by the C3 network to the PP-LCNet network.
3. The method according to claim 2, It is characterized in that In the PP-LCNET network, a SE module is added to the convolution layer with a convolution kernel of 5×5 to obtain a channel attention mechanism.
4. The method according to claim 3, It is characterized in that It also includes, before target detection, recognition and classification, using APAP algorithm to perform multi-camera image registration, combining Seam Finding method to generate seam lines between multi-camera images, and using Multi-Band Bleing method to achieve multi-camera image fusion to obtain a complete multi-camera image stitching. And the obtained complete image is sent to the improved YOLOv5s model for target detection, recognition and classification.
5. The method according to claim 4, It is characterized in that The APAP algorithm includes: First, the SIFT feature point detection algorithm is used to extract the specific features of corner points and high curvature points in the image, and they are expressed as a set of feature vectors to describe the image information. The Euclidean distance and Hamming distance between the feature vectors are calculated to measure the similarity of changes at different scales and viewing angles. Possible image matching pairs are screened out, and the transformation relationship between images is obtained by calculating the matching rotation, translation, and scaling parameters to achieve image registration, and generate descriptors for all feature points. The BF exhaustive method is used to match the features extracted by SIFT to obtain matching pairs, including calculating the distance or similarity between the descriptors of all feature points in two or more images, selecting the feature point pair with the smallest distance or the largest similarity as the initial matching point pair, and then sorting these matching point pairs according to the similarity between them, and selecting the one with the highest similarity as the best matching point pair; The RANSAC algorithm is used to eliminate the erroneous matches in the feature points affected by noise interference and accurately estimate the model parameters, including randomly selecting four pairs of non-collinear matching point pairs from the initial matching pairs, and using these matching point pairs to estimate the global homography matrix; then the remaining matching point pairs are substituted into the matrix, and the Euclidean distance between the corresponding points after substitution and the original matched feature points is calculated, and the matching points that are less than the set threshold are called "inliers", otherwise they are "outliers"; then iterate a certain number of times to meet the condition of the number of inliers as the final global estimation result; MDLT is used to estimate the linear transformation, and the image after global rough alignment is divided into a certain number of sub-regions of equal size and shape. The coordinates of the center point of the sub-region are used as the reference, and the weight is assigned according to the distance from all matching points in each sub-region to the center point of the image block. The smaller the distance, the greater the weight. The local homography matrix is calculated to perform coordinate transformation to complete the local registration.
6. The method according to claim 5, It is characterized in that The process of generating seam lines between multi-camera images by combining the Seam Finding method includes: Each pixel in the image is regarded as a common node. In addition, the terminal points on both sides of the overlapping area with infinite weights are set as the source point and the sink point. Search trees are created from the source point and the sink point respectively, and the two search trees search in opposite directions. After that, the node enters the exploration growth phase until two search tree nodes are connected, and the growth phase ends; The search tree is then split into subtrees to find a feasible path from the source point to the sink point, and the maximum flow or indentation flow on the path is calculated. When at least one edge in the path reaches saturation and cannot be augmented, the edge is truncated to obtain the maximum flow data. After the maximum flow of the network is obtained by the maximum flow minimum cut algorithm, the pixel points in the overlapping area of the entire image are divided into a partial set of source points and a partial set of sink points. At this time, the edges between adjacent pixel points in each set constitute one of the edges in the minimum cut set, and the set of these edges constitutes the seam line to be found.
7. The method according to claim 6, It is characterized in that The process of realizing multi-camera image fusion by the Multi-Band Bleing method includes firstly calculating the overlapping part of the current image to be stitched and the synthesized stitched image, and constructing the Laplacian pyramid and Gaussian pyramid of the two images respectively; Decompose the original image into sub-images of different scales, perform weighted averaging on each sub-image, and obtain the weighted fusion result of each layer of the pyramid; Finally, the pyramid is reversely reconstructed to obtain a complete image stitched from multiple camera images.
8. The method according to claim 7, It is characterized in that The feature point removal process includes generating complete image feature anchor frame position data corresponding to pedestrians through target detection of the complete image; The complete image feature anchor frame position data is resolved to the corresponding position points of each camera's independent image, and the dynamic feature points corresponding to the anchor frame are removed at the corresponding positions in the original camera data.
9. A multi-camera SLAM device, It is characterized in that It includes a multi-camera data input module and a SLAM calculation module mounted on a carrier, wherein the multi-camera data input module and the SLAM calculation module are electrically connected, wherein the SLAM calculation module is configured to perform synchronous positioning and mapping according to the method steps of claims 1-8.
10. The device according to claim 9, It is characterized in that It also includes an IMU fast posture calculation inertial navigation module electrically connected to the SLAM calculation module, which is used to calculate the position and posture of the carrier in real time; It also includes a synchronization trigger module electrically connected to the SLAM calculation multi-camera data input module, which is used to synchronize the multiple camera units in the multi-camera data input module to collect data synchronously by hard triggering.
Citation Information
Patent Citations
Indoor AGV positioning method based on multi-camera visual slam
CN111540013A
Relay protection cabinet terminal row wire sequence detection method
CN117036235A
Road crack detection method based on improved YOLOv7
CN117437201A
Systems and methods for landmark generation for visual simultaneous localization and mapping
US20040168148A1
Cited By
Low-altitude unmanned aerial vehicle live video real-time rapid mapping method and rapid mapping system
CN120166301A
Camera calibration method and system based on deep learning
CN121582358A
A camera calibration method and system based on deep learning
CN121582358B
