CN114511460A - Fluorescent image pseudo-color enhancement method, device, equipment and storage medium - Google Patents

Fluorescent image pseudo-color enhancement method, device, equipment and storage medium Download PDF

Info

Publication number
CN114511460A
CN114511460A CN202210112710.8A CN202210112710A CN114511460A CN 114511460 A CN114511460 A CN 114511460A CN 202210112710 A CN202210112710 A CN 202210112710A CN 114511460 A CN114511460 A CN 114511460A
Authority
CN
China
Prior art keywords
pixel
value
fluorescence
color
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210112710.8A
Other languages
Chinese (zh)
Inventor
邬丹丹
潘力
付威威
董月芳
周哲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Institute of Biomedical Engineering and Technology of CAS
Original Assignee
Suzhou Institute of Biomedical Engineering and Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Institute of Biomedical Engineering and Technology of CAS filed Critical Suzhou Institute of Biomedical Engineering and Technology of CAS
Priority to CN202210112710.8A priority Critical patent/CN114511460A/en
Publication of CN114511460A publication Critical patent/CN114511460A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • G06T5/90
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
    • G06T5/70
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10064Fluorescence image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the field of living body fluorescence imaging, in particular to a fluorescent image pseudo-color enhancement method, a device, equipment and a storage medium, wherein the method comprises the following steps: acquiring a fluorescence image to be processed; calculating to obtain an optimal threshold corresponding to the fluorescence image to be processed based on the pixel value of each pixel point in the fluorescence image to be processed; calculating to obtain a fluorescence threshold corresponding to the fluorescence image to be processed based on the optimal threshold and the pixel mean values of all pixel points in the fluorescence image to be processed; and performing pseudo-color mapping on each pixel point in the fluorescence image to be processed based on the fluorescence threshold value to obtain a pseudo-color enhanced color image. Effective fluorescence information in the fluorescence image to be processed can be better reserved and extracted, and the quality of a color image obtained through pseudo-color enhancement is improved.

Description

Fluorescent image pseudo-color enhancement method, device, equipment and storage medium
Technical Field
The invention relates to the field of living body fluorescence imaging, in particular to a fluorescent image pseudo-color enhancement method, a device, equipment and a storage medium.
Background
Living body fluorescence imaging is used as an optical molecular imaging technology, can continuously track and image animals in vivo, and realizes tumor research, drug screening research and the like by monitoring fluorescence images. The fluorescent image is a black-and-white gray image, the discrimination capability of human eyes to the black-and-white gray image is limited, and the discrimination of the fluorescent image can be greatly improved through pseudo-color enhancement.
The principle of pseudo-color enhancement is to convert different gray levels of a black-and-white gray image into a color image according to a certain mapping method. According to the principle of colorimetry, different colors are obtained by mixing the three primary colors of red, green and blue according to different proportions, so that the pseudo-color enhancement method needs to set mapping functions of the three primary colors of red, green and blue respectively. The common pseudo-color enhancement method in the prior art is a gray scale transformation method, a gray scale image is transformed into a pseudo-color image through a linear function, but the method cannot effectively extract fluorescence information in the gray scale image, so that the color image after pseudo-color enhancement has poor effect.
Disclosure of Invention
Therefore, the present invention provides a method, an apparatus, a device and a storage medium for enhancing a false color of a fluorescent image, to solve the technical problem that the fluorescent information in a gray image cannot be effectively extracted, wherein the technical scheme is as follows:
in one aspect, the present application provides a method for enhancing false color of a fluorescent image, the method comprising: acquiring a fluorescence image to be processed; calculating to obtain an optimal threshold corresponding to the fluorescence image to be processed based on the pixel value of each pixel point in the fluorescence image to be processed;
calculating to obtain a fluorescence threshold corresponding to the fluorescence image to be processed based on the optimal threshold and the pixel mean values of all pixel points in the fluorescence image to be processed;
and performing pseudo-color mapping on each pixel point in the fluorescence image to be processed based on the fluorescence threshold value to obtain a pseudo-color enhanced color image.
Optionally, the calculating to obtain the optimal threshold corresponding to the fluorescence image to be processed based on the pixel value of each pixel point in the fluorescence image to be processed includes: acquiring a preset initial threshold value;
determining a first pixel group with a pixel value larger than an initial threshold value and a second pixel group with a pixel value smaller than or equal to the initial threshold value in the fluorescence image to be processed;
respectively calculating the pixel mean values of the first pixel group and the second pixel group to obtain a first pixel mean value and a second pixel mean value;
averaging the first pixel mean value and the second pixel mean value to obtain a third pixel mean value;
and under the condition that the absolute value of the difference between the third pixel mean value and the initial threshold value is less than or equal to zero, the initial threshold value is the optimal threshold value corresponding to the fluorescence image to be processed.
Optionally, the method further comprises: in the case that the absolute value of the difference between the third pixel mean and an initial threshold is greater than zero, making the initial threshold equal to the third pixel mean;
and returning to execute the first pixel group for determining that the pixel value in the fluorescence image to be processed is greater than the initial threshold value and the second pixel group with the pixel value less than or equal to the initial threshold value.
Optionally, the calculating, based on the optimal threshold and the pixel mean of all pixel points in the fluorescence image to be processed, to obtain the fluorescence threshold corresponding to the fluorescence image to be processed includes:
and averaging the optimal threshold value and the pixel mean values of all pixel points in the fluorescence image to be processed to obtain the fluorescence threshold value.
Optionally, the performing pseudo-color mapping on each pixel point in the to-be-processed fluorescent image based on the fluorescent threshold to obtain a pseudo-color enhanced color image includes:
setting pixel points corresponding to the fluorescence threshold value and the pixel value smaller than the fluorescence threshold value in the fluorescence image to be processed as background colors;
and performing pseudo-color mapping on pixel points corresponding to the fluorescence threshold value or more of the pixel values in the fluorescence image to be processed to obtain a pseudo-color enhanced color image.
Optionally, the method further comprises: acquiring a maximum pixel value in the fluorescence image to be processed;
calculating a plurality of turning values based on the fluorescence threshold and the maximum pixel value;
the pseudo-color mapping is performed on the pixel points corresponding to the fluorescence threshold value or more of the pixel values in the fluorescence image to be processed to obtain a pseudo-color enhanced color image, and the pseudo-color enhanced color image comprises the following steps:
and performing pseudo-color mapping on pixel points corresponding to the pixel values greater than or equal to the fluorescence threshold value in the fluorescence image to be processed by using the fluorescence threshold value, the maximum pixel value and the turning value to obtain the color image.
Optionally, the turning values include four, and the pixel points are pseudo-color mapped through a mathematical model, where the mathematical model is:
Figure BDA0003495315030000031
Figure BDA0003495315030000032
Figure BDA0003495315030000041
in the formula, H (i, j) represents the pixel value of the pixel point (i, j) in the fluorescence image to be processed, R (i, j) represents the red primary color obtained by converting the pixel value of the pixel point (i, j), G (i, j) represents the green primary color obtained by converting the pixel value of the pixel point (i, j), B (i, j) represents the blue primary color obtained by converting the pixel value of the pixel point (i, j), and x (i, j) represents the blue primary color obtained by converting the pixel value of the pixel point (i, j)0Indicates the fluorescence threshold, x1Representing a first inflection value, x2Represents a second inflection value, x3Represents a third inflection value, x4Represents a fourth inflection value, x5Representing the maximum pixel value.
Optionally, the method further comprises: acquiring a preset pseudo-color transformation range, wherein the pseudo-color transformation range comprises a minimum value and a maximum value, the maximum value is greater than a fluorescence threshold value, and the minimum value is smaller than a maximum pixel value; under the condition that the fluorescence threshold is smaller than the minimum value and the maximum pixel value is larger than the maximum value, performing pseudo-color mapping on pixel points corresponding to the pixel values in the to-be-processed fluorescence image in a pseudo-color transformation range to obtain the color image; or
Under the condition that the fluorescence threshold is larger than the minimum value and the maximum pixel value is larger than the maximum value, performing pseudo-color mapping on pixel points corresponding to the range from the fluorescence threshold to the maximum value of the pixel values in the fluorescence image to be processed to obtain the color image; or
And under the condition that the fluorescence threshold is smaller than the minimum value and the maximum pixel value is smaller than the maximum value, performing pseudo-color mapping on pixel points corresponding to the range from the minimum value to the maximum pixel value of the pixel values in the fluorescence image to be processed to obtain the color image.
Optionally, after acquiring the fluorescence image to be processed, the method further includes: locally enhancing the fluorescence image to be processed by adopting self-adaptive contrast enhancement; carrying out mean value filtering on the locally enhanced fluorescence image to be processed; inhibiting the pixel value of the fluorescence image to be processed after mean value filtering; and processing the suppressed fluorescence image to be processed by adopting a morphological closed operation to obtain a preprocessed fluorescence image.
Optionally, the suppressing the pixel values of the fluorescence image to be processed after the mean filtering includes: counting the number of pixels with values larger than a fluorescence threshold value in a preset area in the fluorescence image to be processed;
setting the pixel value of the central pixel point in the preset area to be zero under the condition that the number is smaller than a preset threshold value; and setting the central pixel point in the preset area as the median of the pixel values in the preset area under the condition that the number is greater than or equal to the preset threshold.
In another aspect, the present application provides a fluorescence image pseudo-color enhancement device, comprising: the first acquisition module is used for acquiring a fluorescence image to be processed; the first calculation module is used for calculating to obtain an optimal threshold corresponding to the fluorescence image to be processed based on the pixel value of each pixel point in the fluorescence image to be processed; the second calculation module is used for calculating to obtain a fluorescence threshold value corresponding to the fluorescence image to be processed based on the optimal threshold value and the pixel mean value of all pixel points in the fluorescence image to be processed;
and the mapping module is used for carrying out pseudo-color mapping on each pixel point in the fluorescence image to be processed based on the fluorescence threshold value to obtain a pseudo-color enhanced color image.
In yet another aspect, the present application provides a computer device comprising: the fluorescent image pseudo-color enhancement method of the neural network comprises a memory and a processor, wherein the memory and the processor are mutually connected in a communication mode, computer instructions are stored in the memory, and the processor executes the computer instructions so as to execute the fluorescent image pseudo-color enhancement method of the neural network.
In yet another aspect, the present application provides a computer-readable storage medium storing computer instructions for causing a computer device to execute the above-mentioned fluorescent image pseudo-color enhancement method.
In yet another aspect, the present application provides a computer program product for implementing the above-mentioned fluorescent image pseudo-color enhancement method when the computer program product is run on a computer device.
The technical scheme of the invention has the following advantages:
the fluorescent image pseudo-color enhancement method provided by the invention obtains the corresponding fluorescent threshold value by utilizing the pixel value calculation of each pixel point in the fluorescent image to be processed, and identifies the fluorescent signal and the non-fluorescent signal in the fluorescent image to be processed based on the fluorescent threshold value, so that the effective fluorescent information in the fluorescent image to be processed can be better reserved and extracted, and the quality of the color image obtained by pseudo-color enhancement is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a pseudo-color enhancement method for a fluorescent image according to embodiment 1 of the present invention;
FIG. 2 is a flowchart of step S102 in FIG. 1;
FIG. 3 is a comparison graph of the fluorescent image pseudo color enhancement method and gray scale transformation experiment according to the embodiment of the present invention;
FIG. 4 is a block diagram of a fluorescent image pseudo-color enhancement device in accordance with embodiment 2 of the present invention;
fig. 5 is a schematic block diagram of a computer device according to embodiment 3 of the present invention.
Detailed Description
The technical solutions of the present invention will be described clearly and completely with reference to the accompanying drawings, and it should be understood that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it should be noted that the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
When the fluorescent image is mapped to a color image, a gray scale transformation method is often used for mapping, and the mapping function is as follows:
Figure BDA0003495315030000071
Figure BDA0003495315030000072
Figure BDA0003495315030000073
in the formula, H (i, j) represents a pixel value of a pixel point (i, j) in the fluorescent image, and R (i, j), G (i, j), and B (i, j) respectively represent three primary colors of red, green, and blue obtained by converting the pixel value of the pixel point (i, j).
Because the transformation range of the gray value (i.e. pixel value) of the fluorescent image is small and the contrast is low, the gray value of the background is mostly low gray value, the effective information of the fluorescent image cannot be extracted by the gray transformation method, and part of the noise of the background is taken as the fluorescent signal to perform pseudo-color processing, thereby affecting the color image effect after pseudo-color enhancement.
Example 1
This embodiment provides a method for enhancing false color of a fluorescent image, and fig. 1 is a flowchart illustrating a method for enhancing false color of a fluorescent image to be processed to obtain a color image according to some embodiments of the present invention. Although the processes described below include operations that occur in a particular order, it should be clearly understood that the processes may include more or fewer operations that are performed sequentially or in parallel (e.g., using parallel processors or a multi-threaded environment). As shown in fig. 1, the method comprises the steps of:
and S101, acquiring a fluorescence image to be processed.
The fluorescence image to be processed can be a fluorescence image of a small animal, and the fluorescence imaging technology is utilized to carry out in-vivo continuous tracking imaging on the small animal to form a black, white and grey fluorescence image.
S102, calculating to obtain an optimal threshold corresponding to the fluorescence image to be processed based on the pixel value of each pixel point in the fluorescence image to be processed.
The pixel value range of each pixel point in the fluorescence image to be processed is wide, the pixel values of some pixel points are the same, and the pixel values of some pixel points are different. As shown in fig. 2, calculating the optimal threshold corresponding to the fluorescence image to be processed may include the following steps:
s201, acquiring a preset initial threshold value.
The initial threshold may be set by an operator according to actual conditions, or may be a fixed value set in the system in advance.
202. And determining a first pixel group with a pixel value larger than an initial threshold value and a second pixel group with a pixel value smaller than or equal to the initial threshold value in the fluorescence image to be processed.
The method comprises the steps of obtaining a pixel value of each pixel point in a fluorescence image to be processed, comparing the pixel value of each pixel point with an initial threshold value, calling the pixel point corresponding to the pixel value larger than the initial threshold value as a first pixel family, and calling the pixel point corresponding to the pixel value smaller than or equal to the initial threshold value as a second pixel family.
S203, calculating the pixel mean values of the first pixel group and the second pixel group respectively to obtain a first pixel mean value and a second pixel mean value.
Counting pixel values of all pixel points in the first pixel family, and averaging the pixel values of the pixel points in the first pixel family to obtain a first pixel mean value; and counting the pixel values of all the pixel points in the second pixel family, and averaging the pixel values of the pixel points in the second pixel family to obtain a second pixel mean value.
S204, averaging the first pixel mean value and the second pixel mean value to obtain a third pixel mean value.
If the absolute value of the difference between the third pixel mean value and the initial threshold value is less than or equal to zero, executing step S206, wherein the initial threshold value is the optimal threshold value corresponding to the fluorescence image to be processed; if the absolute value of the difference between the third pixel mean and the initial threshold is greater than zero, step S207 is performed to make the initial threshold equal to the third pixel mean, and step S202 is performed based on the new initial threshold feedback. After returning to the execution of step S202, the subsequent steps S203, S204, and S205 are continuously executed until, at step S205, step S206 is selected to be executed.
S103, calculating to obtain the fluorescence threshold corresponding to the fluorescence image to be processed based on the optimal threshold and the pixel mean values of all pixel points in the fluorescence image to be processed.
In one or more embodiments, the optimal threshold and the pixel mean of all the pixel points in the fluorescence image to be processed may be averaged to obtain the fluorescence threshold corresponding to the fluorescence image to be processed. The pixel mean values of all the pixel points in the fluorescence image are the average of the pixel values of all the pixel points in the fluorescence image to be processed, and a corresponding global mean value is obtained. In some embodiments, the optimal threshold and the average value of some pixel points in the fluorescence image to be processed may be averaged to obtain the fluorescence threshold corresponding to the fluorescence image to be processed.
And S104, performing pseudo-color mapping on each pixel point in the fluorescence image to be processed based on the fluorescence threshold value to obtain a pseudo-color enhanced color image.
The fluorescence threshold is used for judging whether the pixel point is a fluorescence signal or a non-fluorescence signal. Regarding pixel points corresponding to the pixel values smaller than the fluorescence threshold value in the fluorescence image to be processed as non-fluorescence signals; and regarding the pixel points corresponding to the fluorescence threshold value or more of the pixel values in the fluorescence image to be processed as fluorescence signals. In one or more embodiments, the pixel points belonging to the fluorescent signal may be pseudo-color mapped to change gray pixel points into color pixel points, thereby obtaining a color image. In some embodiments, the pixel points belonging to the non-fluorescent signal may be set to a background color, such as white.
In summary, the corresponding fluorescence threshold is calculated by using the pixel value of each pixel point in the fluorescence image to be processed, and the fluorescence signal and the non-fluorescence signal in the fluorescence image to be processed are identified based on the fluorescence threshold, so as to better retain and extract the effective fluorescence information in the fluorescence image to be processed, and improve the quality of the color image obtained by pseudo-color enhancement.
In practical applications, the effective information in the fluorescence image after pseudo-color enhancement often needs to show a gradual color change, for example, a change trend from dark blue to dark red through blue, cyan, green, yellow, red and dark red. In one or more embodiments, the fluorescent image pseudo-color enhancement method further includes the following steps (S301 to S302).
S301, acquiring the maximum pixel value in the fluorescence image to be processed.
And (4) counting the pixel value of each pixel point in the fluorescence image to be processed, and determining the maximum pixel value in all the pixel points.
S302, a plurality of turning values are calculated based on the fluorescence threshold value and the maximum pixel value.
Effective information of the fluorescence image to be processed is extracted through the fluorescence threshold value and the maximum pixel value, a plurality of turning points are set, and the turning points are used for participating in pseudo color mapping, so that the color image can always show gradient color. For example, the turning points include 4, which can be calculated by a first formula as follows:
Figure BDA0003495315030000111
in the formula, x0Indicates the fluorescence threshold, x1Representing a first inflection value, x2Represents a second inflection value, x3Represents a third inflection value, x4Represents a fourth inflection value, x5Representing the maximum pixel value.
In some embodiments, the stronger portion of the fluorescent signal may be of significant interest, and the turning point may be calculated by a second formula, which is as follows:
Figure BDA0003495315030000112
in the formula, x0Indicates the fluorescence threshold, x1Representing a first inflection value, x2Represents a second inflection value, x3Represents a third inflection value, x4Represents a fourth inflection value, x5Representing the maximum pixel value.
When the pseudo-color mapping is carried out on the pixel points belonging to the fluorescent signals, the gray pixel points are changed into the color pixel points, so that when a color image is obtained, the pixel points belonging to the fluorescent signals can be subjected to the pseudo-color mapping by utilizing the fluorescent threshold value, the maximum pixel value and the turning value. In one or more embodiments, the pixel points belonging to the fluorescence signal are pseudo-color mapped by a mathematical model as follows:
Figure BDA0003495315030000113
Figure BDA0003495315030000121
Figure BDA0003495315030000122
in the formula, H (i, j) represents the pixel value of the pixel point (i, j) in the fluorescence image to be processed, R (i, j) represents the red primary color obtained by converting the pixel value of the pixel point (i, j), G (i, j) represents the green primary color obtained by converting the pixel value of the pixel point (i, j), B (i, j) represents the blue primary color obtained by converting the pixel value of the pixel point (i, j), and x (i, j) represents the blue primary color obtained by converting the pixel value of the pixel point (i, j)0Indicates the fluorescence threshold, x1Representing a first inflection value, x2Represents a second inflection value, x3Represents a third inflection value, x4Represents the fourth inflection value, x5Representing the maximum pixel value.
The method uses the fluorescence threshold value to the maximum pixel value as a mapping range, and in practical application, the mapping range needs to be adjusted so as to realize the pseudo-color enhancement effect which is more suitable for the resolution capability of human eyes. After pseudo-color mapping is performed by taking the fluorescence threshold value to the maximum pixel value as a mapping range, the mapping range can be adjusted to adapt to actual requirements so as to change the color display of the color image. In one or more embodiments, the fluorescent image pseudo-color enhancement method further includes the following steps (S401 to S404).
S401, acquiring a preset pseudo color transformation range.
The preset pseudo-color transformation range comprises a maximum value and a minimum value, wherein the maximum value is larger than the fluorescence threshold value, and the minimum value is smaller than the maximum pixel value. For example, the pseudo color transform range may be [ c ]0,c1]Wherein the maximum value is c1Minimum value of c0
S402, under the condition that the fluorescence threshold is smaller than the minimum value and the maximum pixel value is larger than the maximum value, performing pseudo-color mapping on pixel points corresponding to the pixel values in the pseudo-color transformation range in the fluorescence image to be processed to obtain a color image. And setting the pixel point corresponding to the range from the pixel value smaller than the minimum value to the maximum pixel value as background color, such as white.
S403, under the condition that the fluorescence threshold is larger than the minimum value and the maximum pixel value is larger than the maximum value, performing pseudo-color mapping on pixel points corresponding to the pixel values in the fluorescence threshold to maximum value range in the fluorescence image to be processed to obtain a color image. And setting the pixel point corresponding to the range from the pixel value smaller than the fluorescence threshold value to the maximum pixel value as background color, such as white.
S404, under the condition that the fluorescence threshold value is smaller than the minimum value and the maximum pixel value is smaller than the maximum value, performing pseudo-color mapping on pixel points corresponding to the range from the minimum value to the maximum pixel value of the pixel value in the fluorescence image to be processed to obtain a color image. And setting the pixel point corresponding to the pixel value smaller than the minimum value as a background color, such as white.
In some embodiments, if the fluorescence threshold is greater than the minimum value and the maximum pixel value is less than the maximum value, performing pseudo-color mapping on the pixel points corresponding to the range from the fluorescence threshold to the maximum pixel value to obtain a color image. Through steps S401 to S404, a color image that is more adaptive to the resolving power of the human eye and is adjustable can be further provided.
For example, the fluorescence threshold is x0Maximum pixel value of x5At fluorescence threshold value x0To a maximum pixel value of x5The pseudo-color mapping is carried out in the range of (2) to obtain a color image. The obtained preset pseudo color transformation range may be [ c ]0,c1]Maximum value of c1Minimum value of c0. Wherein the maximum value is c1Greater than the fluorescence threshold value of x0Minimum value of c0Less than the maximum pixel value of x5. If the fluorescence threshold is x0Less than a minimum value of c0The maximum pixel value is x5Greater than a maximum value of c1Then pair [ c0,c1]Performing pseudo-color mapping on pixel points corresponding to the range, wherein the pixel value is [ c ]0,c1]Setting the corresponding pixel points outside the range as background colors (such as white); if the fluorescence threshold is x0Greater than a minimum value of c0The maximum pixel value is x5Greater than a maximum value of c1Then pair [ x0,c1]RangePerforming pseudo-color mapping on corresponding pixel points, wherein the pixel value is [ x ]0,c1]Setting the corresponding pixel points outside the range as background colors (such as white); if the fluorescence threshold is x0Less than a minimum value of c0The maximum pixel value is x5Less than a maximum value of c1Then pair [ c0,x5]Carrying out pseudo-color mapping on pixel points corresponding to the range to obtain a color image, wherein the pixel value is [ c ]0,x5]And setting the corresponding pixel points outside the range as background colors (such as white), thereby displaying the color of the color image.
In one or more embodiments, after acquiring the fluorescence image to be processed, the method further includes: locally enhancing a fluorescence image to be processed by adopting self-adaptive contrast enhancement; carrying out mean value filtering on the locally enhanced fluorescence image to be processed; inhibiting the pixel value of the fluorescence image to be processed after mean value filtering; and processing the suppressed fluorescence image to be processed by adopting a morphological closed operation to obtain a preprocessed fluorescence image. The preprocessed fluorescence image can be used for subsequent operations, namely, the optimal threshold value and the fluorescence threshold value of the preprocessed fluorescence image are calculated, and pseudo-color mapping is carried out. In some embodiments, the fluorescence image to be processed may be normalized in advance, and the pixel value may be controlled to be in the range of [0,255], and the fluorescence threshold value may be in the range.
The self-adaptive contrast enhancement obtains the relative light and shade relation between a target pixel point and surrounding pixel points thereof through differential calculation so as to adjust the dynamic range of an image, and the method specifically comprises the following steps:
(1) setting a certain pixel point in the fluorescence image to be processed as x (i, j), and calculating the mean value m of the pixel point in a region with the window size of (2n +1) × (2n +1) by taking the pixel point as the centerx(i, j) and the standard deviation σx(i, j), the specific formula is as follows:
Figure BDA0003495315030000141
Figure BDA0003495315030000142
(2) calculating a pixel value f (i, j) after local enhancement, wherein a specific calculation formula is as follows:
Figure BDA0003495315030000151
in the formula, D is a global mean value of the fluorescence image to be processed.
In the suppression of the pixel values of the mean-filtered fluorescence image to be processed, the method may include the following steps: counting the number of pixels with values larger than a fluorescence threshold value in a preset area in the fluorescence image to be processed; setting the pixel value of a central pixel point in a preset area to be zero under the condition that the number is smaller than a preset threshold value; and setting the central pixel point in the preset area as the median of the pixel values in the preset area under the condition that the number is greater than or equal to the preset threshold value. For example, the number of gray-scale values greater than the fluorescence threshold value in the preset range of 5 × 5 may be counted.
Performing processing by adopting gray morphological closed operation, namely performing expansion processing on the image, and communicating discontinuous edge pixel points to form a closed edge so as to enhance micro information; and then, the image is corroded to remove the image noise points, so that the quality of the finally obtained color image is better. The effective fluorescence signal in the gray level image is highlighted by reserving the fluorescence area in a large range, and the background noise point or the local fluorescence signal in a small range is removed, so that the pseudo-color enhancement effect of the fluorescence image is optimized finally.
As shown in fig. 3, the fluorescence image 101 to be processed is subjected to pseudo-color enhancement processing, the fluorescence image 101 to be processed is processed by a gray-scale transformation method to obtain a first color image 102, and the fluorescence image 101 to be processed is processed by the fluorescence image pseudo-color enhancement method described in this embodiment to obtain a second color image 103.
The pseudo-color enhancement effect of the embodiment is quantitatively evaluated by calculating the definition and the standard deviation of the image, wherein the definition can reflect the contrast expression capability of the image to tiny details, namely, the higher the definition is, the stronger the layering sense of the image is, and the clearer the image is; the standard deviation can reflect the discrete degree of the image pixels, i.e. the larger the standard deviation, the higher the contrast of the image and the sharper the contour.
The formula for sharpness is as follows:
Figure BDA0003495315030000161
in the formula,. DELTA.px(i, j) and Δ py(i, j) represents the difference of p (i, j) in the x and y directions, i.e., Δ px(i,j)=f(x+1,y)-f(x,y),Δpy(i,j)=f(x,y+1)-f(x,y)。
The formula for the standard deviation is as follows:
Figure BDA0003495315030000162
wherein X (i, j) represents the pixel value of each pixel point in the color image,
Figure BDA0003495315030000163
representing the average of the pixel values in the color image.
The sharpness and standard deviation of the first color image 102 and the second color image 103 are calculated, respectively, as shown in table 1 below:
algorithm Definition of Standard deviation of
Method of gray scale conversion 0.0730 3.5419
The example method 0.1403 13.2554
TABLE 1
As can be seen from table 1, this example provides a better pseudo-color enhancement effect than the conventional gray scale conversion method. Especially, when the contrast of the original fluorescence image is low, the distribution of the fluorescence area can be obviously seen after the pseudo-color enhancement method provided by the embodiment is used for enhancing, and effective fluorescence information is extracted. After pseudo-color enhancement is carried out on the fluorescence image, the fluorescence image is fused with the bright field gray level image, so that the external contour information and the internal fluorescence information of the small living animal can be obtained simultaneously.
Example 2
The embodiment provides a fluorescent image pseudo-color enhancement device, which can be a computer device and also can be arranged in the computer device. As shown in fig. 4, the apparatus includes: a first obtaining module 201, a first calculating module 202, a second calculating module 203 and a mapping module 204.
A first obtaining module 201, configured to obtain a fluorescence image to be processed; for details, please refer to the related description in embodiment 1, which is not repeated herein.
The first calculating module 202 is configured to calculate an optimal threshold corresponding to the to-be-processed fluorescent image based on a pixel value of each pixel point in the to-be-processed fluorescent image; for details, please refer to the related description in embodiment 1, which is not repeated herein.
The second calculating module 203 is configured to calculate a fluorescence threshold corresponding to the fluorescence image to be processed based on the optimal threshold and the pixel mean of all pixel points in the fluorescence image to be processed; for details, please refer to the related description in embodiment 1, which is not repeated herein.
And the mapping module 204 is configured to perform pseudo-color mapping on each pixel point in the to-be-processed fluorescent image based on the fluorescent threshold value to obtain a pseudo-color enhanced color image. For details, please refer to the related description in embodiment 1, which is not repeated herein.
In one or more embodiments, the apparatus further includes a second obtaining module (not shown in fig. 2), a determining module (not shown in fig. 2), a third calculating module (not shown in fig. 2), a fourth calculating module (not shown in fig. 2), a first assigning module (not shown in fig. 2), and a second assigning module (not shown in fig. 2).
The second acquisition module is used for acquiring a preset initial threshold; for details, please refer to the related description in embodiment 1, which is not repeated herein.
The determining module is used for determining a first pixel group with a pixel value larger than an initial threshold value and a second pixel group with a pixel value smaller than or equal to the initial threshold value in the fluorescence image to be processed; for details, please refer to the related description in embodiment 1, which is not repeated herein.
The third calculating module is used for calculating the pixel mean values of the first pixel group and the second pixel group respectively to obtain a first pixel mean value and a second pixel mean value; for details, please refer to the related description in embodiment 1, which is not repeated herein.
The fourth calculation module is used for averaging the first pixel mean value and the second pixel mean value to obtain a third pixel mean value; for details, please refer to the related description in embodiment 1, which is not repeated herein.
The first assignment module is used for setting the initial threshold value as the optimal threshold value corresponding to the fluorescence image to be processed under the condition that the absolute value of the difference between the third pixel mean value and the initial threshold value is less than or equal to zero; for details, please refer to the related description in embodiment 1, which is not repeated herein.
And the second assignment module is used for enabling the initial threshold value to be equal to the third pixel mean value under the condition that the absolute value of the difference between the third pixel mean value and the initial threshold value is greater than zero. For details, please refer to the related description in embodiment 1, and the details are not repeated herein.
In one or more embodiments, the apparatus further comprises a homing module (not shown in fig. 2), a first mapping unit (not shown in fig. 2).
The resetting module is used for setting pixel points with pixel values smaller than the fluorescence threshold value in the fluorescence image to be processed as background colors; for details, please refer to the related description in embodiment 1, which is not repeated herein.
And the first mapping unit is used for performing pseudo-color mapping on pixel points corresponding to the fluorescence threshold value or more of the pixel values in the fluorescence image to be processed to obtain a pseudo-color enhanced color image. For details, please refer to the related description in embodiment 1, which is not repeated herein.
In one or more embodiments, the apparatus further includes a third obtaining module (not shown in fig. 2), a fifth calculating module (not shown in fig. 2), and a second mapping unit (not shown in fig. 2).
The third acquisition module is used for acquiring the maximum pixel value in the fluorescence image to be processed; for details, please refer to the related description in embodiment 1, which is not repeated herein.
A fifth calculating module, configured to calculate a plurality of turning values based on the fluorescence threshold and the maximum pixel value; for details, please refer to the related description in embodiment 1, which is not repeated herein.
And the second mapping unit is used for performing pseudo-color mapping on the pixel points corresponding to the pixel values of the to-be-processed fluorescent image which are greater than the fluorescent threshold value by using the fluorescent threshold value, the maximum pixel value and the turning value to obtain the color image. For details, please refer to the related description in embodiment 1, which is not repeated herein.
The effect of the fluorescent image pseudo-color enhancement device of this embodiment can be referred to the related description in embodiment 1, and is not repeated herein.
Example 3
The present embodiment provides a computer device, as shown in fig. 5, the computer device includes a processor 301 and a memory 302, where the processor 301 and the memory 302 may be connected by a bus or by other means, and fig. 5 takes the connection by a bus as an example.
Processor 301 may be a Central Processing Unit (CPU). The Processor 301 may also be other general purpose processors, Digital Signal Processors (DSPs), Graphics Processing Units (GPUs), embedded Neural Network Processors (NPUs), or other dedicated deep learning coprocessors, Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof.
The memory 302 is used as a non-transitory computer readable storage medium, and can be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the fluorescence image pseudo-color enhancement method in the embodiment of the present invention (e.g., the first obtaining module 201, the first calculating module 202, the second calculating module 203, and the mapping module 204 in the above embodiments; the second obtaining module, the determining module, the third calculating module, the fourth calculating module, the first assigning module, and the second assigning module; the homing module, and the first mapping unit; the third obtaining module, the fifth calculating module, and the second mapping unit). The processor 301 executes various functional applications and data processing of the processor by running non-transitory software programs, instructions and modules stored in the memory 302, so as to implement the fluorescence image pseudo-color enhancement method.
The memory 302 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 301, and the like. Further, the memory 302 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 302 may optionally include memory located remotely from the processor 301, which may be connected to the processor 301 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The embodiment of the invention also provides a computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium and can execute the fluorescent image pseudo-color enhancement method in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like; the storage medium may also comprise a combination of memories of the kind described above.
The embodiment of the present application further provides a computer program product, which when running on a computer device, implements the fluorescent image pseudo-color enhancement method in embodiment 1.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (13)

1. A method for enhancing false color of a fluorescent image, the method comprising:
acquiring a fluorescence image to be processed;
calculating to obtain an optimal threshold corresponding to the fluorescence image to be processed based on the pixel value of each pixel point in the fluorescence image to be processed;
calculating to obtain a fluorescence threshold corresponding to the fluorescence image to be processed based on the optimal threshold and the pixel mean values of all pixel points in the fluorescence image to be processed;
and performing pseudo-color mapping on each pixel point in the fluorescence image to be processed based on the fluorescence threshold value to obtain a pseudo-color enhanced color image.
2. The method for enhancing the pseudo color of the fluorescent image according to claim 1, wherein the step of calculating the optimal threshold corresponding to the fluorescent image to be processed based on the pixel value of each pixel point in the fluorescent image to be processed comprises:
acquiring a preset initial threshold value;
determining a first pixel group with a pixel value larger than an initial threshold value and a second pixel group with a pixel value smaller than or equal to the initial threshold value in the fluorescence image to be processed;
respectively calculating the pixel mean values of the first pixel group and the second pixel group to obtain a first pixel mean value and a second pixel mean value;
averaging the first pixel mean value and the second pixel mean value to obtain a third pixel mean value;
and under the condition that the absolute value of the difference between the third pixel mean value and the initial threshold value is less than or equal to zero, the initial threshold value is the optimal threshold value corresponding to the fluorescence image to be processed.
3. The method for pseudo-color enhancement of a fluorescent image according to claim 2, further comprising:
in the case that the absolute value of the difference between the third pixel mean and an initial threshold is greater than zero, making the initial threshold equal to the third pixel mean;
and returning to execute the first pixel family for determining that the pixel value in the fluorescence image to be processed is greater than the initial threshold value and the second pixel family with the pixel value less than or equal to the initial threshold value.
4. The method for enhancing the pseudo color of the fluorescent image according to any one of claims 1 to 3, wherein the step of calculating the fluorescence threshold corresponding to the fluorescent image to be processed based on the optimal threshold and the pixel mean of all the pixel points in the fluorescent image to be processed comprises:
and averaging the optimal threshold value and the pixel mean values of all pixel points in the fluorescence image to be processed to obtain the fluorescence threshold value.
5. The method for enhancing the pseudo color of the fluorescent image according to any one of claims 1 to 4, wherein the pseudo color mapping of each pixel point in the fluorescent image to be processed based on the fluorescence threshold to obtain the pseudo color enhanced color image comprises:
setting pixel points corresponding to the fluorescence threshold value and the pixel value smaller than the fluorescence threshold value in the fluorescence image to be processed as background colors;
and performing pseudo-color mapping on pixel points corresponding to the fluorescence threshold value or more of the pixel values in the fluorescence image to be processed to obtain a pseudo-color enhanced color image.
6. The method for enhancing pseudo-color in a fluorescent image according to claim 5, further comprising:
acquiring a maximum pixel value in the fluorescence image to be processed;
calculating a plurality of turning values based on the fluorescence threshold and the maximum pixel value;
the pseudo-color mapping is performed on the pixel points corresponding to the fluorescence threshold value or more of the pixel values in the fluorescence image to be processed to obtain a pseudo-color enhanced color image, and the pseudo-color enhanced color image comprises the following steps:
and performing pseudo-color mapping on pixel points corresponding to the fluorescence threshold value or more of the pixel values in the fluorescence image to be processed by using the fluorescence threshold value, the maximum pixel value and the turning value to obtain the color image.
7. The method for enhancing the false color of the fluorescent image according to claim 6, wherein the turning values comprise four, and the pixel points are pseudo-color mapped by a mathematical model, wherein the mathematical model is as follows:
Figure FDA0003495315020000031
Figure FDA0003495315020000032
Figure FDA0003495315020000033
in the formula, H (i, j) represents the pixel value of the pixel point (i, j) in the fluorescence image to be processed, R (i, j) represents the red primary color obtained by converting the pixel value of the pixel point (i, j), G (i, j) represents the green primary color obtained by converting the pixel value of the pixel point (i, j), B (i, j) represents the blue primary color obtained by converting the pixel value of the pixel point (i, j), and x (i, j) represents the blue primary color obtained by converting the pixel value of the pixel point (i, j)0Indicates the fluorescence threshold, x1Representing a first inflection value, x2Represents a second inflection value, x3Represents a third inflection value, x4Represents a fourth inflection value, x5Representing the maximum pixel value.
8. The method for pseudo-color enhancement of a fluorescent image according to claim 6 or 7, further comprising:
acquiring a preset pseudo-color transformation range, wherein the pseudo-color transformation range comprises a minimum value and a maximum value, the maximum value is greater than a fluorescence threshold value, and the minimum value is smaller than a maximum pixel value;
under the condition that the fluorescence threshold is smaller than the minimum value and the maximum pixel value is larger than the maximum value, performing pseudo-color mapping on pixel points corresponding to the pixel values in the to-be-processed fluorescence image in a pseudo-color transformation range to obtain the color image; or
Under the condition that the fluorescence threshold is larger than the minimum value and the maximum pixel value is larger than the maximum value, performing pseudo-color mapping on pixel points corresponding to the range from the fluorescence threshold to the maximum value of the pixel values in the fluorescence image to be processed to obtain the color image; or
And under the condition that the fluorescence threshold is smaller than the minimum value and the maximum pixel value is smaller than the maximum value, performing pseudo-color mapping on pixel points corresponding to the range from the minimum value to the maximum pixel value of the pixel values in the fluorescence image to be processed to obtain the color image.
9. The method for enhancing pseudo-color in a fluorescent image according to any one of claims 1 to 8, further comprising, after acquiring the fluorescent image to be processed:
locally enhancing the fluorescence image to be processed by adopting self-adaptive contrast enhancement;
carrying out mean value filtering on the locally enhanced fluorescence image to be processed;
inhibiting the pixel value of the fluorescence image to be processed after mean value filtering;
and processing the suppressed fluorescence image to be processed by adopting a morphological closed operation to obtain a preprocessed fluorescence image.
10. The method for pseudo-color enhancement of a fluorescent image according to claim 9, wherein the suppressing the mean-filtered pixel values of the fluorescent image to be processed comprises:
counting the number of pixels with values larger than a fluorescence threshold value in a preset area in the fluorescence image to be processed;
setting the pixel value of the central pixel point in the preset area to be zero under the condition that the number is smaller than a preset threshold value;
and setting the central pixel point in the preset area as the median of the pixel values in the preset area under the condition that the number is greater than or equal to the preset threshold.
11. A fluorescence image pseudo-color enhancement device, comprising:
the first acquisition module is used for acquiring a fluorescence image to be processed;
the first calculation module is used for calculating to obtain an optimal threshold corresponding to the fluorescence image to be processed based on the pixel value of each pixel point in the fluorescence image to be processed;
the second calculation module is used for calculating to obtain a fluorescence threshold value corresponding to the fluorescence image to be processed based on the optimal threshold value and the pixel mean value of all pixel points in the fluorescence image to be processed;
and the mapping module is used for carrying out pseudo-color mapping on each pixel point in the fluorescence image to be processed based on the fluorescence threshold value to obtain a pseudo-color enhanced color image.
12. A computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory having stored therein computer instructions, the processor executing the computer instructions to perform the method for enhancing false color of a fluorescent image according to any one of claims 1 to 10.
13. A computer-readable storage medium storing computer instructions for causing a computer to execute the fluorescent image pseudo-color enhancement method according to any one of claims 1 to 10.
CN202210112710.8A 2022-01-29 2022-01-29 Fluorescent image pseudo-color enhancement method, device, equipment and storage medium Pending CN114511460A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210112710.8A CN114511460A (en) 2022-01-29 2022-01-29 Fluorescent image pseudo-color enhancement method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210112710.8A CN114511460A (en) 2022-01-29 2022-01-29 Fluorescent image pseudo-color enhancement method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114511460A true CN114511460A (en) 2022-05-17

Family

ID=81551589

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210112710.8A Pending CN114511460A (en) 2022-01-29 2022-01-29 Fluorescent image pseudo-color enhancement method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114511460A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116342401A (en) * 2022-09-06 2023-06-27 上海玄戒技术有限公司 Image processing method and device, electronic equipment, chip and storage medium
WO2024031950A1 (en) * 2022-08-09 2024-02-15 南京诺源医疗器械有限公司 Data processing method for high-resolution fluorescence three-dimensional imaging apparatus

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024031950A1 (en) * 2022-08-09 2024-02-15 南京诺源医疗器械有限公司 Data processing method for high-resolution fluorescence three-dimensional imaging apparatus
CN116342401A (en) * 2022-09-06 2023-06-27 上海玄戒技术有限公司 Image processing method and device, electronic equipment, chip and storage medium

Similar Documents

Publication Publication Date Title
Zhang et al. Underwater image enhancement via extended multi-scale Retinex
CN114511460A (en) Fluorescent image pseudo-color enhancement method, device, equipment and storage medium
US8345063B2 (en) Filtering method and apparatus for anti-aliasing
CN104240194B (en) A kind of enhancement algorithm for low-illumination image based on parabolic function
CN108764358B (en) Terahertz image identification method, device and equipment and readable storage medium
CN106683080B (en) A kind of retinal fundus images preprocess method
EP1892666A1 (en) A method, an apparatus and a computer-readable medium for processing an image dataset
CN112116536A (en) Low-illumination image enhancement method and system
WO2024045821A1 (en) Image processing method and apparatus, computer device, and storage medium
CN109147005A (en) It is a kind of for the adaptive colouring method of infrared image, system, storage medium, terminal
CN115082361A (en) Turbid water body image enhancement method based on image processing
Shi et al. A joint deep neural networks-based method for single nighttime rainy image enhancement
CN115082887A (en) Motor vehicle road auxiliary line detection system and image processing device and method thereof
CN111311503A (en) Night low-brightness image enhancement system
CN113450272B (en) Image enhancement method based on sinusoidal variation and application thereof
CN113808054A (en) Method for repairing optic disc region of fundus image and related product
CN110136085B (en) Image noise reduction method and device
CN115564682A (en) Uneven-illumination image enhancement method and system
CN116263942A (en) Method for adjusting image contrast, storage medium and computer program product
CN110807748A (en) New tone mapping image enhancement method based on high dynamic range
Luo et al. Multi-focus image fusion through pixel-wise voting and morphology
CN113610823B (en) Image processing method, device, electronic equipment and storage medium
CN107038705B (en) Retinal image bleeding area segmentation method and device and computing equipment
CN112766338B (en) Method, system and computer readable storage medium for calculating distance image
Li et al. Image enhancement via lateral inhibition: An analysis under illumination changes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination