Image splicing method, gene sequencing system and corresponding gene sequencer
Patent Information
- Application Number
- CN202280097456.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-02-11
AI Technical Summary
Existing image stitching methods are difficult to achieve high accuracy in gene sequencing and lack measurement standards, resulting in inaccurate stitching results.
By obtaining multiple images of the sample and template information of trajectory lines or trajectory points, pre-stitching is performed, the global template is derived, and the coordinates are adjusted according to the offset to achieve high-precision image splicing.
It achieves pixel-level splicing accuracy, improves the accuracy and anti-interference ability of image splicing, and is suitable for high-precision data processing in the field of life sciences.
Smart Images

Figure CN119422162A_ABST
Abstract
Description
Image splicing method, gene sequencing system and corresponding gene sequencer Technical Field
[0001] The present invention relates to the field of image processing, and more specifically, to an image splicing method, a corresponding gene sequencing system, a gene sequencer, a computer device, and a computer storage medium. Background Art
[0002] Gene sequencing refers to the analysis of the base sequence of a specific DNA fragment, namely the arrangement of adenine (A), thymine (T), cytosine (C), and guanine (G). These four bases carry four different fluorescent groups, which emit fluorescence of different wavelengths (colors) when excited. One of the commonly used sequencing methods currently is to identify the type of synthesized base by recognizing the fluorescence wavelength, thereby changing the base sequence. Second-generation sequencing technology uses a high-resolution microscopy system to capture fluorescent molecular images of DNA nanoballs (DNBs) on a sample (such as a gene sequencing chip). The fluorescent molecular image is sent to base recognition software to decode the image signal and obtain the base sequence. When observing the obtained base sequence using a high-power microscope, only a magnified image of a local area of the observed object can be obtained. In view of this, a continuous multiple-shot method is usually used to achieve the acquisition of optical signals for the entire sample. After data acquisition is completed, it is also necessary to obtain a complete and high-precision global sample image, which is of great significance for subsequent problem discovery and analysis.
[0003] Existing image stitching solutions typically use pixel values or feature points between images to perform operations such as alignment and fusion to complete the stitching process. However, most existing stitching methods are based on feature similarity, which results in a lack of measurement standards and makes it difficult to achieve high accuracy.
[0004] Therefore, there is a need to provide an improved image stitching method for stitching sample images and a corresponding gene sequencing system.
[0005] Summary of the Invention
[0006] The image stitching method and corresponding gene sequencing system provided by the present invention are intended to solve at least one of the above problems.
[0007] Specifically, according to a first aspect of the present invention, there is provided an image stitching method, the method comprising:
[0008] Acquiring a plurality of first images of a sample and template information of trajectory lines or trajectory points of the sample;
[0009] Pre-stitching the multiple first images to obtain pre-stitched coordinates of the multiple first images;
[0010] selecting at least one second image from the plurality of first images according to features of the trajectory line or trajectory point, and deriving a global template according to template information of the sample and pre-stitched coordinates of the second image; and
[0011] For a third image other than the second image in the plurality of first images, an offset between the pre-stitched coordinates of the third image and the corresponding template coordinates of the third image in the global template is calculated, and the coordinates of the third image are adjusted based on the offset to stitch together and generate a stitched image of the sample.
[0012] According to a second aspect of the present invention, a gene sequencing system is provided, comprising:
[0013] An image acquisition module, configured to acquire a plurality of first images of a sample and template information of a trajectory line or trajectory point of the sample;
[0014] An image pre-stitching module, configured to pre-stitch the plurality of first images to obtain pre-stitched coordinates of the plurality of first images;
[0015] a global template derivation module, configured to derive a global template based on at least one second image selected from the plurality of first images, and based on the template information of the sample and the pre-stitched coordinates of the second image; and
[0016] A stitched image generation module is used to calculate, for a third image other than the second image in the multiple first images, an offset between the pre-stitched coordinates of the third image and the corresponding template coordinates of the third image in the global template, and to adjust the coordinates of the third image based on the offset to stitch and generate a stitched image of the sample.
[0017] According to a third aspect of the present invention, a gene sequencer is provided, characterized in that the gene sequencer includes a processor, and the processor is configured to implement the above-mentioned image stitching method when executing a computer program stored in a memory.
[0018] According to a fourth aspect of the present invention, there is provided a computer device, characterized in that it comprises a memory and a processor, the memory storing a computer program, and the processor being configured to implement the above-mentioned image stitching method when executing the computer program.
[0019] According to a fifth aspect of the present invention, there is provided a non-volatile computer-readable storage medium having a computer program stored thereon, wherein the computer program is configured to implement the above-mentioned image stitching method when executed by a processor.
[0020] The image stitching method for stitching sample images of the present invention proposes a new stitching idea and provides a novel trajectory point and trajectory line detection algorithm. Specifically, the image stitching method of the present invention, based on the existing common image stitching algorithm, utilizes the unique trajectory line characteristics of the microscope image to construct an absolute reference system, and fine-tunes the aforementioned stitching results, which can ensure pixel-level stitching accuracy, thereby meeting the needs of business scenarios. In addition, the image stitching method of the present invention has high operating efficiency and strong anti-interference ability. With the increasing amount of data in the field of life sciences, its applicability is becoming more and more extensive, and it can become a reliable standard in the field of image stitching. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] FIG1 is a flow chart of an image stitching method according to one embodiment of the present invention;
[0022] FIG2 is an example of a single image captured by a microscope camera;
[0023] FIG3 is a schematic diagram of multiple images of a sample taken by a microscope camera;
[0024] FIG4 is a schematic diagram of a pre-stitching result in an image stitching process according to one embodiment of the present invention;
[0025] FIG5a is a schematic diagram showing the positional relationship between two first images adjacent in the row direction obtained by scanning in the horizontal direction during pre-stitching;
[0026] FIG5 b is a schematic diagram showing the positional relationship between two first images adjacent in the column direction obtained by scanning in the vertical direction during pre-stitching;
[0027] FIG6 is a schematic diagram illustrating a global template for stitching samples according to one embodiment of the present invention; and
[0028] FIG7 is a schematic diagram of a process for constructing a global template for stitching samples according to an embodiment of the present invention. DETAILED DESCRIPTION
[0029] In order to more clearly understand the above-mentioned purposes, features and advantages of the embodiments of the present invention, the present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that, in the absence of conflict, one or more features in the various embodiments of the present application can be combined with each other.
[0030] The following description sets forth many specific details to facilitate a full understanding of the embodiments of the present invention. The embodiments described are only some of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are also within the scope of protection of the embodiments of the present invention.
[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art in the art of the embodiments of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the embodiments of the present invention.
[0032] FIG1 is a flow chart of an image stitching method according to an embodiment of the present invention.
[0033] As shown in FIG1 , the image stitching method may include the following steps:
[0034] S101: Acquire a plurality of first images of a sample and template information of trajectory lines or trajectory points of the sample;
[0035] S102: Pre-stitching the multiple first images to obtain pre-stitching coordinates of the multiple first images;
[0036] S103: selecting at least one second image from the plurality of first images according to features of the trajectory line or trajectory point, and deriving a global template according to the template information of the sample and pre-stitched coordinates of the second image; and
[0037] S104: For a third image other than the second image in the multiple first images, calculate the offset between the pre-stitched coordinates of the third image and the corresponding template coordinates of the third image in the global template, and adjust the coordinates of the third image based on the offset to stitch and generate a stitched image of the sample.
[0038] FIG2 is an example of a single image of a sample captured by a microscope camera.
[0039] In this context, samples may include chips, mechanical structures, precision instruments, etc.; chips may include sample chips (e.g., biological sample chips) and computing chips; computing chips may include spatiotemporal chips, sequencing chips, etc. Therefore, the image stitching method of the present invention is not limited to stitching images of chips, but is also applicable to stitching images of samples such as various mechanical structures or precision instruments.
[0040] In one embodiment, for example, the sample can be a gene sequencing chip. As shown in Figure 2, the image captured of the sample can be, for example, a fluorescent image formed by the emission of light from a fluorescent group during the sequencing process. A microscope camera can be used to continuously photograph the sample to obtain multiple images of various parts of the sample. These multiple images can be stitched together to form a global image of the entire sample or a local image of the sample. In other words, the stitched image can include a global image of the sample or a local image of the sample.
[0041] In this article, "first image" may refer to a picture of a field of view (FOV or field of view) obtained by taking a single shot of a part of the sample by a microscope camera. During the sequencing process, several images can be taken of a part of a single sample in sequence. There may be several track lines distributed in the horizontal and vertical directions of the image of each field of view, and the intersection of the track lines is a track point (track cross, or "track intersection"). Track lines and track points can be converted to each other; track points can be obtained based on two intersecting track lines; track lines can be obtained based on collinear track points. The template information may include the index numbers of the multiple track lines on the sample. As known to those skilled in the art, the distribution pattern of the track lines on the sample has been specified at the beginning of the sample design. For example, assuming that there are 10 track lines in the vertical direction of the sample, the spacing between them can be, for example, 1, 2, 3, 4, 5, 4, 3, 2, and 1, respectively. Assuming that the position of the first trajectory line is the starting point (coordinate 0), the horizontal axis (x-axis) coordinates of the above 10 trajectory lines are 0, 1, 3, 6, 10, 15, 19, 22, 24, and 25. The index number in the sample template information can be associated with the arrangement of the trajectory lines in the sample. The index numbers of the above 10 trajectory lines can be artificially specified as 0, 1, 2, 3, 4, 5, 6, 7, 8, and 0 respectively.
[0042] In addition, the template information of the sample obtained in step S101 may also include periodicity. For example, for the 10 track lines in the vertical direction of the above sample, they may be extended to the left and right by one or more periods respectively. For example, the spacing between the trajectory lines formed by expanding one cycle on the left and right is 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1, 1, 2, 3, 4, 5, 4, 3, 2, 1. The horizontal axis (x-axis) coordinates of the 28 expanded trajectory lines are -25, -24, -22, -19, -15, -10, -6, -3, -1, 0, 1, 3, 6, 10, 15, 19, 22, 24, 25, 26, 28, 31, 35, 40, 44, 47, 49, 50, and their corresponding index numbers are 0, 1, 2, 3, 4, 5, 6, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 0.
[0043] It is worth noting that, generally speaking, the index number of the sample corresponding to a certain trajectory line is unique, and a certain index number on the sample may correspond to multiple trajectory lines. This is determined by the periodicity of the trajectory line design on the sample.
[0044] The microscope can capture an image of the sample by, for example, scanning the sample row by row or column by column. The spatial distribution of the multiple images after scanning can be as shown in FIG3 , where the multiple images can have, for example, n+1 columns and m+1 rows, including the image (r0, c0) from the first row and first column to the image (r1, c1) from the last row and last column. m ,c n ). For the image (r m-1 , c n-1 ), the image can have up to eight adjacent images. Furthermore, the microscope can also record the camera position information when capturing an image. The camera position information recorded for any image can then be used to determine the corresponding position of the image and its adjacent images.
[0045] FIG4 is a schematic diagram of a pre-stitching result of an image stitching method according to an embodiment of the present invention.
[0046] In the pre-stitching step of S102, multiple first images can be scanned, and the images of the left and right neighbors of the current first image can be determined using, for example, a 2-nearest neighbor method based on the scanning order or the camera position information when the image was captured, and then the offset and overlap between the first image and the left and right adjacent images can be determined. During the scanning process, the offset and overlap between adjacent first images can be obtained by preferably using a fast Fourier transform (FFT) or a scale-invariant feature transform (SIFT) in combination with the template information of the sample. Based on the offset and overlap between adjacent first images obtained during the image scanning process, the pre-stitching coordinates of the multiple first images can be obtained.
[0047] FIG5a is a schematic diagram showing the positional relationship between two first images adjacent in the row direction obtained by scanning in the horizontal direction during pre-splicing; FIG5b is a schematic diagram showing the positional relationship between two first images adjacent in the column direction obtained by scanning in the vertical direction during pre-splicing.
[0048] Specifically, Figures 5a and 5b respectively illustrate the deviation and overlap between adjacent first images obtained after scanning the first image in the horizontal and vertical directions. For horizontal scanning (see Figure 5a), the horizontal overlap distance between two adjacent row-wise images is referred to as the horizontal overlap, and the vertical offset distance is referred to as the vertical offset. Similarly, for vertical scanning (see Figure 5b), the vertical overlap distance between two adjacent column-wise first images is referred to as the vertical overlap, and the horizontal offset distance is referred to as the horizontal offset. After completing the horizontal and vertical scans, the deviation matrix A and overlap matrix B of the multiple first images in the corresponding directions can be obtained. Using the deviation matrix A and overlap matrix B, the spatial coordinates of each first image can be mapped, thereby completing the pre-stitched image of the multiple first images shown in Figure 4.
[0049] However, only pre-stitching the first image cannot achieve pixel-level accuracy, so it is necessary to further accurately adjust the coordinates of the first image in steps S103 and S104 on this basis.
[0050] In step S103, the selected second image (or reference image) may be the image with the most obvious trajectory features or the image with the most trajectory points among the plurality of first images. The second image may be, for example, the image highlighted in FIG3 and FIG4 ( m-1 , c n-1 ), and then the selected image (r m-1 , c n-1 ) performs trajectory detection and matches the spacing between adjacent detected trajectory lines with the spacing between trajectory lines specified during chip design, thereby determining the index number corresponding to the selected trajectory line in the second image. In other words, the index number corresponding to each trajectory line in the second image can be determined based on the distance between adjacent trajectory lines in the second image. Then, a global template can be derived based on the index number of the second image and the pre-stitched coordinates of the second image.
[0051] In one embodiment, as shown in FIG2 , since the tissue slices on the sample will cover the trajectory line, and some trajectory points may be revealed at the location of the tissue cavity, the probability of complete trajectory points appearing in an image is higher than that of complete trajectory lines. Therefore, the image with the most trajectory points may be preferably selected as the second image.
[0052] In one embodiment, an index number corresponding to each trajectory line in the second image is determined according to a distance between adjacent trajectory lines in the second image, and a global template is derived based on the index number of the second image and the pre-stitched coordinates of the second image.
[0053] FIG6 is a schematic diagram showing a global template for stitching samples according to an embodiment of the present invention; FIG7 is a schematic diagram showing a construction process of a global template for stitching samples according to an embodiment of the present invention.
[0054] Referring to the construction example of the global template shown in FIG7 , according to the obtained selected second image (r m-1 , c n-1 ) in the pre-stitching stage and the index number of the trajectory line can be obtained by performing a left-right bidirectional periodic expansion in the horizontal direction and a top-bottom bidirectional periodic expansion in the vertical direction to obtain the second image (r m-1 , c n-1 ) as the global template (or global reference system).
[0055] For all images except the selected second image (r m-1 , c n-1 ) can be divided into two categories, namely, coordinate adjustment for the third image containing the trajectory points and coordinate adjustment for the third image not containing the trajectory points.
[0056] Coordinate adjustment is performed on the third image containing the track points by adding the pre-stitched coordinates of each third image containing the track points to the unique offset of each third image containing the track points. The offset of the third image is the vector formed by the track point on the third image pointing to the template point in the global template corresponding to the track point on the third image. The offset, indicated by the arrow in the partially enlarged schematic diagram of Figure 6, represents the vector from the track point on the sample to the template line track point on the global template corresponding to the track point.
[0057] The determination of the unique offset may preferably be performed in the following manner:
[0058] Obtaining the respective offsets of each trajectory point in each of the third images containing the trajectory points, and selecting, for each of the third images, an offset having a median angle or a median distance among the offsets as the unique offset of the third image; or
[0059] Obtain the respective offsets of each trajectory point in each of the third images containing the trajectory points, sort the offsets according to their vector lengths, and select the offset at a preset sorting position as the unique offset of the third image.
[0060] The adjusted coordinates of the third image containing the track point may be obtained by adding the unique offset of each of the third images containing the track point to the respective unique offset of the third image containing the track point.
[0061] The coordinate adjustment of the third image that does not contain the track point can be performed using a neighbor adjustment method. The neighbor adjustment method includes: for each of the third images that do not contain the track point, the coordinate adjustment of the third image that does not contain the track point is performed based on the unique offset of the third image that contains the track point and is closest to the third image that does not contain the track point, as well as the deviation and overlap between the third image that does not contain the track point and the nearest third image that contains the track point.
[0062] Specifically, due to issues such as tissue coverage, chip feature contamination, and microscope camera quality, some images may not contain track points. In this case, the third image without track points can be aligned based on the deviation and overlap between the third image without track points and the adjacent or closest adjusted third image containing track points. It should be noted that the closest distance metric is Manhattan distance, not Euclidean distance.
[0063] The coordinate adjustment of the third image further includes performing seam fusion processing on adjacent third images, for example, a linear weighted fusion method may be used.
[0064] According to another aspect of the present invention, a gene sequencing system is further provided, characterized in that the gene sequencing system comprises:
[0065] An image acquisition module, configured to acquire a plurality of first images of a sample and template information of a trajectory line or trajectory point of the sample;
[0066] An image pre-stitching module, configured to pre-stitch the plurality of first images to obtain pre-stitched coordinates of the plurality of first images;
[0067] a global template derivation module, configured to derive a global template based on at least one second image selected from the plurality of first images, and based on the template information of the sample and the pre-stitched coordinates of the second image; and
[0068] A stitched image generation module is used to calculate, for a third image other than the second image in the multiple first images, an offset between the pre-stitched coordinates of the third image and the corresponding template coordinates of the third image in the global template, and to adjust the coordinates of the third image based on the offset to stitch and generate a stitched image of the sample.
[0069] In one embodiment, the offset of the third image is a vector formed by a trajectory point on the third image pointing to a template point in the global template corresponding to the trajectory point on the third image.
[0070] In one embodiment, the stitched image generation module is further configured to adjust the coordinates of the third images containing the track points by adding the pre-stitched coordinates of each of the third images containing the track points to the respective unique offset of the third image containing the track points.
[0071] In one embodiment, the stitched image generation module is further configured to obtain the unique offset by:
[0072] Obtaining the respective offsets of each of the trajectory points in each of the third images containing the trajectory points, and selecting, for each of the third images, an offset having a median angle or a median distance among the offsets as the unique offset of the third image; or
[0073] Obtain the respective offsets of each trajectory point in each of the third images containing the trajectory points, sort the offsets according to their vector lengths, and select the offset at a preset sorting position as the unique offset of the third image.
[0074] In one embodiment, the stitched image generation module is further configured to use a nearest neighbor adjustment method to adjust the coordinates of the third image that does not contain the trajectory point, and the nearest neighbor adjustment method includes:
[0075] For each of the third images not containing track points, the coordinates of the third image not containing track points are adjusted according to the unique offset of the third image containing track points that is closest to the third image not containing track points and the deviation and overlap between the third image not containing track points and the closest third image containing track points.
[0076] The features mentioned in the description of each embodiment of the image stitching method can also be extended and applied to the gene sequencing system of this article and the gene sequencer below. For the sake of simplicity, they are not described here in detail.
[0077] The present invention also provides a gene sequencer, characterized in that the gene sequencer includes a processor, and the processor is used to implement any one of the above-mentioned image stitching methods for stitching sample images when executing a computer program stored in a memory. It should be noted that the gene sequencer may include a chip platform, an optical system, and a liquid system. Among them, the chip platform can be used to load samples, the optical system can be used to acquire images, and the liquid system can be used to perform biochemical reactions using preset reagents. The processor is also used to execute the image stitching method and various software installed in the gene sequencer, such as an operating system and application display software. The processor includes but is not limited to a processor (Central Processing Unit, CPU), a microcontroller unit (Micro Controller Unit, MCU), and other devices for interpreting computer instructions and processing data in computer software.
[0078] The gene sequencer may further include a display screen and a memory. The memory and the display screen may be electrically connected to the processor, respectively. The display screen is mounted on the gene sequencer for displaying information. The memory may be a different type of storage device for storing various types of data. For example, it may be the memory or internal memory of the gene sequencer, or it may be a memory card externally connected to the gene sequencer, such as a flash memory, a SM card (Smart Media Card), an SD card (Secure Digital Card), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart memory card, a secure digital (SD) card, a flash card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device. The memory is used to store various types of data, such as various applications installed in the gene sequencer, data set and acquired by applying the above-mentioned image stitching method, and other information.
[0079] The present invention further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to implement any one of the above-mentioned image stitching methods when executing the computer program.
[0080] The present invention also provides a non-volatile computer-readable storage medium having a computer program stored thereon, wherein the computer program implements any of the above-mentioned image stitching methods when executed by a processor.
[0081] If the module / unit integrated in the gene sequencing system / gene sequencer / computer device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0082] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the gene sequencing system / gene sequencer, and uses various interfaces and lines to connect the various parts of the entire gene sequencing system / gene sequencer.
[0083] The memory is used to store the computer programs and / or modules. The processor implements the various functions of the gene sequencing system / gene sequencer by running or executing the computer programs and / or modules stored in the memory and accessing data stored in the memory. The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system, at least one application required for a function, and the like.
[0084] In the several specific embodiments provided by the present invention, it should be understood that the disclosed methods can be implemented in other ways. For example, the system implementation described above is merely illustrative. For example, the module division is merely a logical function division, and actual implementation may have other division methods.
[0085] It is obvious to those skilled in the art that the embodiments of the present invention are not limited to the details of the above exemplary embodiments, and that the embodiments of the present invention can be implemented in other specific forms without departing from the spirit or basic features of the embodiments of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the embodiments of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the embodiments of the present invention. Any figure mark in the claims should not be regarded as limiting the claims involved. Multiple units, modules or devices stated in the system, device or terminal claims may also be implemented by the same unit, module or device through software or hardware.
[0086] The above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention and are not intended to limit them. Although the embodiments of the present invention are described in detail with reference to the above preferred embodiments, those skilled in the art should understand that any modification or equivalent replacement of the technical solutions of the embodiments of the present invention should not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An image stitching method, characterized in that: The method comprises: Acquiring a plurality of first images of a sample and template information of trajectory lines or trajectory points of the sample; Pre-stitching the multiple first images to obtain pre-stitched coordinates of the multiple first images; selecting at least one second image from the plurality of first images according to features of the trajectory line or trajectory point, and deriving a global template according to template information of the sample and pre-stitched coordinates of the second image; and For a third image other than the second image in the plurality of first images, an offset between the pre-stitched coordinates of the third image and the corresponding template coordinates of the third image in the global template is calculated, and the coordinates of the third image are adjusted based on the offset to stitch together and generate a stitched image of the sample.
2. The image stitching method according to claim 1, wherein: The pre-stitching of the plurality of first images to obtain pre-stitched coordinates of the plurality of first images includes: The multiple first images are scanned, and pre-stitching coordinates of the multiple first images are obtained based on deviations and overlaps between adjacent first images obtained during the image scanning process.
3. The image stitching method according to claim 2, wherein: The acquired deviation amount and overlap amount between adjacent first images are obtained by scanning the multiple first images using fast Fourier transform or scale-invariant feature transform.
4. The image stitching method according to claim 1, wherein: The second image is an image having the most obvious trajectory line features or the most trajectory points among the multiple first images.
5. The image stitching method according to claim 1 or 4, characterized in that: The template information includes index numbers of multiple trajectory lines on the sample, and deriving a global template based on the template information of the sample and the pre-stitched coordinates of the second image includes: An index number corresponding to each trajectory line in the second image is determined according to a distance between adjacent trajectory lines in the second image, and a global template is derived based on the index number of the second image and the pre-stitched coordinates of the second image.
6. The image stitching method according to claim 1, wherein: The offset of the third image is a vector formed by the trajectory point on the third image pointing to the template point in the global template corresponding to the trajectory point on the third image.
7. The image stitching method according to claim 1, wherein: Adjusting the coordinates of the third image includes adjusting the coordinates of the third image containing the track point in the following manner: adding the pre-stitched coordinates of each of the third images containing the track point to the respective unique offset of the third image containing the track point.
8. The image stitching method according to claim 7, wherein: The unique offset is obtained as follows: Obtaining the respective offsets of each trajectory point in each of the third images containing the trajectory point, and selecting, for each of the third images, an offset having a median angle or a median distance among the offsets as the unique offset of the third image; or, Obtain the respective offsets of each trajectory point in each of the third images containing the trajectory points, sort the offsets according to their vector lengths, and select the offset at a preset sorting position as the unique offset of the third image.
9. The image stitching method according to claim 8, characterized in that: Adjusting the coordinates of the third image based on the offset further includes adjusting the coordinates of the third image that does not contain the trajectory point using a nearest neighbor adjustment method, wherein the nearest neighbor adjustment method includes: For each of the third images not containing track points, the coordinates of the third image not containing track points are adjusted according to the unique offset of the third image containing track points that is closest to the third image not containing track points and the deviation and overlap between the third image not containing track points and the closest third image containing track points.
10. The image stitching method according to claim 1, wherein: The coordinate adjustment of the third image further includes performing seam fusion processing on adjacent third images.
11. A gene sequencing system, characterized in that: The gene sequencing system comprises: An image acquisition module, configured to acquire a plurality of first images of a sample and template information of a trajectory line or trajectory point of the sample; An image pre-stitching module, configured to pre-stitch the plurality of first images to obtain pre-stitched coordinates of the plurality of first images; a global template derivation module, configured to derive a global template based on at least one second image selected from the plurality of first images, and based on the template information of the sample and the pre-stitched coordinates of the second image; and A stitched image generation module is used to calculate, for a third image other than the second image in the multiple first images, an offset between the pre-stitched coordinates of the third image and the corresponding template coordinates of the third image in the global template, and to adjust the coordinates of the third image based on the offset to stitch and generate a stitched image of the sample.
12. The gene sequencing system according to claim 11, characterized in that: The offset of the third image is a vector formed by a trajectory point on the third image pointing to a template point in the global template corresponding to the trajectory point on the third image.
13. The gene sequencing system according to claim 11, characterized in that: The stitched image generation module is further configured to adjust the coordinates of the third images containing the track points by adding the pre-stitched coordinates of each of the third images containing the track points to the respective unique offset of the third image containing the track points.
14. The gene sequencing system according to claim 13, characterized in that: The stitched image generation module is further configured to obtain the unique offset by: Obtaining the respective offsets of each of the trajectory points in each of the third images containing the trajectory points, and selecting, for each of the third images, an offset having a median angle or a median distance among the offsets as the unique offset of the third image; or, Obtain the respective offsets of each trajectory point in each of the third images containing the trajectory points, sort the offsets according to their vector lengths, and select the offset at a preset sorting position as the unique offset of the third image.
15. The gene sequencing system according to claim 11, characterized in that: The spliced image generation module is further configured to use a nearest neighbor adjustment method to adjust the coordinates of the third image that does not contain the trajectory point, and the nearest neighbor adjustment method includes: For each of the third images not containing track points, the coordinates of the third image not containing track points are adjusted according to the unique offset of the third image containing track points that is closest to the third image not containing track points and the deviation and overlap between the third image not containing track points and the closest third image containing track points.
16. A gene sequencer, characterized in that: The gene sequencer includes a processor, and the processor is configured to implement the image stitching method according to any one of claims 1 to 10 when executing a computer program stored in a memory.
17. A computer device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor is configured to implement the image stitching method according to any one of claims 1 to 10 when executing the computer program.
18. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that: The computer program is configured to implement the image stitching method according to any one of claims 1 to 10 when executed by a processor.