A method for calculating a cell picture definition value based on a saturation value

By converting cell images from RGB to HSV channels, using Gaussian filtering and Laplacian transform to remove noise, and combining decision tree algorithms and morphological operations, the sharpness value of cell images is accurately calculated, thus solving the problem of noise affecting bright spots under oil immersion immersion.

CN116029990BActive Publication Date: 2026-05-08HANGZHOU ZHIWEI INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU ZHIWEI INFORMATION TECH CO LTD
Filing Date
2022-12-19
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing techniques for photographing cells under an oil immersion lens, bright spots can easily lead to errors in calculating the contrast between adjacent Z-axis images, making it difficult to accurately determine the clearest image.

Method used

By converting cell images from RGB to HSV channels, Gaussian filtering and Laplacian transform are used to remove noise. A decision tree algorithm is then used to locate bright spots, and dilation and erosion operations are used to eliminate noise. Finally, the sharpness value of the cell image is calculated.

Benefits of technology

Accurately calculating the sharpness value of cell images eliminates the influence of bright spots and noise, thus improving the accuracy of the calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116029990B_ABST
    Figure CN116029990B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of methods for calculating cell picture definition value based on saturation value, provide a kind of methods for calculating cell picture definition value based on saturation value, comprising the following steps: (1) the color conversion of cell picture obtained by shooting is carried out, and cell picture is converted from RGB (red green blue) channel to HSV (color, saturation, brightness);(2) separate out saturation channel picture S, remove part of noise by Gaussian filtering (or mean filtering), obtain picture S1;(3) select suitable size kernel to picture S1 and carry out Laplace transform and calculate absolute value, find out the position of change in picture, obtain picture S2;(4) set appropriate threshold, carry out thresholding processing to picture S2, record saturation value, find out corresponding bright spot position;(5) the bright spot position of multiple cell pictures is counted, and the saturation value of corresponding picture S2 is recorded.This algorithm is simple, effective, combined with Gaussian filtering (or mean filtering), Laplace transform, decision tree, morphological operation etc., so that the result of judging cell picture definition value is more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of medical image processing, and in particular relates to a method for calculating the sharpness value of cell images based on saturation values. Background Technology

[0002] Algorithms for calculating cell image sharpness are primarily used to locate the sharpest cell image along the Z-axis based on the Z-axis movement of a mechanical device, and then use this point as the focus point for imaging. Due to uneven slice thickness, cell stacking varies, and different cell types exhibit significant differences after staining. Different staining agents also cause color variations, and dust and other impurities can contaminate the slices to varying degrees. Therefore, the accuracy of the algorithm is crucial. Currently, one method is contrast-based focusing, which identifies the position of maximum contrast by analyzing the contrast between adjacent Z-axis images and focuses on this point. However, when shooting under an oil immersion lens, bright spots are easily observed in the image, making it prone to errors when calculating the contrast between adjacent Z-axis images, resulting in a less-than-sharp image. Summary of the Invention

[0003] The purpose of this invention is to overcome the above-mentioned shortcomings in the prior art and to provide a method for calculating cell image sharpness value based on saturation value.

[0004] The technical solution adopted by this invention to solve the above problems is: to provide a method for calculating cell image sharpness value based on saturation value, including the following steps:

[0005] (1) Perform color conversion on the cell images obtained by the camera, converting the cell images from RGB (red, green, blue) channels to HSV (color, saturation, brightness);

[0006] (2) Separate the saturation channel image S, remove some noise by Gaussian filtering (or mean filtering) to obtain image S1;

[0007] (3) Select a suitable size check image S1, perform Laplace transform and calculate the absolute value, find the position of drastic change in the image, and obtain image S2;

[0008] (4) Set an appropriate threshold, perform thresholding on image S2, record the saturation value, and find the corresponding bright spot location;

[0009] (5) Count the bright spot positions of multiple cell images and record the saturation value of the corresponding image S2;

[0010] (6) Based on the recorded results of step (5), apply the decision tree algorithm to find the pattern of saturation values ​​and formulate selection conditions;

[0011] (7) Based on the conditions set in step (6), find the location of all bright spots in the cell image, and then perform a dilation operation on them to obtain the binary image of bright spots B.

[0012] (8) Perform a dilation operation on image S to obtain the dilated image S3;

[0013] (9) Perform an erosion operation on image S to obtain the eroded image S4;

[0014] (10) Subtract images S3 and S4, find the cell edge image D by subtracting the images after morphological operation, and then combine the bright spot position found in step (7) to calculate the sharpness value of the cell image by mean square error.

[0015] Preferably, the calculation formula for Gaussian filtering (or mean filtering) used in step (2) is as follows:

[0016]

[0017] Where (x,y) is the current pixel; m is the template; src is the original image; a is the width of the template; b is the height of the template; and s(x,y) is the saturation value of the processed image at that point.

[0018] Preferably, the formula for calculating the Laplacian transform of image S1 in step (3) is as follows:

[0019]

[0020] Where (x,y) represents the current pixel and src represents the original image.

[0021] Preferably, the selection condition set in step (6) is a threshold T1, that is, when the saturation value is greater than the threshold T1, it is a bright spot, and when the saturation value is less than or equal to the threshold T1, it is a non-bright spot.

[0022] Preferably, the algorithm formula used for dilution operation on image S in step (8) is as follows:

[0023]

[0024] Preferably, the algorithm formula used for the erosion operation on image S in step (9) is as follows:

[0025]

[0026] Compared with existing technologies, this invention has the following advantages and effects: the algorithm is simple, effective, and widely applicable. Specifically, by combining Gaussian filtering (mean filtering), Laplace transform, and decision tree algorithms, the location of bright spots in cell images is identified. Then, by subtracting the images after dilation and erosion, the cell edges are found. This eliminates noise such as bright spots from affecting the final result, enabling more accurate calculation of the cell image's sharpness value and resulting in a more accurate final result. Attached Figure Description

[0027] Figure 1 This is the original cell image of the present invention.

[0028] Figure 2 This is a saturation channel image of the present invention.

[0029] Figure 3 This is a binary image of the bright spot of the present invention.

[0030] Figure 4 This is the cell edge diagram of the present invention. Detailed Implementation

[0031] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. The following embodiments are explanations of the present invention, but the present invention is not limited to the following embodiments.

[0032] Example 1.

[0033] This embodiment provides a method for calculating cell image sharpness values ​​based on saturation values, including the following steps:

[0034] (1) For cell images obtained by photography, such as Figure 1 As shown, color conversion is performed using the following formula:

[0035] v = max(R, G, B)

[0036]

[0037]

[0038] The RGB values ​​range from [0, 255].

[0039] The cell image is converted from RGB (red, green, blue) channels to HSV (color, saturation, brightness) through color conversion.

[0040] (2) Separate the saturation channel image S, such as Figure 2 As shown, a Gaussian filter is applied to it, and the calculation formula is:

[0041]

[0042] Where (x,y) is the current pixel; m is the template; src is the original image; a is the width of the template; b is the height of the template; and s(x,y) is the saturation value of the processed image at that point.

[0043] Image S1 is obtained by removing some noise through Gaussian filtering;

[0044] (3) Select an image of appropriate size S1, perform a Laplace transform and calculate the absolute value, find the position of drastic change in the image, and obtain image S2. The specific calculation formula for the Laplace transform is as follows:

[0045]

[0046] Where (x,y) represents the current pixel and src represents the original image.

[0047] (4) Set an appropriate threshold, perform thresholding on image S2, record the saturation value, and find the corresponding bright spot location;

[0048] (5) Count the bright spot positions of multiple cell images and record the saturation value of the corresponding image S2;

[0049] (6) Based on the recorded results of step (5), apply the decision tree algorithm to find the pattern of saturation value and formulate the selection condition threshold T1. That is, when the saturation value is greater than the threshold T1, it is a bright spot, and when the saturation value is less than or equal to the threshold T1, it is a non-bright spot.

[0050] (7) Based on the conditions specified in step (6), locate all bright spots in the cell image, then perform a dilation operation on them to obtain a binary image B of the bright spots, as shown below. Figure 3 As shown;

[0051] (8) Perform a dilation operation on image S to obtain the dilated image S3. The calculation formula used for the dilation operation is:

[0052]

[0053] (9) Perform an erosion operation on image S to obtain the eroded image S4. The calculation formula used for the erosion operation is:

[0054]

[0055] (10) Subtract images S3 and S4, and find the cell edge map D by subtracting the images after morphological operations, such as... Figure 4 As shown, combined with the location of the bright spot found in step (7), the mean square error of the non-bright spot area in the cell edge image D is calculated using the binary image of the bright spot B as a mask, and the sharpness value of the cell image is calculated through the mean square error.

[0056] In step (6) of this embodiment, when applying the decision tree algorithm to find patterns and formulate selection conditions based on the recorded results of step (5), a loss function plus the number of leaf nodes is used for pruning to prevent overfitting.

[0057] This embodiment quickly and effectively identifies cell edge locations by subtracting images after morphological operations, and then calculates the mean square error of the cell images excluding bright spots to obtain the final sharpness value. This eliminates the influence of noise such as bright spots on the final result, making the result more accurate.

[0058] Furthermore, it should be noted that the above description in this specification is merely illustrative of the present invention. All equivalent or simple variations made based on the features and principles described in this patent concept are included within the protection scope of this patent. Those skilled in the art can make various modifications or additions to the described specific embodiments or use similar methods to replace them, as long as they do not deviate from the technical solution of this invention or exceed the scope defined in these claims, all of which should fall within the protection scope of this invention.

Claims

1. A method for calculating cell image sharpness values ​​based on saturation values, characterized in that, Includes the following steps: (1) Perform color conversion on the cell images obtained by shooting, converting the cell images from RGB (red, green, blue) channels to HSV (color, saturation, brightness); (2) Separate the saturation channel image S, remove some noise by Gaussian filtering or mean filtering, and obtain image S1; (3) Select a suitable size check image S1, perform a Laplace transform and calculate the absolute value, find the position of drastic change in the image, and obtain image S2; (4) Set an appropriate threshold, perform thresholding on image S2, record the saturation value, and find the corresponding bright spot position; (5) Count the bright spot positions of multiple cell images and record the saturation value of the corresponding image S2; (6) Based on the recorded results of step (5), apply the decision tree algorithm to find the pattern of saturation value and formulate the selection conditions; the selection conditions are the threshold T1, that is, when the saturation value is greater than the threshold T1, it is a bright spot, and when the saturation value is less than or equal to the threshold T1, it is a non-bright spot; (7) Based on the conditions set in step (6), find the location of all bright spots in the cell image, and then perform a dilation operation on them to obtain the binary image of bright spots B; (8) Perform a dilation operation on image S to obtain the dilated image S3; (9) Perform an erosion operation on image S to obtain eroded image S4; (10) Subtract images S3 and S4, find cell edge map D by subtracting the images after morphological operation, and then combine the bright spot position found in step (7), use the bright spot binary map B as a mask, calculate the mean square error of the non-bright spot area in cell edge map D, and calculate the clarity value of cell image through the mean square error.

2. The method for calculating cell image sharpness based on saturation value according to claim 1, characterized in that, The calculation formula for Gaussian filtering or mean filtering in step (2) is as follows: Where (x,y) is the current pixel; m is the template; src is the original image; a is the width of the template; b is the height of the template; and s(x,y) is the saturation value of the processed image at that point.

3. The method for calculating cell image sharpness based on saturation value according to claim 1, characterized in that, The formula for calculating the Laplacian transform of image S1 in step (3) is as follows: Where (x,y) is the current pixel and src is the original image.

4. The method for calculating cell image sharpness based on saturation value according to claim 1, characterized in that, The algorithm formula used in step (8) to perform the dilation operation on image S is as follows: Where src is the original image and dst is the processed image.

5. The method for calculating cell image sharpness based on saturation value according to claim 1, characterized in that, The algorithm formula used in step (9) to perform the erosion operation on image S is as follows: Where src is the original image and dst is the processed image.

Citation Information

Patent Citations

  • Focusing method and device, electronic equipment and computer readable storage medium

    CN110191287A

  • Fundus image recognition method, device and equipment and storage medium

    CN110400289A