High-order aberration elimination and image seamless splicing method
By calculating the average aberration of the segmented matrix sequence and performing row, column, and diagonal compensation, the image distortion problem caused by high-order aberrations in optical microscopes is solved, and zero-overlap image stitching and efficient imaging are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YANGTZE DELTA REGION INST OF TSINGHUA UNIV ZHEJIANG
- Filing Date
- 2026-03-26
- Publication Date
- 2026-07-03
AI Technical Summary
Existing technologies suffer from image distortion caused by higher-order aberrations in optical microscopes, which is particularly evident in large-field-of-view stitched images. Furthermore, traditional methods require additional overlapping operations, leading to wasted resources or insufficient feature points, making it difficult to effectively eliminate aberrations.
By dividing the image into a matrix sequence, calculating the evaluation coefficient value of each dividing matrix, selecting the dividing region with the smallest coefficient, calculating the average aberration value and subtracting it, and combining row compensation, column compensation and diagonal compensation, seamless stitching is achieved, aberrations are eliminated and the image is stitched together.
It achieves zero-overlap image stitching, improves imaging quality and efficiency, eliminates image distortion, is suitable for large field-of-view optical microscopy imaging of various samples, and is easy to operate.
Smart Images

Figure CN122335533A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optical microscopy imaging, image processing and large field-of-view image stitching technology, and specifically relates to a method for high-order aberration elimination and seamless image stitching. Background Technology
[0002] Biological cells are the basic structural and functional units of living organisms, and optical microscopes are the core equipment for cell imaging. Limited by the single field of view, they are usually combined with a three-dimensional moving platform to achieve large field-of-view image stitching for cell detection, counting, sorting, and precise manipulation.
[0003] However, during the use of optical microscopes, the combined lens system systematically introduces higher-order aberrations, resulting in image distortion in a single field of view. This distortion causes the image shape to become warped, especially at the edges, where noticeable indentations appear, typically as abrupt blacks or bright areas. In large-field-of-view stitched images, such as 5×5 stitched images, the image distortion caused by aberrations is particularly pronounced, especially at the edges between stitched images, where the blacks or bright areas are more visually obvious compared to a single field of view.
[0004] Traditional image distortion reduction methods require additional image acquisition overlap operations. This involves capturing a single field-of-view image while maintaining the original field of view, leaving overlapping portions on the top, bottom, left, and right sides of the image. This ensures that every adjacent pair of images has overlapping data. Based on this overlapping data, common sample data can be calculated relatively accurately, allowing for the estimation of aberration values. Subtraction of these values can then effectively reconstruct a large field-of-view stitched image. However, this method has drawbacks. First, it requires additional overlap operations. Since the field of view captured by most cameras is valuable, excessive overlap can be wasteful, requiring more stitching to achieve the original total field of view. Second, insufficient overlap may result in insufficient feature points being captured in the overlapping portions, necessitating the design of additional optimization algorithms to effectively eliminate aberrations. Summary of the Invention
[0005] The main objective of this invention is to provide a high-order aberration elimination and seamless image stitching method, aiming to eliminate image distortion problems in zero-overlapping, large-field-of-view stitched images. This method involves dividing the image into a matrix sequence, calculating the evaluation coefficient value of each segmentation matrix, obtaining the segmentation region with the smallest coefficient through sorting, calculating the average aberration value and subtracting it to obtain the background-free segmentation matrix, and achieving seamless stitching of the segmentation matrices through row compensation, column compensation, and diagonal compensation. This invention achieves aberration elimination and seamless stitching of zero-overlapping images captured by a three-axis optical microscopy system, improving the imaging quality and efficiency of large-field-of-view images. This invention features simple operation and wide applicability, and has broad application scenarios, especially in the fields of optical microscopy and field-of-view stitching.
[0006] To achieve the above objectives, this invention provides a high-order aberration elimination and seamless image stitching method, applied to a three-axis optical microbial sample detection system, comprising the following steps: S100, Image Reading and Matrix Separation: Read large field-of-view stitched image data, convert the image into a grayscale matrix, divide the sub-matrix according to the number of stitched rows and columns, expand the matrix and pad zeros for non-square matrix images to form a square matrix-shaped separation matrix. S200, Higher-order aberration elimination: Preprocess each segmentation matrix, obtain coefficient ranking through coefficient evaluation, select the background area and calculate the average aberration of the background area, subtract the average aberration from all segmentation matrices to achieve image aberration elimination, and update the new segmentation matrix data. S30. Seamless Image Lamination: Starting from the first row and first column submatrix, perform row compensation, column compensation and diagonal compensation in sequence, iterate to complete the full image compensation, and output a large field of view image after seamless stitching.
[0007] As a further preferred embodiment of the above technical solution, the image reading and matrix segmentation step in step S100 specifically includes: S101: Reads a 24-bit RGB image, converts it to an 8-bit grayscale image, and then converts it to matrix data. The RGB to grayscale conversion results in a matrix of size [size missing]. N × M Based on the field-of-view stitching, the image matrix is divided into... r OK, c The column submatrix, each submatrix having a pixel size of [value missing]. N / r × M / c Pixel; S102: Comparison r and c The value, if r = c If the submatrix group generated by S101 is used to construct a square matrix partitioning matrix, then the matrix is expanded and zeros are added. S103: If r ≠ c Then let rc for r and c The maximum value of the image matrix is used to expand the image matrix to... rc OK, rc The submatrix of the column, and the values of the extra submatrix are set to 0; S104: Assign the submatrix to the partition matrix I i+1,j+1 The pixel size of each separator matrix is N / r × M / c Pixel.
[0008] As a further preferred embodiment of the above technical solution, the higher-order aberration elimination step in step S200 specifically includes: S201: For the separating matrix I i+1,j+1 Preprocessing is performed, and each partition matrix I is obtained based on the least squares algorithm. i+1,j+1 Fifth-order surface fitting coefficients U The fitting polynomial matrix is S, based on the obtained surface fitting coefficients. U Given a polynomial matrix S, obtain the aberration fitting surface for each separator matrix. A i+1,j+1 Separating matrix I i+1,j+1 Subtracting the aberration fitting surface yields the aberration preprocessing result I'. i+1,j+1 ; S202: Calculate the preprocessing result I' for each aberration. i+1,j+1 The MMASD value, where MMASD represents the maximum value minus the minimum value minus the mean minus the standard deviation for each matrix; S203: Preprocess each aberration result I' i+1,j+1 MMASD value returned r OK, c Column matrix, and compare r OK, c The MMASD value matrix of the columns is sorted from low to high; S204: Sort the MMASD values from low to high, and select the region with the lowest value as the background region based on the number of input background regions; S205: Extract the aberrations of the selected background area, average them, and define the average aberration A. mean ; S206: Separate matrix I i+1,j+1 Subtract the mean aberration A mean And update to the new separator matrix data I i+1,j+1 ,set up t =0.
[0009] As a further preferred technical solution to the above technical solution, step S30, the image loop seamless stitching step, specifically includes: S300: For the partition matrix I i+1,j+1 Perform the line compensation step; S310: For the partition matrix I i+1,j+1 Perform the compensation steps; S320: For the partition matrix I i+1,j+1 Perform diagonal compensation steps; S330: Decision, determining the number of iterations in the loop. t Is it equal to rc-2, if not equal, then perform operation S340 and return to the loop from S300 to S320; if equal, then perform operation S350. S340: t = t +1, Update t The value is returned, and the loop from S300 to S320 is repeated. S350: Update the partition matrix I i+1,j+1 Return to the large field-of-view matrix I; S360: Returns a submatrix of the large field-of-view matrix that is identical to the original image data. r lines and c The sub-matrix is generated and transmitted as a processed image for display.
[0010] As a further preferred technical solution to the above technical solution, step S300 separates the matrix I. i+1,j+1 The specific steps for performing line compensation include: S301: With the updated I t+1,t+1 For the initial submatrix, i =0: rc -2- t , get I t+1+i,t+1 The last line of data; S302: Obtain I t+2+i,t+1 The first row of data; S303: I t+2+i,t+1 The first row of data and I t+1+i,t+1 Subtract the last row of data and take the average; S304: Update submatrix I using the average value as the compensation value. t+2+i,t+1 The data value, for i =0: rc -2- t The row matrices are used to achieve compensation.
[0011] As a further preferred technical solution to the above technical solution, step S310 separates the matrix I. i+1,j+1 The specific steps for column compensation include: S311: With the updated I t+1,t+1 For the initial submatrix, j =0: rc -2- t , get I t+1,t+1+j The last column of data; S312: Get I t+1,t+2+j The first column of data; S313: I t+1,t+1+j The first column of data and I t+1,t+2+j Subtract the last column of data and take the average; S314: Update submatrix I using the average value as the compensation value. t+1,t+2+j The data value, for j =0: rc -2- t The column matrices are used to achieve compensation.
[0012] As a further preferred technical solution to the above technical solution, step S320 separates the matrix I. i+1,j+1 The specific steps for performing diagonal compensation include: S321: With the updated I t+1,t+1 For the initial submatrix, t =0: rc -2, get I t+1,t+2 The last line of data and I t+2,t+2 Subtract the first row of data and take the average; S322: With the updated I t+1,t+1 For the initial submatrix, t =0: rc -2, get I t+2,t+1 The last column of data and I t+2,t+2 Subtract the data in the first column and take the average; S323: Add the average value obtained in S321 to the average value obtained in S322, and then calculate the average value again; S324: Use the average value obtained in S323 as the compensation amount, compensation submatrix I t+2,t+2 This achieves diagonal compensation.
[0013] As a further preferred embodiment of the above technical solution, the triaxial optical microbial sample detection system includes: Light source, emitting coaxial white light; An image receiving system with a CCD camera is used to receive images of biological samples and transmit them to a computer; The beam splitter has a transmission to reflection ratio of 50:50. The computer, equipped with image stitching software, stitches together images transmitted from the image receiving system into a large field-of-view image, and connects it to a three-axis displacement platform to enable the displacement platform to... x , y And precise movement along the z-axis; Microlens group provides microscopic magnification function; A three-axis displacement platform, based on computer settings, provides precise... x , y And precise z-axis movement, which is used to achieve focused imaging of biological samples.
[0014] The beneficial effects of this invention are as follows: 1. Supports zero-overlap image stitching, eliminating the need for prior overlapping acquisition, fully utilizing the camera target surface, and improving imaging efficiency.
[0015] 2. The method employs quintic surface fitting and MMASD background selection, resulting in high aberration elimination accuracy and stable operation.
[0016] 3. Through row, column, and diagonal cyclic compensation, completely seamless splicing is achieved, with no obvious boundaries or light and dark seams.
[0017] 4. It has a fast processing speed and wide applicability, and can be used for optical microscopy with a large field of view imaging of various samples such as resolution plates, wafers, and biological cells. Attached Figure Description
[0018] Figure 1 This invention is a three-axis optical microbial sample detection system.
[0019] Figure 2 This invention is based on a three-axis optical microscopy system to capture zero-overlapping images of biological samples, eliminates higher-order aberrations through aberration fitting, and achieves seamless cyclic stitching algorithm steps.
[0020] Figure 3 This is the input image before the 5×5 large field-of-view stitching of this invention is processed.
[0021] Figure 4 This is a 3D display of the input image before processing by the 5×5 large field-of-view stitching of this invention.
[0022] Figure 5 The images and MMASD values of each sub-matrix obtained by the 5×5 large field-of-view stitching high-order aberration elimination preprocessing of this invention are shown.
[0023] Figure 6 This is a three-dimensional display of the average aberration information of the 5×5 submatrix of the present invention.
[0024] Figure 7 This is a comparison diagram of the edge intercepts for row compensation, column compensation, and diagonal compensation of the submatrix in this invention.
[0025] Figure 8 This is the output image after the 5×5 large field-of-view stitching process of this invention.
[0026] Figure 9 This is a three-dimensional display of the output image after the 5×5 large field-of-view stitching process of this invention.
[0027] Figure 10 This is the present invention. Figure 4 and Figure 6 Comparison of values at the R-R' cutoff line.
[0028] Figure 11 This is the present invention. Figure 4 and Figure 6 Comparison of values at the C-C' cutoff line.
[0029] Figure 12 This is the input image before the 9×7 large field-of-view stitching of this invention was processed.
[0030] Figure 13 This invention provides a 9×7 large field-of-view stitched zero-filling image.
[0031] Figure 14 This is the output image after the 9×7 large field-of-view stitching process of this invention.
[0032] The reference numerals in the attached figures include: 1. Light source; 2. Image receiving system with CCD (Charge Coupled Device) camera; 3. Beam splitter; 4. Computer; 5. Microlens group; 6. Three-axis displacement platform. Detailed Implementation
[0033] The following description is intended to disclose the present invention and enable those skilled in the art to implement it. The preferred embodiments described below are merely examples, and other obvious variations will occur to those skilled in the art. The basic principles of the invention defined in the following description can be applied to other embodiments, modifications, improvements, equivalents, and other technical solutions that do not depart from the spirit and scope of the invention.
[0034] In the preferred embodiments of the present invention, those skilled in the art should note that the image stitching software and the like involved in the present invention can be considered as prior art.
[0035] Preferred embodiment.
[0036] like Figure 2 As shown, this invention discloses a high-order aberration elimination and seamless image stitching method, applied to a three-axis optical microbial sample detection system, comprising the following steps: S100, Image Reading and Matrix Separation: Read large field-of-view stitched image data, convert the image into a grayscale matrix, divide the sub-matrix according to the number of stitched rows and columns, expand the matrix and pad zeros for non-square matrix images to form a square matrix-shaped separation matrix. S200, Higher-order aberration elimination: Preprocess each segmentation matrix, obtain coefficient ranking through coefficient evaluation, select the background area and calculate the average aberration of the background area, subtract the average aberration from all segmentation matrices to achieve image aberration elimination, and update the new segmentation matrix data. S30. Seamless Image Lamination: Starting from the first row and first column submatrix, perform row compensation, column compensation and diagonal compensation in sequence, iterate to complete the full image compensation, and output a large field of view image after seamless stitching.
[0037] Preferably, the image reading and matrix segmentation steps in step S100 specifically include: S101: Reads a 24-bit RGB image, converts it to an 8-bit grayscale image, and then converts it into matrix data. The coefficients for converting RGB to grayscale are 0.2989, 0.5870, and 0.1140, respectively. The matrix size is... N × M Based on the field-of-view stitching, the image matrix is divided into... r OK, c The column submatrix, each submatrix having a pixel size of [value missing]. N / r × M / c Pixels. For example, in a 5x5 field of view stitching, the total pixel size of the stitched image is 1025x1280 pixels, and the size of each sub-matrix is 205x256 pixels; in a 9x7 field of view stitching, the total pixel size of the stitched image is 1323x1281 pixels, and the size of each sub-matrix is 147x183 pixels.
[0038] S102: Comparison r and c The value, if r = c If the submatrix group generated by S101 can be used to construct a square matrix partitioning matrix, then the matrix needs to be expanded and zeros padded.
[0039] S103: If r ≠ c Then let rc for r and c The maximum value of the image matrix is used to expand the image matrix to... rc OK, rc The submatrix of the column, and the values of the extra submatrix are set to 0.
[0040] S104: Assign the submatrix to the partition matrix I i+1,j+1 ,in i , j =0: rc -1, the pixel size of each separator matrix is N / r × M / c Pixel.
[0041] Furthermore, such as Figure 3 and Figure 4 The image shown is a 5x5 row stitched image of the field of view and its 3D display. The total pixel size of the stitched image is 1025x1280 pixels, and the size of each sub-matrix is 205x256 pixels. S101 converts the stitched image of the field of view into an 8-bit grayscale image. The expression for grayscale image I is: I = 0.2989 × I R +0.5870×I G +0.1140×I B (1); Among them I R I G and I B , respectively, represent the layers represented by RGB in the 24-bit image.
[0042] Convert grayscale image I to r =5 lines c =5 columns, because r = c ,but rc =5.
[0043] Separation Matrix I i+1,j+1 for: I i+1,j+1 =I[ Ni / r +1: N ( i +1) / r , Mj / c +1: M ( j +1) / c ],in i , j =0:4(2) Each separator matrix I i+1,j+1 The size is 205×256 pixels.
[0044] Preferably, step S200, the higher-order aberration elimination step, specifically includes: S201: For the separating matrix I i+1,j+1 Preprocessing is performed, and each partition matrix I is obtained based on the least squares algorithm. i+1,j+1 Fifth-order surface fitting coefficients U The fitting coefficients U =[ u 1, u 2, u 3, u 4, u 5, u 6, u 7, u 8, u 9, u 10 , u 11 , u 12 , u 13 , u14 , u 15 , u 16 , u 17 , u 18 , u 19 , u 20 , u 21 ] T The fitted polynomial matrix is S =[1, x , y , x 2 , xy , y 2 , x 3 , x 2 y , xy 2 , y 3 , x 4 , x 3 y , x 2 y 2 , xy 3 , y 4 , x 5 , x 4 y , x 3 y 2 , x 2 y 3 , xy 4 , y 5 Based on the obtained surface fitting coefficients. U Given a polynomial matrix S, obtain the aberration fitting surface for each separator matrix. A i+1,j+1 Separating matrix I i+1,j+1 Subtracting the aberration fitting surface yields the aberration preprocessing result I'. i+1,j+1 .
[0045] Furthermore, such as Figure 5 As shown, step S201 modifies the separation matrix I. i+1,j+1 A fifth-order term surface fitting was performed to obtain each separating matrix I. i+1,j+1 Fit coefficient U i+1,j+1 for: U i+1,j+1 =[ S T S ][ S T I i+1,j+1 (3); Fitted surface A i+1,j+1 The relation is: A i+1,j+1 = SU i+1,j+1 (4); Therefore, the separation matrix I i+1,j+1 Subtracting the aberration fitting surface yields the aberration preprocessing result I'. i+1,j+1 for: I' i+1,j+1 =I i+1,j+1 - A i+1,j+1 (5); S202: Calculate the preprocessing result I' for each aberration. i+1,j+1 The MMASD value is used to evaluate the degree of unevenness of a plane. The higher the MMASD value, the higher the degree of unevenness of the plane, and vice versa.
[0046] S203: Preprocess each aberration result I' i+1,j+1 MMASD value returned r OK, c In the column matrix, preferably, the zero-value submatrix introduced by the zero-padding operation in S102 has an MMASD value of 0, therefore the zero-value matrix does not participate in the MMASD value comparison. r OK, c The MMASD value matrix of the columns is sorted from low to high.
[0047] S204: Based on the MMASD values sorted from low to high, and based on the number of background regions in the input, the region with the lowest value is selected as the background region. As can be seen from S202, a lower MMASD value represents a flat plane, and thus it is used as the background region.
[0048] Furthermore, such as Figure 5As shown, step S202 calculates the preprocessing result I' for each aberration. i+1,j+1 The MMASD value, where the MMASD value is represented as: MMASD{I' i+1,j+1}=max{I' i+1,j+1}-min{I' i+1,j+1}-μ{I' i+1,j+1}-σ{I' i+1,j+1}(6) Where μ{} represents the mean of the matrix and σ{} represents the standard deviation of the matrix.
[0049] Furthermore, step S203 returns the MMASD value as r OK, c A column matrix, represented as: [28.384,37.027,103.936,76.933,49.418, 55.903, 111.378, 121.488, 115.475, 96.085, 104.402, 100.078, 129.604, 98.938, 145.593, 27.421, 126.843, 99.112, 105.648, 124.902, 97.734, 149.216, 133.510, 58.832, 119.643).
[0050] Furthermore, in step S204, the MMASD values are sorted from low to high. In this case, the number of input background areas is 3. According to the MMASD value matrix obtained in S203, the three smallest MMASD values are I' 1,1 、I' 4,1 and I' 1,2 Regions (28.384, 27.421, and 37.027), observe I' 1,1 、I' 4,1 and I' 1,2 The three areas also show relatively high image flatness, which verifies the use of the MMASD value in step S202 to evaluate the degree of unevenness of the plane.
[0051] S205: Extract the aberrations of the selected background area, average them, and define the average aberration. A mean .
[0052] S206: Separate matrix I i+1,j+1 Subtract the mean aberration A meanAnd update to the new separator matrix data I i+1,j+1 ,set up t =0.
[0053] Furthermore, the background region aberrations selected in step S205 are as follows: A 1,1 , A 4,1 and A 1,1 Mean aberration A mean It can be represented as: A mean =( A 1,1 + A 4,1 + A 1,1 ) / 3(7; Furthermore, such as Figure 6 The figure shows the average aberration obtained in step S205. A mean A 3D image obtained by stitching together submatrices.
[0054] Preferably, step S30, the image loop seamless stitching step, specifically includes: S300: For the partition matrix I i+1,j+1 Perform the compensation steps.
[0055] S310: For the partition matrix I i+1,j+1 Perform a series of compensation steps.
[0056] S320: For the partition matrix I i+1,j+1 Perform diagonal compensation steps.
[0057] S330: Decision-making t Is it equal to rc -2 ( rc -2 is the maximum number of rounds that must be stopped. For an rc×rc square matrix, the first compensation round compensates the first row and first column, then the diagonal (the matrix in the second row and second column) is also compensated. For example, for a 5×5 submatrix group, only 3 loops are needed to complete the traversal. If not equal, perform operation S340 and return to the loop from S300 to S320; if equal, perform operation S350.
[0058] S340: t = t +1, Update t The value is returned, and the loop from S300 to S320 is repeated. S350: Update the partition matrix I i+1,j+1Return to the large field-of-view matrix I; S360: Returns a submatrix of the large field-of-view matrix that is identical to the original image data. r lines and c The sub-matrix is generated and transmitted as a processed image for display.
[0059] Preferably, step S300 involves separating the matrix I. i+1,j+1 The specific steps for performing line compensation include: S301: With the updated I t+1,t+1 For the initial submatrix, i =0: rc -2- t , get I t+1+i,t+1 The last line of data.
[0060] S302: Obtain I t+2+i,t+1 The first row of data.
[0061] S303: I t+2+i,t+1 The first row of data and I t+1+i,t+1 Subtract the last row of data and take the average.
[0062] S304: Update submatrix I using the average value as the compensation value. t+2+i,t+1 The data value, for i =0: rc -2- t The row matrices are used to achieve compensation.
[0063] Furthermore, such as Figure 7 As shown in the submatrix row compensation section diagram, with I 1,1 and I 2,1 For example, steps S301 and S302 select I 1,1 The last line of data and I 2,1 From the first row of data, it can be seen that after higher-order aberration elimination, the difference between the two values is small. Step S303 subtracts the two rows of data and takes the average (the average is approximately -1.337). Step S304 uses the average as the compensation value for I. 2,1 Provide compensation and update I. 2,1 The value of . For i =0: rc -2- t This enables the cyclical updating of the entire row of the submatrix.
[0064] Preferably, step S310 involves separating the matrix I. i+1,j+1 The specific steps for column compensation include: S311: With the updated I t+1,t+1 For the initial submatrix, j =0: rc-2- t , get I t+1,t+1+j The last column of data.
[0065] S312: Get I t+1,t+2+j The first column of data.
[0066] S313: I t+1,t+1+j The first column of data and I t+1,t+2+j Subtract the last column of data and take the average.
[0067] S314: Update submatrix I using the average value as the compensation value. t+1,t+2+j The data value, for j =0: rc -2- t The column matrices are used to achieve compensation.
[0068] Furthermore, such as Figure 7 The submatrix column compensation cross-sectional diagram is shown in Figure I. 1,1 and I 1,2 For example, steps S311 and S312 select I 1,1 The last column of data and I 1,2 From the first column of data, it can be seen that after higher-order aberration elimination, the difference between the two values is small. Step S312 subtracts the two columns of data and takes the average (the average is approximately 0.292). Step S314 uses the average as the compensation value for I. 1,2 Provide compensation and update I. 1,2 The value of . For j =0: rc -2- t This enables the cyclical updating of entire columns of the submatrix.
[0069] Preferably, step S320 involves separating the matrix I. i+1,j+1 The specific steps for performing diagonal compensation include: S321: With the updated I t+1,t+1 For the initial submatrix, t =0: rc -2, get I t+1,t+2 The last line of data and I t+2,t+2 Subtract the first row of data and take the average.
[0070] S322: With the updated I t+1,t+1 For the initial submatrix, t =0: rc -2, get I t+2,t+1 The last column of data and I t+2,t+2 Subtract the first column of data and take the average.
[0071] S323: Add the average value obtained in S321 to the average value obtained in S322, and then calculate the average value again.
[0072] S324: Use the average value obtained in S323 as the compensation amount, compensation submatrix I t+2,t+2 This achieves diagonal compensation.
[0073] Furthermore, such as Figure 7 The diagonal compensation section diagram of the submatrix is shown below, with I 1,2 I 2,2 Group and I 2,1 I 2,2 Taking a group as an example. Step S321 selects I. 1,2 The last line of data and I 2,2 The first row of data is used to subtract the two rows of data and take the average (the average is approximately 2.380); step S322 selects I. 2,1 The last column of data and I 2,2 The first column of data is used to subtract the two columns of data and take the average (the average is approximately 7.472). Step S323 adds the two averages together and then averages them again, resulting in 4.926. Step S324 uses the average obtained in S323 as the compensation amount to compensate the submatrix I. 2,2 And update I 2,2 The data. For t =0: rc -2, cyclically update I t+2,t+2 The data is used to achieve diagonal compensation.
[0074] Furthermore, such as Figure 8 and Figure 9 The output image and its 3D display shown are compared. Figure 3 and Figure 4 The input image and its 3D display shown demonstrate that the proposed algorithm effectively suppresses aberrations and achieves good stitching results.
[0075] Furthermore, such as Figure 10 and Figure 11 The cross-section comparison diagram shown in this embodiment extracts the R-R' and C-C' sections of the input image, aberration, and output image for comparison. It can be seen that the aberration is effectively suppressed and seamless stitching is achieved.
[0076] Further improvements based on this embodiment: like Figure 12 As shown in the large field-of-view cell stitched image, in this embodiment, the number of stitched rows in the input image is... r =9, number of columns c At a magnification of 7.50x, the triaxial displacement platform provides x shaft andy Precise displacements of 101.87 μm and 126.82 μm along the axial direction. Because the number of rows in the stitched image is greater than the number of columns, therefore... rc =max( r , c =9. (For example) Figure 13 As shown, step S103 expands the matrix by adding two submatrices with values of 0 in the column direction of the input image.
[0077] Step S203 returns the MMASD value as r OK, c A column matrix, represented as: [140.306,135.322,132.176,123.929,149.426,126.457,132.354, 125.477, 133.322, 107.420, 127.131, 128.044, 144.522, 125.290, 127.506, 156.282, 171.334, 144.060, 124.534, 144.153, 163.182, 168.930, 162.108, 152.759, 145.255, 137.722, 152.547, 133.954, 153.183,124.644,169.229,154.134,146.266,133.161,160.071, 142.224, 122.443, 102.585, 132.309, 145.133, 132.863, 137.239, 133.810, 121.042, 139.044, 132.363, 136.792, 168.887, 144.478, 123.505, 171.773, 137.415, 137.120, 145.778, 132.790, 179.584, 174.537, 161.925, 139.303, 130.277, 160.850, 126.121, 108.512]. In this implementation example, the number of input background areas is 1. According to the MMASD value matrix obtained in S203, the minimum MMASD value is I'. 6,3 The region (102.585) is used as background aberration for subsequent steps.
[0078] like Figure 14The image shown is the output image of this algorithm. It can be observed that the proposed algorithm also achieves good aberration suppression even when the submatrix is not a square matrix, and also achieves good stitching results. The results indicate that the algorithm proposed in this invention has wide applicability and is easy to operate.
[0079] Preferably, such as Figure 1 As shown, the triaxial optical microbial sample detection system includes: Light source 1 emits coaxial white light; The image receiving system 2 with a CCD camera has a CCD target surface pixel size of 3.45μm and a target surface size of 0.71mm×0.88mm. It is used to receive biological sample images and transmit them to the computer 4. Beam splitter 3 has a transmission to reflection ratio of 50:50; Computer 4, equipped with image stitching software, stitches together images transmitted from image receiving system 2 into a large field-of-view image, and connects it to the three-axis displacement platform 6, enabling the displacement platform 6 to... x , y And precise movement along the z-axis.
[0080] Microlens group 5 provides 50x and 100x magnification.
[0081] The three-axis displacement platform 6 can provide precise [functions] based on the settings of the computer 4. x , y And precise movement along the z-axis, for example at 50x magnification, providing x shaft and y Precise displacements of 142.07 μm and 177.41 μm in the axial direction, and z-axis movement are used to achieve focused imaging of biological samples.
[0082] In this embodiment, when adjusting the magnification of the microlens group 5, the z-axis of the three-axis displacement platform 6 is adjusted to the point where the image is clearest (i.e., adjusting forward or backward will blur the image). The target surface size utilization rate of the image receiving system 2 can be appropriately adjusted according to the stitching scheme. For example, the 5×5 image can be stitched into a 9×7 image, thus appropriately reducing the target surface size utilization rate and adapting the three-axis displacement platform 6 to... x shaft and y Axis translation amount.
[0083] It is worth mentioning that the technical features such as image stitching software involved in this patent application should be regarded as prior art. The specific structure, working principle, and possible control methods and spatial arrangement methods of these technical features can be adopted using conventional choices in the field, and should not be regarded as the inventive point of this patent. This patent will not be further elaborated in detail.
[0084] For those skilled in the art, modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this invention should be included within the protection scope of this invention.
Claims
1. A high-order aberration elimination and seamless image stitching method, applied to a three-axis optical microbial sample detection system, characterized in that, Includes the following steps: S100, Image Reading and Matrix Separation: Read large field-of-view stitched image data, convert the image into a grayscale matrix, divide the sub-matrix according to the number of stitched rows and columns, expand the matrix and pad zeros for non-square matrix images to form a square matrix-shaped separation matrix. S200, Higher-order aberration elimination: Preprocess each segmentation matrix, obtain coefficient ranking through coefficient evaluation, select the background area and calculate the average aberration of the background area, subtract the average aberration from all segmentation matrices to achieve image aberration elimination, and update the new segmentation matrix data. S30. Seamless Image Lamination: Starting from the first row and first column submatrix, perform row compensation, column compensation and diagonal compensation in sequence, iterate to complete the full image compensation, and output a large field of view image after seamless stitching.
2. The method for high-order aberration elimination and seamless image stitching according to claim 1, characterized in that, The image reading and matrix segmentation steps in step S100 specifically include: S101: Reads a 24-bit RGB image, converts it to an 8-bit grayscale image, and then converts it to matrix data. The RGB to grayscale conversion results in a matrix of size [size missing]. N × M Based on the field-of-view stitching, the image matrix is divided into... r OK, c The column submatrix, each submatrix having a pixel size of [value missing]. N / r × M / c Pixel; S102: Comparison r and c The value, if r = c If the submatrix group generated by S101 is used to construct a square matrix partitioning matrix, then the matrix is expanded and zeros are added. S103: If r ≠ c Then let rc for r and c The maximum value of the image matrix is used to expand the image matrix to... rc OK, rc The submatrix of the column, and the values of the extra submatrix are set to 0; S104: Assign the submatrix to the partition matrix I i+1,j+1 The pixel size of each separator matrix is N / r × M / c Pixel.
3. The method for high-order aberration elimination and seamless image stitching according to claim 2, characterized in that, The higher-order aberration elimination steps in step S200 specifically include: S201: For the separating matrix I i+1,j+1 Preprocessing is performed, and each partition matrix I is obtained based on the least squares algorithm. i+1,j+1 Fifth-order surface fitting coefficients U The fitting polynomial matrix is S, based on the obtained surface fitting coefficients. U Given a polynomial matrix S, obtain the aberration fitting surface for each separator matrix. A i+1,j+1 Separating matrix I i+1,j+1 Subtracting the aberration fitting surface yields the aberration preprocessing result I'. i+1,j+1 ; S202: Calculate the preprocessing result I' for each aberration. i+1,j+1 The MMASD value, where MMASD represents the maximum value minus the minimum value minus the mean minus the standard deviation for each matrix; S203: Preprocess each aberration result I' i+1,j+1 MMASD value returned r OK, c Column matrix, and compare r OK, c The MMASD value matrix of the columns is sorted from low to high; S204: Sort the MMASD values from low to high, and select the region with the lowest value as the background region based on the number of input background regions; S205: Extract the aberrations of the selected background area, average them, and define the average aberration A. mean ; S206: Separate matrix I i+1,j+1 Subtract the mean aberration A mean And update to the new separator matrix data I i+1,j+1 ,set up t =0.
4. The method for high-order aberration elimination and seamless image stitching according to claim 3, characterized in that, Step S30, the image loop seamless stitching step, specifically includes: S300: For the partition matrix I i+1,j+1 Perform the line compensation step; S310: For the partition matrix I i+1,j+1 Perform the compensation steps; S320: For the partition matrix I i+1,j+1 Perform diagonal compensation steps; S330: Decision, determining the number of iterations in the loop. t Is it equal to rc -2, if not equal, then perform operation S340 and return to the loop from S300 to S320; if equal, then perform operation S350. S340: t = t +1, Update t The value is returned, and the loop from S300 to S320 is repeated. S350: Update the partition matrix I i+1,j+1 Return to the large field-of-view matrix I; S360: Returns a submatrix of the large field-of-view matrix that is identical to the original image data. r lines and c The sub-matrix is generated and transmitted as a processed image for display.
5. The method for high-order aberration elimination and seamless image stitching according to claim 4, characterized in that, Step S300 Separation Matrix I i+1,j+1 The specific steps for performing line compensation include: S301: With the updated I t+1,t+1 For the initial submatrix, i =0: rc -2- t , get I t+1+i,t+1 The last line of data; S302: Obtain I t+2+i,t+1 The first row of data; S303: I t+2+i,t+1 The first row of data and I t+1+i,t+1 Subtract the last row of data and take the average; S304: Update submatrix I using the average value as the compensation value. t+2+i,t+1 The data value, for i =0: rc -2- t The row matrices are used to achieve compensation.
6. The method for high-order aberration elimination and seamless image stitching according to claim 4, characterized in that, Step S310 Separation Matrix I i+1,j+1 The specific steps for column compensation include: S311: With the updated I t+1,t+1 For the initial submatrix, j =0: rc -2- t , get I t+1,t+1+j The last column of data; S312: Get I t+1,t+2+j The first column of data; S313: I t+1,t+1+j The first column of data and I t+1,t+2+j Subtract the last column of data and take the average; S314: Update submatrix I using the average value as the compensation value. t+1,t+2+j The data value, for j =0: rc -2- t The column matrices are used to achieve compensation.
7. The method for high-order aberration elimination and seamless image stitching according to claim 4, characterized in that, Step S320 Separation Matrix I i+1,j+1 The specific steps for performing diagonal compensation include: S321: With the updated I t+1,t+1 For the initial submatrix, t =0: rc -2, get I t+1,t+2 The last line of data and I t+2,t+2 Subtract the first row of data and take the average; S322: With the updated I t+1,t+1 For the initial submatrix, t =0: rc -2, get I t+2,t+1 The last column of data and I t+2,t+2 Subtract the data in the first column and take the average; S323: Add the average value obtained in S321 to the average value obtained in S322, and then calculate the average value again; S324: Use the average value obtained in S323 as the compensation amount, compensation submatrix I t+2,t+2 This achieves diagonal compensation.
8. A method for high-order aberration elimination and seamless image stitching according to any one of claims 1-7, characterized in that, The triaxial optical microbial sample detection system includes: Light source, emitting coaxial white light; An image receiving system with a CCD camera is used to receive images of biological samples and transmit them to a computer; The beam splitter has a transmission to reflection ratio of 50:
50. The computer, equipped with image stitching software, stitches together images transmitted from the image receiving system into a large field-of-view image, and connects it to a three-axis displacement platform to enable the displacement platform to... x , y And precise movement along the z-axis; Microlens group provides microscopic magnification function; A three-axis displacement platform, based on computer settings, provides precise... x , y And precise z-axis movement, which is used to achieve focused imaging of biological samples.