Image processing method, device, electronic device and storage medium
By performing image processing on white light fluorescence images, generating transparency images and performing image fusion, the problem of blurred fluorescence areas is solved and the fluorescence areas are clearly highlighted.
Patent Information
- Application Number
- CN202311686191.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-08
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2043-12-08
AI Technical Summary
During the fusion of white fluorescent images, due to the diffusion of the fluorescent agent, the edges of the fluorescent white light area are easily blurred, making it difficult for users to identify the fluorescent area.
By performing image processing of initial fluorescent images, determine the fluorescent strength of each pixel position and generate transparent images, combine the preset color mapping table to generate pseudo -color fluorescent images, and combine the image and pseudo -color fluorescent images. Finally The fusion image is marked to highlight the fluorescent area.
Effectively highlight the fluorescence area in white light fluorescent images, improve the difference between fluorescence and white light area in the image, and can clearly observe the fluorescent area clearly.
Smart Images

Figure CN117670700B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing, and in particular to an image processing method, device, electronic device and storage medium. Background Art
[0002] Fluorescence imaging labeling technology is widely used in biomedical research and clinical diagnosis. By fluorescently labeling specific proteins, cells or tissues, their distribution, location and function in the body can be studied and observed. In the white light fluorescence image fusion scheme, the fluorescence imaging labeling technology can provide fluorescence images, in which the distribution and location information of the marker is an important part of the fused image. By fusing the fluorescence image with the white light image, the distribution and location information of the fluorescent marker can be integrated with the morphology and surface characteristics of the sample to provide more comprehensive and integrated image information. This can help researchers and professionals observe, analyze and interpret the characteristics and marker information in the sample more accurately, thereby promoting research and development in related fields. The white light fluorescence image fusion scheme is an image processing technology used to fuse white light images and fluorescence images. Its goal is to provide more comprehensive and integrated image information by simultaneously presenting the morphology and surface information of the sample and the distribution and location information of the fluorescent marker. However, usually because of the diffusion of the fluorescent agent, the edge of the fluorescent white light area in the white light fluorescence image becomes blurred over time, making it difficult for users to identify the fluorescent area. Summary of the invention
[0003] In view of this, the present disclosure proposes an image processing method, device, electronic device and storage medium, aiming to highlight the fluorescent area in a white light fluorescent image.
[0004] According to a first aspect of the present disclosure, there is provided an image processing method, the method comprising:
[0005] Capturing images of the target object including the fluorescent area to obtain an initial white light image and an initial fluorescent image;
[0006] Determine a corresponding transparency image according to the fluorescence intensity of each pixel position in the initial fluorescence image;
[0007] Generate a corresponding pseudo-color fluorescence image according to the transparency image and a preset color mapping table;
[0008] Performing image fusion on the initial white light image and the pseudo-color fluorescence image according to the transparency image to obtain a fused fluorescence image;
[0009] The fluorescent area of the target object in the fused fluorescent image is marked to obtain a target fused image.
[0010] In a possible implementation, determining the corresponding transparency image according to the fluorescence intensity of each pixel position in the initial fluorescence image includes:
[0011] Performing smoothing on the initial fluorescence image;
[0012] Determine a first fluorescent image according to a difference between each pixel value in the initial fluorescent image after smoothing and a preset pixel threshold;
[0013] The transparency image is obtained by calculating the ratio of each pixel value in the first fluorescent image to the maximum pixel value and the pixel threshold difference.
[0014] In a possible implementation, determining the first fluorescent image according to the difference between each pixel value in the initial fluorescent image after smoothing and a preset pixel threshold value includes:
[0015] Calculating the difference between each pixel value and a pixel threshold in the initial fluorescent image after smoothing;
[0016] In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being 0 or a negative value, determining that the pixel value at the pixel position in the first fluorescent image is 0;
[0017] In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being a positive value, the pixel value at the pixel position in the first fluorescent image is determined to be the positive value.
[0018] In a possible implementation, the method further includes:
[0019] The initial fluorescence image is input into a pre-trained threshold determination model, and the corresponding pixel threshold is output.
[0020] In a possible implementation, the method further includes:
[0021] determining an average pixel value of the initial fluorescent image;
[0022] Determine a corresponding set threshold value according to a plurality of maximum pixel values in the initial fluorescent image;
[0023] A weighted sum of the average pixel value and the set threshold is calculated to obtain a pixel threshold, and the weighted sum of the average pixel value and the set threshold is 1.
[0024] In a possible implementation, marking the fluorescent area of the target object in the fused fluorescent image to obtain the target fused image includes:
[0025] Calculate the product of each pixel value and the maximum pixel value in the transparency image to obtain a second fluorescent image;
[0026] Binarize the second fluorescent image according to a minimum deviation threshold to obtain a corresponding binary image;
[0027] Determine a marking line image for characterizing the contour position of the fluorescent area in the target object according to the binary image;
[0028] The marking line image and the fused fluorescence image are fused according to a preset marking line transparency to obtain a target fused image.
[0029] In a possible implementation, determining a marker line image for characterizing a contour position of a fluorescent area in the target object according to the binary image includes:
[0030] Calculating the sum of the absolute values of the differences between each pixel in the binary image and at least three adjacent pixels to obtain a differential image corresponding to the binary image;
[0031] Marking pixel values greater than 0 in the differential image as 1 to obtain a candidate position image;
[0032] Performing dilation processing on the candidate position image to obtain an emphasized line image;
[0033] A marked line image is generated according to the marked emphasis line position and the preset emphasis line color in the emphasized line image.
[0034] In a possible implementation, the method further includes:
[0035] Determine a first gray value density of a first target pixel gray value and a second gray value density of a second target pixel gray value in the second fluorescent image, wherein the gray value density represents a ratio of the number of pixels having a gray value of the target pixel to the total number of pixels in the second fluorescent image;
[0036] Based on the candidate threshold T, the first gray value density f1(x) and the second gray value density f2(x) are respectively integrated to obtain the corresponding first error probability and the second error probability
[0037] Constructing a criterion function according to the first error probability and the second error probability And determine the candidate threshold corresponding to the minimum of the criterion function as the minimum deviation threshold, where: is the weight of p1(T), is the weight of p2(T).
[0038] According to a second aspect of the present disclosure, there is provided an image processing device, the device comprising:
[0039] An image acquisition module is used to acquire images of the target object including the fluorescent area to obtain an initial white light image and an initial fluorescent image;
[0040] A first image determination module, configured to determine a corresponding transparency image according to the fluorescence intensity of each pixel position in the initial fluorescence image;
[0041] A second image determination module, used to generate a corresponding pseudo-color fluorescence image according to the transparency image and a preset color mapping table;
[0042] An image fusion module, used for fusing the initial white light image and the pseudo-color fluorescence image according to the transparency image to obtain a fused fluorescence image;
[0043] The image marking module is used to mark the fluorescent area of the target object in the fused fluorescent image to obtain a target fused image.
[0044] In a possible implementation manner, the first image determination module is further configured to:
[0045] Performing smoothing on the initial fluorescence image;
[0046] Determine a first fluorescent image according to a difference between each pixel value in the initial fluorescent image after smoothing and a preset pixel threshold;
[0047] The transparency image is obtained by calculating the ratio of each pixel value in the first fluorescent image to the maximum pixel value and the pixel threshold difference.
[0048] In a possible implementation manner, the first image determination module is further configured to:
[0049] Calculating the difference between each pixel value and a pixel threshold in the initial fluorescent image after smoothing;
[0050] In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being 0 or a negative value, determining that the pixel value at the pixel position in the first fluorescent image is 0;
[0051] In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being a positive value, the pixel value at the pixel position in the first fluorescent image is determined to be the positive value.
[0052] In a possible implementation manner, the device further includes:
[0053] The first threshold determination module is used to input the initial fluorescence image into a pre-trained threshold determination model and output a corresponding pixel threshold.
[0054] In a possible implementation manner, the device further includes:
[0055] an average value determination module, used to determine the average pixel value of the initial fluorescent image;
[0056] A second threshold determination module, used to determine a corresponding set threshold according to a plurality of maximum pixel values in the initial fluorescent image;
[0057] The third threshold determination module is used to calculate the weighted sum of the average pixel value and the set threshold to obtain a pixel threshold, and the weighted sum of the average pixel value and the set threshold is 1.
[0058] In a possible implementation, the image marking module is further used to:
[0059] Calculate the product of each pixel value and the maximum pixel value in the transparency image to obtain a second fluorescent image;
[0060] Binarize the second fluorescent image according to a minimum deviation threshold to obtain a corresponding binary image;
[0061] Determine a marking line image for characterizing the contour position of the fluorescent area in the target object according to the binary image;
[0062] The marking line image and the fused fluorescence image are fused according to a preset marking line transparency to obtain a target fused image.
[0063] In a possible implementation, the image marking module is further used to:
[0064] Calculating the sum of the absolute values of the differences between each pixel in the binary image and at least three adjacent pixels to obtain a differential image corresponding to the binary image;
[0065] Marking pixel values greater than 0 in the differential image as 1 to obtain a candidate position image;
[0066] Performing dilation processing on the candidate position image to obtain an emphasized line image;
[0067] A marked line image is generated according to the marked emphasis line position and the preset emphasis line color in the emphasized line image.
[0068] In a possible implementation manner, the device further includes:
[0069] A density value determination module, used to determine a first gray value density of a first target pixel gray value and a second gray value density of a second target pixel gray value in the second fluorescent image, wherein the gray value density represents a ratio of the number of pixels whose gray value is the target pixel gray value to the total number of pixels in the second fluorescent image;
[0070] An integration module is used to integrate the first gray value density f1(x) and the second gray value density f2(x) based on the candidate threshold T to obtain the corresponding first error probability and the second error probability
[0071] A fourth threshold determination module, configured to construct a criterion function according to the first error probability and the second error probability And determine the candidate threshold corresponding to the minimum of the criterion function as the minimum deviation threshold, where: is the weight of p1(T), is the weight of p2(T).
[0072] According to a third aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0073] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0074] According to a fifth aspect of the present disclosure, a computer program product is provided, comprising a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0075] In an embodiment of the present disclosure, an image of a target object including a fluorescent area is captured to obtain an initial white light image and an initial fluorescent image, and a corresponding transparency image is determined according to the fluorescence intensity of each pixel position in the initial fluorescent image. A corresponding pseudo-color fluorescent image is generated according to the transparency image and a preset color mapping table, and the initial white light image and the pseudo-color fluorescent image are fused to obtain a fused fluorescent image. The fluorescent area of the target object in the fused fluorescent image is marked to obtain a target fused image. The present disclosure fuses the white light image and the fluorescent image based on the transparency image determined by the fluorescence intensity, thereby enhancing the distinction between the fluorescent and white light areas in the fused image. At the same time, the fluorescent area in the fused image is further highlighted by marking.
[0076] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the disclosure and, together with the description, serve to explain the principles of the disclosure.
[0078] Figure 1 A flowchart of an image processing method according to an embodiment of the present disclosure is shown;
[0079] Figure 2 A schematic diagram showing a target fusion image according to an embodiment of the present disclosure;
[0080] Figure 3 A schematic diagram showing an image processing device according to an embodiment of the present disclosure;
[0081] Figure 4 A schematic diagram of an electronic device according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0082] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0083] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0084] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0085] The image processing method of the embodiment of the present disclosure can be performed by an electronic device such as a terminal device or a server. The terminal device can be any fixed or mobile terminal such as a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. The server can be a single server or a server cluster composed of multiple servers. Any electronic device can implement the image processing method of the embodiment of the present disclosure by a processor calling a computer-readable instruction stored in a memory.
[0086] Figure 1 FIG. 1 is a flowchart of an image processing method according to an embodiment of the present disclosure. Figure 1 As shown, the image processing method of the embodiment of the present disclosure may include the following steps S10-S50.
[0087] Step S10: Capture images of the target object including the fluorescent area to obtain an initial white light image and an initial fluorescent image.
[0088] In a possible implementation, an electronic device controls a white light camera and a fluorescent camera to capture images of a target object, and obtains an initial white light image and an initial fluorescent image. For example, the initial white light image and the initial fluorescent image can come from the real-time image data stream captured by the white light camera and the fluorescent camera. Among them, the target object can be the whole or part of an animal, human body, plant, or other inanimate object whose arbitrary area is marked with a fluorescent dye or fluorescent protein. The white light image is used to record the morphology and surface information of the target object, and the fluorescent image is used to record the distribution and positioning information of the fluorescent marker on the target object. Alternatively, the electronic device can also directly receive the initial white light image and the initial fluorescent image obtained by other devices to capture images of the target object.
[0089] Step S20: determining a corresponding transparency image according to the fluorescence intensity of each pixel position in the initial fluorescence image.
[0090] In a possible implementation, after acquiring the initial fluorescent image by image acquisition, the electronic device determines a transparency image for characterizing the fluorescence intensity of each pixel position in the initial fluorescent image. Among them, the fluorescence intensity described in the embodiment of the present disclosure can be characterized by a fluorescence grayscale value or a pixel value, that is, the larger the fluorescence grayscale value or the pixel value, the greater the fluorescence intensity of the pixel position, and the smaller the fluorescence grayscale value or the pixel value, the smaller the fluorescence intensity of the pixel position. Optionally, since there is noise introduced in the image acquisition process in the initial fluorescent image, direct processing will affect the transparency image effect obtained, so the initial fluorescent image can be smoothed before processing to achieve a noise reduction effect. Specifically, the process of determining the transparency image by the electronic device may include smoothing the initial fluorescent image, and then determining the first fluorescent image according to the difference between each pixel value in the smoothed initial fluorescent image and a preset pixel threshold. Then, the ratio of each pixel value in the first fluorescent image to the difference between the maximum pixel value and the pixel threshold is calculated to obtain a transparency image.
[0091] "Transparency" is needed in the process of image fusion (or image superposition). In the embodiment of the present application, transparency is mainly set according to the initial fluorescent image. For example, the larger the pixel value in the initial fluorescent image, the higher the pixel transparency, which is reflected in the image as being more opaque, and thus can better cover the white light image after being superimposed with the white light image.
[0092] Optionally, the process of smoothing the initial fluorescence image by the electronic device may include filtering, noise reduction and convolution in sequence, that is, the initial fluorescence image may be smoothed by filtering, noise reduction and convolution in sequence. Among them, the filtering process may adopt one or more combinations of filtering methods such as mean filtering, median filtering, Gaussian filtering, box filtering, bilateral filtering and guided filtering. For example, when filtering by mean filtering, the electronic device may filter by performing arithmetic averaging on each pixel and neighboring pixel in the initial fluorescence image. Noise reduction may be achieved by a Gaussian filter, that is, the electronic device may input the filtered initial fluorescence image into a Gaussian filter, and the Gaussian filter may perform convolution operation on the input image through a Gaussian filter kernel to reduce noise. The convolution process is used to solve the problem of blurred image boundaries caused by filtering and noise reduction processes, and the convolution process may be achieved by a Laplace convolution kernel. Specifically, the electronic device can convolve the initial fluorescence image after noise reduction processing through the Laplace convolution kernel, and then use the initial fluorescence image after convolution processing to superimpose the initial fluorescence image after noise reduction processing but not convolved processing, so as to achieve the effect of enhancing the edge area in the initial fluorescence image.
[0093] Further, after the initial fluorescent image is smoothed, a pixel threshold is determined and the first fluorescent image is obtained by calculating the difference between each pixel value in the initial fluorescent image after smoothing and the pixel threshold. Specifically, the electronic device may first calculate the difference between each pixel value in the initial fluorescent image after smoothing and a preset pixel threshold. In the case where the difference between the pixel value of any pixel position in the initial fluorescent image and the preset pixel threshold is 0 or a negative value, the pixel value of the pixel position in the first fluorescent image is determined to be 0. In the case where the difference between the pixel value of any pixel position in the initial fluorescent image and the preset pixel threshold is a positive value, the pixel value of the pixel position in the first fluorescent image is determined to be the positive value. That is, the electronic device may first determine that the pixel value in the first fluorescent image is I flu1 =I flu -T1,I flu is the pixel value in the initial fluorescence image, and T1 is the pixel threshold. flu1 When the value of is less than 0, it is modified to 0. In this way, the background noise in the first fluorescent image can be changed to 0, and the brightness of the fluorescent area in the first fluorescent image can be highlighted.
[0094] In a possible implementation, the pixel threshold can be preset or determined in real time during the image processing process. In the case where the pixel threshold is determined in real time during the image processing process, the electronic device can determine the pixel threshold based on the initial fluorescence image by deep learning or traditional methods. Wherein, when the pixel threshold is determined by deep learning, the electronic device can directly input the initial fluorescence image into the threshold determination model obtained by pre-training, and output the corresponding pixel threshold. Wherein, the training process of the threshold determination model can include obtaining a variety of initial fluorescence images with artificially marked thresholds as training sets, and then pre-processing the training sets and using the training sets for model training. Optionally, the model trained by the embodiment of the present disclosure can be a LeNet model including a convolutional layer, a pooling layer, and a fully connected layer. During the model training process, a cross entropy loss function and an optimization algorithm can be defined, and the model parameters can be updated based on the loss function and the optimization algorithm by a back propagation algorithm. Exemplarily, the image in the training set can be input into the LeNet model and processed by a forward propagation algorithm, and the predicted value is output. The predicted value is then compared with the artificially marked threshold, the threshold deviation is calculated by the loss function, and the model parameters are updated by back propagation to achieve model adjustment and optimization. After the adjustment and optimization of the model is completed, a threshold determination model is obtained, through which the pixel threshold is adaptively determined directly according to the change of the pixel value on the input first fluorescent image. Determining the pixel threshold in this way can reduce the problem of incomplete background noise removal or reduction of effective signals.
[0095] Furthermore, when determining the pixel threshold by the traditional method, the electronic device may first determine the average pixel value of the initial fluorescent image, and then determine the corresponding set threshold value according to the largest multiple pixel values in the initial fluorescent image, and calculate the weighted sum of the average pixel value and the set threshold value to obtain the pixel threshold value, and the weighted sum of the average pixel value and the set threshold value is 1. The set threshold value may be determined according to a preset rule. For example, all pixel values in the initial fluorescent image may be sorted from large to small, and the pixel values of the top 1% of the pixel values are taken, and the number of pixels is recorded as k, and the set threshold value is calculated as is the pixel value of the first 1% of pixels in the initial fluorescence image, and K is the number of the first 1% of pixels. That is, 20% of the average value of the largest 1% of pixels in the initial fluorescence image can be determined as the set threshold. The percentage can be changed dynamically, and can be adaptively adjusted according to the overall level of the pixel value of the initial fluorescence image. Taking the 1080p image as an example, there are 2073600 pixels in the 1080p image with a total of 1920*1080. The pixels with the first 1% of pixel values are taken, totaling 20736 pixels, and then the average value of these pixel values is calculated and multiplied by 0.2 to obtain R1. After obtaining the set threshold R1 and the average pixel value R2, E1=σ1*R1+σ2*R2 can be calculated to obtain the pixel threshold. σ1 and σ2 are preset weight values, and the sum of them is 1.
[0096] After obtaining the first fluorescent image, the electronic device can calculate the ratio of the pixel value of each pixel position in the first fluorescent image to the difference between the maximum pixel value and the pixel threshold value to obtain a transparency image. That is, the transparency image can be obtained by the formula Calculate the pixel value α of each pixel position in the transparency image, where 255 is the maximum pixel value, T1 is the pixel threshold, and I flu1 is the pixel value in the first fluorescent image.
[0097] Step S30: generating a corresponding pseudo-color fluorescence image according to the transparency image and a preset color mapping table.
[0098] In a possible implementation, after determining the transparency image corresponding to the first fluorescent image, the electronic device generates a pseudo-color fluorescent image according to the transparency image and a preset color mapping table. Optionally, the electronic device may first calculate the product of each pixel value in the transparency image and the maximum pixel value to obtain the second fluorescent image. Then, the pseudo-color fluorescent image is determined according to the pixel value corresponding to the second fluorescent image in the preset color mapping table. That is, the electronic device may determine that the pixel at each pixel position in the second fluorescent image is I flu2 =α*255, α is the pixel value in the transparency image. This method can convert the pixel values between 0-1 in the transparency image to 0-255 to better display the brightness.
[0099] Optionally, the color mapping table can be pre-set, including the correspondence between grayscale values and R, G, and B values. The pixel values in the second fluorescent image are grayscale values of 0-255. The electronic device can directly select the corresponding R, G, and B values in the color mapping table according to the pixel values in the second fluorescent image to determine the three-channel pixel values corresponding to each pixel position, and generate the corresponding pseudo-color fluorescent image. Exemplarily, the color mapping table can be shown in the following table:
[0100] Pixel Value R-Value G-Value B value 1 52 181 140 2 52 181 138 3 52 181 137 4 55 180 126 5 55 180 124 6 55 180 122 … … … …
[0101] Step S40: performing image fusion on the initial white light image and the pseudo-color fluorescence image according to the transparency image to obtain a fused fluorescence image.
[0102] In a possible implementation, after obtaining the transparency image and the pseudo-color fluorescence image, the electronic device can fuse the initial white light image and the pseudo-color fluorescence image based on the transparency image to obtain a fused fluorescence image that highlights the fluorescent area in the target object. Before the image fusion, the electronic device can also perform noise reduction, filtering and other processing on the initial white light image. Optionally, during the image fusion process, the electronic device can determine that the pixel value of each pixel position in the transparency image is the fluorescence transparency, and determine that the difference between 1 and the pixel value is the white light transparency. Then calculate the first product of the pixel value of each pixel position in the initial white light image and the corresponding white light transparency, and the second product of the pixel value of each pixel position in the pseudo-color fluorescence image and the corresponding fluorescence transparency, and determine the pixel value of each pixel position in the fused fluorescence image based on the sum of the first product and the second product. That is, the pixel value of each pixel position in the fused fluorescence image is I fusion =I pesP +I wp , where I pesP =I pes *α, I wp =(1-α)*I w , I w is the pixel in the initial white light image, I pes is the pixel in the pseudo-color fluorescence image, and α is the pixel in the transparency image. Image fusion based on the transparency image generated by the initial fluorescence image can make the fused result more in line with the human eye's intuition, that is, the pseudo-color intensity is high where the fluorescence concentration is high, and the pseudo-color intensity is low where the fluorescence concentration is low.
[0103] Step S50: Mark the fluorescent area of the target object in the fused fluorescent image to obtain a target fused image.
[0104] In a possible implementation, after determining the fused fluorescence image, the electronic device further marks the fluorescence area of the target object in the fused fluorescence image to obtain a target fused image that highlights the fluorescence area in the target object. Optionally, the electronic device determines the target fused image by first binarizing the second fluorescence image according to a minimum deviation threshold to obtain a corresponding binary image. Then, based on the binary image, a marking line image for characterizing the contour position of the fluorescence area in the target object is determined, and then the marking line image and the fused fluorescence image are fused according to a preset marking line transparency to obtain a target fused image. The minimum deviation threshold can be preset or determined in real time during the image processing process.
[0105] Optionally, in the case where the minimum deviation threshold of the embodiment of the present disclosure is determined in real time during the image processing process, the method for determining the minimum deviation threshold may be to first determine the first gray value density of the gray value of the first target pixel in the second fluorescent image and the second gray value density of the gray value of the second target pixel. The gray value density represents the ratio of the number of pixels whose gray value is the gray value of the target pixel to the total number of pixels in the second fluorescent image. For example, there are 3000 pixels with a gray value of 100 in a 1080p image, and the pixel density of a gray value of 100 is 3000 / (1920*1080)=0.0014. The first target pixel and the second target pixel are used to characterize the image foreground and the image background, respectively. The first target pixel may be a pixel with a higher pixel value in the second fluorescent image, and the second target pixel may be a pixel with a lower pixel value in the second fluorescent image. The first target pixel and the second target pixel may be selected as needed. Based on the candidate threshold T, the first gray value density f1(x) and the second gray value density f2(x) are respectively integrated to obtain the corresponding first error probability. and the second error probability Wherein x represents the gray value, x in f1(x) is the gray value of the first target pixel, and x in f2(x) is the gray value of the second target pixel.
[0106] Then, a criterion function is constructed based on the first error probability and the second error probability. And determine the candidate threshold T corresponding to the minimum of the criterion function as the minimum deviation threshold, where, is the weight of p1(T), is the weight of p2(T), and both weights can be values between 0 and 1.
[0107] Furthermore, the method of binarizing the second fluorescent image based on the minimum deviation threshold can be to compare the pixel value of each pixel position in the second fluorescent image with the minimum deviation threshold, and determine that the pixel value of the pixel position in the binary image is 1 when it is greater than the minimum deviation threshold, which is used to characterize the part with a stronger fluorescent signal in the second fluorescent image; and determine that the pixel value of the pixel position in the binary image is 0 when it is not greater than the minimum deviation threshold, which is used to characterize the part with no fluorescent signal or a weak fluorescent signal in the second fluorescent image.
[0108] In a possible implementation, after obtaining a binary image, the electronic device determines a marking line image representing the contour of the fluorescent area in the target object based on the binary image. Specifically, the sum of the absolute values of the differences between each pixel in the binary image and at least three adjacent pixels (for example, adjacent right pixels, lower pixels, and lower right pixels) can be calculated to obtain a differential image corresponding to the binary image. Then, the pixel values greater than 0 in the differential image are marked as 1 to obtain a candidate position image. Then, the candidate position image is expanded to obtain an emphasis line image, and the marking line image is generated according to the emphasis line position marked in the emphasis line image and the preset emphasis line color.
[0109] Among them, the process of determining the differential image can be to perform differential calculations on the pixel value of each pixel position in the binary image and the pixel values of the adjacent right pixel, the lower pixel and the lower right pixel, and take the sum of the absolute values. After calculating the pixel values of each pixel position in the entire image, it is determined that the pixel value of the pixel position whose result is greater than 0 in the differential image is 1, and the pixel value of the pixel position whose result is not greater than 0 is 0, and the candidate position image is obtained. The method of selecting fewer adjacent pixels to participate in the differential operation can reduce the amount of calculation and the program running time. At the same time, in the case of performing differential operations based on adjacent right pixels, lower pixels and lower right pixels, the neighboring pixels such as the left, upper and upper left have participated in the operation in a continuous cycle, which can ensure the operation effect.
[0110] Furthermore, after determining the candidate position image, the electronic device can thicken the contour of the contour line in the candidate position image by dilation processing, so as to further play an emphasis role. Among them, the dilation process can be to first create a blank image of the same size as the candidate position image, and then define a dilation kernel to perform a preset number of circular convolution operations on the candidate position image to achieve image dilation, and the shape of the dilation kernel can be any shape such as square, rectangle and circle. After the dilation process, the image can also be eroded to shrink the contour line that has been thickened after dilation to eliminate the overlap with the surrounding area. The electronic device can perform multiple erosion operations and dilation operations on the candidate position image based on needs until an emphasized line image including a thick and closed contour line is obtained. At the same time, the electronic device can pre-set the emphasized line color, which can include pixel values corresponding to at least one color. After the emphasized line image including a thick and closed contour line is obtained by dilation processing, the pixel value of the pixel position with a pixel value of 1 in the emphasized line image is replaced with the pixel value of the corresponding emphasized line color to obtain a marked line image after the color is replaced.
[0111] Optionally, the electronic device may also pre-set a marker line transparency α1 in the range of 0-1. After obtaining the marker line image, the electronic device may adjust the marker line image I based on the marker line transparency. line and fused fluorescence image I fusion Perform image fusion to obtain the target fused image I out =I fusion *(1-α1)+I line *α1. The marking lines in the target fusion image can distinguish between high-concentration fluorescence and low-concentration fluorescence areas, and can focus on displaying areas with higher fluorescence to avoid regional misjudgment caused by the expansion of fluorescent agents. Furthermore, after obtaining the target fusion image, the electronic device can also adjust and enhance the target fusion image based on user needs, such as enhancing contrast and brightness. Among them, the contrast enhancement process can be achieved through a histogram equalization algorithm, that is, the grayscale of the image can be redistributed to make the pixel values in the image more evenly distributed, thereby enhancing the contrast of the image. The brightness enhancement process can be achieved through gamma correction, that is, the brightness of the image can be changed by adjusting the brightness curve of the image.
[0112] Figure 2 FIG. 1 is a schematic diagram showing a target fusion image according to an embodiment of the present disclosure. Figure 2 As shown, the target fusion image obtained by the image processing method of the embodiment of the present disclosure includes white light information for recording the morphology and surface features of the target object, and fluorescence information for recording the distribution and positioning of the fluorescent markers in the target object. At the same time, the fluorescent area is marked by a marking line in the target fusion image, so that the user can intuitively observe the effective fluorescent area in the image.
[0113] Based on the above technical features, the disclosed embodiment can fuse the fluorescence image and the white light image based on the intensity of the fluorescence area in the fluorescence image, and preliminarily highlight the boundary between the fluorescence area and the non-fluorescence area in the picture. Furthermore, the outline of the fluorescence area in the target object is obtained by processing the fluorescence image, and the fused fluorescence image is marked to further emphasize the key area with higher fluorescence concentration, solving the problem of being unable to accurately locate the key area in the target object due to changes such as reduction or diffusion of the fluorescence area over time.
[0114] Figure 3 FIG. 1 is a schematic diagram showing an image processing device according to an embodiment of the present disclosure. Figure 3 As shown, the image processing device of the embodiment of the present disclosure may include:
[0115] An image acquisition module 30 is used to acquire an image of the target object including the fluorescent area to obtain an initial white light image and an initial fluorescent image;
[0116] A first image determination module 31, configured to determine a corresponding transparency image according to the fluorescence intensity of each pixel position in the initial fluorescence image;
[0117] A second image determination module 32, configured to generate a corresponding pseudo-color fluorescence image according to the transparency image and a preset color mapping table;
[0118] An image fusion module 33, configured to fuse the initial white light image and the pseudo-color fluorescence image according to the transparency image to obtain a fused fluorescence image;
[0119] The image marking module 34 is used to mark the fluorescent area of the target object in the fused fluorescent image to obtain a target fused image.
[0120] In a possible implementation, the first image determination module 31 is further configured to:
[0121] Performing smoothing on the initial fluorescence image;
[0122] Determine a first fluorescent image according to a difference between each pixel value in the initial fluorescent image after smoothing and a preset pixel threshold;
[0123] The transparency image is obtained by calculating the ratio of each pixel value in the first fluorescent image to the maximum pixel value and the pixel threshold difference.
[0124] In a possible implementation, the first image determination module 31 is further configured to:
[0125] Calculating the difference between each pixel value and a pixel threshold in the initial fluorescent image after smoothing;
[0126] In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being 0 or a negative value, determining that the pixel value at the pixel position in the first fluorescent image is 0;
[0127] In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being a positive value, the pixel value at the pixel position in the first fluorescent image is determined to be the positive value.
[0128] In a possible implementation manner, the device further includes:
[0129] The first threshold determination module is used to input the initial fluorescence image into a pre-trained threshold determination model and output a corresponding pixel threshold.
[0130] In a possible implementation manner, the device further includes:
[0131] an average value determination module, used to determine the average pixel value of the initial fluorescent image;
[0132] A second threshold determination module, used to determine a corresponding set threshold according to a plurality of maximum pixel values in the initial fluorescent image;
[0133] The third threshold determination module is used to calculate the weighted sum of the average pixel value and the set threshold to obtain a pixel threshold, and the weighted sum of the average pixel value and the set threshold is 1.
[0134] In a possible implementation, the image marking module 34 is further configured to:
[0135] Calculate the product of each pixel value and the maximum pixel value in the transparency image to obtain a second fluorescent image;
[0136] Binarize the second fluorescent image according to a minimum deviation threshold to obtain a corresponding binary image;
[0137] Determine a marking line image for characterizing the contour position of the fluorescent area in the target object according to the binary image;
[0138] The marking line image and the fused fluorescence image are fused according to a preset marking line transparency to obtain a target fused image.
[0139] In a possible implementation, the image marking module 34 is further configured to:
[0140] Calculating the sum of the absolute values of the differences between each pixel in the binary image and at least three adjacent pixels to obtain a differential image corresponding to the binary image;
[0141] Marking pixel values greater than 0 in the differential image as 1 to obtain a candidate position image;
[0142] Performing dilation processing on the candidate position image to obtain an emphasized line image;
[0143] A marked line image is generated according to the marked emphasis line position and the preset emphasis line color in the emphasized line image.
[0144] In a possible implementation manner, the device further includes:
[0145] A density value determination module, used to determine a first gray value density of a first target pixel gray value and a second gray value density of a second target pixel gray value in the second fluorescent image, wherein the gray value density represents a ratio of the number of pixels whose gray value is the target pixel gray value to the total number of pixels in the second fluorescent image;
[0146] An integration module is used to integrate the first gray value density f1(x) and the second gray value density f2(x) based on the candidate threshold T to obtain the corresponding first error probability and the second error probability
[0147] A fourth threshold determination module, configured to construct a criterion function according to the first error probability and the second error probability And determine the candidate threshold corresponding to the minimum of the criterion function as the minimum deviation threshold, where: is the weight of p1(T), is the weight of p2(T).
[0148] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0149] The embodiment of the present disclosure also provides a computer-readable storage medium on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium can be a volatile or non-volatile computer-readable storage medium.
[0150] An embodiment of the present disclosure further proposes an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0151] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in a processor of an electronic device, the processor in the electronic device executes the above method.
[0152] Figure 4 1 is a schematic diagram showing an electronic device 1900 according to an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal device. Figure 4 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0153] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM or similar.
[0154] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0155] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0156] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0157] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0158] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.
[0159] Various aspects of the present disclosure are described herein with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0160] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0161] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0162] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0163] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. An image processing method, characterized in that: The method comprises: Capturing images of the target object including the fluorescent area to obtain an initial white light image and an initial fluorescent image; Determine a corresponding transparency image according to the fluorescence intensity of each pixel position in the initial fluorescence image; Generate a corresponding pseudo-color fluorescence image according to the transparency image and a preset color mapping table; Performing image fusion on the initial white light image and the pseudo-color fluorescence image according to the transparency image to obtain a fused fluorescence image; Marking the fluorescent area of the target object in the fused fluorescent image to obtain a target fused image; The step of determining a corresponding transparency image according to the fluorescence intensity of each pixel position in the initial fluorescence image comprises: Performing smoothing on the initial fluorescence image; Determine a first fluorescent image according to a difference between each pixel value in the initial fluorescent image after smoothing and a preset pixel threshold; Calculating the ratio of each pixel value in the first fluorescent image to the maximum pixel value and the pixel threshold difference to obtain the transparency image; Determining the first fluorescent image according to the difference between each pixel value in the initial fluorescent image after smoothing and a preset pixel threshold value includes: Calculating the difference between each pixel value and a pixel threshold in the initial fluorescent image after smoothing; In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being 0 or a negative value, determining that the pixel value at the pixel position in the first fluorescent image is 0; In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being a positive value, determining the pixel value at the pixel position in the first fluorescent image to be the positive value; The step of marking the fluorescent area of the target object in the fused fluorescent image to obtain a target fused image includes: Calculating the product of each pixel value and the maximum pixel value in the transparency image to obtain a second fluorescent image; Binarize the second fluorescent image according to a minimum deviation threshold to obtain a corresponding binary image; Determine a marking line image for characterizing the contour position of the fluorescent area in the target object according to the binary image; Performing image fusion on the marking line image and the fused fluorescence image according to a preset marking line transparency to obtain a target fused image; The step of determining a marker line image for characterizing the contour position of the fluorescent area in the target object according to the binary image comprises: Calculating the sum of the absolute values of the differences between each pixel in the binary image and at least three adjacent pixels to obtain a differential image corresponding to the binary image; Marking pixel values greater than 0 in the differential image as 1 to obtain a candidate position image; Performing dilation processing on the candidate position image to obtain an emphasized line image; A marked line image is generated according to the marked emphasis line position and the preset emphasis line color in the emphasized line image.
2. The method according to claim 1, characterized in that: The method further comprises: The initial fluorescence image is input into a pre-trained threshold determination model, and the corresponding pixel threshold is output.
3. The method according to claim 1, characterized in that The method further comprises: The initial fluorescence image is input into a pre-trained threshold determination model, and the corresponding pixel threshold is output.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: determining an average pixel value of the initial fluorescent image; Determine a corresponding set threshold value according to a plurality of maximum pixel values in the initial fluorescent image; A weighted sum of the average pixel value and the set threshold is calculated to obtain a pixel threshold, and the weighted sum of the average pixel value and the set threshold is 1.
5. The method according to claim 4, characterized in that The step of determining a marker line image for characterizing the contour position of the fluorescent area in the target object according to the binary image comprises: Calculating the sum of the absolute values of the differences between each pixel in the binary image and at least three adjacent pixels to obtain a differential image corresponding to the binary image; Marking pixel values greater than 0 in the differential image as 1 to obtain a candidate position image; Performing dilation processing on the candidate position image to obtain an emphasized line image; A marked line image is generated according to the marked emphasis line position and the preset emphasis line color in the emphasized line image.
6. The method according to any one of claims 1 to 3, characterized in that The method further comprises: Determine a first gray value density of a first target pixel gray value and a second gray value density of a second target pixel gray value in the second fluorescent image, wherein the first gray value density represents a ratio of the number of pixels whose gray value is the first target pixel gray value to the total number of pixels in the second fluorescent image, and the second gray value density represents a ratio of the number of pixels whose gray value is the second target pixel gray value to the total number of pixels in the second fluorescent image; Based on the candidate threshold T, the first gray value density f1(x) and the second gray value density f2(x) are respectively integrated to obtain the corresponding first error probability and the second error probability Constructing a criterion function according to the first error probability and the second error probability And determine the candidate threshold corresponding to the minimum of the criterion function as the minimum deviation threshold, where: is the weight of p1(T), is the weight of p2(T).
7. The method according to claim 4, characterized in that The method further comprises: Determine a first gray value density of a first target pixel gray value and a second gray value density of a second target pixel gray value in the second fluorescent image, wherein the first gray value density represents a ratio of the number of pixels whose gray value is the first target pixel gray value to the total number of pixels in the second fluorescent image, and the second gray value density represents a ratio of the number of pixels whose gray value is the second target pixel gray value to the total number of pixels in the second fluorescent image; Based on the candidate threshold T, the first gray value density f1(x) and the second gray value density f2(x) are respectively integrated to obtain the corresponding first error probability and the second error probability Constructing a criterion function according to the first error probability and the second error probability And determine the candidate threshold corresponding to the minimum of the criterion function as the minimum deviation threshold, where: is the weight of p1(T), is the weight of p2(T).
8. The method according to claim 5, characterized in that The method further comprises: Determine a first gray value density of a first target pixel gray value and a second gray value density of a second target pixel gray value in the second fluorescent image, wherein the first gray value density represents a ratio of the number of pixels whose gray value is the first target pixel gray value to the total number of pixels in the second fluorescent image, and the second gray value density represents a ratio of the number of pixels whose gray value is the second target pixel gray value to the total number of pixels in the second fluorescent image; Based on the candidate threshold T, the first gray value density f1(x) and the second gray value density f2(x) are respectively integrated to obtain the corresponding first error probability and the second error probability Constructing a criterion function according to the first error probability and the second error probability And determine the candidate threshold corresponding to the minimum of the criterion function as the minimum deviation threshold, where: is the weight of p1(T), is the weight of p2(T).
9. An image processing device, characterized in that: The device comprises: An image acquisition module is used to acquire images of the target object including the fluorescent area to obtain an initial white light image and an initial fluorescent image; A first image determination module, configured to determine a corresponding transparency image according to the fluorescence intensity of each pixel position in the initial fluorescence image; A second image determination module, used to generate a corresponding pseudo-color fluorescence image according to the transparency image and a preset color mapping table; An image fusion module, used for performing image fusion on the initial white light image and the pseudo-color fluorescence image according to the transparency image to obtain a fused fluorescence image; An image marking module, used for marking the fluorescent area of the target object in the fused fluorescent image to obtain a target fused image; The first image determination module is further used for: Performing smoothing on the initial fluorescence image; Determine a first fluorescent image according to a difference between each pixel value in the initial fluorescent image after smoothing and a preset pixel threshold; Calculating the ratio of each pixel value in the first fluorescent image to the maximum pixel value and the pixel threshold difference to obtain the transparency image; The first image determination module is further used for: Calculating the difference between each pixel value and a pixel threshold in the initial fluorescent image after smoothing; In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being 0 or a negative value, determining that the pixel value at the pixel position in the first fluorescent image is 0; In response to the difference between a pixel value at any pixel position in the initial fluorescent image and a preset pixel threshold being a positive value, determining the pixel value at the pixel position in the first fluorescent image to be the positive value; The image marking module is further used for: Calculating the product of each pixel value and the maximum pixel value in the transparency image to obtain a second fluorescent image; Binarize the second fluorescent image according to a minimum deviation threshold to obtain a corresponding binary image; Determine a marking line image for characterizing the contour position of the fluorescent area in the target object according to the binary image; Performing image fusion on the marking line image and the fused fluorescence image according to a preset marking line transparency to obtain a target fused image; The image marking module is further used for: Calculating the sum of the absolute values of the differences between each pixel in the binary image and at least three adjacent pixels to obtain a differential image corresponding to the binary image; Marking pixel values greater than 0 in the differential image as 1 to obtain a candidate position image; Performing dilation processing on the candidate position image to obtain an emphasized line image; A marked line image is generated according to the marked emphasis line position and the preset emphasis line color in the emphasized line image.
10. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to implement the method described in any one of claims 1 to 8 when executing the instructions stored in the memory.
11. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Fluorescence image processing method and system, storage medium and electronic equipment
CN117058050A