Image registration method and device, equipment and storage medium

Through multi-threaded parallel operation and eigenvalue calculation, combined with center of gravity method and fitted cross-line method, the problem of low base image registration efficiency in the second generation sequencing technology is solved, and efficient and accurate base information positioning and matching are achieved. allow.

CN119273720APending Publication Date: 2025-01-07SHENZHEN HUADA GENE INST
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310810694.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-04
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing image registration algorithm takes too long in the base image registration process in the second-generation sequencing technology, and further increases as the data volume increases, affecting efficiency.

Method used

The multi-threaded parallel operation method is used to divide the search area through template registration points, and the multi-threaded reduction summing algorithm is used to calculate the feature value, determine the pixel-level registration point, and determine the sub-pixel-level registration point through the center of gravity method and the fitted cross-line method. Improve registration efficiency.

Benefits of technology

It significantly improves the image registration efficiency of base images, achieves high-precision and efficient base information positioning, has anti-impact interference ability, and is suitable for different sequencing platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119273720A_ABST
    Figure CN119273720A_ABST
Patent Text Reader

Abstract

The invention provides an image registration method and device, equipment and a storage medium, and the method comprises the steps: obtaining a base picture, the base picture is a picture obtained by photographing a fluorescent dyed sequencing chip, and a plurality of template registration points are preset on the base picture; for each template registration point, multi-thread parallel operation is carried out on pixels in a search area corresponding to the template registration point to determine pixel-level registration points in the search area, and the search area corresponding to the template registration point is an area in a preset range with the template registration point as the center; and determining a sub-pixel-level registration point corresponding to the pixel-level registration point. According to the scheme, the search areas are divided for the base picture, and the multi-thread parallel operation is performed on each search area, so that the image registration efficiency of the base picture is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image registration, and in particular to a method, device, equipment and storage medium for image registration. Background Art

[0002] DNA sequencing technology has now developed into the second-generation sequencing technology. The core idea of ​​the second-generation sequencing technology is sequencing by synthesis, that is, determining the DNA sequence by capturing the markers at the newly synthesized ends.

[0003] Different fluorescent dyes will produce fluorescent molecular signals of different wavelengths when acting on a base, so the second-generation sequencing technology can use high-resolution microscopic imaging to obtain base images under the action of different fluorescent dyes, and the base sequence can be detected by decoding the fluorescent molecular signals in the base images.

[0004] In order to detect the base category through the second-generation sequencing technology, it is necessary to first analyze the fluorescent molecular energy of the base in different fluorescent dye action scenarios. This requires locating the coordinates of the same position in different scenes, which requires the use of image registration algorithms.

[0005] Figure 1 This is a flow chart of an existing image registration algorithm. The processing logic of the existing image registration algorithm is to extract, screen and match features of the entire image based on image preprocessing, and finally perform spatial transformation on the entire image.

[0006] With the development of sequencing technology, the amount of data in a base image is getting larger and larger, so it takes longer and longer to align the entire base image based on the existing image alignment algorithm. Summary of the invention

[0007] In view of the above-mentioned shortcomings of the prior art, the present invention provides a method, device, equipment and storage medium for image registration to improve the efficiency of base image registration in the second-generation sequencing technology.

[0008] The first aspect of the present application provides a method for image registration, comprising:

[0009] Obtaining a base picture, wherein the base picture is a picture obtained by photographing a fluorescently stained sequencing chip, and a plurality of template alignment points are preset on the base picture;

[0010] For each of the template registration points, multi-threaded parallel operations are performed on the pixels in the search area corresponding to the template registration point to determine the pixel-level registration point in the search area, and the search area corresponding to the template registration point is an area of ​​a preset range centered on the template registration point;

[0011] For each of the pixel-level registration points, a sub-pixel-level registration point corresponding to the pixel-level registration point is determined.

[0012] Optionally, performing multi-threaded parallel operations on pixels in a search area corresponding to the template registration point to determine a pixel-level registration point in the search area includes:

[0013] Using the multiple first threads associated with the search area, based on a multi-threaded reduction sum algorithm, calculate the characteristic value of each row of position points in the search area one by one, the position points corresponding to the positions for setting the fluorescent molecule carrier on the sequencing chip, and the position points including a preset number of pixels in the base picture;

[0014] Using a plurality of second threads associated with the search area, the characteristic values ​​of each column of position points in the search area are calculated one by one based on a multi-thread reduction summation algorithm; the number of the first threads and the number of the second threads are determined according to the size of the search area;

[0015] The position point where a row satisfying the row search condition and a column satisfying the column search condition intersect in the search area is determined as a pixel-level registration point in the search area, wherein the row search condition includes that the feature value of the row is greater than the feature value of the previous row and the feature value of the next row, and the previous row and the next row of the row are the two rows with the lowest feature values ​​in the search area, and the column search condition includes that the feature value of the column is greater than the feature value of the previous column and the feature value of the next column, and the previous column and the next column of the column are the two columns with the lowest feature values ​​in the search area.

[0016] Optionally, determining a sub-pixel level registration point corresponding to the pixel level registration point includes:

[0017] Determine the horizontal line and vertical line where the pixel-level registration point is located; wherein the horizontal line where the pixel-level registration point is located includes the row where the pixel-level registration point is located and the previous row and the next row, and the vertical line where the pixel-level registration point is located includes the column where the pixel-level registration point is located and the previous column and the next column;

[0018] Identify each luminous position point on the horizontal line and the vertical line according to a preset bright spot threshold; wherein the luminous position point refers to a position point whose grayscale value is greater than the bright spot threshold;

[0019] Determine the center of gravity of each of the light-emitting positions using the center of gravity method;

[0020] A sub-pixel horizontal line is obtained by fitting the centroid position of the light-emitting position point on the horizontal line, and a sub-pixel vertical line is obtained by fitting the centroid position of the light-emitting position point on the vertical line;

[0021] An intersection point of the sub-pixel horizontal line and the sub-pixel vertical line is determined as a sub-pixel registration point corresponding to the pixel-level registration point.

[0022] Optionally, after determining the center of gravity position of each of the light-emitting positions by using the center of gravity method, the method further includes:

[0023] Based on a statistical algorithm, light-emitting position points whose center of gravity positions do not meet preset boundary conditions are filtered out from the plurality of light-emitting position points.

[0024] Optionally, before determining, for each pixel-level registration point, a sub-pixel-level registration point corresponding to the pixel-level registration point, the method further includes:

[0025] According to the pixel values ​​of the pixel-level registration points, good points and bad points are identified from the pixel-level registration points, wherein the good points refer to the pixel-level registration points whose pixel values ​​are less than or equal to a preset bad point threshold, and the bad points refer to the pixel-level registration points whose pixel values ​​are greater than the bad point threshold;

[0026] The bad points are corrected according to the good points and the template registration points.

[0027] Optionally, the correcting the bad point according to the good point and the template registration point includes:

[0028] Searching for the good point within a preset correction range centered on the bad point;

[0029] If multiple good points in the horizontal direction and multiple good points in the vertical direction are searched, a correction position point different from the bad point is determined based on the fitting cross line method;

[0030] If multiple good points in the horizontal direction and multiple good points in the vertical direction are not found, a correction position point different from the bad point is determined based on the template registration point and a preset ratio;

[0031] The bad pixel is replaced by the corrected position point.

[0032] Optionally, after identifying good points and bad points from the pixel-level registration points according to the pixel values ​​of the pixel-level registration points, the method further includes:

[0033] For each of the template registration points, determining whether the number of good points in a quality detection area centered on the template registration point is greater than a quality detection threshold;

[0034] If the number of the good points in each of the quality detection areas is not greater than the quality detection threshold, it is determined that the base image is a low-quality image.

[0035] A second aspect of the present application provides an image registration device, comprising:

[0036] An obtaining unit, used for obtaining a base picture, wherein the base picture is a picture obtained by photographing a sequencing chip after fluorescence staining, and a plurality of template registration points are preset on the base picture;

[0037] A search unit is used to perform multi-threaded parallel operations on pixels in a search area corresponding to each template registration point to determine a pixel-level registration point in the search area, wherein the search area corresponding to the template registration point is an area of ​​a preset range centered on the template registration point;

[0038] A determination unit is used to determine, for each of the pixel-level registration points, a sub-pixel-level registration point corresponding to the pixel-level registration point.

[0039] A third aspect of the present application provides an electronic device, including a memory and a processor;

[0040] The memory is used to store computer programs;

[0041] The processor is used to execute the computer program, specifically to implement the image registration method provided in any one of the first aspects of the present application.

[0042] The fourth aspect of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the image registration method provided in any one of the first aspects of the present application.

[0043] The present application provides a method, device, equipment and storage medium for image registration, the method comprising: obtaining a base picture, which is a picture obtained by photographing a sequencing chip after fluorescent staining, and a plurality of template registration points are preset on the base picture; for each template registration point, performing multi-threaded parallel operations on the pixels in the search area corresponding to the template registration point to determine the pixel-level registration point in the search area, the search area corresponding to the template registration point is an area of ​​a preset range centered on the template registration point; determining the sub-pixel registration point corresponding to the pixel-level registration point. This solution divides the base picture into search areas, and performs multi-threaded parallel operations on each search area, thereby improving the image registration efficiency of the base picture. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0045] Figure 1A schematic diagram of an existing image registration process;

[0046] Figure 2 A flowchart of an image registration method provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of a base picture provided in an embodiment of the present application;

[0048] Figure 4 A schematic diagram of template registration points in a base image provided in an embodiment of the present application;

[0049] Figure 5 A characteristic schematic diagram of a dark line provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of calculating the characteristic values ​​of rows and columns in a search area provided by an embodiment of the present application;

[0051] Figure 7 A schematic diagram of a multi-threaded reduction and summation method provided in an embodiment of the present application;

[0052] Figure 8 A schematic diagram of a registration point determination provided in an embodiment of the present application;

[0053] Fig. 9 A schematic diagram of bad pixel correction provided in an embodiment of the present application;

[0054] Fig.10 A schematic diagram of determining a sub-pixel registration point provided in an embodiment of the present application;

[0055] Fig.11 A schematic diagram of a sub-pixel registration point provided in an embodiment of the present application;

[0056] Fig.12 A schematic diagram of a grid point provided in an embodiment of the present application;

[0057] Fig.13 A schematic diagram of the structure of an image registration device provided in an embodiment of the present application;

[0058] Fig.14 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] In response to the problems in the background technology, this application proposes a high-precision GPU parallel second-generation sequencing image registration algorithm based on point features, which can achieve high accuracy and efficiency in the positioning and registration of base information graphs of different sequencing platforms. The algorithm is real-time, efficient and has strong resistance to impurity interference (robustness).

[0061] The program may include the following steps:

[0062] Calculate the input image: Based on the prior information of the chip template, give the center of the 9*9 rectangular search area;

[0063] Each area in the 9*9 rectangular area uses GPU multithreading to calculate the horizontal and vertical features, and the pixel-level registration point is obtained from the smallest intersection position of the horizontal and vertical features;

[0064] Based on the prior information of the chip template, the registration points are classified into good and bad points, and then the bad points are corrected according to the distance and gray value information;

[0065] Using 9*9 pixel-level registration points as reference, GPU multithreading searches for DNBs on the horizontal and vertical intersection lines of each point, filters the DNBs, and corrects the centroids; fits the corrected horizontal and vertical DNB centroids to obtain sub-pixel-level registration points;

[0066] Derive the outermost positioning points to complete the positioning of the input image;

[0067] According to the number of target points in the template, the grid is divided equally to locate the sub-pixel position of each target point.

[0068] The image registration method provided in the embodiment of the present application can be used for positioning and registering fluorescent molecules in images generated by a sequencer based on the second-generation sequencing technology.

[0069] The following is a detailed description with reference to the accompanying drawings.

[0070] See also Figure 2 , is a flowchart of an image registration method provided in an embodiment of the present application, and the method may include the following steps.

[0071] S201, obtaining a base picture.

[0072] The base image is a picture obtained by photographing the sequencing chip after fluorescence staining, and multiple template alignment points are preset on the base image.

[0073] See also Figure 3 , which is a schematic diagram of a base picture provided in an embodiment of the present application.

[0074] In the second generation sequencing technology, fluorescent molecules are fixedly arranged on the sequencing chip. Through special design and processing, some positions can be made to have no fluorescence. When more than 25% of the fluorescent molecules (balanced among the four bases) emit light at random positions, these non-luminescent positions stand out, forming a Figure 3 The dark line features shown. The dark line is partially enlarged (see Figure 3 (a local magnified image) shows that the line is composed of three fluorescent molecular clusters, with a bright spot in the middle and dark spots on both sides. In the local range within the dark wireframe, it can be roughly considered that the imaging distortion is negligible and the fluorescent molecules are evenly distributed. When the points where the dark lines intersect, that is, the four corners of each local area, are obtained, the positions of all fluorescent molecular clusters can be obtained by drawing an evenly distributed grid. The purpose of this solution is to provide a solution for locating the high-precision position of the dark line intersection points.

[0075] In step S201 , the base image may be copied to a cache (GPU-Memory) of a GPU (graphics processing unit) so as to utilize the GPU to execute subsequent steps.

[0076] S202, multi-threaded search for pixel-level registration points in each search area.

[0077] Step S202 is equivalent to: for each template registration point, performing multi-threaded parallel operations on the pixels in the search area corresponding to the template registration point to determine the pixel-level registration point in the search area.

[0078] The search area corresponding to the template registration point is an area of ​​a preset range centered on the template registration point.

[0079] In S202, multiple search areas may be determined in the base picture according to the above rules by concurrent multithreading.

[0080] The size of the preset range is not limited. As an example, it can be a 256*256 rectangular range, that is, a search area can be an area centered on the template registration point and consisting of 256 rows and 256 columns of position points.

[0081] The template registration point can be determined based on the prior information of the chip template.

[0082] See also Figure 4 , is a schematic diagram of a template registration point provided in an embodiment of the present application, wherein the white dots represent a portion of predetermined template registration points.

[0083] The number of template alignment points determined by different sequencing chips may be different. For example, the number of template alignment points may be 9*9.

[0084] See also Figure 5 , which is a schematic diagram of the dark line feature provided in the embodiment of the present application. Figure 5 In (1), we can see that a dark line occupies the positions of three fluorescent molecules (i.e., the width is three positions). Assuming that a molecule occupies 2*2 pixels, i.e., a molecule occupies two pixel widths, the following appears: Figure 5 The “W”-shaped feature 501 is shown in (2). The center of the “W”-shaped feature is the pixel-level position where the dark line is located. The peak area 502 of the “W”-shaped feature is specially designed and processed to randomly load the fluorescent molecule position. The valley area 503 on both sides of the “W”-shaped feature does not have a carrier of fluorescent molecules, so a black area feature is formed. When a molecule occupies two pixels in width, there are two valleys with a spacing of 2 on the edge of the peak. Therefore, to find the lowest feature position, the 6 consecutive pixels in the same direction, that is, (-3) to (+2) positions, should be accumulated and summed. This feature can be used to quickly find the intersection of the black lines in the search area.

[0085] Based on the above characteristics of the dark line, the specific execution process of step S202 may include:

[0086] Using multiple first threads associated with the search area, the feature values ​​of each row of position points in the search area are calculated one by one based on a multi-thread reduction summation algorithm.

[0087] The position point corresponds to a position on the sequencing chip for setting the fluorescent molecule carrier, and the position point includes a preset number of pixels in the base image.

[0088] See also Figure 3 , a location point, can be understood as Figure 3 A fluorescent molecule group position in the base image shown, a fluorescent molecule group position may have a fluorescent molecule group, or may not have a fluorescent molecule group. When there is a fluorescent molecule group, the pixel at the corresponding position point on the base image has a higher gray value, and when there is no fluorescent molecule group, the pixel at the corresponding position point on the base image has a lower gray value;

[0089] Using multiple second threads associated with the search area, the characteristic values ​​of each column of position points in the search area are calculated one by one based on a multi-thread reduction summation algorithm; the number of first threads and the number of second threads are determined according to the size of the search area;

[0090] The position point where a row that meets the row search condition and a column that meets the column search condition intersect in the search area is determined as the pixel-level registration point in the search area. The row search condition includes that the feature value of the row is greater than the feature value of the previous row and the feature value of the next row, and the previous row and the next row of the row are the two rows with the lowest feature values ​​in the search area. The column search condition includes that the feature value of the column is greater than the feature value of the previous column and the feature value of the next column, and the previous column and the next column of the column are the two columns with the lowest feature values ​​in the search area.

[0091] The feature value of a position point can be equal to the sum of the grayscale values ​​of all pixels contained in the position point. For example, if a position point contains 2*2 pixels, then the feature value of the position point can be equal to the sum of the grayscale values ​​of these 2*2 pixels.

[0092] The first thread is a thread that accumulates features along the x direction (ie, the horizontal direction) in the search area, and the second thread is a thread that accumulates features along the y direction (ie, the vertical direction) in the search area.

[0093] For a search area, the number of first threads associated with the search area can be set to half the number of pixels in the horizontal direction of the search area, and the number of second threads associated with the search area can be set to half the number of pixels in the vertical direction of the search area. In addition, in order to improve efficiency, each search area has its own associated first thread and second thread.

[0094] Exemplarily, when 9*9 search areas are divided on the base image, the size of each search area is 256*256 position points, and each position point includes 2*2 pixels. Then the number of pixels in each search area along the x and y directions is 512. Therefore, before executing S202, 9*9*512 threads can be called up first, and every 512 threads are associated with a search area, of which 256 threads are used for feature accumulation in the x direction and 256 threads are used for feature accumulation in the y direction.

[0095] For directions of feature accumulation by multiple threads, see Figure 6 , Figure 6 The arrows in indicate the direction of feature accumulation.

[0096] The principle of multi-threaded reduction summation (multi-threaded concurrent summation) is as follows Figure 7As shown. It can be seen that multi-threaded reduction and summation actually changes the way of summing multiple data from a single thread accumulating each data one by one to multiple threads accumulating different data at the same time, and then further accumulating the results of different data accumulation, thereby significantly shortening the time to accumulate all data. For example, the time complexity of summing 128 data with a single thread is O(128), while the multi-threaded reduction and summation only needs O(7) to complete, greatly improving the calculation speed.

[0097] S203, identifying good points and bad points from the pixel-level registration points according to the pixel values ​​of the pixel-level registration points.

[0098] A good point refers to a pixel-level registration point whose pixel value is less than or equal to a preset bad point threshold, and a bad point refers to a pixel-level registration point whose pixel value is greater than the bad point threshold.

[0099] Optionally, the pixel-level registration points can be further classified into good and bad points based on the prior information of the sequencing chip template, the spacing of the template registration points and the spacing of the pixel-level registration points. The above-mentioned multiple classification criteria can be applied selectively or simultaneously.

[0100] A method for classifying pixel-level registration points as good or bad points based on the spacing between template registration points and pixel-level registration points may be to calculate the distance between the intersection point on each line and other positioning points, match them with the template, and determine whether the pixel-level registration point is a good point or a bad point based on the matching result.

[0101] Specifically, the distance between adjacent template registration points can be calculated as a reference distance, and a reference range can be set based on the reference distance. For example, if the reference distance is 25, then the reference range can be set to 22 to 28. If the distance between any two adjacent pixel-level registration points exceeds the reference range, it is considered that there are bad points in the two adjacent pixel-level registration points. Conversely, if the distance is within the reference range, it is considered that the two adjacent pixel-level registration points are good points.

[0102] See also Figure 8 , is a schematic diagram of a registration point identification result provided in an embodiment of the present application, where the white dots in the figure represent pixel-level registration points that are partially identified as bad dots.

[0103] S204, determining whether the number of good points in the quality detection area centered at each template registration point is greater than a quality detection threshold.

[0104] If the number of good points in each quality detection area is not greater than the quality detection threshold, that is, if all template registration points (e.g. Figure 3If the number of good points in the quality detection area of ​​any template registration point does not exceed the quality detection threshold, step S205 is executed.

[0105] On the contrary, if there is at least one template registration point whose number of good points in the quality detection area is greater than the quality detection threshold, step S206 is executed.

[0106] Exemplarily, the quality detection area may be a 3*3 rectangular area centered on the template registration point, and the quality detection threshold may be set to 5.

[0107] S205, determining that the base image is a low-quality image.

[0108] After determining that the current base image is a low-quality image, the low-quality image can be directly discarded, and the method ends.

[0109] S206, correcting bad pixels based on good pixels and template registration points.

[0110] Optionally, correct bad pixels based on good pixels and template registration points, including:

[0111] Search for good pixels within a preset correction range centered on the bad pixel;

[0112] If multiple good points in the horizontal direction and multiple good points in the vertical direction are searched, a correction position point different from the bad point is determined based on the fitting cross line method;

[0113] If multiple good points in the horizontal direction and multiple good points in the vertical direction are not found, a correction position point different from the bad point is determined based on the template registration point and the preset ratio;

[0114] Replace bad pixels with corrected position pixels.

[0115] The preset correction range may be a range between +2 and -2 positions centered on the bad pixel.

[0116] If there are two or more good pixels in only one direction in the x-direction and y-direction within the range, the bad pixels will be calibrated using the template ratio. If there are two good pixels and one bad pixel in both the x-direction and the y-direction within the range, the bad pixel will be corrected using the cross line fitting method.

[0117] See also Fig. 9 , which is a schematic diagram of correcting bad pixels by using a method of fitting cross lines provided in an embodiment of the present application.

[0118] It should be noted that steps S203 to S206 are optional steps. In some embodiments, good pixels and bad pixels may not be distinguished and S207 may be directly executed. Alternatively, good pixels and bad pixels may be distinguished but whether the base image is a low-quality image is not detected.

[0119] S207, for each pixel-level registration point, determine the horizontal line and vertical line where the pixel-level registration point is located, and identify each luminous position point on the horizontal line and vertical line according to a preset bright spot threshold.

[0120] The luminous position point refers to a position point whose grayscale value is greater than the bright spot threshold.

[0121] Optionally, after the light emitting position points are determined, the light emitting position points may be further filtered in the following manner:

[0122] Based on a statistical algorithm, light-emitting position points whose center of gravity positions do not meet preset boundary conditions are filtered out from a plurality of light-emitting position points.

[0123] The above boundary condition may be that the distance between the center of gravity position and the boundary of the horizontal line or the vertical line is greater than a certain threshold value, and the threshold value may be determined by counting the distances of the center of gravity positions of all luminous position points relative to the boundary according to a statistical algorithm. Correspondingly, the luminous position points that are filtered out may be those luminous position points whose center of gravity positions are too close to the boundary.

[0124] Of course, the above are only examples. In other embodiments, the specific content and form of the boundary conditions are not limited to the above examples.

[0125] The luminous position points that are filtered out can also be called external points, and the luminous position points that are not filtered out can be called internal points. The external points and internal points filtered according to the boundary conditions can be found in Fig.10 . Fig.10 All inner and outer points are indicated by text. Except for the indicated outer points and sub-pixel registration points, all other points are inner points.

[0126] Optionally, before filtering according to the boundary conditions, the luminous position points may be screened by setting a pixel threshold and a point shape threshold, that is, the luminous position points with too high or too low grayscale values ​​may be filtered out.

[0127] Further optionally, before executing S208, the following steps may also be performed:

[0128] Detect the number of bases and bright spots;

[0129] If a bright spot is detected or the number of bases is found to be less than 3, the bad spot is corrected using the good spot coordinates and template registration points;

[0130] If no bright spot is detected and the number of bases is greater than 3, step S208 is executed.

[0131] S208, for each pixel-level registration point, a straight line is fitted to calculate a sub-pixel-level registration point.

[0132] In step S208, for a pixel-level registration point, the process of calculating the corresponding sub-pixel-level registration point by fitting a straight line may include:

[0133] Determine the centroid position of each luminous position point using the centroid method;

[0134] A sub-pixel horizontal line is obtained by fitting the centroid position of the light-emitting position point on the horizontal line, and a sub-pixel vertical line is obtained by fitting the centroid position of the light-emitting position point on the vertical line;

[0135] The intersection of the sub-pixel horizontal line and the sub-pixel vertical line is determined as the sub-pixel registration point corresponding to the pixel registration point.

[0136] In S207 and S208, see Fig.10 , using the pixel-level position of the intersection (pixel-level registration point), detect the luminous bright spot on the line where the intersection is located, filter the bright spot by setting the threshold and the point shape threshold, and then use the centroid method to obtain the good bright spot centroid position, as shown below Fig.10 All the points marked in (2) are counted. Then, a statistical algorithm is used to exclude the external points that do not meet the conditions (i.e., the above boundary conditions). The intersection of the two lines can be obtained by fitting the XY directions of the remaining internal points, which is the sub-pixel registration point corresponding to the pixel-level registration point.

[0137] See also Fig.11 , which is a schematic diagram of a sub-pixel level registration point provided in an embodiment of the present application. The white frame area in (1) represents a pixel in the pixel level registration point. If the pixel is further subdivided, the sub-pixel level registration point of (2) (i.e., the white dot in the figure) is obtained. The position of the intersection is obtained. According to the number of fluorescent molecular clusters in each area known from the template, the sub-pixel level position of all fluorescent molecular clusters arranged in the dot matrix can be obtained by evenly dividing the grid.

[0138] Steps S207 and S208 are equivalent to:

[0139] For each pixel-level registration point, a sub-pixel-level registration point corresponding to the pixel-level registration point is determined.

[0140] After obtaining the sub-pixel registration points, the boundary points can be deduced based on the template to form a complete template. Specifically, after obtaining the position of the intersection point, the number of fluorescent molecular clusters in each area can be known based on the template, and the sub-pixel position of all fluorescent molecular clusters arranged in the dot matrix can be obtained by evenly dividing the grid, such as Fig.12 shown.

[0141] The present application provides a method, device, equipment and storage medium for image registration, the method comprising: obtaining a base picture, which is a picture obtained by photographing a sequencing chip after fluorescent staining, and a plurality of template registration points are preset on the base picture; for each template registration point, performing multi-threaded parallel operations on the pixels in the search area corresponding to the template registration point to determine the pixel-level registration point in the search area, the search area corresponding to the template registration point is an area of ​​a preset range centered on the template registration point; determining the sub-pixel registration point corresponding to the pixel-level registration point. This solution divides the base picture into search areas, and performs multi-threaded parallel operations on each search area, thereby improving the image registration efficiency of the base picture.

[0142] See also Fig.13 , is a schematic diagram of the structure of an image registration device provided in an embodiment of the present application, and the device may include:

[0143] An obtaining unit 1301 is used to obtain a base picture, which is a picture obtained by photographing a fluorescently stained sequencing chip, and a plurality of template registration points are preset on the base picture;

[0144] The search unit 1302 is used to perform multi-threaded parallel operations on the pixels in the search area corresponding to the template registration point for each template registration point, so as to determine the pixel-level registration point in the search area. The search area corresponding to the template registration point is an area of ​​a preset range centered on the template registration point.

[0145] The determination unit 1303 is used to determine, for each pixel-level registration point, a sub-pixel-level registration point corresponding to the pixel-level registration point.

[0146] Optionally, when the search unit 1302 performs multi-threaded parallel operations on the pixels in the search area corresponding to the template registration point to determine the pixel-level registration point in the search area, it is specifically used to:

[0147] Using multiple first threads associated with the search area, based on a multi-threaded reduction sum algorithm, the characteristic value of each row of position points in the search area is calculated one by one, the position points correspond to the positions for setting the fluorescent molecule carrier on the sequencing chip, and the position points include a preset number of pixels in the base image;

[0148] Using multiple second threads associated with the search area, the characteristic values ​​of each column of position points in the search area are calculated one by one based on a multi-thread reduction summation algorithm; the number of first threads and the number of second threads are determined according to the size of the search area;

[0149] The position point where a row that meets the row search condition and a column that meets the column search condition intersect in the search area is determined as the pixel-level registration point in the search area. The row search condition includes that the feature value of the row is greater than the feature value of the previous row and the feature value of the next row, and the previous row and the next row of the row are the two rows with the lowest feature values ​​in the search area. The column search condition includes that the feature value of the column is greater than the feature value of the previous column and the feature value of the next column, and the previous column and the next column of the column are the two columns with the lowest feature values ​​in the search area.

[0150] Optionally, when the determining unit 1303 determines the sub-pixel level registration point corresponding to the pixel level registration point, it is specifically used to:

[0151] Determine the horizontal line and vertical line where the pixel-level registration point is located; wherein the horizontal line where the pixel-level registration point is located includes the row where the pixel-level registration point is located and the previous row and the next row, and the vertical line where the pixel-level registration point is located includes the column where the pixel-level registration point is located and the previous column and the next column;

[0152] Identify each luminous position point on the horizontal line and the vertical line according to a preset bright spot threshold; wherein the luminous position point refers to a position point whose gray value is greater than the bright spot threshold;

[0153] Determine the centroid position of each luminous position point using the centroid method;

[0154] A sub-pixel horizontal line is obtained by fitting the centroid position of the light-emitting position point on the horizontal line, and a sub-pixel vertical line is obtained by fitting the centroid position of the light-emitting position point on the vertical line;

[0155] The intersection of the sub-pixel horizontal line and the sub-pixel vertical line is determined as the sub-pixel registration point corresponding to the pixel registration point.

[0156] Optionally, after the determination unit determines the center of gravity position of each light-emitting position point by using the center of gravity method, it is also used to:

[0157] Based on a statistical algorithm, light-emitting position points whose center of gravity positions do not meet preset boundary conditions are filtered out from a plurality of light-emitting position points.

[0158] Optionally, the searching unit 1302 is further configured to:

[0159] According to the pixel values ​​of the pixel-level registration points, good points and bad points are identified from the pixel-level registration points, where a good point refers to a pixel-level registration point whose pixel value is less than or equal to a preset bad point threshold, and a bad point refers to a pixel-level registration point whose pixel value is greater than the bad point threshold;

[0160] Correct bad pixels based on good pixels and template registration points.

[0161] Optionally, when the search unit 1302 corrects the bad points according to the good points and the template registration points, it is specifically used to:

[0162] Search for good pixels within a preset correction range centered on the bad pixel;

[0163] If multiple good points in the horizontal direction and multiple good points in the vertical direction are searched, a correction position point different from the bad point is determined based on the fitting cross line method;

[0164] If multiple good points in the horizontal direction and multiple good points in the vertical direction are not found, a correction position point different from the bad point is determined based on the template registration point and the preset ratio;

[0165] Replace bad pixels with corrected position pixels.

[0166] Optionally, after identifying good points and bad points from the pixel-level registration points according to the pixel values ​​of the pixel-level registration points, the search unit 1302 is further configured to:

[0167] For each template registration point, determine whether the number of good points in the quality detection area centered on the template registration point is greater than the quality detection threshold;

[0168] If the number of good points in each quality detection area is not greater than the quality detection threshold, the base image is determined to be a low-quality image.

[0169] The specific working principle and beneficial effects of the image registration device provided in this embodiment can be found in the steps and beneficial effects of the image registration method provided in the embodiment of the present application, and will not be repeated here.

[0170] The present application also provides an electronic device. Fig.14 , is a schematic diagram of the structure of the electronic device, the electronic device includes a memory 1401 and a processor 1402;

[0171] The memory 1401 is used to store computer programs;

[0172] The processor 1402 is used to execute a computer program, specifically to implement the image registration method provided in any embodiment of the present application.

[0173] An embodiment of the present application also provides a computer storage medium for storing a computer program. When the computer program is executed, it is specifically used to implement the image registration method provided in any embodiment of the present application.

[0174] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0175] It should be noted that the concepts such as "first" and "second" mentioned in the present invention are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0176] The present application can be implemented or used by professionals and technicians. Various modifications to these embodiments will be apparent to professionals and technicians in the field, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for image registration, characterized in that: include: Obtaining a base picture, wherein the base picture is a picture obtained by photographing a fluorescently stained sequencing chip, and a plurality of template alignment points are preset on the base picture; For each of the template registration points, multi-threaded parallel operations are performed on the pixels in the search area corresponding to the template registration point to determine the pixel-level registration point in the search area, and the search area corresponding to the template registration point is an area of ​​a preset range centered on the template registration point; For each of the pixel-level registration points, a sub-pixel-level registration point corresponding to the pixel-level registration point is determined.

2. The method according to claim 1, characterized in that The performing multi-threaded parallel operations on the pixels in the search area corresponding to the template registration point to determine the pixel-level registration point in the search area includes: Using the multiple first threads associated with the search area, based on a multi-threaded reduction sum algorithm, calculate the characteristic value of each row of position points in the search area one by one, the position points corresponding to the positions for setting the fluorescent molecule carrier on the sequencing chip, and the position points including a preset number of pixels in the base picture; Using a plurality of second threads associated with the search area, the characteristic values ​​of each column of position points in the search area are calculated one by one based on a multi-thread reduction summation algorithm; the number of the first threads and the number of the second threads are determined according to the size of the search area; The position point where a row satisfying the row search condition and a column satisfying the column search condition intersect in the search area is determined as a pixel-level registration point in the search area, wherein the row search condition includes that the feature value of the row is greater than the feature value of the previous row and the feature value of the next row, and the previous row and the next row of the row are the two rows with the lowest feature values ​​in the search area, and the column search condition includes that the feature value of the column is greater than the feature value of the previous column and the feature value of the next column, and the previous column and the next column of the column are the two columns with the lowest feature values ​​in the search area.

3. The method according to claim 2, characterized in that The determining of the sub-pixel level registration point corresponding to the pixel level registration point comprises: Determine the horizontal line and vertical line where the pixel-level registration point is located; wherein the horizontal line where the pixel-level registration point is located includes the row where the pixel-level registration point is located and the previous row and the next row, and the vertical line where the pixel-level registration point is located includes the column where the pixel-level registration point is located and the previous column and the next column; Identify each luminous position point on the horizontal line and the vertical line according to a preset bright spot threshold; wherein the luminous position point refers to a position point whose grayscale value is greater than the bright spot threshold; Determine the center of gravity of each of the light-emitting positions using the center of gravity method; A sub-pixel horizontal line is obtained by fitting the centroid position of the light-emitting position point on the horizontal line, and a sub-pixel vertical line is obtained by fitting the centroid position of the light-emitting position point on the vertical line; An intersection point of the sub-pixel horizontal line and the sub-pixel vertical line is determined as a sub-pixel registration point corresponding to the pixel-level registration point.

4. The method according to claim 3, characterized in that After the centroid position of each luminous position point is determined by the centroid method, the method further includes: Based on a statistical algorithm, light-emitting position points whose center of gravity positions do not meet preset boundary conditions are filtered out from the plurality of light-emitting position points.

5. The method according to claim 3, characterized in that: Before determining the sub-pixel level registration point corresponding to each pixel level registration point, the method further includes: According to the pixel values ​​of the pixel-level registration points, good points and bad points are identified from the pixel-level registration points, wherein the good points refer to the pixel-level registration points whose pixel values ​​are less than or equal to a preset bad point threshold, and the bad points refer to the pixel-level registration points whose pixel values ​​are greater than the bad point threshold; The bad points are corrected according to the good points and the template registration points.

6. The method according to claim 4, characterized in that The correcting the bad point according to the good point and the template registration point includes: Searching for the good point within a preset correction range centered on the bad point; If multiple good points in the horizontal direction and multiple good points in the vertical direction are searched, a correction position point different from the bad point is determined based on the fitting cross line method; If multiple good points in the horizontal direction and multiple good points in the vertical direction are not found, a correction position point different from the bad point is determined based on the template registration point and a preset ratio; The bad pixel is replaced by the corrected position point.

7. The method according to claim 4, characterized in that After identifying good points and bad points from the pixel-level registration points according to the pixel values ​​of the pixel-level registration points, the method further includes: For each of the template registration points, determining whether the number of good points in a quality detection area centered on the template registration point is greater than a quality detection threshold; If the number of the good points in each of the quality detection areas is not greater than the quality detection threshold, it is determined that the base image is a low-quality image.

8. An image registration device, characterized in that: include: An obtaining unit, used for obtaining a base picture, wherein the base picture is a picture obtained by photographing a sequencing chip after fluorescence staining, and a plurality of template registration points are preset on the base picture; A search unit is used to perform multi-threaded parallel operations on pixels in a search area corresponding to each template registration point to determine a pixel-level registration point in the search area, wherein the search area corresponding to the template registration point is an area of ​​a preset range centered on the template registration point; A determination unit is used to determine, for each of the pixel-level registration points, a sub-pixel-level registration point corresponding to the pixel-level registration point.

9. An electronic device, characterized in that: including memory and processor; The memory is used to store computer programs; The processor is used to execute the computer program, specifically to implement the image registration method as described in any one of claims 1 to 7.

10. A computer storage medium, characterized in that: Used to store a computer program, which, when executed, is specifically used to implement the image registration method as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Method for image registration, method for detecting and calling bases from images, and computer device

    EP4738254A1