Biochip positioning method, electronic equipment and storage medium

By combining the identification of trajectory features in the target image of the biochip and the distribution rules, the position of the biochip is automatically determined, which solves the problem of large artificial positioning errors in the prior art, and improves the accuracy and efficiency of positioning.

CN119832061APending Publication Date: 2025-04-15MGI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311335646.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-13
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the prior art, it is necessary to manually locate the corner coordinates of the biochip, resulting in large positioning errors and a large amount of manpower and computing power.

Method used

By identifying the trajectory features in the target image of the randomly selected smaller target area in the biochip, the relative position of the target area in the biochip is determined in combination with the distribution rules of the trajectory line, thereby determining the position of the biochip.

Benefits of technology

There is no need to manually locate the corners of the chip, which improves the accuracy and efficiency of biochip positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119832061A_ABST
    Figure CN119832061A_ABST
Patent Text Reader

Abstract

The present application relates to the field of biochemical detection, and provides a biochip positioning method, an electronic device and a storage medium, the method comprising: preprocessing a target image of a target area of a biochip to obtain a preprocessed image of the target area, the biochip comprising a plurality of trajectory lines distributed according to a preset distribution rule; determining a trajectory image in the preprocessed image according to a plurality of sub-images in the preprocessed image; acquiring a first feature map of the target image and a second feature map of the trajectory image; determining the relative position of the trajectory image in the target image according to the first feature map and the second feature map; and determining the position of the biochip according to the relative position and the distribution rule. By using the method, the accuracy and efficiency of biochip positioning can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of biochemical testing, and in particular to a biochip positioning method, electronic equipment and storage medium. Background Art

[0002] When scanning and sequencing a biochip to obtain sequencing data in the chip, it is usually necessary to determine the corner point of the biochip as the starting scanning point in order to cooperate with the motion platform to scan the entire chip. The method of determining the corner point of the biochip used in the related art usually requires repeated trajectory line recognition based on the chip image and manual positioning of the chip corner point coordinates, which not only easily leads to large errors in each corner point positioning, but also consumes a lot of manpower and computing power in the repeated positioning process. Summary of the invention

[0003] In view of the above, it is necessary to propose a biochip positioning method, electronic device and storage medium, which can solve the problem that the coordinates of the chip corners need to be manually positioned and large errors are prone to occur during corner positioning.

[0004] An embodiment of the present application provides a positioning method for a biochip, the method comprising: collecting a target image of a target area of ​​a biochip and performing preprocessing to obtain a preprocessed image of the target area, the biochip comprising subdomains repeatedly distributed according to a preset distribution rule, the subdomains comprising a plurality of trajectory lines, and the target area being smaller than or equal to a single subdomain; selecting a plurality of regions of interest in the target image and determining a plurality of subimages corresponding to the plurality of regions of interest based on the preprocessed image, extracting trajectory lines in each of the regions of interest based on the plurality of subimages and constructing a trajectory line image in the preprocessed image; acquiring a first feature map of the target image and a second feature map of the trajectory line image; determining a relative position of the trajectory line image in the target image based on the first feature map and the second feature map; and determining the position of the biochip based on the relative position and the distribution rule.

[0005] In one embodiment, the target region represents a rectangular region randomly intercepted from a target subdomain in the biochip, and the area of ​​the target region is less than or equal to the target subdomain; the preprocessing includes: determining a target grayscale threshold according to the grayscale of the trajectory line, and binarizing the target image based on the target grayscale threshold; the multiple trajectory lines distributed according to a preset distribution rule include: a first group of trajectory lines distributed in parallel in a first direction and a second group of trajectory lines distributed in parallel in a second direction, the first direction being perpendicular to the second direction.

[0006] In one embodiment, determining the position of the biochip according to the relative position and the distribution rule includes: determining the relative distance between every two parallel trajectory lines in the trajectory line image; determining the position of the corner point of the target subdomain according to the relative position, the relative distance and the distribution rule; determining the position of the target corner point in the biochip according to the position of the corner point of the target subdomain and the position of the target subdomain in the biochip.

[0007] In one embodiment, the selecting of multiple regions of interest in the target image and determining multiple sub-images corresponding to the multiple regions of interest based on the preprocessed image includes: taking the image of the area in the preprocessed image corresponding to each region of interest in the target image as a sub-image, wherein the multiple sub-images include: a first sub-image corresponding to a first region of interest including a complete upper boundary of the preprocessed image, a second sub-image corresponding to a second region of interest including a complete lower boundary of the preprocessed image, a third sub-image corresponding to a third region of interest including a complete left boundary of the preprocessed image, and a fourth sub-image corresponding to a fourth region of interest including a complete right boundary of the preprocessed image.

[0008] In one embodiment, the extracting of trajectory lines in each of the regions of interest based on the multiple sub-images and constructing a trajectory line image in the preprocessed image includes: performing grayscale statistics on each sub-image to obtain two grayscale histograms corresponding to each sub-image, wherein the two grayscale statistical histograms include a first grayscale histogram and a second grayscale histogram, the abscissa in the first grayscale histogram represents the rank of row pixels, and the ordinate represents the accumulated value of grayscale values ​​of column pixels, and the abscissa in the second grayscale histogram represents the rank of column pixels, and the ordinate represents the accumulated value of grayscale values ​​of row pixels; based on the two grayscale histograms corresponding to each sub-image, determining trajectory line features in a first direction and trajectory line features in a second direction in each sub-image, wherein the first direction is parallel to the upper boundary, and the second direction is perpendicular to the first direction; generating the trajectory line image in the preprocessed image according to the trajectory line features in the first direction and the trajectory line features in the second direction in each sub-image.

[0009] In one embodiment, the method further comprises: performing position comparison on the trajectory line features in the multiple sub-images to obtain the offset between the trajectory line features in the same direction, and performing position correction on the trajectory line features according to the offset.

[0010] In one embodiment, the obtaining of the first feature map of the target image and the second feature map of the trajectory line image includes: performing multi-scale feature extraction on the target image based on the scale-invariant feature transform (SIFT) method to obtain the first feature map; performing multi-scale feature extraction on the trajectory line image based on the SIFT method to obtain the second feature map.

[0011] In one embodiment, determining the relative position of the trajectory line image in the target image based on the first feature map and the second feature map includes: performing position matching on the first feature map and the second feature map based on a fast nearest neighbor search algorithm to obtain the relative position.

[0012] An embodiment of the present application provides a positioning device for a biochip, the device comprising: a preprocessing module, used to collect a target image of a target area of ​​the biochip and perform preprocessing to obtain a preprocessed image of the target area, wherein the target area is smaller than or equal to a single sub-domain; a determination module, used to select multiple regions of interest in the target image and determine multiple sub-images corresponding to the multiple regions of interest based on the preprocessed image, extract trajectory lines in each of the regions of interest based on the multiple sub-images and construct a trajectory line image in the preprocessed image; an acquisition module, used to acquire a first feature map of the target image and a second feature map of the trajectory line image; the determination module is also used to determine the relative position of the trajectory line image in the target image based on the first feature map and the second feature map; the determination module is also used to determine the position of the biochip based on the relative position and the distribution rule.

[0013] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the processor is configured to implement the biochip positioning method when executing a computer program stored in the memory.

[0014] An embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the positioning method of the biochip is implemented.

[0015] In summary, the biochip positioning method described in the present application can determine the position of the biochip by identifying the trajectory line features in the target image of a randomly selected smaller target area in the biochip and determining the relative position of the target area in the biochip in combination with the distribution rules of the trajectory lines. This eliminates the need for manual positioning of chip corners and improves the accuracy and efficiency of biochip positioning. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1It is a structural diagram of an electronic device provided in one embodiment of the present application.

[0017] Figure 2 This is a flow chart of a biochip positioning method provided in one embodiment of the present application.

[0018] Figure 3 This is an example diagram of a biochip provided in one embodiment of the present application.

[0019] Figure 4 This is an example diagram of a region of interest provided in an embodiment of the present application.

[0020] Figure 5 It is a flowchart of a method for constructing a trajectory line image in a preprocessed image provided by an embodiment of the present application.

[0021] Figure 6 This is an example diagram of the first grayscale histogram of the first sub-image provided in an embodiment of the present application.

[0022] Figure 7 This is an example diagram of the second grayscale histogram of the third sub-image provided in an embodiment of the present application.

[0023] Figure 8 This is a flow chart of a biochip positioning method provided in another embodiment of the present application.

[0024] Fig. 9 This is a flow chart of a biochip positioning method provided in yet another embodiment of the present application.

[0025] Fig.10 It is a structural diagram of a biochip positioning device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0026] In order to more clearly understand the above-mentioned purposes, features and advantages of the present application, the present application is described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing the embodiments in one embodiment and are not intended to limit this application.

[0028] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.

[0029] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. The following embodiments and features in the embodiments may be combined with each other without conflict.

[0030] In one embodiment, when scanning and sequencing a biochip to obtain sequencing data in the chip, it is usually necessary to determine the corner point of the biochip as the starting scanning point in order to cooperate with the motion platform to scan the entire chip. The method of determining the corner point of the biochip used in the related art usually requires multiple times of trajectory line recognition based on the chip image and manual positioning of the chip corner point coordinates, which not only easily leads to large errors in each corner point positioning, but also consumes a lot of manpower and computing power in the repeated positioning process.

[0031] To solve the above problems, an embodiment of the present application provides a method for positioning a biochip, which identifies the trajectory line features in the target image of a randomly selected smaller target area in the biochip and determines the relative position of the target area in the biochip in combination with the distribution rule of the trajectory line, thereby determining the position of the corner point of the biochip. This eliminates the need for manual positioning of the chip corner points, thereby improving the accuracy and efficiency of positioning the corner points of the biochip.

[0032] Figure 1 The electronic device 10 can be a computer, a server, a mobile phone, a tablet computer, a notebook computer, or other electronic devices. The specific type of the electronic device is not limited in any way in the embodiment of the present application.

[0033] like Figure 1As shown, the electronic device 10 may include a communication module 101, a memory 102, a processor 103, an input / output (I / O) interface 104 and a bus 105. The processor 103 is coupled to the communication interface 101, the memory 102 and the I / O interface 104 through the bus 105.

[0034] The communication module 101 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as universal serial bus (USB), controller area network bus (CAN, Controller Area Network). The wireless communication module may provide one or more wireless communication solutions such as wireless fidelity (wireless fidelity, Wi-Fi), bluetooth (bluetooth, BT), mobile communication network, frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc.

[0035] The memory 102 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 103, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.

[0036] The non-volatile memory may also store executable programs and user and application data, etc., and may be pre-loaded into the random access memory for direct reading and writing by the processor 110. The non-volatile memory may include a disk storage device and a flash memory.

[0037] The memory 102 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 103. The one or more computer programs include multiple instructions, and when the multiple instructions are executed by the processor 103, the positioning method of the biochip executed on the electronic device 10 can be implemented.

[0038] In other embodiments, the electronic device 10 further includes an external memory interface for connecting to an external memory to expand the storage capacity of the electronic device 10 .

[0039] The processor 103 may include one or more processing units, for example, the processor 103 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0040] The processor 103 provides computing and control capabilities. For example, the processor 103 is used to execute a computer program stored in the memory 102 to implement the above-mentioned biochip positioning method.

[0041] The I / O interface 104 is used to provide a channel for user input or output. For example, the I / O interface 104 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.

[0042] The bus 105 is at least used to provide a channel for mutual communication among the communication module 101 , the memory 102 , the processor 103 , and the I / O interface 104 in the electronic device 10 .

[0043] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0044] Figure 21 is a flow chart of a biochip positioning method provided in an embodiment of the present application. The biochip positioning method is applied to electronic devices, such as Figure 1 The electronic device 10 in the flowchart specifically includes the following steps. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.

[0045] S21, collecting a target image of a target area of ​​a biochip and performing preprocessing to obtain a preprocessed image of the target area.

[0046] In one embodiment, the biochip includes a gene sequencing chip obtained using high-throughput gene sequencing technology. For example, the gene sequencing technology obtains a library corresponding to the biological sample by performing library preparation on the biological sample, and loads the library into the sequencing chip to obtain a biochip corresponding to the biological sample. Specifically, the preparation method of the biochip can refer to methods such as spatial transcriptome technology based on chip technology. For example, the size of the biochip is about 75mm*25mm.

[0047] For example Figure 3 As shown, an example diagram of a biochip provided by an embodiment of the present application. The biochip can be a gene sequencing chip, which can be a solid planar substrate, and the specifications are preferably set to be several centimeters in length and width. For example, the usual chip size can be 2.5cm×7.5cm×0.1cm. It should be understood that the size of the biochip of the present application can be set smaller (for example, the side length is less than about 0.5cm), and in certain operating environments, for the convenience of processing and support, the chip size can be set to be larger (for example, the side length is greater than about 10cm) to meet the flatness required for biochemical testing. In some embodiments, the chip designed according to the present invention can support more than 1 billion biochemical reactions. For example, in cPAL sequencing using DNA nanoballs, each reaction is carried out in a circular area with a diameter of about 300nm. It is understandable that the DNA nanoball can be an amplification product including a DNA fragment. The DNA nanoball (DNB) carries a fluorescent group when synthesizing bases, and the fluorescent group emits a fluorescent signal when excited. In another embodiment, biochemical reactions can be performed on chip sites with a diameter between 30-1000 nm (or length and width), or even between 200-500 nm (or length and width). Figure 3 As shown, the biochip can be formed by repeatedly arranging multiple sub-domains (layouts) according to a preset distribution rule.

[0048] Taking the sequencing chip as an example, the sequencing starting point position includes but is not limited to the position of the first field of view (FOV) at the top of the upper left corner of the biochip. During the sequencing process, the biochip loading platform can be moved so that the objective lens is aligned with the starting point position of the biochip. The field of view is an image captured by a microscope camera at one time. The field of view of the microscope camera is small, about 768.6μm*648μm. During the sequencing process, hundreds of fields of view can be captured for the biochip. Each field of view has several track lines (tracklines) distributed in the first direction and the second direction, and the intersection of the track lines is the track cross. The biochip is provided with a first group of track lines distributed in parallel in the first direction and a second group of track lines distributed in parallel in the second direction. The first direction can be a horizontal direction, and the second direction can be a vertical direction. The area formed between two adjacent track lines in the horizontal and vertical directions in each field of view is called a block, and the block is divided into an internal block and an external block. Several sites are evenly distributed in each block on the biochip, and the sites can adsorb the DNA nanoball molecule (DNB).

[0049] During the chip manufacturing process, the biochip is divided into multiple sub-domains (Layout), and the biochip includes multiple track lines (Track) distributed according to a preset distribution rule, and the multiple track lines distributed according to the preset distribution rule include: a first group of track lines distributed in parallel in a first direction and a second group of track lines distributed in parallel in a second direction, and the first direction is perpendicular to the second direction. The first direction can be a horizontal direction, and the second direction can be a vertical direction. The first group of track lines can be track lines distributed in parallel in the horizontal direction, and the second group of track lines can be track lines distributed in parallel in the vertical direction. For example Figure 3 As shown, the area between two adjacent track lines parallel to each other in the first direction and two adjacent track lines parallel to each other in the second direction is a block.

[0050] In one embodiment, the Layout in the biochip is periodically and regularly repeated. In each complete Layout, the distance between each two adjacent track lines Track in the first direction or the second direction is distributed according to preset distribution rules, and these distribution rules are known information after the chip is manufactured.

[0051] In one embodiment, a plurality of array spots are evenly distributed in the block, and one spot can be loaded with a DNA (DeoxyriboNucleic Acid) nanoball (DNB), and the DNA nanoball can be an amplification product including a DNA fragment.

[0052] In order to scan the biochip to read the base sequence and other data in the DNA nanoball at each site, it is necessary to first determine the starting point of the scan in the biochip so that the motion platform can scan the entire chip from the starting point. The starting point of the scan in the biochip can be a corner point of the biochip, for example, the position of the corner point where the upper left corner of the four corners of the rectangular biochip is located.

[0053] However, since the biochip needs to be manually placed on the motion platform by the user, the corner position of the biochip cannot be guaranteed to correspond one-to-one with the starting scanning position of the motion platform. Therefore, it is necessary to align the corner position of the biochip with the starting scanning position of the motion platform.

[0054] In the related art, it is usually necessary to identify the trajectory line based on the chip image that contains at least one complete layout area, and it is also necessary to manually determine the position of the upper left corner of the chip through optical signals. Once an error occurs, it is necessary to repeatedly find the starting point. In addition, since the field of view (FOV) of the microscope camera commonly used to capture chip images is relatively small, about 768.6μm*648μm, the image obtained by the microscope camera usually cannot contain a complete layout area. Therefore, for small field of view imaging systems, the related art cannot achieve the positioning of the chip corner coordinates.

[0055] In one embodiment, in order to solve the above problem, the target area used in this case represents a rectangular area randomly intercepted from the target subdomain in the biochip, and the area of ​​the target area is less than or equal to the target subdomain, wherein the target subdomain can be any subdomain in the biochip. Therefore, the method of this case can be applied to a small field of view imaging system, and the electronic device obtains a target image of the target area of ​​the biochip from the small field of view imaging system.

[0056] In one embodiment, the preprocessing includes: determining a target grayscale threshold according to the grayscale of the trajectory line, and binarizing the target image based on the target grayscale threshold. The binarization process can discard pixels that are not trajectory line features, and retain the features of the trajectory line in the grayscale image to the greatest extent, so as to improve the accuracy of extracting trajectory line features in subsequent processes.

[0057] Specifically, determining the target grayscale threshold according to the grayscale of the trajectory line may include: obtaining multiple sample chip images, using multiple different random grayscale thresholds to perform binarization processing on the multiple sample chips to obtain multiple sample binary images; determining the clarity of the line of the trajectory line in each sample binary image, and selecting the random grayscale threshold corresponding to the sample binary image with the highest clarity of the line of the trajectory line as the target grayscale threshold. Among them, the method for determining the clarity includes but is not limited to: Sobel operator, Laplacian operator, etc. based on the gradient method, power spectrum density, high-pass filter, etc. based on the frequency domain method, variance calculation, fuzzy entropy algorithm, etc. based on the fuzziness method, and line continuity and sharpness evaluation algorithm based on the edge detection algorithm.

[0058] In one embodiment, the threshold function in OPENCV (e.g., cv2.threshold function) can be used to implement the above binarization processing, for example, the grayscale value of the pixel points greater than or equal to the target grayscale threshold is set to 1 (white), and the grayscale value of the pixel points less than the target grayscale threshold is set to 0 (black). When determining the target grayscale threshold, methods such as Otsu's binarization method and cv2.adaptiveThreshold function can also be used.

[0059] In one embodiment, before the binarization process, the preprocessing may also include but is not limited to: image denoising, for example, using a mean filter, a median filter or other methods to reduce the noise in the target image; image enhancement, for example, using a histogram equalization method or other methods to enhance the line details in the image; image resizing, for example, scaling or cropping the image so that the image size is suitable for the subsequent model network.

[0060] Step S22, selecting multiple regions of interest in the target image and determining multiple sub-images corresponding to the multiple regions of interest based on the preprocessed image, extracting trajectory lines in each of the regions of interest based on the multiple sub-images and constructing a trajectory line image in the preprocessed image.

[0061] In one embodiment, multiple rectangular regions of interest (ROIs) are selected in the target image, and the images of the areas in the preprocessed image corresponding to each ROI in the target image are taken as a sub-image, wherein the multiple sub-images include: a first sub-image corresponding to the first ROI including the complete upper boundary of the preprocessed image, a second sub-image corresponding to the second ROI including the complete lower boundary of the preprocessed image, a third sub-image corresponding to the third ROI including the complete left boundary of the preprocessed image, and a fourth sub-image corresponding to the fourth ROI including the complete right boundary of the preprocessed image. The vertical widths of the first sub-image and the second sub-image can be set according to actual needs, and the horizontal lengths of the third sub-image and the fourth sub-image can be set according to actual needs.

[0062] For example Figure 4 As shown, it is an example diagram of the region of interest provided by an embodiment of the present application. The first sub-image in ROI1 includes the complete upper boundary of the target image, the second sub-image in ROI2 includes the complete lower boundary of the target image, the third sub-image in ROI3 includes the complete left boundary of the target image, and the fourth sub-image in ROI4 includes the complete right boundary of the target image. The white lines in the middle area represent trajectory line features with a gray value of 1 (white).

[0063] In one embodiment, since the above-mentioned multiple regions of interest cover the boundary areas of the horizontal direction (first direction) and the vertical direction (second direction) of the target image, and the trajectory lines are also distributed in these two directions, the distribution of all trajectory lines in the target image can be analyzed through the above-mentioned multiple rectangular regions of interest. Among them, generally speaking, at least one part of each trajectory line can be covered by two sub-images (such as the first sub-image and the third sub-image) that overlap each other and are perpendicular to each other. However, since the distortion that may exist in the target image will affect the accuracy of extracting the trajectory line features, therefore, adding a corresponding parallel region of interest to each of the above-mentioned two regions of interest (for example, adding a second sub-image in the same direction as a control to the first sub-image) can eliminate the recognition error of the trajectory line features caused by image distortion in the subsequent process.

[0064] In one embodiment, Figure 5 As shown, the method for constructing a trajectory line image in a preprocessed image includes the following steps:

[0065] Step S31, performing grayscale statistics on each sub-image to obtain two grayscale histograms corresponding to each sub-image.

[0066] In one embodiment, when performing grayscale statistics on each sub-image, grayscale statistics in the row direction (first direction) and grayscale statistics in the column direction (second direction) can be performed on the grayscale values ​​of the pixels in each sub-image respectively to obtain two grayscale histograms corresponding to each sub-image.

[0067] The two grayscale statistical histograms include a first grayscale histogram and a second grayscale histogram; wherein, the first grayscale histogram is obtained by performing grayscale statistics in the row direction on each sub-image, and the horizontal axis in the first grayscale histogram represents the position of the row pixel points, and the vertical axis represents the accumulated value of the grayscale values ​​of the column pixel points; the second grayscale histogram is obtained by performing grayscale statistics in the column direction on each sub-image, and the horizontal axis in the second grayscale histogram represents the position of the column pixel points, and the vertical axis represents the accumulated value of the grayscale values ​​of the row pixel points.

[0068] In one example, the unit length of the horizontal coordinate in the first grayscale histogram obtained by performing grayscale statistics on the first sub-image represents the length of each pixel, the value corresponding to the horizontal coordinate in the first grayscale histogram represents the position of the row pixels in the row direction of the first sub-image from left to right, the vertical coordinate of the first grayscale histogram represents the accumulated value of the grayscale values ​​of the column pixels, and the vertical coordinate in the histogram represents the vertex coordinates of the histogram lines. Figure 6 As shown, it is an example diagram of the first grayscale histogram of the first sub-image provided by the embodiment of the present application. Wherein, the coordinate (800, 120) in the first grayscale histogram indicates that the cumulative value of the grayscale values ​​of the column pixels in the column direction corresponding to the 800th pixel from left to right in the row direction of the first sub-image is 120, or the cumulative value of the grayscale values ​​of all the column pixels in the 800th column from left to right in the first sub-image is 120.

[0069] In another example, the unit length of the horizontal coordinate in the second grayscale histogram obtained by performing grayscale statistics on the third sub-image represents the length of each pixel, the value corresponding to the horizontal coordinate in the second grayscale histogram represents the position of the column pixels in the column direction of the third sub-image from bottom to top, the vertical coordinate of the second grayscale histogram represents the accumulated value of the grayscale values ​​of the row pixels, and the vertical coordinate in the histogram represents the vertex coordinates of the histogram lines. Figure 7 As shown, it is an example diagram of the second grayscale histogram of the third sub-image provided in an embodiment of the present application. Wherein, the coordinate (470, 145) in the second grayscale histogram indicates that the cumulative value of the grayscale values ​​of the row pixels corresponding to the 470th pixel from bottom to top in the column direction of the third sub-image is 145, or the cumulative value of the grayscale values ​​of all the row pixels from bottom to top in the 470th row in the third sub-image is 145.

[0070] Step S32: determining the trajectory line features in the first direction and the trajectory line features in the second direction in each sub-image based on the two grayscale histograms corresponding to each sub-image.

[0071] In one embodiment, the ordinate in the first grayscale histogram can be used to indicate the size of the grayscale value in the column of the corresponding sub-image, and the ordinate in the second grayscale histogram can be used to indicate the size of the grayscale value in the row of the corresponding sub-image. Referring again to the binarization method in step S21, after determining the target grayscale threshold according to the grayscale of the trajectory line, the grayscale value of the pixel points in each sub-image that are greater than or equal to the target grayscale threshold is set to 1 (white). Therefore, the larger ordinate in the first grayscale histogram can be used to indicate that there are more trajectory line features in a column of the corresponding sub-image, and the larger ordinate in the second grayscale histogram can be used to indicate that there are more trajectory line features in a row of the corresponding sub-image.

[0072] In one embodiment, based on the two grayscale histograms corresponding to each sub-image, determining the trajectory line features in the first direction and the trajectory line features in the second direction in each sub-image may include: determining the ordinate (e.g., Figure 7 The horizontal coordinate corresponding to the vertical coordinate of the line vertex in the circle in the middle) is used as the straight line in the second direction where the row pixel point at the position of the row pixel point corresponding to the horizontal coordinate is located as the trajectory line feature of the second direction in the sub-image; determine the vertical coordinate (for example, the vertical coordinate of the second grayscale histogram of each sub-image) that is greater than the preset second trajectory line feature threshold. Figure 6 The horizontal coordinate corresponding to the vertical coordinate of the line vertex in the circle in the middle) is used as the trajectory line feature of the first direction in the sub-image, where the column pixel point at the position of the column pixel point corresponding to the horizontal coordinate is located. The first direction (horizontal direction) is parallel to the upper boundary, and the second direction (vertical direction) is perpendicular to the first direction.

[0073] In one embodiment, the method further includes: performing position comparison on the trajectory features in the multiple sub-images to obtain the offset between the trajectory features in the same direction, and performing position correction on the trajectory features according to the offset. Referring to the description in step S22, since the captured target image may be distorted, the influence of the image distortion in two directions on the trajectory features can be eliminated by using two sub-images that are compared with each other.

[0074] Specifically, the method for obtaining the offset between trajectory line features in the same direction may include but is not limited to: (a) comparing the first rank of the row pixel points corresponding to the trajectory line features in the second direction in the first sub-image with the second rank of the row pixel points corresponding to the trajectory line features in the second direction in the second sub-image, and obtaining the offset of the trajectory line features in the second direction according to the difference between the first rank and the second rank; comparing the third rank of the row pixel points corresponding to the trajectory line features in the first direction in the third sub-image with the fourth rank of the row pixel points corresponding to the trajectory line features in the first direction in the fourth sub-image, and obtaining the offset of the trajectory line features in the second direction according to the difference between the third rank and the fourth rank; (b) obtaining a first difference image between the first sub-image and the second sub-image, and determining the offset of the trajectory line features in the second direction according to the distance between the trajectory line features in the second direction in the first difference image; obtaining a second difference image between the third sub-image and the fourth sub-image, and determining the offset of the trajectory line features in the first direction according to the distance between the trajectory line features in the first direction in the second difference image. Among them, the offset can indicate whether translation or tilt occurs between the trajectory line features in the same direction. For example, when it is determined that the trajectory line features in the second direction in the first difference image are parallel to each other, it is determined that the offset is only caused by translation; when it is determined that the trajectory line features in the second direction in the first difference image are not parallel to each other, it is determined that the offset is caused by tilt.

[0075] In one embodiment, performing position correction on the trajectory line feature according to the offset may include: if the offset indicates that the trajectory line feature in the same direction has only been translated, translating the offset trajectory line feature to eliminate the offset; if the offset indicates that the trajectory line feature in the same direction has been tilted, using a tangent function in a trigonometric function to calculate the offset angle caused by the tilt, and rotating the offset trajectory line feature according to the corresponding offset angle to eliminate the offset.

[0076] Step S33, generating the trajectory line image in the preprocessed image according to the trajectory line features in the first direction and the trajectory line features in the second direction in each sub-image.

[0077] In one embodiment, all sub-images are arranged according to their relative positions in the target image, and the third sub-image is connected to the trajectory line features in the first direction in the fourth image, and the first sub-image is connected to the trajectory line features in the second direction in the second sub-image, to generate the trajectory line image, which only contains trajectory lines.

[0078] Step S23, obtaining a first feature map of the target image and a second feature map of the trajectory image.

[0079] In one embodiment, obtaining the first feature map of the target image and the second feature map of the trajectory line image includes: performing multi-scale feature extraction on the target image based on a scale invariant feature transform (SIFT) method to obtain the first feature map; performing multi-scale feature extraction on the trajectory line image based on the SIFT method to obtain the second feature map.

[0080] Specifically, the difference pyramid in the SIFT method can be used to extract multi-scale features from the image. For example, the xfeatures2d.SIFT_create function of OPENCV can be used to create a SIFT detector, and then the detectAndCompute function can be called to perform feature marking on the trajectory image and the target image respectively, which can be expressed as:

[0081] kp1, des1=sift.detectAndCompute(img1,None),

[0082] kp2, des2=sift.detectAndCompute(img2,None),

[0083] Among them, img1 represents the trajectory image, and img2 represents the target image.

[0084] In other embodiments, models such as Convolutional Neural Networks (CNN), Pyramid Network, Feature Pyramid Network (FPN), and Spatial Pyramid Pooling (SPP) may be used to implement the multi-scale feature extraction.

[0085] Step S24: determining the relative position of the trajectory line image in the target image according to the first feature map and the second feature map.

[0086] In one embodiment, determining the relative position of the trajectory line image in the target image based on the first feature map and the second feature map includes: performing position matching on the first feature map and the second feature map based on a fast nearest neighbor search algorithm to obtain the relative position. Specifically, a plurality of local feature points that match each other can be determined in the first feature map and the second feature map, respectively, and the relative position is determined based on the positions of the plurality of local feature points, and the local feature points can be intersection points of the trajectory line features. The relative position can be used to indicate the distribution coordinates of the trajectory line features in the target image.

[0087] In one embodiment, the fast nearest neighbor search algorithm includes a FLANN (Fast Approximate Nearest Neighbor Search Library) algorithm, and the FLANN matcher is constructed using the FlannBasedMatcher function of OPENCV. The function used can be expressed as:

[0088] index params =dict(algorithm=0, trees=5),

[0089] search params =dict(checks=50),

[0090] flann=cv2.FlannBasedMatcher(index params , search params ), and then call the knnMatch function to match the features extracted from the layout image and the track line feature image:

[0091] matches=flann.knnMatch(des1, des2, k=2).

[0092] When the distance in the matching result matches is greater than 0.7, local feature points matching each other in the first feature map and the second feature map are obtained, and then the relative position is obtained according to the position of any local feature point.

[0093] Step S25, determining the position of the biochip according to the relative position and the distribution rule.

[0094] In one embodiment, determining the position of the biochip according to the relative position and the distribution rule includes: determining the relative distance between each two mutually parallel trajectory lines in the trajectory line image; determining the corner point position of the target subdomain according to the relative position, the relative distance and the distribution rule; determining the position of the target corner point in the biochip according to the corner point position of the target subdomain and the position of the target subdomain in the biochip. The position of the biochip can be determined by the position of the target corner point in the biochip, thereby realizing the positioning of the biochip.

[0095] Specifically, the distribution coordinates of the track line in the target image are determined according to the relative position of the track line image in the target image, and the relative distance between each two parallel track lines in the track line image is determined according to the distribution coordinates; then, the subdomain (Layout) to which the track line (Track) belongs in the target image is determined according to the relative distance of the track line in the target image and the distribution rule of the track line (refer to the description in step S21), so as to obtain the target subdomain (target Layout) to which the target image belongs and the corner point position of the target subdomain; then, based on the distribution rule of the subdomain in the biochip (refer to the description in step S21), the corner point position of the target subdomain in the biochip is determined (for example, the coordinates of the upper left corner of the target Layout); finally, the position of the target corner point is determined according to the distance between the corner point position of the target subdomain in the distribution rule of the subdomain in the biochip and the target corner point of the biochip (for example, the upper left corner of the biochip). Specifically, you can refer to Figure 3 The process of determining the position of the target corner point mentioned above is actually the following process from right to left: determine the Layout to which it belongs based on Track, and then determine the position of the corner point in the entire biochip based on Layout. The implementation basis of this process includes the distribution rules or laws of Track and Layout in the biochip.

[0096] For example Figure 8 The figure is a flow chart of a biochip positioning method provided by another embodiment of the present application. The biochip positioning method provided by the embodiment of the present application takes an image of any position in the Layout of the upper left corner of the sequencing chip (the image size is smaller than one Layout), selects 4 ROIs around the image, and determines the position of the Track line by accumulating the grayscale values ​​of the rows and columns, redraws the image of the Track line, and then performs template matching to obtain the coordinates of the corner point position of the biochip.

[0097] For example Fig. 9 The figure shows a flow chart of a biochip positioning method provided by another embodiment of the present application. The biochip positioning method provided by the embodiment of the present application extracts and draws a trajectory feature image by the grayscale of the trajectory feature in the input image actually shot of a randomly selected smaller target area in the biochip, performs feature matching to obtain the relative coordinates of the trajectory feature image in the Layout, and then determines the relative position of the trajectory feature image in the biochip (chip platform) in combination with the distribution rule of the trajectory, thereby determining the corner point position of the biochip, which can improve the accuracy and efficiency of the biochip corner point positioning without the need for manual positioning of the chip corner point.

[0098] Fig.10 It is a structural diagram of a biochip positioning device provided in one embodiment of the present application.

[0099] In some embodiments, the biochip positioning device 40 may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments in the biochip positioning device 40 may be stored in a memory of an electronic device and executed by at least one processor to perform (see Figure 2 Description) The positioning function of the biochip.

[0100] In this embodiment, the positioning device 40 of the biochip can be divided into multiple functional modules according to the functions it performs. The functional modules may include: a preprocessing module 401, an acquisition module 402, and a determination module 402. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functional implementation method of each module in the positioning device 40 of the biochip can refer to the above definition of the positioning method of the biochip, and will not be repeated here.

[0101] The preprocessing module 401 is used to collect and preprocess a target image of a target area of ​​a biochip to obtain a preprocessed image of the target area, wherein the target area is smaller than or equal to a single sub-area.

[0102] The determination module 402 is used to select multiple regions of interest in the target image and determine multiple sub-images corresponding to the multiple regions of interest based on the preprocessed image, extract trajectory lines in each of the regions of interest based on the multiple sub-images and construct a trajectory line image in the preprocessed image.

[0103] The acquisition module 403 is used to acquire the first feature map of the target image and the second feature map of the trajectory image.

[0104] The determination module 402 is further configured to determine a relative position of the trajectory line image in the target image according to the first feature map and the second feature map.

[0105] The determination module 402 is further configured to determine the position of the biochip according to the relative position and the distribution rule.

[0106] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the methods in the above-mentioned embodiments of the present application.

[0107] The computer-readable storage medium may be an internal memory of the electronic device described in the above embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device.

[0108] In some embodiments, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0109] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0110] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0111] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0113] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A biochip positioning method, characterized in that: The biochip includes sub-domains that are repeatedly distributed according to a preset distribution rule, and the sub-domains include a plurality of trajectory lines. The method includes: Acquiring a target image of a target area of ​​the biochip and performing preprocessing to obtain a preprocessed image of the target area, wherein the target area is smaller than or equal to a single sub-area; Selecting a plurality of regions of interest in the target image and determining a plurality of sub-images corresponding to the plurality of regions of interest according to the preprocessed image, extracting trajectory lines in each of the regions of interest based on the plurality of sub-images and constructing a trajectory line image in the preprocessed image; Acquire a first feature map of the target image and a second feature map of the trajectory image; Determine the relative position of the trajectory line image in the target image according to the first feature map and the second feature map; The position of the biochip is determined according to the relative position and the distribution rule.

2. The biochip positioning method according to claim 1, characterized in that: The target region represents a rectangular region randomly intercepted from the target sub-region in the biochip, and the area of ​​the target region is smaller than or equal to the target sub-region; The preprocessing includes: determining a target grayscale threshold according to the grayscale of the trajectory line, and performing binarization processing on the target image based on the target grayscale threshold; The plurality of trajectory lines distributed according to a preset distribution rule include: a first group of trajectory lines distributed in parallel in a first direction and a second group of trajectory lines distributed in parallel in a second direction, wherein the first direction is perpendicular to the second direction.

3. The biochip positioning method according to claim 2, characterized in that: Determining the position of the biochip according to the relative position and the distribution rule comprises: Determine the relative distance between every two mutually parallel trajectory lines in the trajectory line image; Determine the corner point position of the target subdomain according to the relative position, the relative distance and the distribution rule; The position of the target corner point in the biochip is determined according to the position of the corner point of the target subdomain and the position of the target subdomain in the biochip.

4. The biochip positioning method according to claim 1, characterized in that: The step of selecting a plurality of regions of interest in the target image and determining a plurality of sub-images corresponding to the plurality of regions of interest according to the preprocessed image comprises: An image of an area in the preprocessed image corresponding to each area of ​​interest in the target image is taken as a sub-image, wherein the multiple sub-images include: a first sub-image corresponding to a first area of ​​interest including a complete upper boundary of the preprocessed image, a second sub-image corresponding to a second area of ​​interest including a complete lower boundary of the preprocessed image, a third sub-image corresponding to a third area of ​​interest including a complete left boundary of the preprocessed image, and a fourth sub-image corresponding to a fourth area of ​​interest including a complete right boundary of the preprocessed image.

5. The biochip positioning method according to claim 4, characterized in that: The step of extracting the trajectory lines in each of the regions of interest based on the multiple sub-images and constructing the trajectory line image in the preprocessed image comprises: Performing grayscale statistics on each sub-image to obtain two grayscale histograms corresponding to each sub-image, wherein the two grayscale statistical histograms include a first grayscale histogram and a second grayscale histogram, the abscissa in the first grayscale histogram represents the order of row pixels, and the ordinate represents the accumulated value of grayscale values ​​of column pixels, and the abscissa in the second grayscale histogram represents the order of column pixels, and the ordinate represents the accumulated value of grayscale values ​​of row pixels; Based on two grayscale histograms corresponding to each sub-image, determining a trajectory line feature in a first direction and a trajectory line feature in a second direction in each sub-image, wherein the first direction is parallel to the upper boundary, and the second direction is perpendicular to the first direction; The trajectory line image in the preprocessed image is generated according to the trajectory line features in the first direction and the trajectory line features in the second direction in each sub-image.

6. The biochip positioning method according to claim 5, characterized in that: The method further comprises: Position comparison is performed on the trajectory line features in the multiple sub-images to obtain the offset between the trajectory line features in the same direction, and position correction is performed on the trajectory line features according to the offset.

7. The biochip positioning method according to claim 1, characterized in that: The acquiring of the first feature map of the target image and the second feature map of the trajectory image comprises: Performing multi-scale feature extraction on the target image based on a scale-invariant feature transform (SIFT) method to obtain the first feature map; Multi-scale feature extraction is performed on the trajectory line image based on the SIFT method to obtain the second feature map.

8. The biochip positioning method according to claim 1, characterized in that: Determining the relative position of the trajectory line image in the target image according to the first feature map and the second feature map includes: The first feature map and the second feature map are position matched based on a fast nearest neighbor search algorithm to obtain the relative position.

9. An electronic device, characterized in that: The electronic device comprises a processor and a memory, and the processor is used to implement the biochip positioning method as described in any one of claims 1 to 8 when executing the computer program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the biochip positioning method as described in any one of claims 1 to 8 is implemented.