HK40035909B - Method, device and computer program product for detecting bright spots on images - Google Patents
Method, device and computer program product for detecting bright spots on images Download PDFInfo
- Publication number
- HK40035909B HK40035909B HK42021026024.6A HK42021026024A HK40035909B HK 40035909 B HK40035909 B HK 40035909B HK 42021026024 A HK42021026024 A HK 42021026024A HK 40035909 B HK40035909 B HK 40035909B
- Authority
- HK
- Hong Kong
- Prior art keywords
- image
- pixel
- value
- pixel point
- candidate
- Prior art date
Links
Description
Technical Field
The present invention relates to the field of image processing, and in particular, to a method of detecting bright spots on an image, an apparatus for detecting bright spots on an image, and a computer program product.
Background
In the related art, the positioning of bright spots on an image has important application in gene sequencers and LED lamp light spots.
In a system for sequence determination using the optical imaging principle, such as nucleic acid sequence determination, image analysis is an important part, and determination of a nucleic acid sequence is achieved by means of detection and identification of a bright spot on an image, and conversion of the bright spot identified by detection into a base/nucleotide sequence. The accuracy of detection and localization of bright spots on the image directly determines the accuracy of gene sequencing.
In nucleic acid sequencing applications, how to simply, quickly and/or efficiently detect the hot spots on the image and use the hot spot information or accurately read the hot spot information needs to be developed and improved.
Disclosure of Invention
Embodiments of the present invention are directed to solving at least one of the technical problems occurring in the related art or at least providing an alternative practical solution.
According to one embodiment of the present invention, there is provided a method for detecting a bright spot on an image acquired from a field in which a base extension reaction occurs, a plurality of nucleic acid molecules with an optically detectable label being present in the field in which the base extension reaction occurs, at least a part of the nucleic acid molecules appearing as a bright spot on the image, the method comprising: preprocessing an image to obtain a preprocessed image; determining a critical value to simplify the preprocessed image, wherein assignment of pixel values of pixel points on the preprocessed image smaller than the critical value to a first preset value and assignment of pixel values of pixel points on the preprocessed image not smaller than the critical value to a second preset value is carried out to obtain a simplified image; determining a first bright spot detection threshold c1 based on the preprocessed image; identifying candidate bright spots on the image based on the preprocessed image and the simplified image, including judging a pixel matrix satisfying the following conditions as a candidate bright spot, a) in the preprocessed image, the pixel value of a central pixel of the pixel matrix is maximum, the pixel matrix can be represented as k1 × k2, both k1 and k2 are odd numbers larger than 1, the k1 × k2 pixel matrix comprises k1 × k2 pixels, b) in the preprocessed image and the simplified imageIn the simplified image, the pixel value of the central pixel point of the pixel point matrix is a second preset value, and the connected pixels of the pixel point matrix are larger thanAnd c) the pixel value of the central pixel point of the pixel point matrix in the preprocessed image is greater than a third preset value and meets g1 × g2>c1 G1 is a correlation coefficient of two-dimensional Gaussian distribution in a range of m1 × m2 with a central pixel point of the pixel point matrix as a center, g2 is a pixel in the range of m1 × m2, m1 and m2 are both odd numbers larger than 1, and the range of m1 × m2 contains m1 × m2 pixel points.
According to another embodiment of the present invention, there is provided an apparatus for detecting a bright spot on an image, the apparatus being used to carry out the method for detecting a bright spot on an image according to the above-mentioned embodiment of the present invention, the image being taken from a field in which a base extension reaction occurs, a plurality of nucleic acid molecules with optically detectable labels being present in the field in which the base extension reaction occurs, at least a part of the nucleic acid molecules appearing as a bright spot on the image, the apparatus including: the preprocessing unit is used for preprocessing the image to obtain a preprocessed image; the simplifying unit is used for determining a critical value to simplify the preprocessed image from the preprocessing unit, and the simplifying unit assigns the pixel value of the pixel point on the preprocessed image smaller than the critical value as a first preset value and assigns the pixel value of the pixel point on the preprocessed image not smaller than the critical value as a second preset value to obtain a simplified image; a first threshold determination unit configured to determine a first bright spot detection threshold c1 based on the preprocessed image from the preprocessing unit; a candidate bright spot determining unit, configured to identify a candidate bright spot on an image based on the preprocessed image from the preprocessing unit and the simplified image from the simplifying unit, including determining that a pixel matrix satisfying the following conditions is a candidate bright spot, a) in the preprocessed image, a pixel value of a central pixel of the pixel matrix is maximum, the pixel matrix may be represented as k1 × k2, both k1 and k2 are odd numbers greater than 1, the k1 × k2 pixel matrix includes k1 × k2 pixels, and b) in the simplified image, the pixel of the central pixel of the pixel matrix is represented as k1 × k2 pixelsThe value is a second preset value and the connected pixels of the pixel point matrix are larger thanAnd c) the pixel value of the central pixel point of the pixel point matrix in the preprocessed image is greater than a third preset value and meets g1 × g2>c1 G1 is a correlation coefficient of two-dimensional Gaussian distribution in a range of m1 × m2 with a central pixel point of the pixel point matrix as a center, g2 is a pixel value in a range of m1 × m2, m1 and m2 are both odd numbers larger than 1, and the range of m1 × m2 contains m1 × m2 pixel points.
According to still another embodiment of the present invention, there is provided a computer-readable storage medium storing a program for execution by a computer, the executing of the program including performing the method for detecting bright spots on an image in any of the above embodiments. The computer-readable storage medium may include: read-only memory, random access memory, magnetic or optical disk, and the like.
According to still another embodiment of the present invention, there is provided a computer program product including instructions for implementing detection of bright spots on an image, the instructions causing a computer to execute some or all of the steps of the bright spot detection method in the above-described embodiment of the present invention when the computer executes the program.
The term "bright spots" or "bright spots" refers to light-emitting points on an image, where one light-emitting point occupies at least one pixel. So called "pixel point" is the same as "pixel".
In embodiments of the invention, the image is from a sequencing platform using optical imaging principles for sequence determination, including but not limited to the sequencing platforms of the warfarin BGI-seq, illumina/Solexa, life Technologies ABI SOLID, and Roche 454, the detection of the so-called "bright spots" being the detection of optical signals of extended bases or base clusters.
The method, apparatus and system/computer program product for detecting bright spots on an image according to any of the above embodiments of the present invention can rapidly and effectively detect bright spots (spots or peaks) on an image, especially an image collected from a nucleic acid sequencing reaction. The method has no special limitation on the image to be detected, namely the original input data, is suitable for processing and analyzing the image generated by any platform for measuring the nucleic acid sequence by utilizing the optical detection principle, comprises image quality evaluation for focusing and tracking, comprises image processing and analysis for base recognition and the like, has the characteristics of high accuracy and high efficiency, and can acquire more information representing the sequence from the image.
It should be noted that, currently, the known method and/or system for identifying and locating the bright spots on the sequencing image are developed mainly for images from the second generation sequencing platform, and most of the sequencing chips used in the second generation sequencing are of an array type, that is, probes on the sequencing chips are regularly arranged, and an image obtained by photographing is a pattern (pattern) image, generally, signals on the image are regular, and accurate identification of effective signals is relatively easy; in addition, since second-generation sequencing generally involves signal amplification (e.g., amplification) of nucleic acid templates, typically a nucleic acid template is present in the form of a cluster (cluster) containing at least hundreds of copies, i.e., the signal of the nucleic acid template is a collection of signals of a large number of molecules of the nucleic acid template, it can be understood that the signal reflected on the image is strong and/or has a specific morphological feature, or so to speak, is significantly different from the non-target signal, and is relatively easy to identify and locate. Therefore, the speckle detection on the general second-generation sequencing image can obtain a large amount of speckle signals corresponding to the sequence without special image processing and comprehensive and high-accuracy identification and judgment on the speckle of the corresponding sequence information, and then the speckle signals are identified and converted into the sequence information.
For the third generation sequencing, namely single molecule sequencing, the method is limited by the development of the related technology of the surface treatment of the chip at present, and the used sequencing chip is random, namely probes on the sequencing chip are randomly arranged, and images obtained by photographing are random images which are not easy to process and analyze; moreover, in general single molecule sequencing, due to a method that does not include a nucleic acid template, the nucleic acid template exists in the form of a single molecule or a few molecules, which is reflected in a weak signal that is easily interfered/submerged on an image, and the amount of the identified bright spots corresponds to the accurate identification of the bright spots of the nucleic acid molecule, so that the throughput and the amount of effective data can be directly determined. By "single molecule" is meant one or a small number of molecules, for example no more than 10 molecules.
The method, the device and/or the corresponding computer product for detecting the bright spots on the image are/is suitable for detecting the bright spots on the sequencing image, and particularly have advantages for random images and signal identification with high accuracy requirements.
Additional aspects and advantages of embodiments of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of embodiments of the invention.
Drawings
Fig. 1 is a flowchart illustrating a method for detecting bright spots on an image according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a pixel matrix and connected pixels according to an embodiment of the invention.
Fig. 3 is a schematic diagram of pixel values in a range of m1 × m2 centered on a central pixel point of the pixel point matrix on the simplified image according to the embodiment of the present invention.
Fig. 4 is a flowchart illustrating a method for detecting bright spots on an image according to an embodiment of the present invention.
Fig. 5 is a schematic diagram showing the results of bright spot detection with and without S50 in the embodiment of the present invention.
Fig. 6 is a schematic diagram of an apparatus for detecting bright spots on an image according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of an apparatus for detecting bright spots on an image according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
In the description of the present invention, "first", "second", "third", and "fourth" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying any order or number of technical features indicated. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The sequencing, also referred to as sequencing, in embodiments of the invention refers to nucleic acid sequencing, including DNA sequencing and/or RNA sequencing, including long-fragment sequencing and/or short-fragment sequencing.
Sequencing can be carried out by a sequencing platform, and the sequencing platform can be selected from but not limited to Hisq/Miseq/Nextseq sequencing platform of Illumina, ion Torrent platform of Thermo Fisher/Life Technologies, BGISEQ platform of Huada gene and single-molecule sequencing platform; the sequencing mode can select single-ended sequencing or double-ended sequencing; the sequencing results/data obtained are the fragments read by the assay, called reads. The length of a read is called the read length.
Referring to fig. 1, a method for detecting a bright spot on an image, according to an embodiment of the present invention, the image is captured from a field in which a base extension reaction occurs, a plurality of nucleic acid molecules with optically detectable labels are present in the field in which the base extension reaction occurs, and at least a portion of the nucleic acid molecules appear as a bright spot on the image, the method includes: s10, preprocessing an image to obtain a preprocessed image; s20, determining a critical value to simplify the preprocessed image, wherein the assignment of the pixel value of the pixel point on the preprocessed image smaller than the critical value to a first preset value and the assignment of the pixel value of the pixel point on the preprocessed image not smaller than the critical value to a second preset value is carried out to obtain the simplified image; s30, determining a first bright spot detection threshold c1 based on the preprocessed image; s40 identifying candidate hot spots on the image based on the preprocessed image and the reduced image, including determining that satisfaction is metA pixel matrix of at least two conditions in a) to c) below is a candidate bright spot, a) in the preprocessed image, the pixel value of the central pixel of the pixel matrix is maximum, the pixel matrix can be represented as k1 × k2, both k1 and k2 are odd numbers greater than 1, the k1 × k2 pixel matrix comprises k1 × k2 pixels, b) in the simplified image, the pixel value of the central pixel of the pixel matrix is a second preset value, and the connected pixels of the pixel matrix are greater than the connected pixels of the pixel matrixAnd c) the pixel value of the central pixel point of the pixel point matrix in the preprocessed image is greater than a third preset value and meets g1 × g2>c1 G1 is a correlation coefficient of two-dimensional Gaussian distribution in a range of m1 × m2 with a central pixel point of the pixel point matrix as a center, g2 is a pixel in the range of m1 × m2, m1 and m2 are both odd numbers larger than 1, and the range of m1 × m2 contains m1 × m2 pixel points.
The method for detecting the bright spots on the image comprises the steps that the judgment condition or the combination of the judgment conditions is determined by the inventor through mass data training, and the method can quickly and effectively realize the detection of the bright spots on the image, particularly the image collected from the nucleic acid sequence determination reaction. The method has no special limitation on the image to be detected, namely the original input data, is suitable for processing and analyzing the image generated by any platform for determining the nucleic acid sequence by using the optical detection principle, including but not limited to second generation and third generation sequencing, has the characteristics of high accuracy and high efficiency, and can acquire more information representing the sequence from the image. Especially for random images and signal recognition with high accuracy requirements.
For a grayscale image, the pixel values are the same as the grayscale values. If the image is a color image, one pixel point of the color image has three pixel values, the color image can be converted into a gray image, and then bright spot detection is carried out, so that the calculated amount and the complexity of the image detection process are reduced. The non-grayscale image may be optionally converted to a grayscale image using, but not limited to, floating point algorithm, integer method, shift method, or average method, etc.
In some embodiments, S10 pre-processes the image, including: determining the background of the image by utilizing an opening operation; converting the image into a first image by utilizing top hat operation based on the background; performing Gaussian blur processing on the first image to obtain a second image; the second image is sharpened to obtain a so-called pre-processed image. Therefore, the noise of the image can be effectively reduced or the signal to noise ratio of the image can be improved, and the accurate detection of the bright spots is facilitated.
The opening operation is a morphological process, namely, a process of expanding first and then corroding, wherein the corrosion operation can make the foreground (interested part) smaller, and the expanding can make the foreground larger; the on operation can be used to eliminate small objects, separate objects at fine points, and smooth the boundaries of larger objects without significantly changing their area. The size of the structural element p1 × p2 (basic template for processing an image) for performing an open operation on an image in this embodiment is not particularly limited, and p1 and p2 are odd numbers. In one example, the structural elements p1 × p2 may be 15 × 15, 31 × 31, etc., and eventually a preprocessed image may be obtained that facilitates subsequent processing analysis.
Top hat operations are often used to separate patches that are brighter than nearby points (bright spots/bright spots), and in the case where an image has a large background and tiny objects are regular, top hat operations can be used to extract the background. In one example, top-hat transforming the image includes performing an open operation on the image, and subtracting the open operation result from the original image to obtain a first image, i.e., a top-hat transformed image. The mathematical expression of top-hat transformation is dst = tophat (src, element) = src-open (src, element). The inventor considers that the result of the opening operation enlarges the crack or the local low-brightness area, so that the image obtained by subtracting the image after the opening operation from the original image highlights the area brighter than the area around the outline of the original image, the operation is related to the size of the selected nucleus, and can be considered to be related to the expected size of the bright point/bright spot, if the bright point is not the expected size, the effect after the processing can cause the whole image to generate a plurality of small bulges, and particularly, the bright point/bright spot can be stained in a lump by referring to the virtual focus image. In one example, the expected size of the bright spot, i.e., the size of the selected kernel, is 3 × 3, and the resulting top-hat transformed image is favorable for further denoising processing.
Gaussian Blur (Gaussian Blur), also called Gaussian filtering, is a linear smoothing filter, is suitable for eliminating Gaussian noise, and is widely applied to noise reduction processes of image processing. Generally speaking, gaussian filtering is a process of performing weighted average on the whole image, and the value of each pixel point is obtained by performing weighted average on the value of each pixel point and other pixel values in the neighborhood. The specific operation of gaussian filtering is: each pixel in the image is scanned using a template (or convolution, mask) and the weighted average gray value of the pixels in the neighborhood determined by the template is used to replace the value of the center pixel of the template. In one example, the first image is subjected to gaussian blurring using a gaussian filtered gaussian spread black function in OpenCV, the gaussian distribution parameter Sigma takes 0.9, the two-dimensional filter matrix (convolution kernel) used is 3 × 3, and after this gaussian blurring from the image perspective, the small bumps on the first image are smoothed and the image edges are smooth. Further, the second image, i.e., the gaussian filtered image, is sharpened, for example, by performing a two-dimensional laplacian sharpening, and after the image is processed from the viewpoint of the image, the edge is sharpened, and the image after the gaussian blur is restored.
In certain embodiments, S20 comprises: determining a critical value based on the background and the preprocessed image; and comparing the pixel value of the pixel point on the preprocessed image with the critical value, assigning the pixel value of the pixel point on the preprocessed image smaller than the critical value as a first preset value, and assigning the pixel value of the pixel point on the preprocessed image not smaller than the critical value as a second preset value to obtain the simplified image. Therefore, according to the critical value determining mode and the determined critical value summarized by a large amount of test data of the inventor, the preprocessed image is simplified, such as binaryzation, so that the method is beneficial to accurate detection of subsequent bright spots, accurate identification of subsequent bases, acquisition of high-quality data and the like.
Specifically, in some embodiments, S20 includes dividing the sharpened result obtained in S10 by the division operation result to obtain a set of values corresponding to the image pixel points; and determining the critical value of the image after the binarization preprocessing through the set of values. For example, the set of values may be sorted in ascending order of magnitude, and the value corresponding to the 20 th, 30 th or 40 th percentile of the set of values may be used as the binarization critical value/threshold value. Therefore, the obtained binary image is beneficial to accurate detection and identification of subsequent bright spots.
In one example, the structural element of the open operation in the S10 image preprocessing is p1 × p2, so called dividing the preprocessed image (sharpened result) by the open operation result to obtain a group of arrays/matrices p1 × p2 having the same size as the structural element, in each array, the p1 × p2 values included in the array are arranged in ascending order according to size, and the value corresponding to the thirty-th percentile in the array is taken as the binarization critical value/threshold value of the region (value matrix), so that the threshold value is respectively determined to binarize each region on the image, and the finally obtained binarization result highlights real information while denoising, which is favorable for accurate detection of subsequent bright spots.
In some embodiments, S30 includes determining the first speckle detection threshold using the ohd method. Otsu's method (OTSU algorithm) can also be called maximum inter-class variance method, and it uses the maximum inter-class variance to segment the image, meaning that the probability of misclassification is small and the accuracy is high. Assuming that the segmentation threshold of the foreground and the background of the preprocessed image is T (c 1), the proportion of the number of pixels belonging to the foreground in the whole image is w 0 Average gray of μ 0 (ii) a The proportion of the number of pixels belonging to the background to the whole image is w 1 With an average gray level of mu 1 . The total average gray level of the image to be processed is marked as mu, the inter-class variance is marked as var, and then:
μ=ω 0 *μ 0 +ω 1 *μ 1 ;var=ω 0 (μ 0 -μ) 2 +ω 1 (μ 1 -μ) 2 substituting the latter into the former to obtain an equivalent formula: var = ω 0 ω 1 (μ 1 -μ 0 ) 2 . And obtaining a segmentation threshold T which maximizes the inter-class variance by adopting a traversal method, namely obtaining the first bright spot detection threshold c1.
In some embodiments, the S40 identifies the candidate bright spots on the image based on the preprocessed image and the simplified image, including determining that the pixel matrix satisfying the three conditions a) -c) is a candidate bright spot. Therefore, the accuracy of the subsequent determination of the nucleic acid sequence based on the speckle information and the quality of the off-line data can be effectively improved.
Specifically, in one example, the condition that needs to be satisfied by the determination of the candidate bright spots includes a), k1 and k2 may be equal or unequal. In one example, the imaging system related parameters are: the objective lens is 60 times, the size of the electronic sensor is 6.5 μm, the minimum size of the image formed by the microscope and the electronic sensor can be seen to be 0.1 μm, the obtained image or the input image can be 16-bit gray scale or color image of 512 × 512, 1024 × 1024 or 2048 × 2048, and the value ranges of k1 and k2 are both more than 1 and less than 10. In one example, in one pre-processed image, k1= k2=3 is set in accordance with the expected size of the bright spot; in another example, k1= k2=5 is set.
In one example, the condition that the candidate bright spot needs to be determined to satisfy includes b) in the simplified image, the pixel value of the central pixel of the pixel matrix is a second preset value, and the connected pixel of the pixel matrix is greater than the second preset valueThat is, the pixel value of the central pixel is greater than the threshold value and the connected pixels are greater than two thirds of the matrix. Here, two or more pixels whose adjacent pixel values are all the second preset value are called connected pixels/connected pixels (pixel connectivity), for example, the simplified image is a binarized image, the first preset value is 0, the second preset value is 1, as shown in fig. 2, the bold and enlarged representation indicates the center of the called pixel matrix, the thick frame indicates the pixel matrix 3 × 3, that is, k1= k2=3, the pixel value of the center pixel of the matrix is 1, and the connected pixels are 4 (smaller than the connected pixels) which are smaller than the connected pixels/connected pixels (smaller than the connected pixels)) And if the pixel point matrix does not meet the condition b), non-candidate bright spots.
In one example, the condition that needs to be satisfied for determining the candidate bright spots includes c), and in the preprocessed image, g2 is a modified m1 × m2 range of pixels, that is, a modified m1 × m2 range of pixel sums. In one example, the correction is performed according to a ratio of the pixels having the pixel values of the second preset value in the corresponding m1 × m2 range of the simplified image, for example, as shown in fig. 3, m1= m2=5, a ratio of the pixels having the pixel values of the second preset value in the corresponding m1 × m2 range of the simplified image is 13/25 (13 "1"), and g2 after the correction is 13/25 of the original ratio. Therefore, the method is beneficial to more accurately detecting and identifying the bright spots and is beneficial to analyzing and reading subsequent bright spot information.
In some embodiments, as shown in fig. 4, the method further includes S50 determining whether the candidate hot spot is a hot spot. In one example, S50 includes: and determining a second bright spot detection threshold value based on the preprocessed image, and judging the candidate bright spots with the pixel values not smaller than the second bright spot detection threshold value as the bright spots. In a specific example, the pixel value of the pixel point where the coordinate of the candidate bright spot is located is used as the pixel value of the candidate bright spot. Through further screening of the candidate bright spots by using the second bright spot detection threshold determined based on the preprocessed image, at least one part of the bright spots which are more likely to be the image background and have brightness (intensity) and/or shape of 'bright spots' can be excluded, so that accurate identification of a subsequent sequence based on the bright spots is facilitated, and the quality of off-line data is improved.
In one example, the coordinates of the candidate hot spots, including sub-pixel level coordinates, may be obtained using a barycentric method. And calculating the gray value of the coordinate position of the candidate bright spot by using a bilinear interpolation method.
In some specific examples, S50 includes: dividing the preprocessed image into a group of regions (blocks) with a preset size, and sequencing pixel values of pixel points in the regions to determine a second bright spot detection threshold corresponding to the regions; and judging the candidate bright spots with the pixel values not less than the second bright spot detection threshold value corresponding to the area as the bright spots. Therefore, the difference of different areas of the image, such as the integral fall of light intensity, is distinguished, the further detection and identification of the bright spots are separately carried out, the accurate identification of the bright spots is facilitated, and more bright spots are obtained.
The preprocessed image is said to be divided into a set of regions (blocks) of a predetermined size, with or without overlap between the blocks. In one example, there is no overlap between blocks. In some embodiments, the size of the pre-processed image is not less than 512 × 512, for example 512 × 512, 1024 × 1024, 1800 × 1800, 2056 × 2056, etc., and the region of the predetermined size may be set to 200 × 200. Therefore, the method is favorable for quickly calculating, judging and identifying the bright spots.
In some embodiments, when the second bright spot detection threshold corresponding to the region is determined, the pixel values of the pixels in each block are arranged in an ascending order according to the size, and p10+ (p 10-p 1) × 4.1 is taken as the second bright spot detection threshold corresponding to the block, that is, the background of the block, where p1 represents the pixel value of the tenth percentile and p10 represents the pixel value of the tenth percentile. The threshold is a relatively stable threshold obtained by an inventor through a large amount of data training tests, and can eliminate a large amount of bright spots on the background. It will be appreciated that this threshold may need to be adjusted appropriately when the optical system is adjusted and the overall pixel distribution of the image changes. Fig. 5 is a schematic diagram showing comparison between before and after performing S50, that is, a schematic diagram showing a result of detecting bright spots before and after excluding the background of the area, the upper half of fig. 5 shows a result of detecting bright spots in S50, the lower half shows a result of detecting bright spots without performing S50, and the cross mark is a candidate bright spot or a bright spot.
The logic and/or steps represented in the flowcharts or otherwise described herein, for example, as a sequence of executable instructions that can be considered to implement logical functions, can be embodied in any computer-readable storage medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. For the purposes of this description, a "computer-readable storage medium" can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
Referring to fig. 6, an apparatus 1000 for detecting a bright spot on an image according to an embodiment of the present invention is an apparatus for performing the method for detecting a bright spot on an image according to any one of the above embodiments of the present invention, where the image is acquired from a field in which a base extension reaction occurs, and a plurality of nucleic acid molecules with optically detectable labels are present in the field in which the base extension reaction occurs, and at least a part of the nucleic acid molecules appear as a bright spot on the image, the apparatus including: a preprocessing unit 100, configured to preprocess an image to obtain a preprocessed image; a simplifying unit 200, configured to determine a critical value to simplify the preprocessed image from the preprocessing unit, including assigning a pixel value of a pixel point on the preprocessed image smaller than the critical value to a first preset value, and assigning a pixel value of a pixel point on the preprocessed image not smaller than the critical value to a second preset value, so as to obtain a simplified image; a first threshold value determining unit 300 for determining a first bright spot detection threshold value c1 based on the pre-processed image from the pre-processing unit; a candidate hot spot determining unit 400, configured to identify a candidate hot spot on the image based on the preprocessed image from the preprocessing unit and the simplified image from the simplifying unit, including determining that a pixel matrix satisfying the following conditions is a candidate hot spot, a) in the preprocessed image, a pixel value of a central pixel of the pixel matrix is the largest, the pixel matrix may be represented as k1 × k2, where k1 and k2 are both odd numbers greater than 1, and k is an odd number greater than 11 x k2 pixel matrix contains k1 x k2 pixels, b) in the simplified image, the pixel value of the central pixel of the pixel matrix is the second preset value and the connected pixels of the pixel matrix are more thanAnd c) the pixel value of the central pixel point of the pixel point matrix in the preprocessed image is greater than a third preset value and meets g1 × g2>c1 G1 is a correlation coefficient of two-dimensional gaussian distribution in a range of m1 × m2 centered on a central pixel of the pixel matrix, g2 is a pixel value in a range of m1 × m2, both m1 and m2 are odd numbers greater than 1, and the range of m1 × m2 includes m1 × m2 pixels.
The above description of the advantages and technical features of the method for detecting bright spots on an image according to any embodiment of the present invention is also applicable to the apparatus for detecting bright spots according to the embodiment of the present invention, and will not be described herein again.
For example, as shown in fig. 7, in some examples, the apparatus 1000 further includes a second threshold determining unit 500 and a hot spot determining unit 600, the second threshold determining unit 500 is configured to determine a second hot spot detection threshold based on the preprocessed image from the preprocessing unit, and the hot spot determining unit 600 is configured to determine that a candidate hot spot having a pixel value not less than the second hot spot detection threshold is a hot spot.
In some examples, the pixel value of the candidate hot spot is the pixel value of the pixel point where the coordinates of the candidate hot spot are located.
In some examples, the second threshold determining unit 500 is configured to divide the preprocessed image into a group of regions with a predetermined size, and sort pixel values of pixel points in the region to determine a second hot spot detection threshold corresponding to the region; and the bright spot determining unit is used for judging the candidate bright spots with the pixel values not smaller than the second bright spot detection threshold value corresponding to the area as the bright spots.
In some examples, the pre-processing unit 100 is to: determining the background of the image by using an opening operation, converting the image into a first image by using a top hat operation based on the background, performing Gaussian blur processing on the first image to obtain a second image, and sharpening the second image to obtain a preprocessed image.
In some examples, the simplification unit 200 is configured to determine a critical value based on the background and the pre-processed image, and compare a pixel value of a pixel point on the pre-processed image with the critical value to obtain the simplified image.
In some examples, g2 is a pixel in the range of m1 × m2 after correction, and the pixel in the range of m1 × m2 is corrected according to a proportion of the pixel points, in the corresponding range of m1 × m2 of the simplified image, of which the pixel values are the second preset values.
Embodiments of the present invention also provide a computer program product, which includes instructions for implementing the method for detecting bright spots on an image, and the instructions, when executed by a computer, cause the computer to perform all or part of the steps of the method for detecting bright spots on an image in any of the above embodiments.
Those skilled in the art will appreciate that, in addition to implementing the controller/processor in purely computer readable program code means, the same functionality can be implemented entirely by logically transforming method steps into logic such that the controller takes the form of logic gates, switches, application specific integrated circuits, editable logic controllers, embedded microcontrollers and the like. Thus, such a controller/processor may be considered a hardware component, and the means included therein for performing the various functions may also be considered as an arrangement within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
In the description of the present specification, a description of one embodiment, some embodiments, one or some specific embodiments, one or some examples, etc. means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one example or example of the present invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims (19)
1. A method for detecting a bright spot on an image, wherein the image captures a field of view in which a base extension reaction occurs, a plurality of nucleic acid molecules with an optically detectable label being present in the field of view in which the base extension reaction occurs, and at least a portion of the nucleic acid molecules appear as a bright spot on the image, the method comprising:
preprocessing the image to obtain a preprocessed image;
determining a critical value to simplify the preprocessed image, wherein the step of assigning the pixel value of the pixel point on the preprocessed image smaller than the critical value to be a first preset value and assigning the pixel value of the pixel point on the preprocessed image not smaller than the critical value to be a second preset value is included to obtain a simplified image;
determining a first bright spot detection threshold c1 based on the preprocessed image;
identifying a candidate hot spot on the image based on the preprocessed image and the simplified image, including determining a matrix of pixels satisfying at least two of the following conditions a) -c) as one of the candidate hot spots,
a) In the preprocessed image, the pixel value of the central pixel point of the pixel point matrix is maximum, the pixel point matrix is represented as k1 x k2, both k1 and k2 are odd numbers larger than 1, the k1 x k2 pixel point matrix comprises k1 x k2 pixel points,
b) In the simplified image, the pixel value of the central pixel point of the pixel point matrix is a second preset value, and the connected pixel of the pixel point matrix is larger thanAnd
c) The pixel value of the central pixel point of the pixel point matrix in the preprocessed image is larger than a third preset value, and g1 × g2> c1 is satisfied, g1 is a correlation coefficient of two-dimensional Gaussian distribution in a range of m1 × m2 with the central pixel point of the pixel point matrix as the center, g2 is a pixel in the range of m1 × m2, m1 and m2 are odd numbers larger than 1, and the range of m1 × m2 includes m1 × m2 pixel points.
2. The method of claim 1, further comprising determining whether the candidate hot spot is the hot spot, comprising:
and determining a second bright spot detection threshold value based on the preprocessed image, and judging candidate bright spots with pixel values not smaller than the second bright spot detection threshold value as the bright spots.
3. The method of claim 2, wherein the pixel value of the candidate hot spot is a pixel value of a pixel point at which the coordinates of the candidate hot spot are located.
4. The method of claim 2, wherein determining a second speckle detection threshold based on the preprocessed image, and determining a candidate speckle having a pixel value not less than the second speckle detection threshold as the speckle, comprises:
dividing the preprocessed image into a set of regions of a predetermined size,
sorting the pixel values of the pixel points in the region to determine a second bright spot detection threshold corresponding to the region,
and for the candidate bright spots in the region, judging the candidate bright spots with the pixel values not smaller than the second bright spot detection threshold value corresponding to the region as the bright spots.
5. The method of claim 3, wherein determining a second speckle detection threshold based on the preprocessed image, and determining a candidate speckle having a pixel value not less than the second speckle detection threshold as the speckle comprises:
dividing the pre-processed image into a set of regions of a predetermined size,
sorting the pixel values of the pixel points in the area to determine a second hot spot detection threshold corresponding to the area,
and judging the candidate bright spots with the pixel values not less than the second bright spot detection threshold value corresponding to the area as the bright spots.
6. The method of any of claims 1-5, wherein pre-processing the image comprises:
determining a background of the image using an on operation,
converting the image into a first image using a top hat operation based on the background,
performing Gaussian blur processing on the first image to obtain a second image,
and sharpening the second image to obtain the preprocessed image.
7. The method of claim 6, wherein determining the threshold value to simplify the pre-processed image to obtain a simplified image comprises:
determining the critical value based on the background and the pre-processed image,
and comparing the pixel value of the pixel point on the preprocessed image with the critical value to obtain the simplified image.
8. The method according to any one of claims 1-5 and 7, wherein g2 is the modified pixels in the range of m1 × m2, and the modification is performed according to the proportion of pixels having the pixel values of the second predetermined value in the corresponding range of m1 × m2 of the simplified image.
9. The method of claim 6, wherein g2 is the modified pixels in the range of m1 × m2, and the modification is performed according to the ratio of the pixels having the pixel values of the second predetermined value in the corresponding range of m1 × m2 of the simplified image.
10. A device for detecting bright spots on an image, wherein said image is captured from a field in which a base extension reaction occurs, a plurality of optically detectable labeled nucleic acid molecules being present in the field in which the base extension reaction occurs, at least a portion of said nucleic acid molecules appearing as bright spots on said image, said device comprising:
the preprocessing unit is used for preprocessing the image to obtain a preprocessed image;
a simplifying unit, configured to determine a critical value to simplify the preprocessed image from the preprocessing unit, where assigning a pixel value of a pixel point on the preprocessed image that is smaller than the critical value to a first preset value and assigning a pixel value of a pixel point on the preprocessed image that is not smaller than the critical value to a second preset value to obtain a simplified image;
a first threshold determination unit configured to determine a first speckle detection threshold c1 based on the preprocessed image from the preprocessing unit;
a candidate bright spot determining unit for identifying candidate bright spots on the image based on the preprocessed image from the preprocessing unit and the simplified image from the simplifying unit, including determining a pixel matrix satisfying at least two of the following conditions a) -c) as one candidate bright spot,
a) In the preprocessed image, the pixel value of a central pixel point of a pixel point matrix is maximum, the pixel point matrix is represented as k1 x k2, both k1 and k2 are odd numbers larger than 1, the k1 x k2 pixel point matrix comprises k1 x k2 pixel points,
b) In the simplified image, the pixel value of the central pixel point of the pixel point matrix is a second preset value, and the connected pixels of the pixel point matrix are larger thanAnd
c) The pixel value of the central pixel point of the pixel point matrix in the preprocessed image is larger than a third preset value, and g1 × g2> c1 is satisfied, g1 is a correlation coefficient of two-dimensional Gaussian distribution within a range of m1 × m2 with the central pixel point of the pixel point matrix as the center, g2 is a pixel value within a range of m1 × m2, m1 and m2 are odd numbers larger than 1, and m1 × m2 contains m1 × m2 pixel points.
11. The apparatus of claim 10, further comprising a second threshold determination unit and a hot spot determination unit,
the second threshold determination unit is configured to determine a second speckle detection threshold based on the pre-processed image from the pre-processing unit,
the bright spot determination unit is configured to determine that the candidate bright spot having the pixel value not less than the second bright spot detection threshold is the bright spot.
12. The apparatus of claim 11, wherein the pixel value of the candidate hot spot is a pixel value of a pixel point at which coordinates of the candidate hot spot are located.
13. The apparatus according to claim 11, wherein the second threshold determining unit is configured to divide the preprocessed image into a group of regions with a predetermined size, and sort pixel values of pixel points in the region to determine a second hot spot detection threshold corresponding to the region;
the bright spot determining unit is configured to determine, as to the candidate bright spots located in the region, candidate bright spots whose pixel values are not smaller than the second bright spot detection threshold corresponding to the region as the bright spots.
14. The apparatus according to claim 12, wherein the second threshold determining unit is configured to divide the preprocessed image into a group of regions with predetermined sizes, and sort pixel values of pixels in the region to determine a second speckle detection threshold corresponding to the region;
the bright spot determining unit is configured to determine, as to the candidate bright spots located in the region, candidate bright spots whose pixel values are not smaller than the second bright spot detection threshold corresponding to the region as the bright spots.
15. The apparatus of any one of claims 10-14, wherein the pre-processing unit is to:
determining a background of the image using an on operation,
converting the image into a first image using a top hat operation based on the background,
performing Gaussian blur processing on the first image to obtain a second image,
and sharpening the second image to obtain the preprocessed image.
16. The apparatus of claim 15, wherein the reduction unit is to,
determining the critical value based on the background and the pre-processed image,
and comparing the pixel value of the pixel point on the preprocessed image with the critical value to obtain the simplified image.
17. The apparatus according to any one of claims 10-14, 16, wherein g2 is the modified pixels in the range of m1 × m2, and the pixels in the range of m1 × m2 are modified according to a ratio of pixels in the corresponding range of m1 × m2 of the simplified image having the pixel value of the second predetermined value.
18. The apparatus of claim 15, wherein g2 is the modified range of m1 x m2 pixels, and the modified range of m1 x m2 pixels is modified based on a ratio of pixels in the corresponding range of m1 x m2 pixels having the second predetermined value to the modified range of m1 x m2 pixels.
19. A computer program product comprising instructions for enabling detection of bright spots on an image, which instructions, when executed by said computer, cause said computer to carry out the method according to any one of claims 1-9.
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK40035909A HK40035909A (en) | 2021-05-21 |
| HK40035909B true HK40035909B (en) | 2023-02-10 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN112823352B (en) | Base calling method, system and sequencing system | |
| CN107918931B (en) | Image processing method and system and computer readable storage medium | |
| US11847766B2 (en) | Method and device for detecting bright spots on image, and computer program product | |
| US12008775B2 (en) | Method and device for image registration, and computer program product | |
| CN112285070B (en) | Method and device for detecting bright spots on image and image registration method and device | |
| CN112289377B (en) | Method, apparatus and computer program product for detecting bright spots on an image | |
| WO2020037572A1 (en) | Method and device for detecting bright spot on image, and image registration method and device | |
| EP3843033B1 (en) | Method for constructing sequencing template based on image, and base recognition method and device | |
| CN112288781B (en) | Image registration method, apparatus and computer program product | |
| CN112289381B (en) | Method, device and computer product for constructing sequencing template based on image | |
| CN107274349B (en) | Method and device for determining inclination angle of fluorescence image of biochip | |
| HK40035909A (en) | Method, device and computer program product for detecting bright spots on images | |
| HK40035909B (en) | Method, device and computer program product for detecting bright spots on images | |
| WO2020037571A1 (en) | Method and apparatus for building sequencing template on basis of images, and computer program product | |
| CN112288783B (en) | Method, base calling method and device for constructing sequencing template based on image | |
| HK40035905A (en) | Image registration method, device and computer program product | |
| Fouad et al. | A new method to grid noisy cDNA microarray images utilizing denoising techniques | |
| HK40035905B (en) | Image registration method, device and computer program product | |
| HK40035910B (en) | Method and device for detecting bright spots on an image, and image registration method and device | |
| HK40052070B (en) | Base recognition method, system and sequencing system | |
| HK40035911A (en) | Method for constructing sequencing template based on images, base recognition method and device | |
| HK40035911B (en) | Method for constructing sequencing template based on images, base recognition method and device | |
| HK40035907B (en) | Method, device and computer product for constructing sequencing template based on images | |
| HK40035907A (en) | Method, device and computer product for constructing sequencing template based on images | |
| Fouad et al. | Developing a new methodology for de-noising and gridding cDNA microarray images |