Disclosure of Invention
In view of the above, it is desirable to provide an image sharpness analysis method, an automatic focusing method, a gene sequencer, a gene sequencing system, and a storage medium, which can optimize the operation of determining the sharpness of a fluorescence image.
An embodiment of the present invention provides an image sharpness analysis method, including the following steps:
obtaining at least one fluorescence image of a biochip on which a plurality of sites (spots) for binding nucleic acid molecules carrying fluorophores are disposed;
performing a discrete Fourier transform on the fluorescence image;
obtaining a Fourier amplitude map of the fluorescence image after discrete Fourier transform;
acquiring a Fourier spectrum corresponding to the fluorescence image according to the Fourier amplitude map;
acquiring at least one peak value of the Fourier spectrum in a medium-high frequency region, wherein the peak value is selected from a local maximum value set of the Fourier spectrum in the medium-high frequency region, and the peak value is a maximum value and a second maximum value in the local maximum value set;
acquiring the mean value of the Fourier spectrum in a low-frequency area;
calculating the ratio of the sum of the maximum value and the second maximum value in the local maximum value set in the Fourier spectrum to the mean value to obtain the difference degree of the peak value and the mean value;
and when the difference degree is greater than a preset threshold value, judging that the fluorescence image is clear.
Further, in the method for analyzing image sharpness according to an embodiment of the present invention, the performing discrete fourier transform on the fluorescence image includes:
acquiring the number of pixels of the fluorescence image in a first direction and a second direction, wherein the first direction is perpendicular to the second direction;
acquiring an original two-dimensional image of the fluorescence image;
and performing discrete Fourier transform on the fluorescence image by using the pixel number and the original two-dimensional image.
Further, in the method for analyzing image sharpness according to an embodiment of the present invention, the acquiring a fourier spectrum corresponding to the fluorescence image according to the fourier magnitude map includes:
transforming the Fourier magnitude map from a Cartesian coordinate system to a polar coordinate system;
and obtaining the Fourier spectrum by carrying out integral processing on the angles in the polar coordinate system.
In another aspect, an embodiment of the present invention further provides an automatic focusing method, where the automatic focusing method includes:
acquiring at least one fluorescence image of a biochip at a first position, wherein a plurality of sites are arranged on the biochip and used for combining nucleic acid molecules, and the nucleic acid molecules carry fluorescent groups;
judging whether the fluorescence image is clear or not by using the image definition analysis method of any one of the above;
if the judgment result is negative, acquiring the fluorescence image of the biochip at the second position.
In another aspect of the embodiments of the present invention, there is provided a gene sequencing system, including:
the image acquisition module is used for acquiring at least one fluorescence image of a biochip, wherein a plurality of sites are arranged on the biochip and used for combining nucleic acid molecules, and the nucleic acid molecules carry fluorescent groups;
a discrete Fourier transform module for performing a discrete Fourier transform on the fluorescence image;
the Fourier amplitude acquisition module is used for acquiring a Fourier amplitude map of the fluorescence image after discrete Fourier transform;
the Fourier spectrum acquisition module is used for acquiring a Fourier spectrum corresponding to the fluorescence image according to the Fourier amplitude map;
the peak value acquisition module is used for acquiring at least one peak value of the Fourier spectrum in a middle-high frequency region, wherein the peak value is selected from a local maximum value set of the Fourier spectrum in the middle-high frequency region, and the peak value is a maximum value and a second maximum value in the local maximum value set;
the mean value acquisition module is used for acquiring the mean value of the Fourier spectrum in a low-frequency area;
a difference degree calculating module, configured to calculate a ratio of a sum of the maximum value and the second maximum value in the local maximum value set in the fourier spectrum to the mean value, so as to obtain a difference degree between the peak value and the mean value;
and the judging module is used for judging that the fluorescence image is clear when the difference degree is greater than a preset threshold value.
Yet another aspect of an embodiment of the present invention further provides a gene sequencer, including a processor, configured to implement any one of the steps of the image sharpness analysis method described above when executing a computer program stored in a memory.
Yet another aspect of the embodiments of the present invention provides a non-transitory computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement any one of the steps of the image sharpness analysis method described above.
The embodiment of the invention provides an image definition analysis and focusing method, a gene sequencer system and a storage medium. Acquiring at least one fluorescence image of a biochip, and performing discrete Fourier transform on the fluorescence image; obtaining a Fourier amplitude map of the fluorescence image after discrete Fourier transform; acquiring a Fourier spectrum corresponding to the fluorescence image according to the Fourier amplitude map; acquiring at least one peak value of the Fourier spectrum in a middle-high frequency region; acquiring the mean value of the Fourier spectrum in a low-frequency area; calculating the difference degree between the peak value and the mean value; and when the difference degree is greater than a preset threshold value, judging that the fluorescence image is clear. The embodiment of the invention is insensitive to the sampling frequency of the DNA nanospheres (namely the pixel number of a single DNA nanosphere), and the sampling frequency of the DNA nanospheres is changed without changing the size of a peak value, so that by utilizing the embodiment of the invention, evaluation functions do not need to be modified for biochips of different models and gene sequencers of different models; according to the embodiment of the invention, the image definition of the whole fluorescence image or the local fluorescence image can be calculated, and the definition does not need to be evaluated by using a single point, so that the embodiment of the invention is not easily influenced by noise points; the embodiment of the invention calculates the Fourier amplitude after normalization processing, and considers the intensity of the low-frequency signal, thereby reducing the influence generated by illumination and background value transformation.
Detailed Description
So that the manner in which the above recited objects, features and advantages of embodiments of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to the embodiments thereof which are illustrated in the appended drawings. In addition, the features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth to provide a thorough understanding of embodiments of the invention, some, but not all embodiments of the invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative effort belong to the protection scope of the embodiments of the present invention.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which embodiments of the present invention belong. The terminology used herein in the description of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the invention.
Fig. 1 is a flowchart of an image sharpness analysis method according to an embodiment of the present invention. As shown in fig. 1, the image sharpness analysis method may include the steps of:
s101: obtaining at least one fluorescence image of a biochip, wherein a plurality of sites are arranged on the biochip and used for combining nucleic acid molecules, and the nucleic acid molecules carry fluorescent groups.
In this embodiment, the biochip may be a gene sequencing chip, the fluorescence image may be an image obtained by emitting light from the fluorophore during the sequencing process, and the biochip may be continuously photographed by a microscope camera to obtain a plurality of fluorescence images. It should be noted that the "fluorescence image" herein refers to an image obtained by partially magnifying an image of one field of view (FOV) captured by a microscope camera at a time. The field of view of the microscope camera was small, approximately 768.6 μm by 648 μm. During sequencing, hundreds of fluorescence images can be taken of the biochip. Several track lines are distributed in the horizontal direction and the vertical direction of each visual field, and the intersection point of the track lines is a track intersection point (trackcross). The area between two adjacent horizontal and vertical trajectories of each field of view is called a block (block), and each block is filled with sites (spots), preferably evenly distributed, for binding nucleic acid molecules carrying fluorophores.
S102: performing a discrete Fourier transform on the fluorescence image.
In this embodiment, the performing the discrete fourier transform on the fluorescence image may include: acquiring the number of pixels of the fluorescence image in a first direction and a second direction, wherein the first direction is perpendicular to the second direction. The first direction may be a horizontal direction, and the second direction may be a vertical direction. Acquiring an original two-dimensional image of the fluorescence image, wherein the original two-dimensional image can be a clear fluorescence image, and performing discrete Fourier transform on the fluorescence image by using the number of pixels and the original two-dimensional image.
In an embodiment, the fluorescence image may be saved in a tif format, the fluorescence image in the tif format includes a header of the fluorescence image, the header carries the number of pixels in the first direction and the second direction, and the number of pixels in the first direction and the second direction of the fluorescence image may be obtained by analyzing the header.
S103: obtaining a Fourier magnitude map of the fluorescence image after discrete Fourier transform.
In this embodiment, a fourier magnitude map of the fluorescence image can be obtained after discrete fourier transform of the fluorescence image. The gray value of each pixel in the fourier magnitude map represents the magnitude of the corresponding frequency.
S104: and acquiring a Fourier spectrum corresponding to the fluorescence image according to the Fourier amplitude map.
In this embodiment, the obtaining of the fourier spectrum corresponding to the fluorescence image according to the fourier magnitude map may include: and transforming the Fourier amplitude diagram from a Cartesian coordinate system to a polar coordinate system, and performing integral processing on angles in the polar coordinate system to obtain the Fourier spectrum. The cartesian coordinate system is a general name of a rectangular coordinate system and an oblique coordinate system, and two number axis measurement units intersecting with an origin in the cartesian coordinate system are equal. The polar coordinate system is a coordinate system consisting of a pole, a polar axis and a polar diameter in a plane. The cartesian coordinate system and the polar coordinate system may be transformed to each other.
S105: and acquiring at least one peak value of the Fourier spectrum in a middle-high frequency region.
In this embodiment, the peak is selected from a set of local maxima of the fourier spectrum in the mid-to high frequency region. The peak value may be a maximum value and a second largest value of the fourier spectrum in the local maximum value set of the middle-high frequency region, and the peak value may also be the first n larger values of the fourier spectrum in the local maximum value set of the middle-high frequency region, where n is greater than or equal to 1. The size of the middle and high frequency region is related to the size of the original two-dimensional image of the acquired fluorescence image. In this embodiment, taking the original two-dimensional image of the fluorescence image with a size of 640 pixels by 540 pixels as an example, the middle-high frequency region may include 150Hz to 300 Hz. It will be appreciated that 150Hz indicates that the sampled signal occurs every 2.79((1/150) × maximum radius of polar coordinate system) pixels in size. The polar coordinate system has a maximum radius of 419(sqrt (320 × 320+270 × 270)) pixels.
S106: and acquiring the mean value of the Fourier spectrum in a low frequency region.
In this embodiment, taking the original two-dimensional image of the fluorescence image with a size of 640 pixels by 540 pixels as an example, the low frequency region may include 30Hz to 150 Hz. The mean of the fourier spectrum in the low frequency region may comprise a mean of fourier magnitudes of the fourier spectrum in the low frequency region.
S107: and calculating the difference degree between the peak value and the mean value.
In this embodiment, the difference degree may include a ratio of a sum of the maximum value and the second largest value in the fourier spectrum to the average value. It will be appreciated that the ratio is greater if the fluorescence image is sharper; the ratio is smaller if the fluorescence image is more blurred.
S108: and when the difference degree is greater than a preset threshold value, judging that the fluorescence image is clear.
In this embodiment, the preset threshold may be preset by a person skilled in the art according to an empirical value. It is understood that the greater the degree of difference, the sharper the fluorescence image; the smaller the degree of difference, the more blurred the fluorescence image. If the difference degree is smaller than the preset threshold value, the motor moving platform can be controlled to obtain the fluorescence image of the biochip at the second position. The second position refers to the position of the biochip relative to the objective lens.
The image definition analysis method provided by the embodiment of the invention comprises the steps of obtaining at least one fluorescence image of a biochip, and carrying out discrete Fourier transform on the fluorescence image; obtaining a Fourier amplitude map of the fluorescence image after discrete Fourier transform; acquiring a Fourier spectrum corresponding to the fluorescence image according to the Fourier amplitude map; acquiring at least one peak value of the Fourier spectrum in a middle-high frequency region; acquiring the mean value of the Fourier spectrum in a low-frequency area; calculating the difference degree between the peak value and the mean value; and when the difference degree is greater than a preset threshold value, judging that the fluorescence image is clear. By utilizing the embodiment of the invention, the operation of judging the definition of the fluorescence image can be optimized.
Fig. 2 is a flowchart of an auto-focusing method according to an embodiment of the present invention. As shown in fig. 2, the auto-focusing method may include the steps of:
s201: acquiring at least one fluorescence image of a biochip at a first position, wherein a plurality of sites are arranged on the biochip, preferably, the sites are uniformly distributed, the sites are used for combining nucleic acid molecules, and the nucleic acid molecules carry fluorescent groups.
S202: judging whether the fluorescence image is clear, and entering step 203 if the judgment result is negative; and when the judgment result is yes, ending the flow.
In this embodiment, the difference between the peak value and the mean value may be calculated, and whether the fluorescence image is clear may be determined by determining whether the difference is greater than a preset threshold. It is understood that if the difference degree is greater than a preset threshold, the fluorescence image is judged to be clear.
S203: acquiring a fluorescence image of the biochip at the second location.
In this embodiment, the platform loaded with the biochip can be moved to the second position by controlling the motor to move the platform, and the fluorescence image of the biochip located at the second position can be acquired. It is understood that, after the acquiring of the fluorescence image of the biochip at the second position, it may be continuously determined whether the fluorescence image of the biochip at the second position is sharp, and when the determination result is negative, the fluorescence image of the biochip at the third position is acquired. The automatic focusing method provided by the embodiment of the invention obtains at least one fluorescence image of the biochip at the first position, judges whether the fluorescence image is clear, and obtains the fluorescence image of the biochip at the second position if the fluorescence image is not clear. By utilizing the embodiment of the invention, for biochips of different models and gene sequencers of different models, evaluation functions do not need to be modified, and the flexibility is higher; the embodiment of the invention does not need to use a single point to evaluate the definition, so the method is not easily influenced by noise points, and the embodiment of the invention calculates the Fourier amplitude after normalization processing and considers the intensity of a low-frequency signal, so the influence generated by illumination and background value transformation can be reduced by utilizing the embodiment of the invention.
The above is a detailed description of the method provided by the embodiments of the present invention. The gene sequencer provided in the embodiments of the present invention will be described below.
The embodiment of the invention also provides a gene sequencer, which comprises a memory, a processor and a computer program which is stored on the memory and can be run on the processor, wherein the processor executes the program to realize the steps of the image definition analysis method in any one of the above embodiments. The gene sequencer may include a chip platform, an optical system, and a liquid path system. The chip platform can be used for loading a biochip, the optical system can be used for acquiring a fluorescence image, and the liquid path system can be used for carrying out biochemical reaction by utilizing a preset reagent.
FIG. 3 is a schematic structural view of a gene sequencer according to an embodiment of the present invention. As shown in fig. 3, the gene sequencer 1 includes a memory 10, and the gene sequencing system 100 is stored in the memory 10. The gene sequencing system 100 can acquire at least one fluorescence image of a biochip, and perform discrete fourier transform on the fluorescence image; obtaining a Fourier amplitude map of the fluorescence image after discrete Fourier transform; acquiring a Fourier spectrum corresponding to the fluorescence image according to the Fourier amplitude map; acquiring at least one peak value of the Fourier spectrum in a middle-high frequency region; acquiring the mean value of the Fourier spectrum in a low-frequency area; calculating the difference degree between the peak value and the mean value; and when the difference degree is greater than a preset threshold value, judging that the fluorescence image is clear. By utilizing the embodiment of the invention, the operation of judging the definition of the fluorescence image can be optimized.
The gene sequencing system 100 may further obtain at least one fluorescence image of the biochip located at the first position, determine whether the fluorescence image is clear, and if the fluorescence image is not clear, obtain the fluorescence image of the biochip located at the second position. By utilizing the embodiment of the invention, for biochips of different models and gene sequencers of different models, evaluation functions do not need to be modified, and the flexibility is higher; according to the embodiment of the invention, the evaluation definition of a single point is not needed, so that the influence of noise points is not easily caused, the Fourier amplitude is subjected to normalization processing and then calculated, and the lightness of a low-frequency signal is considered, so that the influence generated by illumination and background value transformation can be reduced by utilizing the embodiment of the invention.
In this embodiment, the gene sequencer 1 may further include a display 20 and a processor 30. The memory 10 and the display screen 20 can be electrically connected with the processor 30 respectively.
The memory 10 may be of different types of memory devices for storing various types of data. For example, the memory or internal memory of the gene sequencer 1 may be used, and a memory Card such as a flash memory, an SM Card (Smart Media Card), an SD Card (Secure Digital Card), or the like may be externally connected to the gene sequencer 1. In addition, the memory 10 may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device. The memory 10 is used for storing various types of data, for example, various types of application programs (Applications) installed in the gene sequencer 1, data set and acquired by applying the image sharpness analysis method described above, and the like.
The display screen 20 is installed on the gene sequencer 1 and is used for displaying information.
The processor 30 is used for executing the image sharpness analysis method and various software installed in the gene sequencer 1, such as an operating system and application display software. The processor 30 includes, but is not limited to, a Central Processing Unit (CPU), a Micro Controller Unit (MCU), and other devices for interpreting computer instructions and Processing data in computer software.
The gene sequencing system 100 may include one or more modules stored in the memory 10 of the gene sequencer 1 and configured to be executed by one or more processors (in this embodiment, a processor 30) to implement embodiments of the present invention. For example, referring to fig. 4, the gene sequencing system 100 may include an image acquisition module 11, a discrete fourier transform module 12, a fourier amplitude acquisition module 13, a fourier spectrum acquisition module 14, a peak acquisition module 15, a mean acquisition module 16, a difference degree calculation module 17, and a determination module 18. The modules referred to in the embodiments of the present invention may be program segments that perform a specific function, and are more suitable than programs for describing the execution process of software in a processor.
It is understood that, in accordance with various embodiments of the above-described image sharpness analysis method, the gene sequencing system 100 may include some or all of the functional blocks shown in fig. 4, and the functions of the functional blocks will be described in detail below. It should be noted that the same nouns and their specific explanations in the above embodiments of the image sharpness analysis method may also be applied to the following functional descriptions of the modules. For brevity and to avoid repetition, further description is omitted.
The image acquisition module 11 can be used to acquire at least one fluorescence image of a biochip on which a plurality of sites are disposed, preferably, the sites are uniformly distributed, the sites are used to bind nucleic acid molecules, and the nucleic acid molecules carry fluorophores.
The image obtaining module 11 is further configured to obtain at least one fluorescence image of a biochip located at a first position, the biochip having a plurality of sites disposed thereon, preferably, the sites being uniformly distributed, the sites being configured to bind nucleic acid molecules, the nucleic acid molecules carrying fluorophores.
The image acquisition module 11 can also be used to acquire a fluorescence image of the biochip located at the second location.
A discrete fourier transform module 12 may be used to perform a discrete fourier transform on the fluorescence image.
The fourier amplitude acquisition module 13 may be used to acquire a fourier amplitude map of the fluorescence image after discrete fourier transform.
The fourier spectrum acquiring module 14 can be used for acquiring a fourier spectrum corresponding to the fluorescence image according to the fourier amplitude map.
The peak value obtaining module 15 can be used to obtain at least one peak value of the fourier spectrum in the middle-high frequency region.
The mean acquisition module 16 may be configured to acquire a mean of the fourier spectrum in a low frequency region.
The degree of difference calculation module 17 may be configured to calculate the degree of difference between the peak value and the mean value.
The determining module 18 may be configured to determine that the fluorescence image is clear when the difference degree is greater than a preset threshold.
An embodiment of the present invention further provides a non-volatile computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the image sharpness analysis method in any one of the above embodiments.
The gene sequencing system/gene sequencer/computer device integrated module/unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method according to the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium and used by a processor to implement the steps of the above method embodiments. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like, the processor is the control center of the gene sequencing system/gene sequencer, and various interfaces and lines are used to connect the various parts of the whole gene sequencing system/gene sequencer.
The memory is used for storing the computer program and/or the module, and the processor realizes various functions of the gene sequencing system/gene sequencer by running or executing the computer program and/or the module stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Referring to FIG. 5A, FIG. 5A is a diagram illustrating a site distribution on a biochip according to an embodiment of the present invention. The biochip has a plurality of sites distributed thereon, preferably, the sites are uniformly distributed. As shown in FIG. 5A, the biochip of the present invention has a uniform distribution of sites. Each site may be 900nm, which is used to load a DNA nanosphere, which is a nucleic acid molecule. The large circles shown in fig. 5A represent sites whose pixel size may be 300nm by 300nm, and it is understood that the DNA nanospheres loaded on each site occupy 3 by 3 pixel regions.
Referring to FIG. 5B, FIG. 5B is a diagram of a fluorescence imaging of a portion of the DNA nanospheres on the biochip according to the embodiment of the invention. The small dots shown in FIG. 5B represent the imaging of the DNA nanospheres, and it can be understood by those skilled in the art that in the sequencing process, not all DNA nanosphere molecules are bound to the site, and not every DNA nanosphere molecule emits light every time it is photographed, only the base fluorophore corresponding to the current channel emits light, so the DNA nanosphere shown in FIG. 5B is a light-emitting DNA nanosphere. The spatial frequency of the DNA nanospheres is fixed and the spatial distribution of the DNA nanospheres is periodic. The DNA nanospheres can be formed by stacking fewer cosine waves, so that the Fourier amplitude of the two-dimensional discrete Fourier transform corresponding to the fluorescence image has a peak value at a corresponding frequency.
Referring to fig. 6A, fig. 6A is a local area diagram of a clear fluorescence image according to an embodiment of the invention. In this embodiment, L (x, y) may be used to represent a clear two-dimensional fluorescence image, M represents the number of pixels in the x direction, and N represents the number of pixels in the y direction, so that the two-dimensional DFT (discrete fourier transform) of the fluorescence image is expressed as follows:
the inverse discrete Fourier transform corresponding to the clear two-dimensional fluorescence image is expressed by the following formula:
referring to fig. 6B, fig. 6B is a fourier magnitude graph after fourier transform of the local region graph of the sharp fluorescence image provided in fig. 6A. As shown in fig. 6B, the fourier amplitude of the discrete fourier transform corresponding to the local region of the clear two-dimensional fluorescence image is larger in some regions, and the black circle is artificially added, indicating that the fourier amplitude is larger there, and the fourier amplitude is represented by the gray scale of the pixel of the fourier amplitude map.
Referring to fig. 7A, fig. 7A is a local area diagram of a defocused image according to an embodiment of the present invention. In the present embodiment, I (x, y) represents a defocused two-dimensional fluorescence image, L (x, y) represents a sharp two-dimensional fluorescence image, n represents noise, f represents a point spread function, and the point spread function f can be approximated by a two-dimensional gaussian function. The clear two-dimensional fluorescence image is low-pass filtered using equation 3:
fig. 7B is a fourier magnitude map obtained by fourier transforming the local region map of the defocus image provided in fig. 7A. As shown in fig. 7B, the fourier transform corresponding to the out-of-focus image has a small fourier amplitude in the medium-high frequency region.
Referring to fig. 8A and 8B, fig. 8A is a fourier spectrogram corresponding to a defocused two-dimensional fluorescence image provided by the embodiment of the present invention, and fig. 8B is a fourier spectrogram corresponding to a clear two-dimensional fluorescence image provided by the embodiment of the present invention. As shown in fig. 8A and 8B, in the present embodiment, the fourier amplitude map is transformed from a cartesian coordinate system to a polar coordinate system, and the fourier spectrum is obtained by integrating angles in the polar coordinate system. The origin of the polar coordinate system is set at the center of fig. 8A, 8B. As shown in fig. 8A and 8B, the horizontal axis represents frequency, and the vertical axis represents the ratio of the fourier amplitude corresponding to the frequency to the total fourier amplitude (i.e., normalized fourier amplitude). Taking the region-of-interest image of the fluorescence image of 640 pixels by 540 pixels as an example, the middle-high frequency region of the fourier spectrum may include 150Hz to 300Hz, and the low frequency region may include 30Hz to 150 Hz. As shown in fig. 8A, the fourier spectrum corresponding to the defocused two-dimensional fluorescence image has no peak in the middle-high frequency region. As shown in fig. 8B, a fourier spectrum corresponding to the clear two-dimensional fluorescence image has a peak in the middle-high frequency region, the peak is selected from a local maximum value set of the fourier spectrum in the middle-high frequency region, and { localPeaks } represents the local maximum value set, and the peak may be a maximum value and a second maximum value in the local maximum value set of the fourier spectrum in the middle-high frequency region. Obtaining the mean value of the Fourier spectrum in a low frequency region, representing the mean value of the low frequency region by avg (lowFreq _ mag), and calculating the ratio of the sum of the maximum value and the second maximum value in the Fourier spectrum to the mean value. The ratio is expressed by the following formula:
equation 4 is referred to as the virtual focus merit function. The larger the ratio is, the clearer the fluorescence image is; the smaller the ratio, the more blurred the fluorescence image.
It will be appreciated that the peak may also include the first n larger values (n is greater than or equal to 1) of the set of local maxima of the fourier spectrum in the mid-high frequency region.
In the several embodiments provided in the present invention, it should be understood that the disclosed terminal and method can be implemented in other manners. For example, the system embodiments described above are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
It will be evident to those skilled in the art that the embodiments of the present invention are not limited to the details of the foregoing illustrative embodiments, and that the embodiments of the present invention are capable of being embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the embodiments being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Several units, modules or means recited in the system, apparatus or terminal claims may also be implemented by one and the same unit, module or means in software or hardware.
Although the embodiments of the present invention have been described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that various changes may be made and equivalents may be substituted without departing from the spirit and scope of the embodiments of the present invention.