Weak texture microscopic image rapid splicing method, system, device and medium

Through the improved FAST algorithm and graph theory model optimization path, combined with multi-threaded parallel processing, the weak texture image mismatch and calculation complexity problems in fluorescence microscope image stitching are solved, and fast and stable image stitching is achieved, suitable for hardware Resource-limited clinical environment.

CN119313548APending Publication Date: 2025-01-14SOUTHWEAT UNIV OF SCI & TECH +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410889052.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-04
Publication Date
2025-01-14

AI Technical Summary

Technical Problem

In fluorescence microscopic image stitching in the medical field, weak texture images mismatch, inconsistent color and brightness, high computational complexity, and insufficient processing speed and real-time performance, making it difficult for traditional stitching algorithms to achieve efficient and stable image stitching, especially in hardware In the case of limited resources.

Method used

The FAST algorithm based on improved spatial consistency constraints and coordinate constraints is used for accurate image registration, the local stitching path is optimized in combination with the graph theory model, and the trigonometric function weighting method is used to seamlessly fusion of images, and multi-threading technology is used to develop producer and consumer models. Implement parallel processing to improve splicing efficiency.

Benefits of technology

The fast, stable and reliable splicing of weak texture microscope images is achieved, ensuring high-quality full-field images are obtained under limited hardware resources, improving diagnostic efficiency and accuracy, and avoiding insufficient memory during splicing. fail.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119313548A_ABST
    Figure CN119313548A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a weak texture microscopic image rapid splicing method, system and device and a medium. The method comprises the steps that S1, slice scanning preset information and server configuration information are acquired; s2, acquiring a microscopic image sequence and preprocessing an overlapping region; s3, using an improved FAST algorithm based on space consistency constraint and coordinate constraint to carry out image accurate registration; s4, optimizing a local splicing path based on a graph theory model and a mean absolute error; s5, performing image seamless fusion by using a trigonometric function weight method; s6, performing parallel processing on the steps S2 to S5 by using a multi-thread technology and the producer and consumer model; and S7, outputting and storing a splicing result. According to the method, rapid splicing of weak texture microscopic images is realized through the process, and the splicing result is stored in blocks under the condition of insufficient memory, so that splicing failure of large-scale images is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of image stitching, and in particular to a method, system, equipment and medium for fast stitching of weak-texture microscopic images. Background Art

[0002] In the medical field, fluorescence microscopy uses fluorescent dyes to label specific biological molecules, providing high-contrast images of tissues and cells, and is widely used in cancer diagnosis. Since slice samples are usually large in size, a single field of view image cannot fully display the entire area to be observed, so multiple images need to be precisely stitched together to expand the field of view, improve diagnostic accuracy, and facilitate automated analysis.

[0003] Although image stitching technology plays an important role in cancer diagnosis, it still faces the following challenges when stitching fluorescence microscopy images: (1) Weak texture image mismatch: Due to the limitations of tissue type, slice preparation process and imaging conditions, some fluorescence images lack obvious and easily recognizable texture features, and traditional registration algorithms have difficulty capturing subtle image features. (2) Color and brightness inconsistency: The differences in acquisition conditions of images in different fields of view make the imaging color and brightness inconsistent, resulting in obvious stitching gaps. (3) High computational complexity: In some medical institutions and clinical practices, due to equipment conditions and budget constraints, it is impossible to provide sufficient computing resources and storage space to support the stitching process of large-scale images, and the efficiency of the stitching algorithm is difficult to improve. (4) Processing speed and real-time performance: In actual clinical applications, quickly obtaining stitching results is crucial to diagnostic efficiency.

[0004] With the increasing demand for diagnosis, there is an urgent need for a method that can quickly, stably and high-quality stitching of weak texture microscopic images with limited hardware resources. This method should have efficient image registration and stitching capabilities to ensure that diagnosticians can obtain complete and accurate full-field image information in a shorter time, providing more timely and accurate support for clinical diagnosis. Summary of the invention

[0005] The purpose of the present invention is to achieve fast, stable and reliable stitching of weak texture microscopic images, and the stitching process and results are not easily affected by hardware resources. A method, system, device and medium for fast stitching of weak texture microscopic images are proposed, which can obtain high-quality full-field images in a short time.

[0006] In a first aspect, the present invention provides a method for fast stitching of weak texture microscopic images, which adopts the following technical solution:

[0007] S1: Obtain slice scanning preset information and server configuration information;

[0008] S2: Acquire microscopic image sequences and preprocess the overlapping areas of adjacent images;

[0009] S3: Use the improved FAST algorithm based on spatial consistency constraints and coordinate constraints for accurate image registration;

[0010] S4: Optimizing local splicing paths based on graph theory model and mean absolute error;

[0011] S5: Use trigonometric weighting method for seamless image fusion;

[0012] S6: Use multi-threading technology and the producer-consumer model to process steps S2 to S5 in parallel;

[0013] S7: Output and store the stitching result.

[0014] In the step S1, it is necessary to read the relevant preset information of the slice scan and obtain the server configuration information, including the scanning rows and columns, image resolution, image overlap rate, server available memory and other information.

[0015] In step S2, a microscopic image sequence needs to be acquired, and the overlapping area of ​​two adjacent images needs to be preprocessed, including image noise reduction and local contrast enhancement, to improve the accuracy of subsequent weak texture image registration. The following steps are included:

[0016] Step S2.1: reading or receiving the reference image and the displacement image acquired by the CCD from the microscopic image set according to the scanning preset information, and obtaining the overlapping area of ​​the two;

[0017] Step S2.2: Use Gaussian filtering to perform image smoothing and noise reduction in the overlapping area to reduce the impact of background noise in the weak texture image;

[0018] Step S2.3: Adaptive histogram equalization is used to enhance the local contrast of the overlapping area after Gaussian filtering, thereby improving the detectability of subtle features in the weak texture image.

[0019] In step S3, the FAST algorithm improved based on spatial consistency constraint and coordinate constraint is used to accurately register the weak texture image. The improved FAST algorithm registration steps are:

[0020] Step S3.1: using the FAST algorithm to detect feature points in adjacent overlapping areas of the preprocessed weak texture image to obtain a feature point set;

[0021] Step S3.2: Use the BRIEF descriptor to describe the feature point set to obtain a feature descriptor set;

[0022] Step S3.3: Use the KNN matching algorithm to find matching pairs between two feature descriptor sets;

[0023] Step S3.4: Introduce similar triangles to constrain the spatial consistency of matching pairs and eliminate unreliable matching pairs;

[0024] Step S3.5: Based on the matching pairs verified by similar triangle constraints, RANSAC is used to calculate the transformation matrix between the two images to obtain the offset;

[0025] Step S3.6: Introduce coordinate constraints to ensure that the offset is within a reasonable range;

[0026] Step S3.7: Calculate the mean absolute error of the overlapping area corresponding to the current offset.

[0027] In step S4, based on the registration results and mean absolute errors of every two rows of images, a graph theory model is used to optimize the local stitching path and calculate the global position coordinates.

[0028] In step S5, the actual overlapping area of ​​the images adjacent to each other, that is, the fusion area, is calculated according to the global position coordinates, and the trigonometric function weight method is used to achieve pixel-level seamless fusion in the fusion area.

[0029] In step S6, multithreading technology and producer-consumer model are used to implement parallel processing of steps S2 to S5, thereby improving the overall splicing efficiency.

[0030] In the step S7, according to the scanning preset information and the server configuration information, the result is stored during or after the stitching process until all the microscopic images are stitched together.

[0031] In a second aspect, the present invention applies the methods described in each of the first aspect to further provide a system for rapid stitching of weak texture microscopic images, comprising:

[0032] 1. Image preprocessing module, used to reduce noise and enhance images in overlapping areas, and improve the detectability of subtle features in weak texture images;

[0033] 2. Image registration module, which uses the improved FAST algorithm to register the overlapping areas of the preprocessed weak texture images;

[0034] 3. Path optimization module, used to optimize the splicing path of every two rows of images;

[0035] 4. Image fusion module, using trigonometric function weight method to perform image fusion;

[0036] 5. Multi-thread module, used to process pre-processing, registration, path optimization and fusion modules in parallel;

[0037] 6. Storage and output module, which stores the stitched image and outputs the result after the stitching is completed.

[0038] In a third aspect, the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the method as described in any one of the first aspects when executing the computer program.

[0039] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program that can be loaded by a processor and execute any method as described in the first aspect.

[0040] In summary, the present invention includes at least one of the following beneficial technical effects:

[0041] The present invention provides a method, system, device and medium for fast stitching of weak-textured microscopic images. First, slice scanning preset information and server configuration information are obtained; a microscopic image sequence is obtained and the overlapping areas of adjacent images are preprocessed; an improved FAST algorithm based on spatial constraints and coordinate constraints is used for accurate image registration; local stitching paths are optimized based on graph theory models and mean absolute error; trigonometric function weighting method is used for seamless image fusion; multi-threading technology and producer-consumer models are used to parallelly process preprocessing, registration, path optimization, and fusion steps; and finally, the stitching results are output and stored. The method provided by the present invention is based on improved FAST algorithm registration, and uses graph theory models to optimize the stitching path, so as to achieve fast, stable and reliable stitching of weak-textured microscopic images, and in the case of insufficient hardware memory, the stitching results are automatically stored in blocks to avoid stitching failures due to insufficient memory when stitching large-scale image data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 It is an overall flow chart of the method for rapid stitching of weak texture microscopic images in the present invention.

[0043] Figure 2 It is a schematic diagram of obtaining a sequence of microscopic images of the slice to be observed through a scanner in the present invention.

[0044] Figure 3 It is a schematic diagram of the sequence of slice scanning in an embodiment of the present invention.

[0045] Figure 4 It is a schematic diagram of the overlapping area between horizontally or vertically adjacent images in an embodiment of the present invention.

[0046] Figure 5 It is a schematic diagram of performing spatial constraints based on similar triangles in an embodiment of the present invention.

[0047] Figure 6 It is a schematic diagram of the horizontal or vertical registration result of the image in an embodiment of the present invention.

[0048] Figure 7 Schematic diagram of image misregistration in an embodiment of the present invention.

[0049] Figure 8 It is a schematic diagram of using a graph theory model to optimize a local splicing path in an embodiment of the present invention.

[0050] Fig. 9 Schematic diagram of image path optimization to be adjusted in an embodiment of the present invention.

[0051] Fig.10 It is a schematic diagram of the splicing path after optimization using a graph theory model in an embodiment of the present invention.

[0052] Fig.11 Schematic diagram of the fusion of two images in an embodiment of the present invention.

[0053] Fig.12 Schematic diagram of weight changes of the trigonometric function weight method in an embodiment of the present invention.

[0054] Fig.13 It is a schematic diagram of multi-image fusion in an embodiment of the present invention.

[0055] Fig.14 It is a schematic diagram of parallel processing using multi-threading technology in an embodiment of the present invention.

[0056] Fig.15 It is a set of dark field weak texture microscopic images collected in the embodiment of the present invention.

[0057] Fig.16 In the embodiment of the present invention, when there is sufficient memory Fig.14 The stitching result of the image set.

[0058] Fig.17 In the case of insufficient memory in the embodiment of the present invention Fig.14 The image set is stored in upper and lower blocks. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to illustrate the present invention, rather than to limit the present invention.

[0060] Figure 1 The overall process of the present invention is shown, which specifically includes the following steps:

[0061] Step S1: Obtain slice scanning preset information and server configuration information.

[0062] Reference Figure 2 The microscopic image set of the embodiment of the present invention can be a scanned image sequence of any tissue section, and the technical solution provided by the present invention can quickly splice the scanned microscopic image set, and can also splice while scanning.

[0063] Scanning related preset information includes scanning order, scanning rows and columns, image overlap rate, image resolution, etc. Server configuration information mainly includes its available memory information, which is defined as S f .

[0064] Reference Figure 3 , the scanning order is "bow" scanning, starting from the left, the number of scanning rows M = 6, the number of scanning columns N = 5, and the horizontal overlap rate is o H , the longitudinal overlap rate is o V , the resolution of a single microscopic image is (w,h).

[0065] The scanning sequence referred to in the present invention includes row-by-row scanning, column-by-column scanning, and “bow”-shaped scanning, and the scanning starting directions include upward, downward, left, and right.

[0066] Step S2: Acquire a microscopic image sequence and preprocess the overlapping areas of adjacent images. For weak texture images in the microscopic image set, perform noise reduction and local contrast enhancement on the overlapping areas of adjacent images to improve the accuracy of subsequent registration results. This mainly includes the following steps:

[0067] Step S2.1: According to the scanning preset information, read or receive the reference image and the displacement image acquired from the CCD from the microscopic image set, and obtain the overlapping area of ​​the two.

[0068] Reference Figure 4 (a) is a schematic diagram of the overlapping area of ​​horizontally adjacent images in an embodiment of the present invention. The shaded area is the overlapping area, and the horizontal overlapping pixel width is w o , the overlap rate is o H .

[0069] Reference Figure 4 (b) is a schematic diagram of the overlapping area of ​​adjacent vertical images in an embodiment of the present invention, the shaded area is the overlapping area, and the vertical overlapping pixel height is h o , the overlap rate is o V .

[0070] The resolution of a single microscopic image is (w, h), and the relationship between the overlap rate and the overlap area can be calculated by the following formula:

[0071]

[0072]

[0073] Step S2.2: Use Gaussian filtering to smooth and reduce noise in the overlapping area. The Gaussian function formula is:

[0074]

[0075] Where: (x, y) is the coordinate in the image; σ is the standard deviation of the Gaussian function, which determines the smoothness of the filter. Gaussian filtering can reduce the influence of background noise in weak texture images.

[0076] Step S2.3: Adaptive histogram equalization is used to enhance the local contrast of the overlapping area of ​​the weak texture image, so that the inconspicuous feature points in the weak texture image are easier to detect.

[0077] Step S3: Use the improved FAST algorithm based on spatial consistency constraints and coordinate constraints to perform accurate image registration. The improved FAST algorithm image registration implementation steps are:

[0078] Step S3.1: Use the FAST algorithm to detect the preprocessed overlapping area to obtain a set of feature points. The feature point sets corresponding to the overlapping area of ​​the reference image and the displacement image are P1 and P2 respectively.

[0079] Step S3.2: Use the BRIEF descriptor to describe the detected feature point set, and obtain the descriptor sets D1 and D2 corresponding to the feature point sets P1 and P2.

[0080] Step S3.3: Use the KNN matching algorithm to find a matching pair set P′ between the feature descriptor sets D1 and D2 of the two images.

[0081] Step S3.4: Introduce similar triangles to perform spatial constraints on the point pairs in the matching pair set P′, traverse all the 3-point combinations in P′ and determine whether the corresponding 3 groups of matching pairs can form similar triangles, so as to eliminate unreliable matching pairs and retain the matching pairs that meet the similar triangle constraints and write them into the set R.

[0082] Reference Figure 5 , assuming are three sets of matching points in set R, forming two triangles in the overlapping area, θ B ,θ O are the angles of the triangles at the same position. If the side lengths and angles of the two triangles satisfy the following two formulas:

[0083]

[0084] |θ B -θ O |<T θ ,

[0085] Then it is judged that the three groups of matching points form similar triangles, which means are all correct matching point pairs, where: is the side length of the triangle, θ B For is the degree of the vertex angle, θ O For is the degree of the vertex angle, T P is the threshold of the difference in side length ratio, T θ is the threshold of the angle difference. After experimental verification, for the image set in this embodiment, the two thresholds are set to T P =0.05, T θ The matching effect is best when =2°.

[0086] Step S3.5: Use the matching point pairs in set R that have been verified by similar triangle constraints, and use RANSAC to calculate the transformation matrix between the overlapping areas of the two images to obtain the offset (ox, oy). According to the position relationship and overlap rate, the local offset (dx, dy) between the images can be calculated from (ox, oy):

[0087] Reference Figure 6 (a), when the images are adjacent horizontally, the calculation formula is:

[0088] dx=ox+(1-o H )×w,

[0089] dy=oy;

[0090] Reference Figure 6 (b), when the images are adjacent vertically, the calculation formula is:

[0091] dx=ox,

[0092] dy=oy+(1-o V )×h.

[0093] If the number of matching point pairs in set R is less than 3, the confidence of the local offset (dx, dy) is low, but it does not mean that the match fails completely. (dx, dy) can be compared with the average offset of all images with the same position relationship in the current stitched images (dx avg ,dy avg ) for comparison: When (dx,dy) satisfies or , we determine that (dx,dy) is wrong, and let (dx,dy) = (dx avg ,dy avg ). It has been verified by experiments that for the image set used in the embodiment of the present invention, let T R =0.04 can realize effective judgment of (dx,dy).

[0094] Step S3.6: Introduce coordinate constraints to ensure that the offset is within a reasonable range. When the scanning platform is extremely accurate, in theory, the width and height of the overlapping area between images are complementary to the offset. However, the scanning process will inevitably be affected by the shaking of the displacement platform and the mechanical precision error, causing the image offset to fluctuate within a certain range. Therefore, the coordinate range constraint can be imposed on (dx, dy) to ensure that it is within a reasonable range. For the offset (dx, dy): the images are adjacent horizontally and satisfy -L range <dy<L range And (1-o H )×wL range <dx<(1-o H )×w+L range ; The images are adjacent vertically, satisfying -L range <dx<L range And (1-o V )×hL range <dy<(1-o V )×h+L range .L range is the floating range of the offset, which can be fine-tuned according to the actual accuracy of the platform. In conventional scanners, L rate = 20 pixels. When (dx, dy) exceeds the above coordinate range constraints, it is determined that the offset is incorrect and (dx, dy) = (dx avg ,dy avg ), replacing the original erroneous registration result.

[0095] Step S3.7: Calculate the mean absolute error of the overlapping area corresponding to the current offset, the formula is:

[0096]

[0097] Where: I1(x i ,y i )、I2(x i ,y i ) is the actual overlapping area pixel of the two registered images, Q is the total number of pixels in the area, and the smaller the MAE, the better the match.

[0098] The improved FAST algorithm of the present invention is used to register weak texture images, which can effectively improve the reliability and accuracy of the registration results, and the mean absolute error is calculated for subsequent optimization of the splicing path.

[0099] Step S4: After every two rows of images are registered, the local offset between the two rows of images and the corresponding mean absolute error (MAE) are obtained. A graph theory model is constructed using spanning tree, greedy algorithm, and loop invariant theory. The stitching path is numerically optimized based on the local offset and MAE, which can effectively avoid misregistration between weak texture images. The global position coordinates of the image are calculated based on the optimization of the stitching path. The local offset of the displacement image is (dx, dy), then its global position coordinates (x g ,y g ), where x g =dx+x g ′,y g =dy+y g ′,(x g ′,y g ′) is the global position coordinate of the reference image.

[0100] Reference Figure 7 ,When there is an incorrect match between img4 and img5, and img9 and img10, stitching according to the scan path will cause the subsequent stitching results to be misaligned, and the errors will gradually accumulate.

[0101] Reference Figure 8 , the image set was collected from spinal cord cross-sections. Figure 3 The scanning order is 6 rows and 5 columns, a total of 30 images. Figure 8 Image set, based on the MAE of adjacent image registration results, the stitching path between each two adjacent rows of images is optimized during the stitching process until all image registrations and path optimization are completed.

[0102] Reference Fig. 9 , taking the "image to be adjusted img" in the figure as an example, when the row where img is located is registered, the stitching paths of the images in this row need to be adjusted and optimized in turn. When adjusting to img, this image has a total of 3 stitching paths with the adjacent images above, on the left, and on the right. According to the MAE corresponding to the path, the path with the smallest MAE, that is, the best match, is selected as the final path for subsequent stitching. Fig. 9 Select upward stitching as the stitching path.

[0103] Reference Fig.10 , the lines in the figure are the splicing paths optimized based on the graph theory model.

[0104] Step S5: Use trigonometric function weighting method to perform seamless image fusion.

[0105] Reference Fig.11 When two images are stitched together, the global position coordinates (x g ,y g ) can calculate the actual overlapping area range, such as Fig.11In the middle shadow area, the pixel values ​​in this area are fused. The specific weight calculation formula is:

[0106]

[0107] Where: weights w1 and w2 are the weights of the pixels in the overlapping area of ​​f1(x, y) and f2(x, y), w1∈[0,1], w2∈[0,1]. The weight value of each pixel in the overlapping area is calculated using the trigonometric function weight method. Fig.10 (a) is taken as an example, l and r represent the left and right boundaries of the fusion area respectively, and each column of pixel points j in the area is represented by angle θ, then:

[0108]

[0109] The range of θ can be calculated to be The calculation formula for weights w1 and w2 is:

[0110] w1=cos 2 (θ),

[0111] w2=1-w1.

[0112] Reference Fig.12 ,In the trigonometric function weight method, as the pixel position changes, w1 and w2 change very slowly when they approach ,from the two boundaries to the center, which makes the effect of eliminating ,joint traces more obvious.

[0113] Reference Fig.13 When batch microscopic images are stitched, the displacement image has overlapping areas with the reference image and the existing stitching result during fusion. The weight formula is:

[0114]

[0115] Where: w2=1-w1, w4=1-w3.

[0116] Step S6: Use multi-threading technology and the producer-consumer model to process steps S2 to S5 in parallel to improve the overall splicing efficiency.

[0117] Reference Fig.14 , the overall stitching process is divided into three threads: image preprocessing and registration, stitching path optimization, and image fusion. The three threads are processed in parallel using the producer-consumer model. The threads exchange data through buffers buffer1 and buffer2. Specifically:

[0118] The image preprocessing and registration thread loads the image data and stores the registration result in buffer1. The stitching path optimization thread obtains the registration result and mean absolute error from buffer1, optimizes the stitching path, calculates the global position coordinates based on the path, and stores the global position coordinates in buffer2. The image fusion thread obtains the global position coordinates from buffer2 to perform image fusion operations. The data exchange and operation accuracy and security between the three threads are ensured through semaphores and mutexes, making full use of the parallel computing capabilities of multi-core processors.

[0119] Step S7: Output and store the splicing result.

[0120] Based on the scanning preset information and the server configuration information in step S1, the result is stored during or after the stitching process until all the microscopic images are stitched together. In the embodiment of the present invention, a large number of microscopic images need to be stitched together. When the memory is insufficient to store the stitching result, the stitching result needs to be divided into multiple images for storage.

[0121] According to the parameters in the scanning preset information in step S1, when there is no error in the scanning process, the ideal stitching result image resolution is (W, H), and its calculation formula is:

[0122] W=w*[(1-o H )(N-1)+1],

[0123] H=h*[(1-o V )(M-1)+1].

[0124] For an image with a resolution of (W, H), the memory size it occupies is:

[0125]

[0126] Where: S img is the size of the memory space occupied by the image; channels is the number of image channels; depth is the bit depth of a single channel; GB is the computer storage unit. In order to ensure that the memory does not overflow during the stitching process, a parameter rate=0.7 is specified when comparing the memory size. f The available memory information in step S1 is:

[0127] When S img ≤rate×S f When , it means that the current available memory is fully sufficient to store the data in the stitching process and the final stitching result, then the final result will be stored after all microscopic images are stitched;

[0128] When S img >rate×S f, it means that the current available memory is not enough to store the data in the stitching process and the final stitching result. When the stitching reaches a certain resolution, the existing stitching result will be stored, and the memory space occupied by it will be released before continuing to stitch subsequent images until all images are stitched and stored.

[0129] The embodiment of the present invention applies the above-mentioned weak-texture microscopic image fast stitching method, and further provides a weak-texture microscopic image fast stitching system, including:

[0130] 1. Image preprocessing module, used to reduce noise and enhance images in overlapping areas, and improve the detectability of subtle features in weak texture images;

[0131] 2. Image registration module, which uses the improved FAST algorithm to register the overlapping areas of the preprocessed weak texture images;

[0132] 3. Path optimization module, used to optimize the splicing path of every two rows of images;

[0133] 4. Image fusion module, using trigonometric function weight method to perform image fusion;

[0134] 5. Multi-thread module, used to process pre-processing, registration, path optimization and fusion modules in parallel;

[0135] 6. Storage and output module, which stores the stitched image and outputs the result after the stitching is completed.

[0136] An embodiment of the present invention provides a device for fast stitching of weak-texture microscopic images, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned method when executing the computer program.

[0137] An embodiment of the present invention provides a weak-texture microscopic image fast stitching medium storing a computer program that can be loaded by a processor and enables the computer to execute the above-mentioned method.

[0138] Reference Fig.15 The dark field microscopy image set contains 544 images, the resolution of a single image (w, h) is (1200, 1920), that is, 230w pixels, the number of image scanning rows M = 16, the number of image scanning columns N = 34, and the lateral overlap rate o H =10%, longitudinal overlap rate o V =7%, weak texture images account for about 70% of the entire image set, and some images are completely black.

[0139] Splicing on a server with 16GB memory and i5-8250U processor Fig.15 544 images in the image collection. Fig.16, if there is enough memory, the stitching result will be stored as a single image. Fig.17 , when the memory is insufficient, the stitching result will be divided into two images, the upper and the lower, for storage; when the scanning order is to scan column by column starting from the left, the stitching result will be divided into two images, the left and the right, for storage.

[0140] Using the method described in the embodiments of the present invention Fig.15 The stitching time for the image set was 25.5 seconds, with an average stitching speed of 21.3 images / s, and no stitching seams or image misalignment, indicating that this method is suitable for fast, stable and reliable stitching of weak texture images. In addition to stitching existing microscopic image sets, this method can also stitch while scanning, and the stitching result can be obtained after the scanning is completed, which shortens the time spent in the image acquisition stage and saves time to a certain extent.

[0141] for Fig.15 The image set was stitched using the method described in the embodiment of the present invention, AutoStitch2.2, ImageJ, and Panorama software, respectively, and the stitching speed and results were compared: as for the stitching speed, the stitching speed of the method described in the embodiment of the present invention was better than that of the other three types of stitching software; as for the stitching results, the stitching results of the three types of software showed large-area dislocation and could not be applied to pathological diagnosis. The stitching result of the method described in the embodiment of the present invention had no stitching seams and image dislocation, which was better than that of the other three types of software.

[0142] In summary, the embodiments of the present invention provide a method, system, device and medium for fast stitching of weak-textured microscopic images. Based on server configuration information, it combines the improvement of the registration algorithm with the optimization of the stitching path by the graph theory model. It can greatly improve the stitching speed while ensuring the stitching quality of weak-textured images, and provides an efficient and reliable solution for medical imaging diagnosis.

[0143] The specific embodiments of the present invention are intended to illustrate the core concept and overall technical solution of the present invention and are only used to help understanding. For professionals and technicians in this field, corresponding improvements can be made according to the ideas and technical solutions of the present invention according to actual application requirements and specific implementation conditions. Therefore, the contents of this specification should not be regarded as limiting the present invention. The present invention is not limited to the above-mentioned embodiments, and any form of deformation or modification within the scope of the claims belongs to the protection scope of the present invention.

Claims

1. A method for fast stitching of weak texture microscopic images, characterized in that: The following steps are involved: S1: Obtain slice scanning preset information and server configuration information; S2: Acquire microscopic image sequences and preprocess the overlapping areas of adjacent images; S3: Use the improved FAST algorithm based on spatial consistency constraints and coordinate constraints for accurate image registration; S4: Optimizing local splicing paths based on graph theory model and mean absolute error; S5: Use trigonometric weighting method for seamless image fusion; S6: Use multi-threading technology and the producer-consumer model to process steps S2 to S5 in parallel; S7: Output and store the stitching result.

2. The method according to claim 1, characterized in that: In step S1, the scanning preset information of the pathological section is read to obtain the server configuration information.

3. The method according to claim 1, characterized in that The step S2 comprises: Step S2.1: reading or receiving the reference image and the displacement image acquired by the CCD from the microscopic image set according to the scanning preset information, and obtaining the overlapping area of ​​the two; Step S2.2: Use Gaussian filtering to perform image smoothing and noise reduction in the overlapping area to reduce the impact of background noise in the weak texture image; Step S2.3: Adaptive histogram equalization is used to enhance the local contrast of the overlapping area after Gaussian filtering, thereby improving the detectability of subtle features in the weak texture image.

4. The method according to claim 1, characterized in that The step S3 comprises: Step S3.1: using the FAST algorithm to detect feature points in the adjacent overlapping areas after preprocessing to obtain a feature point set; Step S3.2: Use the BRIEF descriptor to describe the feature point set to obtain a feature descriptor set; Step S3.3: Use the KNN matching algorithm to find matching pairs between two feature descriptor sets; Step S3.4: Introduce similar triangles to constrain the spatial consistency of matching pairs and eliminate unreliable matching pairs; Step S3.5: Based on the matching pairs verified by the similar triangle constraint, RANSAC is used to calculate the transformation matrix between the two images to obtain the offset; Step S3.6: Introduce coordinate constraints to ensure that the offset is within a reasonable range; Step S3.7: Calculate the mean absolute error of the overlapping area corresponding to the current offset.

5. The method according to claim 1, characterized in that The step S4 comprises: based on the registration results and the mean absolute error of every two rows of images, using a graph theory model to optimize the local stitching path and calculate the global position coordinates of the image.

6. The method according to claim 1, characterized in that In step S5, the actual overlapping area of ​​the images adjacent to each other, that is, the fusion area, is calculated according to the global position coordinates, and the trigonometric function weight method is used to achieve pixel-level seamless fusion in the fusion area.

7. The method according to claim 1, characterized in that In step S6, multithreading technology and producer-consumer model are used to implement parallel processing of steps S2 to S5, thereby improving the overall splicing efficiency.

8. The method according to claim 1, characterized in that: In the step S7, according to the scanning preset information and the server configuration information, the result is stored during or after the stitching process to complete the stitching of all microscopic images.

9. A system for rapid stitching of weak texture microscopic images, characterized in that: The system comprises: Image preprocessing module, used to reduce noise and enhance images in overlapping areas, and improve the detectability of subtle features in weak texture images; Image registration module, which uses the improved FAST algorithm to register the overlapping areas of the preprocessed weak texture images; A path optimization module is used to optimize the stitching path of every two rows of images; Image fusion module, using trigonometric function weight method to perform image fusion; Multithreading module, used to process preprocessing, registration, path optimization and fusion modules in parallel; The storage and output module stores the stitched image and outputs the result after the stitching is completed.

10. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the processor executes the computer program, the method according to any one of claims 1 to 8 is implemented.

11. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and causes the computer to execute the method as claimed in any one of claims 1 to 8.

Citation Information

Cited By

  • Tissue digital pathological section generation method for lung biopsy through bronchoscope

    CN120427625A