Digital image enhancement method based on cytopathology
By converting the cytopathic image from the RGB color space to the CIE 1931XYZ color space, brightness and chromaticity correction are performed, and the image is fused by weighted average method, the image inconsistency problem caused by the difference in dyeing methods and quality is solved, and the image unity and quality improvement are achieved.
Patent Information
- Application Number
- CN202510609651.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-13
- Publication Date
- 2025-08-12
AI Technical Summary
The inconsistent cytopathic digital image quality caused by different staining methods and staining quality makes it more difficult to map different staining batch images to a unified color space.
By converting the image from RGB color space to CIE 1931XYZ color space, brightness and chromaticity correction are performed, the image is fused using the weighted average method, and the color correction factor is calculated through linear interpolation method and polynomial regression model to adjust the image color consistency.
The unity of luminance and chromaticity of cytopathic images with different staining methods and staining quality is achieved, which improves the consistency of the image quality and simplifies the standardization process of the image.
Smart Images

Figure CN120471798A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of biomedical engineering and digital image processing, and in particular to a digital image enhancement method based on cell pathology. Background Art
[0002] Color, texture, and other information in digital cytopathology images are crucial for physicians' diagnoses and computer-aided diagnosis (CAD) systems. However, during image acquisition, storage, and display, interference factors such as noise, blur, and data loss can degrade image quality and affect diagnostic results. Image enhancement technology can improve image clarity and contrast, highlighting lesion areas and features, and helping physicians diagnose diseases more accurately.
[0003] Although the introduction of image enhancement technology solves the problem of image quality degradation affecting diagnostic results, it still encounters the following problems in practical application:
[0004] In the field of clinical diagnosis in hospital pathology departments, even with the same scanning equipment, the digital images obtained from differently stained slides can vary significantly. For example, differences in staining solution concentration, staining time, and staining temperature can affect the staining effect of cells. Different staining methods and staining quality can result in cells exhibiting different colors and morphological characteristics. This complicates the subsequent standardization process—the mapping of images from different stained batches into a unified color space.
[0005] In order to address the above problems, a digital image enhancement method based on cell pathology is urgently needed to improve the shortcomings of existing technologies. Summary of the Invention
[0006] The purpose of the present invention is to provide a digital image enhancement method based on cytopathology to solve the problem raised in the above background art that the quality of cytopathology digital images obtained due to different staining methods and staining qualities is inconsistent, which makes it difficult to map images of different staining batches into a unified color space.
[0007] To achieve the above object, a digital image enhancement method based on cell pathology is provided, comprising the following steps:
[0008] S1. Denoising and artifact removal: Eliminate noise and artifacts caused by uneven staining, slice folding, and dust;
[0009] S2. Color correction and standardization: Solve the problem of dyeing differences caused by different dyeing methods and dyeing quality;
[0010] S2.1. Color space conversion: The cytopathology images acquired using different staining methods and staining qualities are converted from the RGB color space to the CIE 1931XYZ color space to obtain the luminance component Y and the chromaticity components X and Z, which are recorded as known color samples.
[0011] S2.2. Brightness Correction: Correct the brightness component Y to compensate for differences in brightness response of cytopathology images due to different staining methods and staining quality.
[0012] S2.3, Chroma Correction: Calculate the color correction factor based on the staining model and reference color information, and then use linear interpolation to adjust the chroma value according to the color correction factor to make the image color more consistent;
[0013] S2.4. Image Fusion and Standardization: Images acquired using different staining methods and staining qualities and corrected for brightness and chroma are fused using a weighted averaging method to obtain the final corrected image.
[0014] S3, contrast enhancement: highlight key areas including cell nuclei and cell membranes to improve the visual effect of low-contrast images;
[0015] S4, super-resolution reconstruction: improves the detail resolution of low-resolution images, especially the clarity of small cell structures;
[0016] S5. Image segmentation and feature extraction: Segment the cell region including the nucleus and cytoplasm, and extract morphological features.
[0017] As a further improvement of this technical solution, in S2.3, the specific operation steps of chromaticity correction are as follows:
[0018] S2.3.1. Based on the dyeing characteristics of different dyeing methods and dyeing quality, establish a dyeing model for the corresponding equipment by measuring and analyzing a large number of known color samples;
[0019] S2.3.2. Calculate a color correction factor for each pixel based on the staining model and reference color information. The color correction factor is used to adjust the chromaticity value of the pixel so that the cytopathology image after the adjustment of the pixel chromaticity value is closer to the reference color.
[0020] S2.3.3. Apply the calculated color correction factor to the chromaticity components X and Z of the image using linear interpolation to correct the chromaticity value of each pixel.
[0021] As a further improvement of the present technical solution, in S2.3.1, the steps of obtaining the dyeing model by measuring and analyzing a large number of known color samples are as follows:
[0022] Collect a large number of known color samples, which contain different cell types, staining conditions, and pathological conditions; annotate the collected images to determine the true color category or value of each pixel or area; and preprocess the images, including cropping, normalization, and denoising.
[0023] Extract the RGB values of the annotated image and convert each known color sample into a corresponding feature vector. Then analyze the extracted features and calculate the mean, standard deviation, and correlation of the feature vectors.
[0024] According to the linear regression model, the extracted feature vector and the corresponding annotation information are used as input to train the linear regression model and adjust the parameters of the linear regression model; the trained model is evaluated using the cross-validation method, and the evaluation indicators of the linear regression model including the mean square error, mean absolute error, determination coefficient and root mean square error are calculated. The structure, parameters and feature selection of the linear regression model are optimized and adjusted, and the final linear regression model is the staining model.
[0025] As a further improvement of the present technical solution, in S2.3.2, the steps of calculating the color correction factor of each pixel using a polynomial regression modeling method based on the staining model and the reference color information are as follows:
[0026] According to the principle of color space conversion, a three-variable polynomial is constructed. Let (x, y, z) be the color value of a point in the image to be corrected, and (Rt, Gt, Bt) be the color value after correction. The transformation can be expressed as Rt = fR(x, y, z), Gt = fG(x, y, z), Bt = fB(x, y, z);
[0027] Assuming there are n sample points, the matrix AR = [a1, a2, a3, a4, a5, a6, a7] can be constructed for the R channel, where the subscript is the sample point number;
[0028] The coefficient matrix is calculated by the least square method, and the model of the G and B channels of the image can be obtained in the same way;
[0029] Substitute the pixel values of the image to be corrected into the polynomial model to calculate the color correction factor.
[0030] As a further improvement of this technical solution, the steps for calculating the coefficient matrix by the least squares method are as follows:
[0031] Photograph a standard color card under a fixed light source and obtain the standard RGB value of each color block in the color card, recorded as R0i, G0i, B0i, where i represents the index of the color block;
[0032] For the RGB values Ri, Gi, Bi of each pixel in the actual captured image, a polynomial matrix V is constructed;
[0033] Transpose the polynomial matrix V and multiply it with itself to get a square matrix V T V, transpose the polynomial matrix V and multiply it with the matrix X consisting of the standard RGB values of the color card color block to obtain V T X, each column of X is {R0i, G0i, B0i};
[0034] Obtain the coefficient matrix A=(V T V) -1 (V T X), where (V T V) -1 It is V T The inverse matrix of V;
[0035] For the image to be corrected taken under the same light source, the matrix composed of its RGB values is X in , construct the corresponding polynomial matrix V in ;
[0036] Corrected image X out =A T V in .
[0037] As a further improvement of the present technical solution, in S2.3.3, the steps of adjusting the chromaticity value according to the color correction factor using the linear interpolation method are as follows:
[0038] Select reference colors from the standard color space CIE 1931XYZ to establish a color calibration benchmark;
[0039] For each pixel in the image, a linear equation is constructed to calculate the corrected chromaticity value based on its current chromaticity value P1(x1, y1) and the calculated color correction factor P2(x2, y2);
[0040] The calculated corrected chromaticity values are applied to the image to replace the original chromaticity values to achieve color correction.
[0041] As a further improvement of this technical solution, the method for constructing the linear equation is as follows:
[0042] In the two-dimensional space of a cytopathology image, given two points P1(x1, y1) and P2(x2, y2), and attribute values v1 and v2 of these two points, the attribute value v of any point P(x, y) between these two points can be estimated using the following linear equation:
[0043]
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] Cytopathology images acquired using different staining methods and staining qualities are converted from RGB color space to a standard color space. The luminance component Y is corrected to compensate for differences in brightness response between different cytopathology images. The chromaticity values are then adjusted based on a color correction factor to achieve more consistent image color. Finally, the images acquired using different staining methods and staining qualities and corrected for luminance and chromaticity are fused to create the final corrected image. This solves the problem of inconsistent quality of cytopathology digital images acquired due to different staining methods and staining qualities, which makes it difficult to map cell images from different stained batches to a unified color space (i.e., standardization). BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flowchart of the overall steps of the present invention;
[0047] Figure 2 This is a flow chart of S2 of the present invention. DETAILED DESCRIPTION
[0048] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0049] See also Figure 1 and Figure 2 As shown, a digital image enhancement method based on cell pathology is provided, comprising the following steps:
[0050] S1. Denoising and Artifact Removal: This eliminates noise and artifacts introduced by uneven staining, slide folding, and dust. First, it distinguishes between Gaussian noise, Poisson noise, speckle noise, and scanning artifacts. Next, it applies Gaussian filtering to remove captured noise. The filter strength is then dynamically adjusted based on the local noise level. Finally, it uses mask inpainting or GAN completion to address specific artifacts, such as slide folding and staining bubbles.
[0051] S2. Color correction and standardization: Solve the problem of dyeing differences caused by different dyeing methods and dyeing quality.
[0052] S2.1. Color Space Conversion: Cytopathology images acquired using different staining methods and staining qualities are converted from the RGB color space to the CIE 1931XYZ color space, obtaining the luminance component Y and the chromaticity components X and Z, which are recorded as known color samples. This is because the CIE 1931XYZ color space is independent of the staining method and staining quality and can more accurately represent color information, facilitating subsequent color correction and standardization.
[0053] S2.2 Brightness Correction: Correct the brightness component Y to compensate for differences in brightness response in cytopathology images due to varying staining methods and staining quality. Image brightness can be adjusted to a consistent level using methods based on reference images or standard brightness values. For example, the average brightness of the image can be calculated and compared to a reference brightness value, and then the brightness of each pixel in the image can be adjusted to bring the average brightness to the reference value.
[0054] It should be noted that the method for calculating the average brightness of an image is as follows: For color images (when observing cell pathology, images of stained cells are usually in color), the average brightness can be calculated using a weighted average. The commonly used formula is average brightness = 0.21*R + 0.72*G + 0.07*B, where R, G, and B are the values of the red, green, and blue channels, respectively.
[0055] The reference brightness value is a pre-set standard value used for comparison with the calculated average brightness. It can be determined based on specific application scenarios and requirements. For example, in some image enhancement or correction algorithms, the reference brightness value may be set based on the image content or target brightness level.
[0056] Next, the average brightness is compared with the reference brightness value, and the difference between the average brightness value and the reference brightness value is calculated, for example, as a difference or ratio. This method can more intuitively understand the degree of deviation between the image brightness and the reference value, thereby determining whether and how much adjustment is needed.
[0057] Then, the brightness of each pixel in the image is adjusted through a linear transformation. For each pixel, the brightness can be adjusted using a linear transformation formula. For example, if you want to adjust the average brightness to a reference brightness value, you can calculate the adjustment coefficient and then multiply the brightness value of each pixel by this coefficient.
[0058] Linear transformation formula:
[0059] For digital image transformation, let the original pixel grayscale be f(i, j) and the transformed pixel grayscale be g(i, j). The commonly used linear transformation formula is g(i, j) = af(i, j) + b. Among them, the coefficient a affects the contrast of the image, and the coefficient b affects the brightness of the image. The specific situation is as follows:
[0060] (1) When a=1, the image remains unchanged, that is, the original image;
[0061] (2) When a>1, the contrast is enhanced and the image looks clearer;
[0062] (3) When a < 1, the contrast is reduced and the image appears darker;
[0063] (4) When b>0, as b increases, the overall grayscale value of the image moves up, that is, the image becomes brighter as a whole; when b<0, as b decreases, the overall grayscale value of the image moves down, that is, the image becomes darker as a whole. The change of b will not change the contrast of the image.
[0064] Calculate the adjustment coefficient: Assume that the average brightness of the image is adjusted to the reference brightness value, and the adjustment coefficient is k, then
[0065] Apply the adjustment coefficient: After obtaining the adjustment coefficient k, apply it to the linear transformation formula, that is, g(i,j)=kf(i,j), so that the brightness of each pixel of the image can be adjusted so that the average brightness reaches the reference value.
[0066] S2.3, Chroma Correction: Calculate the color correction factor based on the staining model and reference color information, and then use linear interpolation to adjust the chroma value according to the color correction factor to make the color of the image more consistent.
[0067] S2.4 Image Fusion and Standardization: Images acquired using different staining methods and staining qualities, and corrected for brightness and color, are fused using a weighted averaging method to produce the final corrected image. The fused image is then standardized, for example, by normalizing pixel values to the [0, 1] range or adjusting to a specific image format and resolution to facilitate subsequent analysis and application.
[0068] The following is the process of fusing different collected images using the weighted average method:
[0069] (1) Principle: The weighted average method is a simple image fusion method that obtains a fused image by weighted summing the pixel values of different images. For two images A and B to be fused, the pixel value of the fused image C at each pixel point (x, y) is calculated as C(x, y) = w1 × A(x, y) + w2 × B(x, y), where w1 and w2 are weighting coefficients corresponding to images A and B respectively, and w1 + w2 = 1.
[0070] (2) Determination of weighting coefficients: The choice of weighting coefficients depends on the specific application scenario and requirements. In some cases, weights can be assigned based on the importance or quality of the image. For example, if image A is of higher quality or contains more important information, it can be given a larger weight w1. In other cases, weights can also be calculated dynamically based on the characteristics or content of the image.
[0071] Plan the image pixel values to the interval [0,1]:
[0072] (1) Normalization method: A common method is to normalize the pixel values of an image to the range [0, 1]. For an image I, whose pixel value range is [min(I), max(I)], it can be normalized to the range [0, 1] using the following formula:
[0073]
[0074] (2) Data type conversion: Before normalization, you need to ensure that the image data type supports decimal operations. If the image data type is an integer type, you may need to convert it to a floating-point type before normalization.
[0075] The method to convert the image data type from integer type to floating point type is as follows:
[0076] (1) Programming: In C++, you can use the type conversion operator to convert integer data to floating-point data. For example: "int num = 10; float fnum = (float) num;". In Python, you can use the built-in float() function to perform the conversion. For example: "num = 10fnum = float(num)".
[0077] (2) Image processing software: In Adobe Photoshop, you can use the "Mode" option in the "Image" menu to convert the image mode from an integer type (such as 8-bit or 16-bit integer) to a floating-point type (such as 32-bit floating point). In GIMP, you can use the "Mode" option in the "Image" menu to convert the image mode from an integer type to a floating-point type.
[0078] S3. Contrast enhancement: This improves the visual quality of low-contrast images by highlighting key areas, including the cell nucleus and cell membrane. First, global contrast adjustment is performed, using histogram equalization to stretch the grayscale distribution of the entire image. Channel processing may be performed (e.g., enhancing only the blue channel where the cell nucleus is located). Second, local contrast optimization is performed using CLAHE (contrast-limited adaptive histogram equalization), which includes block processing (e.g., 16×16 sub-regions), limiting local contrast gain (to prevent noise amplification), and interpolating to smooth the boundaries between blocks. Finally, dynamic range compression is performed, and HDR fusion is performed on overexposed or underexposed areas.
[0079] S4. Super-resolution reconstruction: Improves the detail resolution of low-resolution images, especially the clarity of small cell structures. First, bicubic interpolation is used as initial upsampling (for subsequent algorithm optimization). Next, ResNet and attention mechanisms are used to capture multi-scale features. Finally, adversarial training (GAN) is used to generate realistic textures. Finally, multi-frame fusion is performed. If multiple low-resolution images (e.g., at different focal planes) are present, sub-pixel alignment and fusion are performed.
[0080] S5. Image Segmentation and Feature Extraction: Segment the cell regions, including the nucleus and cytoplasm, and extract morphological features. First, binarize the enhanced image or generate region proposals. Second, adaptively determine the nucleus segmentation threshold using the Otsu algorithm. Then, use morphological operations (such as opening and closing operations) to remove segmentation artifacts. Finally, calculate the morphological features of each cell region (including area, perimeter, and circularity), and then extract the nuclear chromatin distribution pattern using the gray-level co-occurrence matrix (GLCM).
[0081] It should be disclosed that in S2.3, the specific steps of chromaticity correction are as follows:
[0082] S2.3.1. Based on the dyeing characteristics of different dyeing methods and dyeing quality, establish a dyeing model for the corresponding device by measuring and analyzing a large number of known color samples. The dyeing model can describe the device's response characteristics to different colors, such as the device's sensitivity and deviation to red, green, and blue.
[0083] S2.3.2. Based on the staining model and reference color information, calculate a color correction factor for each pixel. The color correction factor is used to adjust the pixel's chromaticity value so that the adjusted cytopathology image more closely resembles the reference color. For example, for the red channel, a red correction factor can be calculated based on the staining model. The red channel value of each pixel in the image is then multiplied by this correction factor to obtain the corrected red channel value.
[0084] S2.3.3. Apply the calculated color correction factor to the chromaticity components X and Z of the image using linear interpolation to correct the chromaticity value of each pixel. Adjust the chromaticity value based on the color correction factor to make the color of the image more accurate and consistent.
[0085] Furthermore, in S2.1, the RGB color space is an additive color model based on the three primary colors of red, green, and blue. Various colors are represented by mixing red, green, and blue light of different intensities. In the RGB model, the intensity value of each color is usually between 0 and 255, where (0,0,0) represents black and (255,255,255) represents white.
[0086] Furthermore, in S2.1, the CIE 1931XYZ color space is a standard color space defined by the International Commission on Illumination (CIE) in 1931. The CIE 1931XYZ color space represents color through three stimulus values X, Y, and Z, where Y represents the brightness component and X and Z represent the chromaticity components of the color.
[0087] Furthermore, in S2.1, the RGB color space is converted to the CIE 1931XYZ color space using the following conversion matrix:
[0088]
[0089] Among them, R, G, and B are the values of the red, green, and blue channels in the RGB color space, and X, Y, and Z are the three stimulus values in the CIE1931XYZ color space.
[0090] Based on the above description, in S2.3.1, the steps for obtaining the dyeing model by measuring and analyzing a large number of known color samples are as follows:
[0091] Collect a large number of known color samples, which contain different cell types, staining conditions, and pathological conditions; annotate the collected images to determine the true color category or value of each pixel or area; and preprocess the images, including cropping, normalization, and denoising.
[0092] Extract the RGB values of the annotated image and convert each known color sample into a corresponding feature vector. Then analyze the extracted features and calculate the mean, standard deviation, and correlation of the feature vectors.
[0093] According to the linear regression model, the extracted feature vector and the corresponding annotation information are used as input to train the linear regression model and adjust the parameters of the linear regression model; the trained model is evaluated using the cross-validation method, and the evaluation indicators of the linear regression model including the mean square error, mean absolute error, determination coefficient and root mean square error are calculated. The structure, parameters and feature selection of the linear regression model are optimized and adjusted, and the final linear regression model is the staining model.
[0094] Cross-validation method is used to evaluate the trained linear regression model:
[0095] (1) Divide the dataset into a training set and a test set. K-fold cross-validation is usually used, which divides the dataset into K subsets of similar size. Each time, one of the subsets is selected as the test set, and the remaining K-1 subsets are used as the training set.
[0096] (2) For each cross-validation step, use the training set to train the linear regression model, and then make predictions on the test set. Record the error of each prediction, such as the mean squared error (MSE) or mean absolute error (MAE).
[0097] (3) Calculate the average error of K cross-validation to evaluate the generalization ability of the model. The smaller the average error, the stronger the generalization ability of the model.
[0098] Calculate the evaluation index of the linear regression model:
[0099] (1) Mean Square Error (MSE): Calculates the average square error between the predicted value and the true value.
[0100] (2) Mean Square Error (MSE): Calculates the average square error between the predicted value and the true value.
[0101] (3) Coefficient of determination (R 2 ): Measures the degree of fit of the model to the data. The value range is between 0 and 1. The closer to 1, the better the model fit.
[0102] (4) Root mean square error (RMSE): It is the square root of MSE and is used to measure the prediction error of the model.
[0103] It should be disclosed that, in S2.3.2, reference color information refers to an X-Rite Colorchecker color test chart, which contains multiple color patches, each of which represents a known standard color, and its color value can be used as a reference;
[0104] The steps for calculating the color correction factor for each pixel using the polynomial regression modeling method based on the staining model and reference color information are as follows:
[0105] According to the principle of color space conversion, a three-variable polynomial is constructed. Let (x, y, z) be the color value of a point in the image to be corrected, and (Rt, Gt, Bt) be the color value after correction. The transformation can be expressed as Rt = fR(x, y, z), Gt = fG(x, y, z), Bt = fB(x, y, z). The commonly used polynomial model is a 7-term form.
[0106] For the 7-term polynomial, assuming there are n sample points, the matrix AR = [a1, a2, a3, a4, a5, a6, a7] can be constructed for the R channel, where the subscript is the sample point number. The coefficient matrix is calculated by the least squares method, and the model of the G and B channels of the image can be obtained in the same way.
[0107] Substitute the pixel values of the image to be corrected into the polynomial model to calculate the color correction factor.
[0108] The steps for calculating the coefficient matrix by the least squares method are as follows:
[0109] Photograph a standard color card under a fixed light source and obtain the standard RGB value of each color block in the color card, recorded as R0i, G0i, B0i, where i represents the index of the color block;
[0110] For the RGB values Ri, Gi, Bi of each pixel in the actual captured image, a polynomial matrix V is constructed. For example, for a quadratic polynomial, each row of V can be
[0111] Transpose the polynomial matrix V and multiply it with itself to get a square matrix V T V, transpose the polynomial matrix V and multiply it with the matrix X consisting of the standard RGB values of the color card color block to obtain V T X, each column of X is {R0i, G0i, B0i};
[0112] Obtain the coefficient matrix A=(V T V) -1 (V T X), where (V T V) -1 It is V T The inverse matrix of V;
[0113] For the image to be corrected taken under the same light source, the matrix composed of its RGB values is X in , construct the corresponding polynomial matrix V in ;
[0114] Corrected image X out =A T V in .
[0115] Through the above steps, the coefficient matrix A is calculated using the least squares method, thereby achieving color correction of the image.
[0116] In S2.3.3, the steps for adjusting the chromaticity value according to the color correction factor using linear interpolation are as follows:
[0117] Select reference colors from the standard color space CIE 1931XYZ to establish a color calibration benchmark;
[0118] For each pixel in the image, a linear equation is constructed to calculate the corrected chromaticity value based on its current chromaticity value P1(x1, y1) and the calculated color correction factor P2(x2, y2);
[0119] The calculated corrected chromaticity values are applied to the image to replace the original chromaticity values to achieve color correction.
[0120] Based on the above, the method of constructing the linear equation is as follows:
[0121] In the two-dimensional space of a cytopathology image, given two points P1(x1, y1) and P2(x2, y2), and attribute values v1 and v2 of these two points, the attribute value v of any point P(x, y) between these two points can be estimated using the following linear equation:
[0122]
[0123] In summary, the working principle of the present invention is as follows:
[0124] First, the cytopathology images acquired by different staining methods and staining qualities were converted from the RGB color space to the standard color space, and the brightness component Y was corrected to compensate for the differences in brightness response of different cytopathology images.
[0125] Next, the chromaticity values are adjusted according to the color correction factor to make the image color more consistent;
[0126] Finally, images acquired using different staining methods and staining qualities, and corrected for brightness and chromaticity, are fused to produce the final corrected image. This eliminates inconsistencies in cytopathology image quality caused by different staining methods and staining qualities, which can result in different colors and morphological features of cells.
[0127] The above formulas are all calculated by removing dimensions and taking their numerical values. The formula is a formula that is closest to the actual situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and preset thresholds in the formula are set by technicians in this field according to actual conditions or obtained by simulating a large amount of data.
[0128] In the embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the module division is merely a logical functional division, and other division methods may be used in actual implementation. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the method of this embodiment.
[0129] The above embodiments are only used to illustrate the technical method of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. A digital image enhancement method based on cell pathology, characterized in that: The following steps are involved: S1. Denoising and artifact removal: Eliminate noise and artifacts caused by uneven staining, slice folding, and dust; S2. Color correction and standardization: Solve the problem of dyeing differences caused by different dyeing methods and dyeing quality; S2.
1. Color space conversion: The cytopathology images acquired using different staining methods and staining qualities are converted from the RGB color space to the CIE 1931XYZ color space to obtain the luminance component Y and the chromaticity components X and Z, which are recorded as known color samples. S2.
2. Brightness Correction: Correct the brightness component Y to compensate for differences in brightness response of cytopathology images due to different staining methods and staining quality. S2.3, Chroma Correction: Calculate the color correction factor based on the staining model and reference color information, and then use linear interpolation to adjust the chroma value according to the color correction factor to make the image color more consistent; S2.
4. Image Fusion and Standardization: Images acquired using different staining methods and staining qualities and corrected for brightness and chroma are fused using a weighted averaging method to obtain the final corrected image. S3, contrast enhancement: highlight key areas including cell nuclei and cell membranes to improve the visual effect of low-contrast images; S4, super-resolution reconstruction: improves the detail resolution of low-resolution images, especially the clarity of small cell structures; S5. Image segmentation and feature extraction: Segment the cell region including the nucleus and cytoplasm, and extract morphological features.
2. The digital image enhancement method based on cell pathology according to claim 1, characterized in that: In S2.3, the specific steps of chromaticity correction are as follows: S2.3.
1. Based on the dyeing characteristics of different dyeing methods and dyeing quality, establish a dyeing model for the corresponding equipment by measuring and analyzing a large number of known color samples; S2.3.
2. Calculate a color correction factor for each pixel based on the staining model and reference color information. The color correction factor is used to adjust the chromaticity value of the pixel so that the cytopathology image after the adjustment of the pixel chromaticity value is closer to the reference color. S2.3.
3. Apply the calculated color correction factor to the chromaticity components X and Z of the image using linear interpolation to correct the chromaticity value of each pixel.
3. The digital image enhancement method based on cell pathology according to claim 2, characterized in that: In S2.3.1, the steps for obtaining the dyeing model by measuring and analyzing a large number of known color samples are as follows: Collect a large number of known color samples, which contain different cell types, staining conditions, and pathological conditions; annotate the collected images to determine the true color category or value of each pixel or area; and preprocess the images, including cropping, normalization, and denoising. Extract the RGB values of the annotated image and convert each known color sample into a corresponding feature vector. Then analyze the extracted features and calculate the mean, standard deviation, and correlation of the feature vectors. According to the linear regression model, the extracted feature vector and the corresponding annotation information are used as input to train the linear regression model and adjust the parameters of the linear regression model; the trained model is evaluated using the cross-validation method, and the evaluation indicators of the linear regression model including the mean square error, mean absolute error, determination coefficient and root mean square error are calculated. The structure, parameters and feature selection of the linear regression model are optimized and adjusted, and the final linear regression model is the staining model.
4. The digital image enhancement method based on cell pathology according to claim 2, characterized in that: In S2.3.2, the steps of calculating the color correction factor of each pixel using the polynomial regression modeling method according to the staining model and the reference color information are as follows: According to the principle of color space conversion, a three-variable polynomial is constructed. Let (x, y, z) be the color value of a point in the image to be corrected, and (Rt, Gt, Bt) be the color value after correction. The transformation can be expressed as Rt = fR(x, y, z), Gt = fG(x, y, z), Bt = fB(x, y, z); Assuming there are n sample points, the matrix AR = [a1, a2, a3, a4, a5, a6, a7] can be constructed for the R channel, where the subscript is the sample point number; The coefficient matrix is calculated by the least square method, and the model of the G and B channels of the image can be obtained in the same way; Substitute the pixel values of the image to be corrected into the polynomial model to calculate the color correction factor.
5. The digital image enhancement method based on cell pathology according to claim 4, characterized in that: The steps to calculate the coefficient matrix by the least squares method are as follows: Photograph a standard color card under a fixed light source and obtain the standard RGB value of each color block in the color card, recorded as R0i, G0i, B0i, where i represents the index of the color block; For the RGB values Ri, Gi, Bi of each pixel in the actual captured image, a polynomial matrix V is constructed; Transpose the polynomial matrix V and multiply it with itself to get a square matrix V T V, transpose the polynomial matrix V and multiply it with the matrix X consisting of the standard RGB values of the color card color block to obtain V T X, each column of X is {R0i, G0i, B0i}; Obtain the coefficient matrix A=(V T V) -1 (V T X), where (V T V) -1 It is V T The inverse matrix of V; For the image to be corrected taken under the same light source, the matrix composed of its RGB values is X in , construct the corresponding polynomial matrix V in ; Corrected image X out =A T V in .
6. The digital image enhancement method based on cell pathology according to claim 4, characterized in that: In S2.3.3, the steps of adjusting the chromaticity value according to the color correction factor using the linear interpolation method are as follows: Select reference colors from the standard color space CIE 1931XYZ to establish a color calibration benchmark; For each pixel in the image, a linear equation is constructed to calculate the corrected chromaticity value based on its current chromaticity value P1(x1, y1) and the calculated color correction factor P2(x2, y2); Apply the calculated corrected chromaticity values to the image, replacing the original chromaticity values.
7. The digital image enhancement method based on cell pathology according to claim 6, characterized in that: The linear equation is constructed as follows: In the two-dimensional space of a cytopathology image, given two points P1(x1, y1) and P2(x2, y2), and attribute values v1 and v2 of these two points, the attribute value v of any point P(x, y) between these two points is estimated using the following linear equation:
Citation Information
Cited By
Digital grading system for blood smears for alkaline phosphatase staining
CN121095154A
Abnormal cell screening method and system based on image analysis
CN121392834A
Digital pathology slide color correction methods, equipment, and storage media
CN122415625A
Digital pathology slide color correction method, apparatus, and storage medium
CN122415625B