Transverse rapid splicing method for underground cavern image data

Through the feature point matching technology combined with ORB, SIFT and KNN algorithms, combined with image deformation and exposure compensation, the problem of slow image stitching speed and large computing requirements in underground cave rooms is solved, and fast and accurate image stitching is achieved, suitable for tunnel image data Splicing.

CN119228640APending Publication Date: 2024-12-31CHENGDU JIAODA ZHITONG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411317663.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-20
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The prior art is slow in the process of stitching images in the underground cave chamber, especially when accumulating large and small images, the calculation similarity is slow and requires strong computing power. It is difficult for common methods to reduce while ensuring the quality of stitching. The number of cameras to meet the needs of portable acquisition.

Method used

The ORB algorithm is used to detect and match the feature points quickly, combine the SIFT algorithm to optimize the matching results, and use the KNN algorithm to match the feature points, and achieve rapid generation of panoramic images through image deformation, correction, segmentation and stitching. Specific measures include setting the number of feature points and thresholds, adjusting the pyramid scale factor and filtering thresholds, ensuring high accuracy and real-time performance, and performing exposure compensation and seam processing during the splicing process.

Benefits of technology

It realizes the rapid stitching of 5 tunnel images at a 20% overlap rate. The completion time takes only 1 to 2 seconds, and the accuracy rate reaches more than 95%. It is suitable for tunnel image data stitching, saving manpower and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119228640A_ABST
    Figure CN119228640A_ABST
Patent Text Reader

Abstract

The invention relates to an underground cavern image data transverse rapid splicing method, which comprises the following steps of: in the circumferential direction of a tunnel, sequentially acquiring five images from a lower left corner to a vault and from the vault to a lower right corner as a group, and ensuring that the coincidence rate of every two adjacent images meets the requirement; the ORB algorithm is adopted to carry out rapid feature point detection and matching, a large number of feature points are reserved, the sensitivity of feature point detection is reduced, then the SIFT algorithm is adopted to reduce the filtering threshold value of the feature points, and the matching result is optimized and refined, so that the balance of high precision and real-time performance of feature point matching is realized; matching the feature points of two adjacent images by using a KNN algorithm, and reserving the successfully matched images; and finally, the obtained image is subjected to deformation, correction, segmentation, splicing and fusion in sequence, and a final panorama is obtained. According to the method, the tunnel image data can be spliced under the condition that the coincidence rate is 20%, and the splicing time of five tunnel images is only 1-2 seconds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of image processing, and in particular to a method for rapid horizontal splicing of underground cave image data. Background Art

[0002] During the construction and maintenance of underground cavern projects, it is of great significance to accurately stitch and generate panoramic images of the interior of underground caverns; for the horizontal stitching of underground cavern images, the images are stitched from the lower left to the top and then to the lower right in a certain sequence; the stitching between two adjacent sequence images has high requirements for the image overlap rate, and the overlap of the sequence images shot will directly affect the quality of the later stitching processing; in the current common sequence image acquisition mode, the acquisition method using a tripod to fix the camera, by fixing the focal length and rotating the camera to collect images, the overlap area needs to account for about 30% of the image area, and the handheld camera translation acquisition method is mainly used for wide buildings, and the overlap area of ​​the sequence images is preferably 30% to 50%. At the underground cavern site, on the premise of ensuring effective stitching, the number of cameras should be minimized to achieve the purpose of portable acquisition.

[0003] Most of the current image stitching is done by stitching two images together. If the cumulative stitching is continued, the speed will become slower and slower, because the calculation of the similarity between the large image for cumulative stitching and the small image to be stitched will be very slow and require strong computing power. Although the stiching module that comes with OpenCV has done a good job in pursuing stitching quality, even if it is stitching two images, such as the source program stitching two 640×480 resolution images, the stitching time is 4.78 seconds, and the overall stitching speed is not high. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for rapid horizontal splicing of underground cave image data, thereby solving the deficiencies of the prior art.

[0005] The object of the present invention is achieved by the following technical solution: a method for rapid horizontal splicing of underground cave image data, the method comprising: In the circumferential direction of the tunnel, five images from the lower left corner to the vault, and from the vault to the lower right corner are collected as a group, and the overlap rate of each two adjacent images is guaranteed to meet the requirements; The ORB algorithm is used for fast feature point detection and matching, retaining a large number of feature points and reducing the sensitivity of detecting feature points. The SIFT algorithm is then used to reduce the filtering threshold of feature points to optimize and refine the matching results, so as to achieve a balance between high precision and real-time matching of feature points. Use the KNN algorithm to match the feature points of two adjacent images and keep the successfully matched images; Finally, the obtained images are deformed, corrected, segmented, spliced ​​and fused in turn to obtain the final panorama.

[0006] In the ORB algorithm, the maximum number of feature points to be retained is set to 2500, the image pyramid scale factor is adjusted to detect more feature points, and the fastThreshold value is set to 12 to reduce the sensitivity of detecting feature points.

[0007] The nOctaveLayers pyramid Gaussian blur layers in the SIFT algorithm are set to 8 to increase the number of feature point detections, and the contrastThreshold feature point filtering threshold is set to 0.02 to retain more possible feature points.

[0008] The method of matching feature points of two adjacent images using the KNN algorithm and retaining the successfully matched image includes: Use the KNN algorithm to match the feature points of two adjacent images, and set the KNN adjacent feature point matching parameter to 4 to increase the probability of feature point matching; If there are less than 4 pairs of matching points between the two images, the matching is considered to have failed, and good feature points are searched again for matching until the matching is completed.

[0009] The segmentation and splicing include: Initialize three vectors: masks is used to store the mask of each image, corners is used to record the corner position of the deformed image, and sizes is used to record the size of the deformed image. The sizes of the three vectors are the same as the number of images to be stitched; Create a new mask for each image to be processed, create a rotation deformer, and calculate the scaling factor for mask deformation of subsequent images; Scaling the camera parameters to fit the seam work scale, warping each image and its mask to a uniform view and scale; Exposure compensation is performed during the image stitching process to balance the brightness differences between the input images and improve the visual quality of the final panoramic image; The best segmentation line of the overlapping area of ​​the two images is found to segment the two images, the best seam line is found through the seam finder, and the images are seam processed according to the calculated seam mask.

[0010] The present invention has the following advantages: a method for rapid horizontal splicing of underground cavern image data, which can splice tunnel image data with an overlap rate of 20%, and only takes 1 to 2 seconds to complete the splicing of 5 tunnel images. For structures with a relatively simple texture such as surrounding rock and repetitive structures such as tunnels supported by steel arch frames, the accuracy rate reaches more than 95%, which is very suitable for tunnel image data splicing, has fewer processes for splicing, can quickly complete image acquisition and splicing, and saves manpower and time. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a schematic diagram of the process of the present invention; Figure 2 Schematic diagram of the image stitching process. DETAILED DESCRIPTION

[0012] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the detailed description of the embodiments of the present application provided below in conjunction with the drawings is not intended to limit the scope of protection of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application. The present invention is further described below in conjunction with the drawings.

[0013] like Figure 1 As shown, the present invention specifically relates to a method for rapid horizontal splicing of underground cavern image data. First, the original image data of the tunnel is collected, and the images should ensure that the tunnel wall is complete (in the circumferential direction of the tunnel, from the lower left corner to the arch, and from the arch to the lower right corner are all photographed without omission); the photographed images are checked, and each two adjacent images have a certain overlap rate; qualified images are grouped and saved for later call and distinction; based on the original images, the images are horizontally spliced; which specifically includes the following contents: 1. Connect the multi-purpose photographic equipment through the acquisition unit and use the image acquisition APP to shoot the tunnel. To ensure that the complete cave wall picture can be captured, the multi-purpose photographic equipment is installed horizontally along the tunnel. There are 5 cameras in total, which can collect 5 pictures at a time. The shooting positions are lower left, upper left, upper part, upper right and lower right respectively.

[0014] 2. Check the overlap rate of the photos taken to ensure that there is more than 20% overlap rate between every two adjacent photos.

[0015] 3. Save the five qualified images taken synchronously each time into the same group to facilitate the distinction in later queries.

[0016] 4. The tunnel images are horizontally stitched together into a total of 5 images. Click on horizontal stitching in the data acquisition software to complete it.

[0017] Furthermore, if Figure 2 As shown in the figure, the splicing process is as follows: A1. Feature detection and extraction: According to the input feature type enumeration value, the corresponding feature detector is selected and created to detect the feature points of the image; the present invention first uses the ORB algorithm to perform fast feature point detection and matching, retains a large number of feature points and reduces the sensitivity of detecting feature points, and then uses the SIFT algorithm to reduce the filtering threshold of the feature points to optimize and refine the matching results, so as to achieve a balance between high precision and real-time matching of feature points.

[0018] In ORB, the maximum number of feature points to be retained is set to 2500, the image pyramid scale factor is adjusted to detect more feature points, and the fastThreshold value is set to 12 to reduce the sensitivity of detecting feature points. In SIFT, the number of nOctaveLayers pyramid Gaussian blur layers is set to 8 to increase the number of feature point detections, and the contrastThreshold feature point filtering threshold is set to 0.02 to retain more possible feature points.

[0019] A2. Find matching feature points of two adjacent images and filter out good feature points for matching: Use the KNN algorithm to match the feature points of two adjacent images, and set the KNN neighboring feature point matching parameter to 4 to increase the probability of feature point matching. The transformation between two images requires at least 4 pairs of matching points. If there are less than 4 pairs of matching points, the match is considered to have failed, and good feature points are searched again for matching until the match is completed.

[0020] A3. Image deformation: Based on the projection options provided by the matching points found in A2, a spherical deformer is used to deform the image.

[0021] A4. Waveform correction: For the distortion in the image caused by the camera lens, the OpenCV waveform correction algorithm is used for waveform correction, and the waveform correction type is set to horizontal.

[0022] A5. Image segmentation and seam processing: For the rectified image, first use the best segmentation line to segment the two adjacent images, and then perform seam processing.

[0023] Specifically, it includes: (1) initializing three vectors: masks is used to store the mask of each image, corners is used to record the corner positions of the deformed image, and sizes is used to record the size of the deformed image. The sizes of these vectors are the same as the number of images to be stitched; (2) creating a new mask for each image to be processed; (3) creating a rotation deformer instance, and calculating the scaling ratio based on warped_image_scale_ and seam_work_aspect_ for subsequent image and mask deformation; (4) scaling the camera parameters to adapt to the scaling ratio of the seam work; (5) deforming each image and its mask, adjusting them to a uniform perspective and scale, and preparing for seam finding; (6) performing exposure compensation during the image stitching process to balance the brightness differences between the input images and improve the visual quality of the final panoramic image; (7) finding the best segmentation line in the overlapping area of ​​the two images to segment the two images; (8) calling the seam finder to find the best seam line, and performing seam processing on the image based on the calculated seam mask (that is, the deformed mask, which contains the seam information).

[0024] A6. Image fusion: Create result, which is used to store the image matrix of the fusion result. Assign the fusion result to pano (panorama), and assign the fused panoramic image result to the output parameter pano of the method, so that the final panoramic image can be obtained.

[0025] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used for various other combinations, modifications and improvements, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art do not deviate from the spirit and scope of the present invention, and should be within the scope of protection of the claims attached to the present invention.

Claims

1. A method for rapid horizontal splicing of underground cavern image data, characterized in that: The splicing method comprises: In the circumferential direction of the tunnel, five images from the lower left corner to the vault, and from the vault to the lower right corner are collected as a group, and the overlap rate of each two adjacent images is guaranteed to meet the requirements; The ORB algorithm is used for fast feature point detection and matching, retaining a large number of feature points and reducing the sensitivity of detecting feature points. The SIFT algorithm is then used to reduce the filtering threshold of feature points to optimize and refine the matching results, so as to achieve a balance between high precision and real-time matching of feature points. Use the KNN algorithm to match the feature points of two adjacent images and keep the successfully matched images; Finally, the obtained images are deformed, corrected, segmented, spliced ​​and fused in turn to obtain the final panorama.

2. The method for rapid horizontal splicing of underground cave image data according to claim 1, characterized in that: In the ORB algorithm, the maximum number of feature points to be retained is set to 2500, the image pyramid scale factor is adjusted to detect more feature points, and the fastThreshold value is set to 12 to reduce the sensitivity of detecting feature points.

3. The method for rapid horizontal splicing of underground cave image data according to claim 1, characterized in that: The nOctaveLayers pyramid Gaussian blur layers in the SIFT algorithm are set to 8 to increase the number of feature point detections, and the contrastThreshold feature point filtering threshold is set to 0.02 to retain more possible feature points.

4. The method for rapid horizontal splicing of underground cavern image data according to claim 1, characterized in that: The method of matching feature points of two adjacent images using the KNN algorithm and retaining the successfully matched image includes: Use the KNN algorithm to match the feature points of two adjacent images, and set the KNN adjacent feature point matching parameter to 4 to increase the probability of feature point matching; If there are less than 4 pairs of matching points between the two images, the matching is considered to have failed, and good feature points are searched again for matching until the matching is completed.

5. The method for rapid horizontal splicing of underground cave image data according to claim 1, characterized in that: The segmentation and splicing include: Initialize three vectors: masks is used to store the mask of each image, corners is used to record the corner position of the deformed image, and sizes is used to record the size of the deformed image. The sizes of the three vectors are the same as the number of images to be stitched; Create a new mask for each image to be processed, create a rotation deformer, and calculate the scaling factor for mask deformation of subsequent images; Scaling the camera parameters to fit the seam work scale, warping each image and its mask to a uniform view and scale; Exposure compensation is performed during the image stitching process to balance the brightness differences between the input images and improve the visual quality of the final panoramic image; The best segmentation line of the overlapping area of ​​the two images is found to segment the two images, the best seam line is found through the seam finder, and the images are seam processed according to the calculated seam mask.