Pathological image segmentation method for department of cardiology

By analyzing the grayscale histogram and edge line status of cardiology pathology images, the histogram equalization algorithm was modified, which solved the false edge problem caused by excessive grayscale difference in the segmentation of cardiology pathology images, and improved the segmentation accuracy and robustness.

CN121837293AInactive Publication Date: 2026-04-10SHENYANG SHANYOU TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-27
Publication Date
2026-04-10
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN121837293A_ABST
    Figure CN121837293A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image enhancement, in particular to a cardiology department pathological image segmentation method, which comprises the following steps: according to the image equalization deviation degree of a cardiology department pathological image and the gradient change and area change of each myocardial cell before and after histogram equalization, carrying out histogram equalization on the cardiology department pathological image; the equalization error degree of the cardiology department pathological image before and after histogram equalization is obtained, the interference degree of peripheral myocardial cells on interstitial fibers is determined by combining the edge line states of the interstitial fibers and the myocardial cells adjacent to the interstitial fibers, and the influence degree of the gray scale overlapping degree of the myocardial cells and the interstitial fibers on the segmentation boundary is determined; according to the method, the mapping distribution function in the histogram equalization algorithm is corrected in the forward direction, the cardiology department pathological image is enhanced, the enhanced cardiology department pathological image is segmented, the enhancement effect of the cardiology department pathological image is improved, and therefore the image segmentation precision and robustness are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image enhancement technology, and more specifically to a method for segmenting pathological images in cardiology. Background Technology

[0002] Cardiology pathology images refer to digital imaging data that reflect the microscopic structure and cellular pathological characteristics of cardiac tissue, acquired through techniques such as tissue sections, immunohistochemical staining, electron microscopy, or high-resolution digital scanning. The core objective of cardiology pathology image segmentation is to automatically or semi-automatically isolate specific tissue regions (such as cardiomyocytes and interstitial fibers) from complex myocardial tissue images. Interstitial fibers are fibrous structures that fill the spaces between cardiomyocytes, providing support and connection; the area containing interstitial fibers is a region formed by multiple cardiomyocytes surrounding each other.

[0003] When segmenting pathological images in cardiology, algorithms often rely on the difference between pixel grayscale and local texture to identify tissue boundaries. Therefore, the uniformity and contrast of image grayscale distribution have a decisive impact on the accuracy of segmentation results. Thus, image enhancement processing needs to be introduced before image segmentation. However, traditional histogram equalization enhancement algorithms may have the following problems during image enhancement: the texture of myocardial tissue is delicate and continuous. While histogram equalization enhances contrast, it is easy to over-amplify grayscale differences, leading to increased brightness fluctuations within cells and the appearance of false edges or pseudo-textures. This can cause subsequent segmentation algorithms to misjudge tissue boundaries. Furthermore, myocardial cells and interstitial fibers often have similar grayscale levels under a microscope. Although histogram equalization can improve global contrast, it cannot effectively distinguish areas with overlapping local grayscale levels, especially the boundary area between myocardial cells and interstitial fibers, which is difficult to segment accurately. Summary of the Invention

[0004] To address the technical problem that existing histogram equalization enhancement methods for cardiology pathology images produce poor enhancement results and reduce image segmentation accuracy, this invention aims to provide a cardiology pathology image segmentation method. The specific technical solution adopted is as follows: This invention provides a method for segmenting pathological images in cardiology, comprising: The peak distribution in the gray-level histogram of cardiology pathology images was analyzed to determine the degree of image equalization deviation. Based on the gradient and area changes of each myocardial cell in the cardiology pathology image before and after histogram equalization, and combined with the degree of deviation of the image equalization, the degree of equalization error of the cardiology pathology image before and after histogram equalization is obtained. Based on the edge line status of each interstitial fiber and its adjacent myocardial cells in the pathological images of cardiology, as well as the degree of balance error, the degree of interference of the interstitial fibers with the surrounding myocardial cells is determined. The degree of gray-level overlap between cardiomyocytes and interstitial fibers is determined, and combined with the degree of interference, the degree of influence of the gray-level overlap region of cardiomyocytes and interstitial fibers on the segmentation boundary is obtained. The mapping distribution function in the histogram equalization algorithm is positively corrected based on the degree of influence; the enhanced cardiology pathology image is then processed according to the corrected histogram equalization algorithm to obtain the enhanced cardiology pathology image; and image segmentation is performed on the enhanced cardiology pathology image.

[0005] In an exemplary embodiment, the process of obtaining the degree of image equalization deviation includes: Determine the distance between each reference peak and the target peak in the grayscale histogram, as well as the height of each reference peak; the target peak is any peak in the grayscale histogram, and the reference peak is any other peak in the grayscale histogram associated with the target peak; Based on the distance and the height, the image equalization effect on the target peak is obtained; the image equalization effect is inversely correlated with both the distance and the height. The degree of image equalization deviation is obtained by integrating the image equalization effect of all peaks in the grayscale histogram.

[0006] In an exemplary embodiment, the process of obtaining the gradient changes and area changes of each myocardial cell in the cardiology pathology image before and after histogram equalization includes: The first gradient change, the second gradient change, and the area change of the cardiomyocyte are determined. The first gradient change is the gradient difference of the cytoplasmic region of the cardiomyocyte before and after histogram equalization. The second gradient change is the gradient difference of the nucleus region of the cardiomyocyte before and after histogram equalization. The area change is the area difference of the cytoplasmic region of the cardiomyocyte before and after histogram equalization.

[0007] In an exemplary embodiment, the process of obtaining the degree of equalization error includes: By integrating the gradient change differences of each cardiomyocyte and the area change, the cell balance error performance of each cardiomyocyte before and after histogram equalization is obtained; the gradient change difference is the difference between the first gradient change and the second gradient change. The degree of balance error is obtained by integrating the cell balance error performance of all myocardial cells in the aforementioned cardiology pathology images and combining it with the degree of image equalization deviation.

[0008] In an exemplary embodiment, the process of acquiring the edge line status of each interstitial fiber and its adjacent cardiomyocyte in the cardiology pathology image includes: The edge lines in the interstitial fibers are extracted to determine the degree of fluctuation of the first slope difference of the interstitial fibers; the degree of fluctuation of the first slope difference characterizes the degree of fluctuation of the slope difference between any two edge lines in the interstitial fibers. The edge lines of each adjacent cardiomyocyte are extracted to determine the degree of fluctuation of the second slope difference between adjacent cardiomyocytes; the degree of fluctuation of the second slope difference characterizes the degree of fluctuation of the slope difference between any two edge lines in adjacent cardiomyocytes; the adjacent cardiomyocytes are cardiomyocytes adjacent to the interstitial fibers; The overall performance of the slope difference fluctuation for all adjacent myocardial cells is obtained from the degree of fluctuation of the second slope difference among each adjacent myocardial cell; The texture similarity between interstitial fibers and adjacent cardiomyocytes is determined, and the texture similarity is inversely correlated with the difference between the first slope difference fluctuation degree and the overall performance of the slope difference fluctuation degree.

[0009] In an exemplary embodiment, the process of obtaining the degree of fluctuation of the first slope difference includes: Determine the slope between two adjacent edge pixels in any edge line of the interstitial fiber, calculate the average slope between all two adjacent edge pixels in any edge line, and obtain the overall slope of any edge line. Obtain the overall slope difference between any two edge lines in the interstitial fiber, and calculate the standard deviation of the overall slope difference between any two edge lines in the interstitial fiber as the first slope difference fluctuation degree; The process of obtaining the degree of fluctuation of the second slope difference includes: Determine the overall slope of any edge line in the adjacent cardiomyocytes; Obtain the overall slope difference between any two edge lines in the adjacent myocardial cells, and calculate the standard deviation of the overall slope difference between any two edge lines in the adjacent myocardial cells as the second slope difference fluctuation degree.

[0010] In an exemplary embodiment, the process of obtaining the interference level includes: The interference level is obtained based on the texture similarity and the equalization error level; the interference level is positively correlated with both texture similarity and equalization error level.

[0011] In an exemplary embodiment, obtaining the overall performance of the slope difference fluctuation for all adjacent myocardial cells from the second slope difference fluctuation of each adjacent myocardial cell includes: The average value of the second slope difference fluctuation of each adjacent myocardial cell is calculated as the overall performance of the slope difference fluctuation of all adjacent myocardial cells.

[0012] In an exemplary embodiment, determining the degree of grayscale overlap between cardiomyocytes and interstitial fibers includes: Determine the gray value ranges of cardiomyocytes and interstitial fibers in pathological images of cardiology, respectively; The crossover ratio of the grayscale value ranges of the myocardial cells and interstitial fibers is calculated as the degree of grayscale overlap.

[0013] In an exemplary embodiment, the modified mapping distribution function is: ; in, This indicates the original grayscale value in a cardiology pathology image. The new grayscale value of the pixel after being enhanced by the histogram equalization algorithm. This represents the rounding function. Indicates the highest grayscale value. Indicates that the grayscale value is less than or equal to The percentage of pixels in cardiac pathology images. This indicates the degree of impact.

[0014] This invention has the following beneficial effects: First, it analyzes the peak distribution in the grayscale histogram of cardiology pathology images to obtain the degree of image equalization deviation. Then, it performs histogram equalization processing on the cardiology pathology images. Based on the differences between the images before and after processing, it obtains the degree of equalization error. Furthermore, since there are certain differences in the texture of interstitial fibers and cardiomyocytes in cardiology pathology images, the degree of interference of interstitial fibers with surrounding cardiomyocytes can be obtained based on the edge line state of both, combined with the degree of equalization error. Finally, by combining the grayscale overlap between cardiomyocytes and interstitial fibers, the degree of interference between cardiomyocytes and interstitial fibers can be analyzed. The influence of overlapping gray-level regions on segmentation boundaries is investigated, and the mapping distribution function in the histogram equalization algorithm is ultimately corrected accordingly. The corrected histogram equalization algorithm can effectively distinguish local gray-level overlapping regions, especially the boundary between cardiomyocytes and interstitial fibers. It can effectively solve the problem that different levels of gray-level values ​​are equalized to the same output value after histogram equalization, avoids excessive compression of important gray-level intervals, and protects gray-level intervals with rich image information. It also reduces the merging of important myocardial tissue features, improves the enhancement effect on cardiology pathology images, and thus improves image segmentation accuracy and robustness. Attached Figure Description

[0015] Figure 1 This is a flowchart of a method for segmenting pathological images in cardiology according to an embodiment of the present invention; Figure 2 This is a flowchart of the process for obtaining the degree of image equalization deviation provided in one embodiment of the present invention; Figure 3 This is a flowchart illustrating the process of obtaining the edge line state according to an embodiment of the present invention. Detailed Implementation

[0016] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the specific implementation methods, structures, features, and effects of the present invention are described in detail below with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.

[0017] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. All data and information collected in this application have been obtained with full consent.

[0018] This embodiment provides a method for segmenting cardiology pathology images. The main purpose is that when using histogram equalization enhancement algorithm to enhance cardiology pathology images, although it can enhance the overall contrast of the image, it cannot effectively distinguish areas with overlapping local gray levels, which causes certain errors in the accurate segmentation of cardiology pathology images.

[0019] This embodiment requires preparing pathological sections from myocardial biopsy samples and performing staining (such as HE staining). Subsequent analysis necessitates precise differentiation of three key structures: cytoplasm, nucleus, and interstitial fibers, to avoid structural missegmentation due to improper staining procedures or subjective judgment bias. The cardiology pathology images in this embodiment are myocardial tissue images.

[0020] In cardiology pathology images, myocardial fibers exhibit a banded arrangement with continuous intercellular texture. The grayscale variations in the tissue are primarily influenced by staining concentration, cell density, and illumination distribution. Statistical analysis of the grayscale histogram of the cardiology pathology image (i.e., the original image) reveals a non-uniform, multi-peaked grayscale distribution, with different peak regions corresponding to the cell nucleus, cytoplasm, and interstitial regions. It should be understood that the cardiology pathology image is a grayscale image after grayscale conversion. Furthermore, this embodiment can normalize the grayscale values ​​of the cardiology pathology image by dividing the grayscale value of each pixel by 255, distributing the grayscale value of each pixel within the numerical range [0, 1] and eliminating the dimension, making the grayscale value a dimensionless data point, facilitating data processing. Moreover, this embodiment constructs a two-dimensional coordinate system using the image width and height as the horizontal and vertical axes, respectively, mapping the cardiology pathology image into this two-dimensional coordinate system.

[0021] like Figure 1As shown, the cardiology pathology image segmentation method provided in this embodiment includes the following steps: Step S1: Analyze the peak distribution in the grayscale histogram of the cardiology pathology images to obtain the degree of image equalization deviation; Step S2: Based on the gradient and area changes of each myocardial cell in the cardiology pathology image before and after histogram equalization, and combined with the degree of image equalization deviation, the degree of equalization error of the cardiology pathology image before and after histogram equalization is obtained. Step S3: Based on the edge line status of each interstitial fiber and its adjacent myocardial cells in the cardiology pathology images, as well as the degree of balance error, determine the degree of interference of the interstitial fibers with the surrounding myocardial cells. Step S4: Determine the degree of gray-level overlap between cardiomyocytes and interstitial fibers, and combine it with the degree of interference to obtain the degree of influence of the gray-level overlap area of ​​cardiomyocytes and interstitial fibers on the segmentation boundary; Step S5: Correct the mapping distribution function in the histogram equalization algorithm by positively adjusting the degree of influence; enhance the cardiology pathology image according to the corrected histogram equalization algorithm to obtain the enhanced cardiology pathology image; perform image segmentation on the enhanced cardiology pathology image.

[0022] The following detailed explanation of each step, in conjunction with the accompanying drawings, is provided.

[0023] Step S1: Analyze the peak distribution in the grayscale histogram of the cardiology pathology images to obtain the degree of image equalization deviation.

[0024] When obtaining a grayscale histogram of a cardiology pathology image, it should be understood that the grayscale histogram can be set to 256 grayscale levels, with each grayscale value representing a grayscale level. For normal cardiology pathology images, the grayscale histogram contains multiple peaks: peaks with low grayscale values, few grayscale levels covered, and low peak heights (i.e., few corresponding pixels) correspond to the grayscale region of the cell nucleus (because a myocardial cell has only one nucleus, and the area of ​​the nucleus is much smaller than that of the cytoplasm, so the number of pixels in the nucleus is much smaller than that in the cytoplasm); peaks with moderate grayscale values, many grayscale levels covered, and high peak heights (i.e., many corresponding pixels) correspond to the grayscale region of the cytoplasm (because the cytoplasm has a large area, contains many pixels, and there are differences in the cytoplasm regions during staining, so the peaks in the cytoplasm have many grayscale levels); interstitial fibers are light red or white thin cord-like areas, so after grayscale conversion, the peaks belonging to interstitial fibers have higher grayscale values ​​than the grayscale values ​​of the cytoplasm and the nucleus. Since the total area of ​​interstitial fibers is smaller than the area of ​​the cytoplasm but larger than the area of ​​the nucleus, the peaks of interstitial fibers have the highest grayscale values ​​and moderate peak heights in the image.

[0025] For ease of explanation, any given peak is defined as the target peak. When performing histogram equalization on cardiology pathology images, if the distance between a peak in the histogram representing texture details and the target peak is very close, histogram equalization may map them to the same grayscale range, thus merging these peaks. This could result in the loss of subtle differences or even the creation of false edges or pseudo-feature regions. This indicates that relying solely on global grayscale remapping cannot accurately reflect the detailed layers and grayscale distribution patterns of myocardial tissue.

[0026] Analyzing the peak distribution in the grayscale histogram of cardiology pathology images yields the degree of image equalization deviation. In an exemplary embodiment, such as... Figure 2 As shown, the following is a specific process for obtaining the degree of deviation in image equalization: Step S11: Determine the distance between each reference peak and the target peak in the grayscale histogram, as well as the height of each reference peak.

[0027] In this embodiment, the heights of each peak in the grayscale histogram are first normalized. Since the height of each peak represents the number of corresponding pixels, the ratio of the number of pixels corresponding to each peak to the total number of pixels in the image is used as the normalized height of each peak (all heights mentioned below are normalized heights). This ensures that the heights of each peak are distributed within the numerical range of (0, 1), eliminating the dimension and making each peak's height a dimensionless data point, facilitating data processing. Furthermore, a peak with a height of 0 indicates that there are no pixels with that grayscale value in the image, and therefore it does not constitute a peak in the grayscale histogram. Thus, in this embodiment, the height of each peak is greater than 0.

[0028] For the target peak, other peaks associated with it in the grayscale histogram are identified. Based on the above analysis, these other peaks are those representing more detailed parts of cardiomyocytes, such as peaks depicting the texture of cardiomyocytes. Since the peaks representing details have relatively small heights, this embodiment presets a height threshold. This height threshold ranges from 0 to 1, and the specific value is set according to actual needs. This height threshold is used to compare with the heights of each peak to identify the peaks with smaller heights; therefore, this height threshold needs to be a small value. Peaks with heights less than this height threshold are obtained as other peaks associated with the target peak and defined as reference peaks.

[0029] For any reference peak, obtain the distance between the reference peak and the target peak in the grayscale histogram (the distance is the absolute value of the difference between the corresponding grayscale values ​​of the reference peak and the target peak), and obtain the height of the reference peak.

[0030] Step S12: Based on distance and height, obtain the image equalization effect performance for the target peak.

[0031] Based on the distance between each reference peak and the target peak in the gray-level histogram, and the height of each reference peak, the image equalization effect on the target peak is obtained. The smaller the distance between the reference peak and the target peak in the gray-level histogram, the higher the likelihood that the reference peak will influence the gray-level equalization of the target peak when performing gray-level equalization processing on cardiology pathology images; that is, the stronger the image equalization effect on the target peak. Therefore, the image equalization effect is inversely correlated with the distance between the reference peak and the target peak in the gray-level histogram. The smaller the height of the reference peak, the higher the likelihood that the reference peak represents a more detailed part of the cardiomyocyte, such as the texture of the cardiomyocyte. When performing gray-level equalization processing on cardiology pathology images, the higher the likelihood that the reference peak will influence the gray-level equalization of the target peak; that is, the stronger the image equalization effect on the target peak. Therefore, the image equalization effect is inversely correlated with the height of the reference peak.

[0032] Based on the above logical analysis, the following is a specific calculation method for the impact of image equalization on the target peak: ; in, This indicates the impact of image equalization on the target peak. This represents the height of the i-th reference peak. This represents the distance between the i-th reference peak and the target peak; n represents the number of reference peaks.

[0033] Step S13: Combine the image equalization effects of all peaks in the grayscale histogram to obtain the degree of image equalization deviation.

[0034] Since the target peak is any peak in the grayscale histogram, the image equalization influence of each peak in the grayscale histogram is obtained through step S12. The average value of the image equalization influence of all peaks in the grayscale histogram is calculated, and the result is the comprehensive influence of image equalization on the cardiology pathology image, which is defined as the degree of image equalization deviation.

[0035] Step S2: Based on the gradient and area changes of each myocardial cell in the cardiology pathology image before and after histogram equalization, and combined with the degree of image equalization deviation, the degree of equalization error of the cardiology pathology image before and after histogram equalization is obtained.

[0036] To further verify the distortion effect of histogram equalization in cardiology pathology images, gray-level contrast gain analysis was performed on cardiology pathology images before and after histogram equalization enhancement. The results showed that while histogram equalization expanded the overall dynamic range, it significantly increased the gray-level standard deviation in the myocardial cell region, enhancing local brightness fluctuations and leading to excessive amplification of the gray-level contrast between the cell nucleus and cytoplasm. This nonlinear enhancement effect caused the segmentation algorithm to incorrectly identify brightness abrupt changes as boundary points during edge detection, resulting in pseudo-segmentation contours. Further gradient distribution observations indicated that the gradient direction distribution was more discrete after histogram equalization, weakening texture directionality and disrupting the original structural continuity of myocardial tissue.

[0037] Each cardiomyocyte has a nucleus, which appears blue-purple after HE staining, significantly different from the pink color of the cytoplasm and the light pink or white color of the interstitial fibers. Therefore, the pixel grayscale values ​​of different parts of the image vary greatly after grayscale conversion. Furthermore, the nucleus is a small, round or near-round shape. Based on the characteristic that the cytoplasm encloses the nucleus, the region of interest can be identified to locate each cardiomyocyte.

[0038] Histogram equalization of cardiology pathology images can yield new images with enhanced grayscale contrast. Analysis using a single cardiomyocyte as an example reveals that after image enhancement, the previously blurred boundary between the nucleus and cytoplasm becomes clearer. Cytoplasmic pixels that were initially misclassified as nuclei due to similar grayscale levels are correctly reclassified back to their original cytoplasmic regions in the enhanced image. At this point, the number of pixels between the nucleus and cytoplasm is approximately equal or even nearly equal. However, areas with uneven or lightly stained cytoplasm exhibit significantly amplified local brightness differences after histogram equalization. This over-enhancement leads to a large brightness difference between these areas and the normally stained, uniform cytoplasm, resulting in misidentification as false cell boundaries. In this situation, the originally intact cytoplasmic region is unreasonably segmented by these false boundaries, severely compressing the effective area of ​​the cytoplasm and causing significant inconsistencies in pixel variation between the cytoplasm and nucleus.

[0039] For any cardiomyocyte, obtain the gradient and area changes of the cardiomyocyte before and after histogram equalization. Since a cardiomyocyte consists of cytoplasm and a nucleus, the gradient change of the cardiomyocyte before and after histogram equalization includes a first gradient change and a second gradient change. The first gradient change is the gradient difference of the cytoplasmic region of the cardiomyocyte before and after histogram equalization, and the second gradient change is the gradient difference of the nuclear region of the cardiomyocyte before and after histogram equalization. The area change is the area difference of the cytoplasmic region of the cardiomyocyte before and after histogram equalization.

[0040] Specifically, for the first gradient change, the gradient magnitude of each pixel in the cytoplasm region of the cardiomyocyte is obtained before histogram equalization. The average gradient magnitude of each pixel in the cytoplasm region of the cardiomyocyte is calculated as the overall gradient magnitude of the cytoplasm region of the cardiomyocyte before histogram equalization. After histogram equalization, the gradient magnitude of each pixel in the cytoplasm region of the cardiomyocyte is obtained. The average gradient magnitude of each pixel in the cytoplasm region of the cardiomyocyte is calculated as the overall gradient magnitude of the cytoplasm region of the cardiomyocyte after histogram equalization. Then, the absolute value of the difference between the overall gradient magnitude of the cytoplasm region of the cardiomyocyte before and after histogram equalization is calculated as the first gradient change.

[0041] Similarly, for the second gradient change, the gradient magnitude of each pixel in the nucleus region of the cardiomyocyte is obtained before histogram equalization. The average gradient magnitude of each pixel in the nucleus region of the cardiomyocyte is calculated as the overall gradient magnitude of the nucleus region of the cardiomyocyte before histogram equalization. After histogram equalization, the gradient magnitude of each pixel in the nucleus region of the cardiomyocyte is obtained. The average gradient magnitude of each pixel in the nucleus region of the cardiomyocyte is calculated as the overall gradient magnitude of the nucleus region of the cardiomyocyte after histogram equalization. Then, the absolute value of the difference between the overall gradient magnitude of the nucleus region of the cardiomyocyte before and after histogram equalization is calculated as the second gradient change.

[0042] For area change, the area of ​​the cytoplasmic region in the cardiomyocyte before histogram equalization is obtained, where the area is the number of pixels contained in the cytoplasmic region. Simultaneously, the area of ​​the cytoplasmic region in the cardiomyocyte after histogram equalization is also obtained. Then, the absolute value of the difference between the areas of the cytoplasmic region in the cardiomyocyte before and after histogram equalization is calculated as the area change.

[0043] After obtaining the gradient and area changes of each myocardial cell in the cardiology pathology image before and after histogram equalization, the degree of equalization error of the cardiology pathology image before and after histogram equalization is obtained by combining the degree of image equalization deviation.

[0044] In an exemplary embodiment, for any cardiomyocyte, the difference between the first gradient change and the second gradient change of the cardiomyocyte is obtained. Specifically, the absolute value of the difference between the first gradient change and the second gradient change is calculated, and the result is the gradient change difference of the cardiomyocyte. The smaller the difference in gradient changes, the more similar the gradient changes in the nucleus and cytoplasm regions of the cardiomyocyte before and after histogram equalization. This means the equalization effect on the nucleus and cytoplasm regions is more consistent, resulting in a more balanced overall image contrast enhancement. The cardiomyocyte exhibits a weaker cell equalization error before and after histogram equalization, ultimately leading to a lower degree of equalization error in the cardiology pathology image. Conversely, the larger the difference in gradient changes, the more significant the difference in gradient changes between the nucleus and cytoplasm regions of the cardiomyocyte before and after histogram equalization. This means the equalization effect on the nucleus and cytoplasm regions is more inconsistent, resulting in a more unbalanced overall image contrast enhancement. The cardiomyocyte exhibits a stronger cell equalization error before and after histogram equalization, ultimately leading to a higher degree of equalization error in the cardiology pathology image. Therefore, the cell equalization error of the cardiomyocyte before and after histogram equalization is positively correlated with the difference in gradient changes. The smaller the area change of the cardiomyocyte, the more stable the histogram equalization is in segmenting the cytoplasmic region. The weaker the cell equalization error before and after histogram equalization, the lower the degree of equalization error reflected in the cardiology pathology image. Conversely, the larger the area change of the cardiomyocyte, the less stable the histogram equalization is in segmenting the cytoplasmic region. The stronger the cell equalization error before and after histogram equalization, the higher the degree of equalization error reflected in the cardiology pathology image. Therefore, the cell equalization error before and after histogram equalization is positively correlated with the area change. Based on the above logic, the following is a calculation method for cell equalization error: ; in, This represents the cell balance error performance of the j-th myocardial cell before and after histogram equalization. This represents the first gradient change in the j-th cardiomyocyte. This represents the second gradient change in the j-th cardiomyocyte. This represents the gradient change difference in the j-th cardiomyocyte. This represents the change in area of ​​the j-th myocardial cell. This represents a normalization function, such as a maximum / minimum value normalization method. The formula for calculating cell equilibrium error performance uses an average method to fuse the differences between the two parts to obtain the cell equilibrium error performance.

[0045] Then, the cell balance error performance of each myocardial cell in the cardiology pathology image is integrated. In an exemplary embodiment, the average value of the cell balance error performance of each myocardial cell in the cardiology pathology image is calculated to obtain the overall cell balance error performance. The average value of the cell balance error performance of each myocardial cell is used to represent the overall error of the image after histogram equalization.

[0046] Multiplying the overall cell equalization error by the degree of image equalization deviation yields the degree of equalization error in the cardiology pathology image before and after histogram equalization. A higher degree of equalization error indicates a greater error in the cardiology pathology image after histogram equalization.

[0047] Step S3: Based on the edge line status of each interstitial fiber and its adjacent myocardial cells in the cardiology pathology images, as well as the degree of balance error, determine the degree of interference of the interstitial fibers with the surrounding myocardial cells.

[0048] In regions where the gray values ​​of cardiomyocytes and interstitial fibers are similar, histogram equalization fails to effectively distinguish subtle differences between tissues. Local gray-level distribution analysis reveals a high degree of overlap in the gray-level ranges of these regions, and equalization further compresses the effective contrast range between them, making the gray-level threshold determination for pixel classification unstable. When segmentation algorithms (such as thresholding or the U-Net model) rely on enhanced gray-level gradients for region partitioning, overlapping gray-level regions are incorrectly classified into the same category, resulting in blurred boundaries. These results indicate that gray-level overlap is a significant intrinsic factor contributing to decreased segmentation accuracy, requiring targeted correction through feature adaptation or local enhancement strategies.

[0049] The texture of the cytoplasm is formed by alternating thick myosin and thin myosin filaments, appearing as alternating light and dark parallel striations on the surface of cardiomyocytes. In contrast, the texture of the interstitial fibers is a scattered, cord-like or reticular distribution without periodic arrangement. Therefore, this embodiment can analyze the presence of regularly distributed textures in the interstitial fiber region based on the parallel distribution of the cytoplasmic texture. If regularly distributed parallel striations are present, it indicates the existence of unidentified cytoplasmic regions within that area (overlapping interference regions are areas at the boundary between cytoplasm and interstitial fibers that belong to cytoplasm but are misidentified as interstitial fibers).

[0050] First, the edge line status of each interstitial fiber and its adjacent cardiomyocytes in the cardiac pathology image is obtained. In an exemplary embodiment, such as... Figure 3 As shown, the following is a specific process for obtaining the edge line state: Step S31: Extract the edge lines in the interstitial fibers to determine the degree of fluctuation of the first slope difference of the interstitial fibers.

[0051] First, identify the interstitial fibers in the cardiology pathology images. Interstitial fibers are fibrous structures that fill the spaces between myocardial cells and provide support and connection. The interstitial fiber region is an area formed by multiple myocardial cells.

[0052] Taking any interstitial fibrous region as an example for analysis, the cardiomyocytes adjacent to the interstitial fibrous region are identified and defined as the adjacent cardiomyocytes of the interstitial fibrous region. It should be understood that the adjacent cardiomyocytes of the interstitial fibrous region can surround and form the interstitial fibrous region.

[0053] Canny edge detection was performed on the pathological images of the cardiology department to extract the edge lines within the interstitial fibrous region, as well as the edge lines of each adjacent myocardial cell.

[0054] Based on the edge lines within the interstitial fiber region, the first slope difference fluctuation degree of the interstitial fiber region is determined. The first slope difference fluctuation degree characterizes the fluctuation degree of the slope difference between any two edge lines within the interstitial fiber region.

[0055] In an exemplary embodiment, for any edge line in the interstitial fiber region, since the edge line includes several edge pixels, the slope between every two adjacent edge pixels is obtained (i.e., the slope of the line connecting two adjacent edge pixels; the slope value can be positive or negative. For ease of processing, this embodiment normalizes the slope using the sigmoid function to a value range of 0-1. It should be understood that when the slope is positive infinity, the normalized result is a value of 1, and when the slope is negative infinity, the normalized result is a value of 0. The slopes mentioned below are all normalized results). This yields a slope sequence corresponding to the edge line. The average value of the slope sequence is calculated as the overall slope of the edge line. Thus, the overall slope of each edge line in the interstitial fiber region is obtained. Since the interstitial fiber region contains several edge lines, the overall slope difference between any two edge lines in the interstitial fiber region (i.e., the absolute value of the difference in the overall slope) is obtained, thereby obtaining the overall slope difference between multiple any two edge lines. The standard deviation of the overall slope difference between all any two edge lines in the interstitial fiber region is calculated as the first slope difference fluctuation degree of the interstitial fiber region.

[0056] Step S32: Extract the edge lines of each adjacent myocardial cell to determine the degree of fluctuation in the second slope difference between each adjacent myocardial cell.

[0057] For any adjacent cardiomyocyte, the degree of fluctuation of the second slope difference between the adjacent cardiomyocytes characterizes the degree of fluctuation of the slope difference between any two edge lines in the adjacent cardiomyocytes.

[0058] In an exemplary embodiment, for any edge line in an adjacent cardiomyocyte, the slope between every two adjacent edge pixels is obtained (similarly, the slope is normalized using the sigmoid function), thus obtaining a slope sequence corresponding to the edge line. The average value of the slope sequence is calculated as the overall slope of the edge line. This yields the overall slope of each edge line in the adjacent cardiomyocyte. Since the adjacent cardiomyocyte contains several edge lines, the overall slope difference between any two edge lines in the adjacent cardiomyocyte is obtained (i.e., the absolute value of the difference in overall slope), thus obtaining multiple overall slope differences between any two edge lines. The standard deviation of the overall slope differences between all any two edge lines in the adjacent cardiomyocyte is calculated as the second slope difference fluctuation degree of the adjacent cardiomyocyte.

[0059] Step S33: Obtain the overall performance of the slope difference fluctuation for all adjacent myocardial cells from the second slope difference fluctuation of each adjacent myocardial cell.

[0060] The average value of the second slope difference fluctuation of each adjacent myocardial cell in the interstitial fiber region is calculated as the overall performance of the slope difference fluctuation of all adjacent myocardial cells in the interstitial fiber region.

[0061] Step S34: Determine the texture similarity between interstitial fibers and adjacent cardiomyocytes.

[0062] For this interstitial fiber region, the difference between the degree of fluctuation of the first slope difference in this region and the overall performance of the degree of fluctuation of the slope difference in all adjacent cardiomyocytes in this region is obtained; specifically, the absolute value of the difference between the two. The smaller this difference, the higher the texture similarity between the interstitial fiber and adjacent cardiomyocytes, indicating a larger area of ​​overlap and interference between the interstitial fiber and its surrounding cardiomyocytes. The texture similarity between the interstitial fiber and adjacent cardiomyocytes is inversely correlated with the difference in the degree of fluctuation of the first slope difference and the overall performance of the degree of fluctuation of the slope difference.

[0063] Then, based on the texture similarity between the interstitial fiber and adjacent cardiomyocytes, and the degree of balance error, the degree of interference of the interstitial fiber with surrounding cardiomyocytes is obtained. Specifically, the higher the texture similarity between the interstitial fiber and adjacent cardiomyocytes, the larger the overlapping and interference area between the interstitial fiber and surrounding cardiomyocytes, and the higher the degree of interference of the interstitial fiber with surrounding cardiomyocytes; the two are positively correlated. Similarly, the higher the degree of balance error, the higher the degree of interference of the interstitial fiber with surrounding cardiomyocytes; the two are also positively correlated. Based on the above logical analysis, the following is a method for calculating the degree of interference of interstitial fibers with surrounding cardiomyocytes: ; in, This indicates the degree of interference of the a-th interstitial fiber with the surrounding myocardial cells. This indicates the degree of fluctuation in the first slope difference of the a-th interstitial fiber. This represents the overall variation in the slope difference among all adjacent myocardial cells in the a-th interstitial fiber region. This represents the difference between the degree of slope variation fluctuation of the first interstitial fiber (a-th interstitial fiber) and the overall performance of the slope variation fluctuation of all adjacent myocardial cells in the region of the a-th interstitial fiber. This represents the textural similarity between the a-th interstitial fiber and its adjacent cardiomyocytes. This indicates the degree of balance error in cardiology pathology images before and after histogram equalization.

[0064] Step S4: Determine the degree of gray-level overlap between cardiomyocytes and interstitial fibers, and combine it with the degree of interference to obtain the degree of influence of the gray-level overlap area of ​​cardiomyocytes and interstitial fibers on the segmentation boundary.

[0065] The degree of grayscale overlap between cardiomyocytes and interstitial fibers is determined. First, the grayscale value ranges of cardiomyocytes and interstitial fibers in the cardiology pathology images are determined separately. In an exemplary embodiment, the grayscale value range of each cardiomyocyte is obtained, and then the union of the grayscale value ranges of each cardiomyocyte is obtained to obtain the grayscale value range of the cardiomyocyte. Similarly, the grayscale value range of each interstitial fiber is obtained, and then the union of the grayscale value ranges of each interstitial fiber is obtained to obtain the grayscale value range of the interstitial fiber.

[0066] The intersection and union of the grayscale value ranges of cardiomyocytes and interstitial fibers are obtained, and the intersection-union ratio (IU / U) of the grayscale value ranges of cardiomyocytes and interstitial fibers is calculated. This ratio is the ratio of the length of the grayscale range corresponding to the intersection to the length of the grayscale range corresponding to the union. The result is the degree of grayscale overlap. In cardiology pathology images, the higher the degree of grayscale overlap between cardiomyocytes and interstitial fibers, the greater the influence of the grayscale overlap area on the segmentation boundary; therefore, the degree of influence is positively correlated with the degree of grayscale overlap.

[0067] The average degree of interference of each interstitial fiber with surrounding cardiomyocytes is calculated, and the result is the overall degree of interference of interstitial fibers with surrounding cardiomyocytes. The higher the overall degree of interference of interstitial fibers with surrounding cardiomyocytes, the greater the influence of the gray-level overlap area of ​​cardiomyocytes and interstitial fibers on the segmentation boundary, and the degree of influence is positively correlated with the overall degree of interference.

[0068] Based on the above logic, the following is a calculation method for the influence of the gray-level overlap region of myocardial cells and interstitial fibers on the segmentation boundary: calculate the average value of the gray-level overlap degree of myocardial cells and interstitial fibers and the overall interference degree of interstitial fibers by surrounding myocardial cells, and use the result as the influence of the gray-level overlap region of myocardial cells and interstitial fibers on the segmentation boundary.

[0069] Step S5: Correct the mapping distribution function in the histogram equalization algorithm by positively adjusting the degree of influence; enhance the cardiology pathology image according to the corrected histogram equalization algorithm to obtain the enhanced cardiology pathology image; perform image segmentation on the enhanced cardiology pathology image.

[0070] After grayscale histogram equalization of cardiology pathology images, the data obtained by the histogram equalization algorithm, after rounding, may map different grayscale values ​​to the same output value, resulting in a larger error in the enhanced image. Therefore, it is necessary to assign higher weights to cardiology pathology images with a high degree of influence, allowing the grayscale values ​​of pixels in the cardiology pathology images to obtain a wider output grayscale range during mapping, avoiding compression to the same output value, and reducing errors at the source. When the influence is less, a lower weight should be set to avoid overstretching and noise amplification, allowing values ​​with large differences in grayscale to be better distinguished from surrounding easily confused grayscale values.

[0071] In an exemplary embodiment, the modified mapping distribution function is: ; in, This indicates the original grayscale value in a cardiology pathology image. The new grayscale value of the pixel after being enhanced by the histogram equalization algorithm. This represents the rounding function. This represents the highest grayscale value (usually set to 255). Indicates that the grayscale value is less than or equal to The percentage of pixels in cardiac pathology images. The degree of influence is represented as a weight and incorporated into the mapping distribution function to achieve a positive correction to the mapping distribution function. It should be understood that the original grayscale value of each pixel in the mapping distribution function is the pixel's true grayscale value, i.e., the grayscale value before normalization. The resulting new grayscale value ranges from 0 to 255. It should be understood that, in the above mapping distribution function, besides the degree of influence... Apart from that, the other parts are the calculation formulas for the existing mapping distribution function.

[0072] degree of impact This study characterizes the influence of the gray-level overlap region of cardiomyocytes and interstitial fibers on the segmentation boundary. When the gray-level value is large, based on rounding, the new gray-level value of the pixel can be further improved compared to existing histogram equalization algorithms, thereby obtaining a larger gray-level span. This makes the details in the image clearer, thus reducing the influence of the gray-level overlap region of cardiomyocytes and interstitial fibers on the segmentation boundary, improving the image enhancement effect, and avoiding the influence of the gray-level overlap region on the segmentation boundary. Excessive grayscale adjustment due to large values ​​can lead to image distortion; degree of impact. When the value is small, it means that the gray-level overlap area of ​​myocardial cells and interstitial fibers has little impact on the segmentation boundary. In this case, the rounding result determines whether to enhance the gray level.

[0073] By incorporating the degree of influence as a weight into the histogram equalization algorithm, the information-rich gray-level range in the image is preserved, the merging of important features in cardiology pathology images is reduced, and a larger gray-level span is obtained in the weighted mapping, making the details in the image clearer. The greater the degree of influence, the more dispersed the output gray level will be due to the weighting, avoiding overlap with other gray levels, which has resulted in significant improvements, especially in the missegmentation of fine myocardial cell structures and interstitial fibers.

[0074] In this embodiment, after the mapping distribution function in the histogram equalization algorithm is positively corrected based on the degree of influence, the cardiology pathology image is enhanced according to the corrected histogram equalization algorithm to obtain an enhanced cardiology pathology image. Then, image segmentation is performed on the enhanced cardiology pathology image to segment the desired target regions, including cardiomyocytes and interstitial fibers. In an exemplary embodiment, this embodiment can use a threshold segmentation algorithm or a deep learning-based image segmentation algorithm for image segmentation. The process of the deep learning-based image segmentation algorithm is as follows: multiple enhanced cardiology pathology images are acquired as samples; different target regions are labeled for each pixel in the enhanced cardiology pathology image to label the cardiomyocyte region and the interstitial fiber region; the labeled samples are input into a neural network for training to obtain an image segmentation model. Subsequently, image segmentation can be performed based on the image segmentation model.

[0075] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0076] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.

Claims

1. A method for segmenting pathological images in cardiology, characterized in that, include: The peak distribution in the gray-level histogram of cardiology pathology images was analyzed to determine the degree of image equalization deviation. Based on the gradient and area changes of each myocardial cell in the cardiology pathology image before and after histogram equalization, and combined with the degree of deviation of the image equalization, the degree of equalization error of the cardiology pathology image before and after histogram equalization is obtained. Based on the edge line status of each interstitial fiber and its adjacent myocardial cells in the pathological images of cardiology, as well as the degree of balance error, the degree of interference of the interstitial fibers with the surrounding myocardial cells is determined. The degree of gray-level overlap between cardiomyocytes and interstitial fibers is determined, and combined with the degree of interference, the degree of influence of the gray-level overlap region of cardiomyocytes and interstitial fibers on the segmentation boundary is obtained. The mapping distribution function in the histogram equalization algorithm is positively corrected based on the degree of influence; according to the corrected histogram equalization algorithm, the cardiology pathology image is enhanced to obtain the enhanced cardiology pathology image; Image segmentation was performed on the enhanced cardiology pathology images.

2. The method for segmenting cardiology pathology images as described in claim 1, characterized in that, The process of obtaining the degree of image equalization deviation includes: Determine the distance between each reference peak and the target peak in the grayscale histogram, as well as the height of each reference peak; the target peak is any peak in the grayscale histogram, and the reference peak is any other peak in the grayscale histogram associated with the target peak; Based on the distance and the height, the image equalization effect on the target peak is obtained; the image equalization effect is inversely correlated with both the distance and the height. The degree of image equalization deviation is obtained by integrating the image equalization effect of all peaks in the grayscale histogram.

3. The method for segmenting cardiology pathology images as described in claim 1, characterized in that, The process of obtaining the gradient changes and area changes of each myocardial cell in the cardiology pathology images before and after histogram equalization includes: The first gradient change, the second gradient change, and the area change of the cardiomyocyte are determined. The first gradient change is the gradient difference of the cytoplasmic region of the cardiomyocyte before and after histogram equalization. The second gradient change is the gradient difference of the nucleus region of the cardiomyocyte before and after histogram equalization. The area change is the area difference of the cytoplasmic region of the cardiomyocyte before and after histogram equalization.

4. The method for segmenting cardiology pathology images as described in claim 3, characterized in that, The process of obtaining the degree of equalization error includes: By integrating the gradient change differences of each cardiomyocyte and the area change, the cell balance error performance of each cardiomyocyte before and after histogram equalization is obtained; the gradient change difference is the difference between the first gradient change and the second gradient change. The degree of balance error is obtained by integrating the cell balance error performance of all myocardial cells in the aforementioned cardiology pathology images and combining it with the degree of image equalization deviation.

5. The method for segmenting cardiology pathology images as described in claim 1, characterized in that, The process of acquiring the edge line status of each interstitial fiber and its adjacent cardiomyocytes in the aforementioned cardiology pathology images includes: The edge lines in the interstitial fibers are extracted to determine the degree of fluctuation of the first slope difference of the interstitial fibers; the degree of fluctuation of the first slope difference characterizes the degree of fluctuation of the slope difference between any two edge lines in the interstitial fibers. The edge lines of each adjacent cardiomyocyte are extracted to determine the degree of fluctuation of the second slope difference between adjacent cardiomyocytes; the degree of fluctuation of the second slope difference characterizes the degree of fluctuation of the slope difference between any two edge lines in adjacent cardiomyocytes; the adjacent cardiomyocytes are cardiomyocytes adjacent to the interstitial fibers; The overall performance of the slope difference fluctuation for all adjacent myocardial cells is obtained from the degree of fluctuation of the second slope difference among each adjacent myocardial cell; The texture similarity between interstitial fibers and adjacent cardiomyocytes is determined, and the texture similarity is inversely correlated with the difference between the first slope difference fluctuation degree and the overall performance of the slope difference fluctuation degree.

6. The method for segmenting cardiology pathology images as described in claim 5, characterized in that, The process of obtaining the degree of fluctuation of the first slope difference includes: Determine the slope between two adjacent edge pixels in any edge line of the interstitial fiber, calculate the average slope between all two adjacent edge pixels in any edge line, and obtain the overall slope of any edge line. Obtain the overall slope difference between any two edge lines in the interstitial fiber, and calculate the standard deviation of the overall slope difference between any two edge lines in the interstitial fiber as the first slope difference fluctuation degree; The process of obtaining the degree of fluctuation of the second slope difference includes: Determine the overall slope of any edge line in the adjacent cardiomyocytes; Obtain the overall slope difference between any two edge lines in the adjacent myocardial cells, and calculate the standard deviation of the overall slope difference between any two edge lines in the adjacent myocardial cells as the second slope difference fluctuation degree.

7. The method for segmenting cardiology pathology images as described in claim 5, characterized in that, The process of obtaining the interference level includes: The interference level is obtained based on the texture similarity and the equalization error level; the interference level is positively correlated with both texture similarity and equalization error level.

8. The method for segmenting cardiology pathology images as described in claim 5, characterized in that, The overall performance of the slope difference fluctuation for all adjacent myocardial cells, derived from the second slope difference fluctuation of each adjacent myocardial cell, includes: The average value of the second slope difference fluctuation of each adjacent myocardial cell is calculated as the overall performance of the slope difference fluctuation of all adjacent myocardial cells.

9. The method for segmenting cardiology pathology images as described in claim 1, characterized in that, The determination of the grayscale overlap between cardiomyocytes and interstitial fibers includes: Determine the gray value ranges of cardiomyocytes and interstitial fibers in pathological images of cardiology, respectively; The crossover ratio of the grayscale value ranges of the myocardial cells and interstitial fibers is calculated as the degree of grayscale overlap.

10. The method for segmenting cardiology pathology images as described in claim 1, characterized in that, The corrected mapping distribution function is: ; in, This indicates the original grayscale value in a cardiology pathology image. The new grayscale value of the pixel after being enhanced by the histogram equalization algorithm. This represents the rounding function. Indicates the highest grayscale value. Indicates that the grayscale value is less than or equal to The percentage of pixels in cardiac pathology images. This indicates the degree of impact.