Coronary angiography lesion detection method and system based on image processing

By mapping and feature analysis of the histogram equalization algorithm for coronary angiography grayscale images, combining gradient and brightness characteristics, the problem of poor enhancement effect of coronary angiography images in the existing technology is solved, and the contrast and details of vascular areas are improved Retention improves the accuracy of coronary artery detection.

CN118967460BActive Publication Date: 2024-12-20THE PEOPLES HOSPITAL SHAANXI PROV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411422885.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-12
Publication Date
2024-12-20
Estimated Expiration
2044-10-12

AI Technical Summary

Technical Problem

The existing histogram equalization algorithm has no obvious effect on coronary angiography image enhancement, resulting in low accuracy in coronary artery detection and may reduce the contrast of the vascular area and lose image details.

Method used

By mapping pixel points and preset neighborhood pixel points in coronary angiography grayscale image in different degrees, the optimal mapping value is obtained based on structural difference characteristics and contrast characteristics, combining gradient values, brightness coefficients and classes Vascular coefficients, global mapping is performed to enhance the image.

Benefits of technology

The contrast between the vascular area and other tissue areas in coronary angiography images is improved while retaining details, enhancing the accuracy of coronary artery analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118967460B_ABST
    Figure CN118967460B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image enhancement technology, and specifically to a method and system for detecting coronary angiography lesions based on image processing; mapping pixels in a coronary angiography grayscale image with preset neighborhood pixels through a histogram equalization algorithm, obtaining an optimal mapping value of the pixel based on structural difference characteristics before and after mapping and contrast characteristics after mapping; obtaining a gradient coefficient of the pixel based on the variation characteristics and distribution characteristics of the gradient value within a preset window range of the pixel; obtaining a brightness coefficient based on the grayscale characteristics of the pixel; and obtaining a vascular-like coefficient based on the gradient coefficient and brightness coefficient of the pixel. The present invention obtains a global mapping value based on the vascular-like coefficient corresponding to the pixel with the same optimal mapping value; and enhances the coronary angiography grayscale image through a histogram equalization algorithm based on the global mapping value, so as to increase the contrast between the vascular area and other tissue areas while retaining details.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image enhancement, and in particular to a method and system for detecting coronary angiography lesions based on image processing. Background Art

[0002] Coronary angiography is a medical imaging technology used to check the health of coronary arteries. It can help doctors evaluate whether there are stenosis, blockage and other lesions in the coronary arteries and improve the accuracy of diagnosis. Analysis of coronary artery lesions is usually judged by observing whether the morphology of the blood vessels is normal. Since there are many small blood vessels in the acquired coronary angiography images, it is difficult to accurately detect lesions during image analysis. Therefore, it is necessary to enhance the coronary angiography images to increase the contrast between the vascular area and other tissues. The commonly used histogram equalization algorithm is used to enhance coronary angiography images, but the algorithm may increase the contrast of non-vascular areas and reduce the contrast of vascular areas during the image enhancement process, making it difficult to significantly enhance the vascular area, and even lose some image details; the quality of coronary angiography image enhancement is not high, which ultimately leads to low accuracy of doctors' analysis of coronary artery health. Summary of the invention

[0003] In order to solve the technical problem that the enhancement effect of the above-mentioned histogram equalization on the coronary angiography image is not obvious, resulting in low accuracy of coronary artery detection, the purpose of the present invention is to provide a coronary angiography lesion detection method and system based on image processing, and the technical scheme adopted is as follows:

[0004] Acquire a coronary angiography grayscale image to be detected;

[0005] Mapping pixels in the coronary angiography grayscale image to preset neighborhood pixels to different degrees using a histogram equalization algorithm, and obtaining optimal mapping values ​​of the pixels according to structural difference characteristics before and after mapping and contrast characteristics after mapping;

[0006] Obtaining the gradient value of the pixel point according to the grayscale difference characteristics between the pixel point and other pixel points within a preset neighborhood range in the coronary angiography grayscale image; obtaining the first gradient characteristic value of the pixel point according to the variation characteristics of the gradient value within the preset window range of the pixel point; obtaining the second gradient characteristic value of the pixel point according to the distribution characteristics of the gradient value within the preset window range of the pixel point; obtaining the gradient coefficient of the pixel point according to the first gradient characteristic value and the second gradient characteristic value; obtaining the brightness coefficient according to the grayscale characteristics of the pixel point;

[0007] A vascular-like coefficient is obtained according to the gradient coefficient and brightness coefficient of the pixel point; a global mapping value is obtained according to the weight characteristics of the vascular-like coefficient corresponding to the pixel point with the same optimal mapping value; and the coronary angiography grayscale image is enhanced by a histogram equalization algorithm according to the global mapping value to obtain a coronary angiography enhanced image.

[0008] Furthermore, the step of mapping the pixel points in the coronary angiography grayscale image to the preset neighborhood pixel points to different degrees by using a histogram equalization algorithm, and obtaining the optimal mapping value of the pixel points according to the structural difference characteristics before and after mapping and the contrast characteristics after mapping includes:

[0009] A value is randomly selected in the closed interval between the grayscale value of the pixel point and the constant 255 as the grayscale value in the histogram equalization algorithm for mapping, and mapping images after different mapping degrees are obtained; in the mapping image, the average value of the absolute value of the grayscale difference between the pixel point and the preset neighborhood pixel points is calculated and normalized to obtain the mapping contrast of the pixel point; the structural similarity between the mapping image and the corresponding image before mapping is calculated to obtain the image similarity feature value; the product of the preset first proportional factor and the mapping contrast is calculated to obtain the first factor; the product of the preset second proportional factor and the image similarity feature value is calculated to obtain the second factor; the sum of the first factor and the second factor is calculated to obtain the mapping effect feature value of the mapping image; the grayscale value corresponding to the maximum value of the mapping effect feature value is used as the optimal mapping value of the pixel point.

[0010] Furthermore, the step of obtaining the gradient value of the pixel point according to the grayscale difference characteristics between the pixel point in the coronary angiography grayscale image and other pixel points within a preset neighborhood range includes:

[0011] The absolute value of the difference between the grayscale values ​​of the pixel point and other pixel points within a preset neighborhood is calculated to obtain a grayscale difference value of the pixel point; and the maximum value of the grayscale difference value is used as the gradient value of the pixel point.

[0012] Furthermore, the step of obtaining a first gradient characteristic value of a pixel point according to a change characteristic of a gradient value within a preset window range of the pixel point comprises:

[0013] A change curve is constructed based on the gradient values ​​of all pixel points within any preset window range of the pixel point; the change rate of the gradient values ​​of the pixel point and the adjacent pixel points within the arbitrary preset window range is calculated based on the change curve to obtain the gradient change characteristic value of the pixel point and the adjacent pixel points; the ratio of the gradient change characteristic value of the pixel point to the previous adjacent pixel point and the ratio of the gradient change characteristic value of the pixel point to the next adjacent pixel point is calculated to obtain the first gradient characteristic value of the pixel point.

[0014] Furthermore, the step of obtaining a second gradient characteristic value of a pixel point according to a distribution characteristic of a gradient value within a preset window range of the pixel point comprises:

[0015] Calculate the sum of the gradient values ​​of all pixel points within any preset window range of the pixel point to obtain the gradient sum value; calculate the ratio of the gradient value of the pixel point to the gradient sum value to obtain a gradient proportion eigenvalue; and use the maximum value of the gradient proportion eigenvalues ​​corresponding to different preset window ranges as the second gradient eigenvalue of the pixel point.

[0016] Further, the step of obtaining a gradient coefficient of a pixel point according to the first gradient eigenvalue and the second gradient eigenvalue comprises:

[0017] Calculate the sum of the first gradient eigenvalues ​​corresponding to all preset window ranges of the pixel point to obtain the comprehensive first gradient eigenvalue of the pixel point; calculate the absolute value of the sum of the comprehensive first gradient eigenvalue and the number of preset window ranges to obtain the first mapping value of the pixel point; calculate the inverse of the first mapping value and the sum of the second gradient eigenvalue and normalize them to obtain the gradient coefficient of the pixel point.

[0018] Furthermore, the step of obtaining the brightness coefficient according to the grayscale characteristics of the pixel point includes:

[0019] The inverse of the grayscale value of the pixel point in the coronary angiography grayscale image is calculated to obtain the brightness coefficient of the pixel point.

[0020] Furthermore, the step of obtaining a blood vessel-like coefficient according to the gradient coefficient and the brightness coefficient of the pixel point comprises:

[0021] Calculate the product of a preset first weight and the gradient coefficient to obtain a first coefficient; calculate the product of a preset second weight and the brightness coefficient to obtain a second coefficient; the sum of the preset first weight and the preset second weight is a constant 1, and the preset first weight is greater than the preset second weight; calculate the sum of the first coefficient and the second coefficient to obtain a blood vessel-like coefficient of the pixel point.

[0022] Furthermore, the step of obtaining a global mapping value according to the weight characteristics of the blood vessel-like coefficients corresponding to the pixels having the same optimal mapping value comprises:

[0023] The sum of the blood vessel-like coefficients corresponding to the pixel points with the same optimal mapping value is calculated to obtain the total blood vessel-like coefficient; and the optimal mapping value corresponding to the maximum value of the total blood vessel-like coefficient is used as the global mapping value.

[0024] The present invention also proposes a coronary angiography lesion detection system based on image processing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any step of a coronary angiography lesion detection method based on image processing.

[0025] The present invention has the following beneficial effects:

[0026] In the present invention, the pixel points in the coronary angiography grayscale image and the preset neighborhood pixel points are mapped to different degrees through the histogram equalization algorithm, and the contrast and detail retention characteristics under different equalization degrees can be determined; obtaining the optimal mapping value can determine the optimal mapping range of different pixel points and the corresponding preset neighborhood pixel points, and provide a suitable selection range for the global mapping of the final overall coronary angiography grayscale image. Since the grayscale difference between the vascular area and other tissue areas in the coronary angiography grayscale image is obvious, obtaining the gradient value of the pixel point can characterize the position of the pixel point, obtaining the first gradient eigenvalue can analyze the position of the pixel point according to the change characteristics of the gradient value, obtaining the second gradient eigenvalue can analyze the position of the pixel point according to the gradient distribution characteristics of the gradient value, and obtaining the gradient coefficient can accurately analyze the position of the pixel point in the image. Since the color of the vascular area in the coronary angiography grayscale image is darker, obtaining the brightness coefficient can reflect the position of the pixel point; obtaining the vascular-like coefficient can accurately characterize the possibility that the pixel point is in the vascular area. The final global mapping value can be mapped according to the mapping degree of the pixels in the vascular area of ​​the image, which can increase the contrast between the vascular area and other tissue areas while retaining the details; making the coronary angiography enhanced image more accurate in assisting physicians in coronary artery analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 A flow chart of a coronary angiography lesion detection method based on image processing provided by one embodiment of the present invention. DETAILED DESCRIPTION

[0029] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the specific implementation method, structure, features and effects of a coronary angiography lesion detection method based on image processing proposed by the present invention in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0030] Unless defined otherwise, 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 belongs.

[0031] The following is a detailed description of a method for detecting coronary angiography lesions based on image processing provided by the present invention in conjunction with the accompanying drawings.

[0032] See also Figure 1 , which shows a flow chart of a coronary angiography lesion detection method based on image processing provided by an embodiment of the present invention, the method comprising the following steps:

[0033] Step S1, obtaining a coronary angiography grayscale image to be detected.

[0034] In an embodiment of the present invention, the implementation scenario is to perform image enhancement on the coronary angiography grayscale image for physicians to analyze the health of coronary arteries, so as to improve the accuracy of physicians' judgments; first, the coronary angiography grayscale image to be detected is obtained, and the coronary angiography image is collected by an instrument and then grayscaled and denoised to obtain the coronary angiography grayscale image. In an embodiment of the present invention, the existing bilateral filtering algorithm is used to reduce noise and maintain edges, so as to improve the accuracy of subsequent enhancement.

[0035] Since the characteristics of small blood vessels in the acquired grayscale images of coronary angiography are not obvious, the accuracy of analyzing the health status of coronary arteries is low. Therefore, it is necessary to improve the contrast between blood vessels and other tissue areas in the image and highlight the characteristics of blood vessels. The commonly used histogram equalization is used for image enhancement. However, in the process of image enhancement of coronary angiography grayscale images, the contrast of non-vascular areas may be increased and the contrast of vascular areas may be reduced, resulting in low quality of image enhancement. In order to improve the effect of image enhancement and improve the accuracy of coronary artery health status analysis, it is necessary to improve the process of image enhancement using histogram equalization and improve the image enhancement quality of coronary angiography grayscale images.

[0036] Step S2, mapping the pixel points in the coronary angiography grayscale image and the preset neighborhood pixel points to different degrees through a histogram equalization algorithm, and obtaining the optimal mapping value of the pixel point according to the structural difference characteristics before and after mapping and the contrast characteristics after mapping.

[0037] The existing histogram equalization determines the grayscale cumulative distribution frequency of different grayscale levels based on the grayscale histogram of the original image, and obtains the equalized image based on the grayscale cumulative distribution frequency and the maximum grayscale level of the original image, so that the grayscale range of the equalized image is consistent with that of the original image; but when the grayscale range is consistent with the original image, it may cause the contrast between the vascular area and other tissue areas to be unclear, so the grayscale range of the equalized image can be improved and the contrast between pixels can be increased. Therefore, the pixel points in the coronary angiography grayscale image and the preset neighborhood pixel points are mapped to different degrees through the histogram equalization algorithm, and the optimal mapping value of the pixel point is obtained according to the structural difference characteristics before and after mapping and the contrast characteristics after mapping. In an embodiment of the present invention, the preset neighborhood pixel points are other pixel points within a range of 7 with the pixel point as the center and a window length of 7, which can be determined by the implementer according to the implementation scenario.

[0038] Preferably, in an embodiment of the present invention, the step of obtaining the optimal mapping value includes: arbitrarily selecting a value in the closed interval between the grayscale value of the pixel point and the constant 255 as the grayscale value in the histogram equalization algorithm for mapping, and obtaining mapping images after different mapping degrees; that is, equalizing according to the grayscale cumulative distribution frequency of the pixel point and the preset neighborhood pixel points and any selected grayscale value to obtain a mapping image after equalization, the grayscale range of the mapping image is different from that of the corresponding original image, the grayscale difference between the pixels in the mapping image is greater, and the feature difference between different areas in the image is more obvious. After obtaining different mapping images, it is necessary to analyze the contrast of the mapping image and the degree of retention of image details to select a suitable grayscale value.

[0039] Furthermore, in the mapping image, the average value of the absolute value of the grayscale difference between the pixel point and the preset neighborhood pixel point is calculated and normalized to obtain the mapping contrast of the pixel point; when the mapping contrast is larger, it means that the grayscale difference in the mapping image is more obvious, and the contrast is larger than that of the original image, which is more suitable for coronary artery analysis. However, too large a contrast will cause some details in the image to be lost, resulting in a decrease in the accuracy of coronary artery analysis. Therefore, while improving the image contrast, it is necessary to ensure that the details are not lost. The structural similarity between the mapping image and the corresponding image before mapping is calculated to obtain an image similarity feature value; it should be noted that the calculation of structural similarity belongs to the prior art, and the specific steps are not repeated. When the structural similarity is closer to 1, it means that the images in the two images are more similar, and the more image details are retained. The product of the preset first scale factor and the mapping contrast is calculated to obtain the first factor; the product of the preset second scale factor and the image similarity feature value is calculated to obtain the second factor; in the embodiment of the present invention, the preset first scale factor is 0.4, and the preset second scale factor is 0.6. The sum of the first factor and the second factor is calculated to obtain the mapping effect characteristic value of the mapping image; the larger the mapping effect characteristic value, the more the mapping image retains the detailed texture in the image as much as possible while increasing the image contrast, and balances the contrast and image details. The grayscale value corresponding to the maximum value of the mapping effect characteristic value is used as the optimal mapping value of the pixel; the mapping image after equalizing the pixel and the preset neighborhood pixel with the optimal mapping value can balance the contrast and image details to the greatest extent; so far, each pixel in the coronary angiography grayscale image corresponds to an optimal mapping value, and the optimal mapping values ​​of different pixels may be different.

[0040] Step S3, obtaining the gradient value of the pixel point based on the grayscale difference characteristics between the pixel point in the coronary angiography grayscale image and other pixel points within a preset neighborhood range; obtaining the first gradient characteristic value of the pixel point based on the change characteristics of the gradient value within the preset window range of the pixel point; obtaining the second gradient characteristic value of the pixel point based on the distribution characteristics of the gradient value within the preset window range of the pixel point; obtaining the gradient coefficient of the pixel point based on the first gradient characteristic value and the second gradient characteristic value; obtaining the brightness coefficient based on the grayscale characteristics of the pixel point.

[0041] In step S2, an optimal mapping value is obtained for each pixel in the grayscale image of the coronary angiography, so that the degree of equalization mapping in different areas of the grayscale image of the coronary angiography is different, and the vascular area in the image plays a decisive role in analyzing the state of the coronary arteries; therefore, in order to determine the mapping range of the entire grayscale image of the coronary angiography, it is necessary to determine the vascular area in the image, and determine the mapping range of the grayscale image of the coronary angiography according to the optimal mapping value of the pixel in the vascular area. The grayscale difference between the vascular area and other tissue areas in the grayscale image of the coronary angiography is obvious, and there is a large gradient difference at the edge of the vascular area; therefore, the gradient value of the pixel is obtained according to the grayscale difference characteristics between the pixel in the grayscale image of the coronary angiography and other pixel points in the preset neighborhood range; preferably, in the embodiment of the present invention, the step of obtaining the gradient value of the pixel includes: calculating the absolute value of the difference between the grayscale values ​​of the pixel and other pixel points in the preset neighborhood range to obtain the grayscale difference value of the pixel; taking the maximum value of the grayscale difference value as the gradient value of the pixel; in the embodiment of the present invention, the preset neighborhood range is the eight neighborhoods of the pixel. The larger the grayscale difference value, the more likely it is that the area is the boundary between blood vessels and other tissue areas. Therefore, the maximum grayscale difference value is used as the gradient value of the pixel point. The larger the gradient value, the more obvious the grayscale change at the pixel point, and the more likely it is that it is the edge area of ​​the blood vessel.

[0042] Further, when the gradient value of a pixel point and other surrounding pixels changes more obviously, the pixel point is more likely to be a blood vessel edge area, so the first gradient characteristic value of the pixel point is obtained according to the change characteristics of the gradient value within the preset window range of the pixel point; preferably, in the embodiment of the present invention, the step of obtaining the first gradient characteristic value includes: constructing a change curve according to the gradient values ​​of all pixels within any preset window range of the pixel point; in the embodiment of the present invention, one preset window range is centered on the pixel point, with a total of 7 pixels in the horizontal direction; another preset window range is centered on the pixel point, with a total of 7 pixels in the vertical direction; it should be noted that if the condition that the pixel point is the center is not met, the preset window range is constructed with the position of the pixel point closest to the window center, which can be determined by the implementer according to the implementation scenario. According to the change curve, the change rate of the gradient value of the pixel point and the adjacent pixel points within the arbitrary preset window range is calculated to obtain the gradient change characteristic value of the pixel point and the adjacent pixel points; the adjacent pixel points in the embodiment of the present invention are the left and right pixels or the upper and lower pixels of the pixel point. The ratio of the gradient change characteristic value between the pixel point and the previous adjacent pixel point and the gradient change characteristic value between the pixel point and the next adjacent pixel point is calculated to obtain the first gradient characteristic value of the pixel point; the previous adjacent pixel point and the next adjacent pixel point are the pixels before and after the pixel point in the change curve, respectively. If the pixel point is a pixel point in the edge area of ​​the blood vessel, the greater the difference between the gradient value of the pixel point and the adjacent pixel point, the less close the gradient change characteristic value is to 0, the gradient change characteristic value between the pixel point and the previous adjacent pixel point presents an upward feature, and the gradient characteristic change value between the pixel point and the next adjacent pixel point presents a downward feature, and thus the first gradient characteristic value is closer to -1.

[0043] When the pixel point is more likely to be at the edge of the blood vessel, the greater the gradient value of the pixel point is, and when the pixel point is less likely to be at the edge of the blood vessel, the smaller the gradient value of the pixel point is, so the second gradient characteristic value of the pixel point can be obtained according to the distribution characteristics of the gradient value within the preset window range of the pixel point; preferably, in the embodiment of the present invention, the step of obtaining the second gradient characteristic value includes: calculating the sum of the gradient values ​​of all pixels within any preset window range of the pixel point to obtain the gradient sum value; calculating the ratio of the gradient value of the pixel point to the gradient sum value to obtain the gradient proportion characteristic value; when the pixel point is more likely to be at the edge of the blood vessel, the greater the gradient proportion characteristic value of the pixel point is. The maximum value of the gradient proportion characteristic values ​​corresponding to different preset window ranges is taken as the second gradient characteristic value of the pixel point. When the second gradient characteristic value is larger, it means that the pixel point is more likely to be at the boundary between the blood vessel and other tissue areas.

[0044] Then, the gradient coefficient of the pixel point can be obtained according to the first gradient eigenvalue and the second gradient eigenvalue; preferably, in the embodiment of the present invention, the step of obtaining the gradient coefficient includes: calculating the sum of the first gradient eigenvalues ​​corresponding to all preset window ranges of the pixel point to obtain the comprehensive first gradient eigenvalue of the pixel point; calculating the absolute value of the sum of the comprehensive first gradient eigenvalue and the number of preset window ranges to obtain the first mapping value of the pixel point; in the embodiment of the present invention, there are two preset window ranges, when the comprehensive first gradient eigenvalue is closer to -2, it means that the pixel point is more likely to be a blood vessel edge pixel point; when the first mapping value is closer to 0, the pixel point is more likely to be a blood vessel edge pixel point. Calculate the sum of the opposite number of the first mapping value and the second gradient eigenvalue and normalize them to obtain the gradient coefficient of the pixel point; when the gradient coefficient of the pixel point is larger, it means that the pixel point is more likely to be at the boundary between the blood vessel and other tissue areas, then when the optimal mapping value of the pixel point is used as the mapping value of the overall coronary angiography grayscale image, the image contrast can be increased and the image details can be retained, thereby improving the accuracy of coronary artery analysis. The formula for obtaining the gradient coefficient includes:

[0045]

[0046] In the formula, R represents the gradient coefficient of the pixel point, A represents the number of preset window ranges, represents the first gradient eigenvalue of the a-th preset window range, represents the integrated first gradient eigenvalue, represents the first mapping value, W represents the second gradient eigenvalue, Represents the normalization function.

[0047] Furthermore, since the color of the vascular area in the coronary angiography grayscale image is darker, the smaller the grayscale value of the pixel, the more likely it is to be a vascular area, and the brightness coefficient can be obtained based on the grayscale characteristics of the pixel; preferably, in an embodiment of the present invention, the step of obtaining the brightness coefficient includes: calculating the inverse of the grayscale value of the pixel in the coronary angiography grayscale image, and obtaining the brightness coefficient of the pixel. The larger the brightness coefficient, the more likely it is that the pixel is to be a vascular area.

[0048] Step S4, obtaining a vessel-like coefficient according to the gradient coefficient and brightness coefficient of the pixel point; obtaining a global mapping value according to the weight characteristics of the vessel-like coefficient corresponding to the pixel points with the same optimal mapping value; enhancing the coronary angiography grayscale image through a histogram equalization algorithm according to the global mapping value to obtain a coronary angiography enhanced image.

[0049] After obtaining the gradient coefficient and brightness coefficient that can characterize whether the pixel point is in the vascular area, the two can be combined to analyze whether the pixel point is in the vascular area, so the vascular-like coefficient is obtained according to the gradient coefficient and brightness coefficient of the pixel point; preferably, in the embodiment of the present invention, the step of obtaining the vascular-like coefficient includes: calculating the product of the preset first weight and the gradient coefficient to obtain the first coefficient; calculating the product of the preset second weight and the brightness coefficient to obtain the second coefficient; the sum of the preset first weight and the preset second weight is a constant 1, and since the gradient feature is more capable of characterizing the situation that the pixel point is in the vascular area than the brightness feature, the preset first weight is greater than the preset second weight. Calculate the sum of the first coefficient and the second coefficient to obtain the vascular-like coefficient of the pixel point. In the embodiment of the present invention, the preset first weight is 0.7 and the preset second weight is 0.3, which can be determined by the implementer according to the implementation scenario. When the vascular-like coefficient of the pixel point is larger, it means that the pixel point is more likely to be in the vascular area, and the optimal mapping value corresponding to the pixel point is more suitable as the mapping value when the entire coronary angiography grayscale image is equalized, so the global mapping value is obtained according to the weight characteristics of the vascular-like coefficients corresponding to the pixels with the same optimal mapping value.

[0050] Preferably, in an embodiment of the present invention, the step of obtaining a global mapping value includes: calculating the sum of the vascular-like coefficients corresponding to the pixels with the same optimal mapping value to obtain the vascular-like total coefficient; and taking the optimal mapping value corresponding to the maximum value of the vascular-like total coefficient as the global mapping value. When the vascular-like total coefficient is larger, it means that the number of pixels corresponding to the optimal mapping value is greater in the vascular area. In this case, when performing global histogram equalization, it is necessary to perform overall mapping based on the mapping degree of the vascular area, so as to ensure that the contrast between the vascular area and other tissue areas is more obvious and retain certain image details. Furthermore, the coronary angiography grayscale image can be enhanced by a histogram equalization algorithm according to the global mapping value to obtain a coronary angiography enhanced image, that is, the global mapping value is equalized with the grayscale cumulative distribution frequency of the pixels in the coronary angiography grayscale image. It should be noted that histogram equalization belongs to the prior art, and the specific steps will not be repeated. Coronary angiography enhanced images are used to assist physicians in analyzing the status of coronary arteries. Compared with the original images, the final coronary angiography enhanced images have more obvious contrast between vascular areas and other tissue areas, and the details can be retained, thereby improving the accuracy of coronary angiography enhanced images in assisting physicians in analyzing coronary arteries.

[0051] In summary, the embodiments of the present invention provide a method for detecting coronary angiography lesions based on image processing; the pixel points in the grayscale image of the coronary angiography are mapped to the preset neighborhood pixel points through a histogram equalization algorithm, and the optimal mapping value of the pixel point is obtained according to the structural difference characteristics before and after the mapping and the contrast characteristics after the mapping; the gradient coefficient of the pixel point is obtained according to the change characteristics and distribution characteristics of the gradient value within the preset window range of the pixel point; the brightness coefficient is obtained according to the grayscale characteristics of the pixel point; and the blood vessel coefficient is obtained according to the gradient coefficient and the brightness coefficient of the pixel point. The present invention obtains a global mapping value based on the blood vessel coefficient corresponding to the pixel point with the same optimal mapping value; the coronary angiography grayscale image is enhanced through a histogram equalization algorithm according to the global mapping value, which can increase the contrast between the blood vessel area and other tissue areas while retaining the details.

[0052] The present invention also proposes a coronary angiography lesion detection system based on image processing, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any step of a coronary angiography lesion detection method based on image processing.

[0053] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0054] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

Claims

1. A method for detecting coronary angiography lesions based on image processing, characterized in that: The method comprises the following steps: Acquire a coronary angiography grayscale image to be detected; Mapping pixels in the coronary angiography grayscale image to preset neighborhood pixels to different degrees using a histogram equalization algorithm, and obtaining optimal mapping values ​​of the pixels according to structural difference characteristics before and after mapping and contrast characteristics after mapping; Obtaining the gradient value of the pixel point according to the grayscale difference characteristics between the pixel point and other pixel points within a preset neighborhood range in the coronary angiography grayscale image; obtaining the first gradient characteristic value of the pixel point according to the variation characteristics of the gradient value within the preset window range of the pixel point; obtaining the second gradient characteristic value of the pixel point according to the distribution characteristics of the gradient value within the preset window range of the pixel point; obtaining the gradient coefficient of the pixel point according to the first gradient characteristic value and the second gradient characteristic value; obtaining the brightness coefficient according to the grayscale characteristics of the pixel point; Obtaining a blood vessel coefficient according to the gradient coefficient and the brightness coefficient of the pixel point; obtaining a global mapping value according to the weight characteristics of the blood vessel coefficient corresponding to the pixel points with the same optimal mapping value; enhancing the coronary angiography grayscale image by a histogram equalization algorithm according to the global mapping value to obtain a coronary angiography enhanced image; The step of mapping the pixel points in the coronary angiography grayscale image to the preset neighborhood pixel points to different degrees by using a histogram equalization algorithm, and obtaining the optimal mapping value of the pixel points according to the structural difference characteristics before and after mapping and the contrast characteristics after mapping comprises: Randomly select a value in the closed interval between the grayscale value of the pixel point and the constant 255 as the grayscale value in the histogram equalization algorithm for mapping, and obtain mapping images after different mapping degrees; calculate the average value of the absolute value of the grayscale difference between the pixel point and the preset neighborhood pixel points in the mapping image and normalize it to obtain the mapping contrast of the pixel point; calculate the structural similarity between the mapping image and the corresponding image before mapping to obtain the image similarity feature value; calculate the product of the preset first proportional factor and the mapping contrast to obtain the first factor; calculate the product of the preset second proportional factor and the image similarity feature value to obtain the second factor; calculate the sum of the first factor and the second factor to obtain the mapping effect feature value of the mapping image; take the grayscale value corresponding to the maximum value of the mapping effect feature value as the optimal mapping value of the pixel point; The step of obtaining the gradient coefficient of the pixel point according to the first gradient eigenvalue and the second gradient eigenvalue comprises: Calculate the sum of the first gradient eigenvalues ​​corresponding to all preset window ranges of the pixel point to obtain the comprehensive first gradient eigenvalue of the pixel point; calculate the absolute value of the sum of the comprehensive first gradient eigenvalue and the number of preset window ranges to obtain the first mapping value of the pixel point; calculate the sum of the opposite number of the first mapping value and the second gradient eigenvalue and normalize them to obtain the gradient coefficient of the pixel point; The step of obtaining a blood vessel-like coefficient according to the gradient coefficient and the brightness coefficient of the pixel point comprises: Calculate the product of a preset first weight and the gradient coefficient to obtain a first coefficient; calculate the product of a preset second weight and the brightness coefficient to obtain a second coefficient; the sum of the preset first weight and the preset second weight is a constant 1, and the preset first weight is greater than the preset second weight; calculate the sum of the first coefficient and the second coefficient to obtain a blood vessel-like coefficient of the pixel point; The step of obtaining a global mapping value according to the weight characteristics of the blood vessel-like coefficients corresponding to the pixels having the same optimal mapping value comprises: The sum of the blood vessel-like coefficients corresponding to the pixel points with the same optimal mapping value is calculated to obtain the total blood vessel-like coefficient; and the optimal mapping value corresponding to the maximum value of the total blood vessel-like coefficient is used as the global mapping value.

2. The method for detecting coronary angiography lesions based on image processing according to claim 1, characterized in that: The step of obtaining the gradient value of the pixel point according to the grayscale difference characteristics between the pixel point in the coronary angiography grayscale image and other pixel points within a preset neighborhood range comprises: The absolute value of the difference between the grayscale values ​​of the pixel point and other pixel points within a preset neighborhood is calculated to obtain a grayscale difference value of the pixel point; and the maximum value of the grayscale difference value is used as the gradient value of the pixel point.

3. The method for detecting coronary angiography lesions based on image processing according to claim 1, characterized in that: The step of obtaining a first gradient characteristic value of a pixel point according to a change characteristic of a gradient value within a preset window range of the pixel point comprises: A change curve is constructed based on the gradient values ​​of all pixel points within any preset window range of the pixel point; the change rate of the gradient values ​​of the pixel point and the adjacent pixel points within the arbitrary preset window range is calculated based on the change curve to obtain the gradient change characteristic value of the pixel point and the adjacent pixel points; the ratio of the gradient change characteristic value of the pixel point to the previous adjacent pixel point and the ratio of the gradient change characteristic value of the pixel point to the next adjacent pixel point is calculated to obtain the first gradient characteristic value of the pixel point.

4. The method for detecting coronary angiography lesions based on image processing according to claim 1, characterized in that: The step of obtaining a second gradient characteristic value of a pixel point according to the distribution characteristics of the gradient value within a preset window range of the pixel point comprises: Calculate the sum of the gradient values ​​of all pixel points within any preset window range of the pixel point to obtain the gradient sum value; calculate the ratio of the gradient value of the pixel point to the gradient sum value to obtain a gradient proportion eigenvalue; and use the maximum value of the gradient proportion eigenvalues ​​corresponding to different preset window ranges as the second gradient eigenvalue of the pixel point.

5. The method for detecting coronary angiography lesions based on image processing according to claim 1, characterized in that: The step of obtaining the brightness coefficient according to the grayscale characteristics of the pixel point comprises: The inverse of the grayscale value of the pixel point in the coronary angiography grayscale image is calculated to obtain the brightness coefficient of the pixel point.

6. A coronary angiography lesion detection system based on image processing, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 5.