Intelligent cardiovascular imaging method and system based on image recognition
By performing binary analysis and connected domain analysis on grayscale images of cardiovascular and cerebrovascular tissues, the likelihood coefficient and regional probability of skeleton pixels are calculated to achieve adaptive image enhancement and solve the problem of insufficient blood vessel area enhancement effects in the existing technology. The obvious problem is to improve the display of image details in the blood vessel area.
Patent Information
- Application Number
- CN202410718573.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-05
- Publication Date
- 2024-09-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing image enhancement methods enhance the overall image, causing dark details to be compressed within a small grayscale range, resulting in insignificant enhancement effects in blood vessel areas.
By acquiring grayscale images of cardiovascular and cerebrovascular tissues, perform binary analysis and mask processing, extract connected domains and skeletons, calculate the likelihood coefficients of skeleton pixels, determine regional probabilities based on the morphological distribution of connected domains, and automatically Adapt enhancement coefficients for image enhancement.
Effectively retain the dark details of the blood vessel area, improve the enhancement effect of the blood vessel area, and ensure the integrity of texture details.
Smart Images

Figure CN118314235B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image enhancement, and in particular to a cardiovascular and cerebrovascular intelligent imaging method and system based on image recognition. Background Art
[0002] Cardiovascular and cerebrovascular diseases are a group of diseases that occur in brain blood vessels and cause brain tissue damage due to impaired intracranial blood circulation. Ultrasound images of cardiovascular and cerebrovascular tissues can be obtained through color Doppler ultrasound to display the corresponding texture features of brain blood vessels. As a result, cardiovascular and cerebrovascular tissues will be brighter overall during the imaging process, resulting in loss of details, necessitating image enhancement of the ultrasound image.
[0003] In the related art, image enhancement is achieved based on an image enhancement algorithm. In this way, since the existing image enhancement method enhances the entire image, the dark details are still compressed within a very small grayscale range, and the dark details are lost, which leads to unclear enhancement effect in the vascular area. Summary of the invention
[0004] In order to solve the technical problem in the related art that due to the enhancement of the overall image, the dark details are still compressed within a very small grayscale range, the dark details are lost, and the vascular area enhancement effect is not obvious, the present invention provides a cardiovascular and cerebrovascular intelligent imaging method and system based on image recognition, and the technical solution adopted is as follows:
[0005] In a first aspect, the present invention proposes a cardiovascular and cerebrovascular intelligent imaging method based on image recognition, the method comprising:
[0006] Acquire a grayscale image of cardiovascular and cerebrovascular tissue, perform a binarization analysis on the grayscale image, and perform mask processing on the grayscale image according to the analysis result to obtain an image to be tested; perform a connected domain analysis and skeleton extraction on the image to be tested to determine edge pixel points and skeleton pixel points of the connected domain;
[0007] Taking any skeleton pixel point as a test point, determining the edge pixel point closest to the test point as a first analysis point, connecting the first analysis point and the test point and extending them, taking another edge pixel point closest to the test point on the extension line as a second analysis point, and determining the probability coefficient of the test point being a pixel point in the blood vessel region according to the position distribution and grayscale distribution of the test point, the first analysis point and the second analysis point;
[0008] According to the distribution of the possibility coefficients of all skeleton pixels in the same connected domain and the morphological distribution of the connected domain, the regional probability of the connected domain being a blood vessel region is determined; according to the position distribution of any two connected domains and the gradient direction of the edge pixels, all connected domains are merged to obtain a merged region; and according to the regional probability of all connected domains in each merged region, an adaptive enhancement coefficient of the merged region is determined;
[0009] Image enhancement is performed on the position corresponding to the merged area in the grayscale image according to the adaptive enhancement coefficient to obtain a target image.
[0010] Furthermore, the method for obtaining the probability coefficient that the point to be measured is a pixel point in the blood vessel region includes:
[0011] Connecting the point to be measured and the first analysis point to obtain a first line segment, and connecting the point to be measured and the second analysis point to obtain a second line segment; obtaining the grayscale similarity between the grayscale values of all pixels on the first line segment and the grayscale values of all pixels on the second line segment;
[0012] determining a length difference between the first line segment and the second line segment as a length influence coefficient;
[0013] Determine a grayscale impact index according to a grayscale difference and a gradient difference between the first analysis point and the second analysis point;
[0014] The possibility coefficient is determined according to the grayscale similarity, the length influence coefficient and the grayscale influence index, wherein the grayscale similarity is positively correlated with the possibility coefficient, the length influence coefficient and the grayscale influence index are both negatively correlated with the possibility coefficient, and the value of the possibility coefficient is a normalized value.
[0015] Furthermore, the method for obtaining the grayscale impact index includes:
[0016] Normalize the absolute value of the grayscale value difference between the first analysis point and the second analysis point as a grayscale variation coefficient;
[0017] Normalize the absolute value of the difference between the gradient amplitudes of the first analysis point and the second analysis point as a gradient change coefficient;
[0018] A grayscale influence index is determined according to the grayscale variation coefficient and the gradient variation coefficient, wherein both the grayscale variation coefficient and the gradient variation coefficient are positively correlated with the grayscale influence index.
[0019] Furthermore, the method for obtaining the region probability that the connected domain is a blood vessel region includes:
[0020] Normalizing the negative number of the variance of the likelihood coefficients of all skeleton pixels in the connected domain as a variance index;
[0021] The product of the mean value and the variance index of the possibility coefficients of all skeleton pixels in the connected domain is used as the possibility distribution index;
[0022] Obtaining a minimum bounding rectangle of the connected domain, and using the aspect ratio of the minimum bounding rectangle as a connected domain morphology indicator;
[0023] The regional probability that the connected domain is a blood vessel region is determined according to the possibility distribution index and the connected domain morphology index, wherein both the possibility distribution index and the connected domain morphology index are positively correlated with the regional probability, and the value of the regional probability is a normalized value.
[0024] Furthermore, the method for obtaining the merged area includes:
[0025] Determine the distance between the two closest edge pixels in two connected domains as the merging distance;
[0026] The angle between the gradient direction of the edge pixel points of each connected domain and the preset horizontal direction is taken as the gradient angle value of the corresponding gradient direction, the gradient angle values of all edge pixel points of each connected domain are averaged as the mean gradient angle, the direction corresponding to the mean gradient angle is taken as the regional change direction of the connected domain, and the cosine value of the angle between the two regional change directions is taken as the gradient change index;
[0027] Determine a merging probability according to the merging distance and the gradient change index; wherein the merging distance is negatively correlated with the merging probability, the gradient change index is positively correlated with the merging probability, and the value of the merging probability is a normalized value;
[0028] According to the merging probability, it is determined whether two connected domains are to be merged, and all connected domains are traversed to obtain a merged region.
[0029] Further, judging whether to merge two connected domains according to the merging probability includes:
[0030] When the merging probability is greater than a preset probability threshold, merging the corresponding two connected domains;
[0031] When the merging probability is less than or equal to a preset probability threshold, it is determined that the corresponding two connected domains are not to be merged.
[0032] Furthermore, determining the adaptive enhancement coefficient of each merged region according to the region probabilities of all connected regions in the merged region includes:
[0033] The average of the region probabilities of all connected regions in each merged region is negatively correlated and normalized as the adaptive enhancement coefficient of the merged region.
[0034] Further, performing image enhancement on a position corresponding to the merged area in the grayscale image according to the adaptive enhancement coefficient to obtain a target image includes:
[0035] Linear enhancement is performed on pixel points at all positions corresponding to the merged area in the grayscale image according to the adaptive enhancement coefficient, and all merged areas are traversed to obtain a target image.
[0036] Furthermore, the method for acquiring the image to be tested includes:
[0037] Binarizing the grayscale image based on a maximum inter-class variance algorithm to obtain a binary image;
[0038] Using the binary image as a mask of the grayscale image, calculating the product of each pixel in the grayscale image and the pixel at the same position in the binary image as the grayscale value of the pixel at the same position of the image to be tested;
[0039] Traverse all pixel positions to obtain the image to be tested.
[0040] In a second aspect, the present invention also provides a cardiovascular and cerebrovascular intelligent imaging system based on image recognition, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the steps of a cardiovascular and cerebrovascular intelligent imaging method based on image recognition as described in any one of the foregoing items are implemented.
[0041] The present invention has the following beneficial effects:
[0042] The present invention uses the fact that cardiovascular and cerebrovascular tissues will be brighter overall during imaging, which will lead to loss of dark details, but the existing image enhancement algorithm will enhance the overall image, resulting in the problem that the enhancement effect of the vascular area is not obvious. By combining the grayscale distribution and gradient distribution of pixels in the image, adaptive image enhancement is achieved to improve the cardiovascular and cerebrovascular intelligent imaging effect and ensure that the texture details of the vascular area can be effectively retained. First, the present invention eliminates the highlight tissue background and retains the dark details through binary analysis and setting a mask, thereby reducing the interference of high grayscale value texture on image enhancement; through connected domain analysis and skeleton extraction, it is convenient to perform specific analysis on the grayscale distribution and morphology of the connected domain in the subsequent process; determine the probability coefficient of the skeleton pixel point being a pixel point in the vascular region, which is a combination of the position of the skeleton pixel point in the connected domain itself and the grayscale of the connected domain, so as to accurately perform similarity analysis with the skeleton features of the vascular region, and combine the distribution of the probability coefficient and the morphological distribution of the connected domain to determine the regional probability that the connected domain is a vascular region. Then, the regional probability can effectively characterize the similarity between the corresponding connected domain and the normal vascular region in morphology, grayscale and skeleton, and has stronger accuracy and reliability. The regions are first merged through the regional probability to determine the complete vascular region, and then, the adaptive enhancement coefficient is determined for the regional probability, and image enhancement is achieved according to the adaptive enhancement coefficient to obtain the target image. In summary, the present invention can effectively perform adaptive image enhancement on the vascular region, completely retain the dark details, and improve the enhancement effect of the vascular region. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] 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.
[0044] Figure 1 A flowchart of a cardiovascular and cerebrovascular intelligent imaging method based on image recognition provided by an embodiment of the present invention;
[0045] Figure 2 A schematic diagram of a grayscale image provided by an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of a binary image provided by an embodiment of the present invention;
[0047] Figure 4 A schematic diagram of a target image provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0048] 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, structure, features and effects of a cardiovascular and cerebrovascular intelligent imaging method and system based on image recognition 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.
[0049] 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.
[0050] The following is a detailed description of a specific scheme of a cardiovascular and cerebrovascular intelligent imaging method based on image recognition provided by the present invention in conjunction with the accompanying drawings.
[0051] See also Figure 1 , which shows a flow chart of a cardiovascular and cerebrovascular intelligent imaging method based on image recognition provided by an embodiment of the present invention, the method comprising:
[0052] S101: Acquire a grayscale image of cardiovascular tissue, perform binarization analysis on the grayscale image, and perform mask processing on the grayscale image according to the analysis result to obtain an image to be tested; perform connected domain analysis and skeleton extraction on the image to be tested to determine edge pixel points and skeleton pixel points of the connected domain.
[0053] A specific implementation scenario of the present invention is to perform imaging examination on cardiovascular tissue. It should be noted that cardiovascular imaging can be performed in a variety of imaging modes. The embodiment of the present invention performs imaging analysis in the form of color Doppler ultrasound. The original image containing cardiovascular tissue is obtained through the corresponding detection equipment, and then the image is preprocessed to obtain a grayscale image. Figure 2 , Figure 2 A schematic diagram of a grayscale image provided by an embodiment of the present invention.
[0054] The image preprocessing method in the embodiment of the present invention includes preprocessing means such as image denoising, image grayscale processing and semantic segmentation, among which the image denoising method is mean denoising, and the image grayscale processing method is mean grayscale processing. Of course, in other embodiments of the present invention, the technical means used for preprocessing can also be adjusted according to needs to meet the actual usage scenarios, and no further elaboration or limitation is made on this.
[0055] Since the acquired grayscale image has many interference factors, such as the interference of tissue fluid outside the cardiovascular and cerebrovascular systems on imaging, the overall imaging is brighter and the imaging details are not clear. Therefore, the embodiment of the present invention needs to identify the cardiovascular and cerebrovascular areas and perform image enhancement to improve the display effect of the imaging details.
[0056] The embodiment of the present invention can perform binarization analysis on the grayscale image, and perform mask processing on the grayscale image according to the analysis result to obtain the image to be tested.
[0057] Furthermore, in some embodiments of the present invention, a method for acquiring an image to be tested includes: binarizing a grayscale image based on a maximum inter-class variance algorithm to obtain a binary image; using the binary image as a mask for the grayscale image, calculating the product of each pixel in the grayscale image and the pixel at the same position in the binary image as the grayscale value of the pixel at the same position of the image to be tested; and traversing all pixel positions to obtain the image to be tested.
[0058] Among them, the maximum inter-class variance method is a threshold analysis algorithm well known in the art. The grayscale threshold of the grayscale image is determined by the maximum inter-class variance method, and then the pixels greater than the grayscale threshold are marked as 0, and the pixels less than or equal to the grayscale threshold are marked as 1, thereby obtaining a binary image, which is used to retain the dark information in the grayscale image according to the binary image, such as Figure 3 As shown, Figure 3 A schematic diagram of a binary image provided by an embodiment of the present invention, combined with Figure 3 It can be seen that the texture features of blood vessels are effectively extracted.
[0059] In an embodiment of the present invention, the mark value of the pixel point at the same position in the binary image is multiplied by the grayscale value of the grayscale image to obtain the grayscale value of the pixel point at the same position in the image to be tested. As a result, the obtained image to be tested only contains the texture of the pixel point with a lower grayscale value, that is, the dark details, thereby reducing the influence of the high grayscale value texture.
[0060] After determining the image to be tested, the present invention can perform connected domain analysis and skeleton extraction on the image to be tested, wherein the connected domain analysis obtains the connected domain in the image to be tested, and edge detection is performed on the connected domain to obtain edge pixel points of the connected domain. The process is a calculation process well known to those skilled in the art and will not be further limited or elaborated on.
[0061] Among them, skeleton extraction is to perform morphological analysis on the connected domain based on the skeleton extraction algorithm to obtain the skeleton of the connected domain, and use the pixel points corresponding to the skeleton position as the skeleton pixel points. The skeleton extraction algorithm is an irreversible algorithm of open operation, and its specific process is a technology well known to technical personnel in this field, which will not be repeated here.
[0062] S102: Take any skeleton pixel point as the test point, determine the edge pixel point closest to the test point as the first analysis point, connect the first analysis point and the test point and extend them, take another edge pixel point on the extension line closest to the test point as the second analysis point, and determine the probability coefficient of the test point being a pixel point in the blood vessel area based on the position distribution and grayscale distribution of the test point, the first analysis point, and the second analysis point.
[0063] In the embodiment of the present invention, any skeleton pixel point can be used as a point to be tested, and the distribution of edge points of the connected domain around the pixel point to be tested can be specifically analyzed.
[0064] In an embodiment of the present invention, a first analysis point and a second analysis point are determined, wherein the first analysis point is an edge pixel point that is closest to the point to be measured. Since the pixel to be measured is a skeleton pixel point of a connected domain, and the first analysis point is an edge pixel point of the connected domain, the line connecting the pixel to be measured and the edge pixel point can characterize the distribution characteristics of the connected domain in which the pixel to be measured is located. The first analysis point and the point to be measured are connected and extended, and another edge pixel point on the extension line that is closest to the point to be measured is used as the second analysis point. The pixel to be measured can then be specifically analyzed based on the first analysis point and the second analysis point.
[0065] Further, in some embodiments of the present invention, the possibility coefficient of the test point being a pixel point in the blood vessel area is determined based on the position distribution and grayscale distribution of the test point, the first analysis point, and the second analysis point, including: connecting the test point and the first analysis point to obtain a first line segment, and connecting the test point and the second analysis point to obtain a second line segment; obtaining the grayscale values of all pixels in the first line segment and the grayscale similarity of all pixels on the second line segment; determining the length difference between the first line segment and the second line segment as the length influence coefficient; determining the grayscale influence index based on the grayscale difference and gradient difference between the first analysis point and the second analysis point; determining the possibility coefficient based on the grayscale similarity, the length influence coefficient, and the grayscale influence index, wherein the grayscale similarity is positively correlated with the possibility coefficient, the length influence coefficient and the grayscale influence index are both negatively correlated with the possibility coefficient, and the value of the possibility coefficient is a normalized value.
[0066] Since the grayscale of the blood vessel area is obviously different from that of the outside world at the blood vessel wall, there are gradient mutations at the closer positions on both sides of the blood vessel, and the change rules on both sides are consistent. The possibility coefficient is calculated based on this feature.
[0067] It should be noted that the grayscale similarity between the grayscale values of all pixels on the first line segment and the grayscale values of all pixels on the second line segment is obtained by, for example, calculating the grayscale value sum of all pixels on the first line segment and the grayscale value sum of all pixels on the second line segment, and normalizing the absolute value of the difference between the two grayscale values to obtain the grayscale similarity. Alternatively, the grayscale values of all pixels on the first line segment may be taken as a sequence, and the grayscale values of all pixels on the second line segment may be taken as a sequence, and the similarity of the two sequences may be calculated based on the DTW algorithm. It should be noted that the grayscale similarity characterizes the similarity of the grayscale distribution on the two line segments, and the calculation method thereof is well known to those skilled in the art, and the specific calculation process of the grayscale similarity will not be further described.
[0068] Among them, a positive correlation means that the dependent variable will increase as the independent variable increases, and the dependent variable will decrease as the independent variable decreases. The specific relationship can be a multiplication relationship, an addition relationship, or the power of an exponential function, which is determined by actual application; a negative correlation means that the dependent variable will decrease as the independent variable increases, and the dependent variable will increase as the independent variable decreases. It can be a subtraction relationship, a division relationship, etc., which is determined by actual application.
[0069] In one embodiment of the present invention, the normalization process is the maximum and minimum value normalization process, and the normalization in the subsequent steps can adopt the maximum and minimum value normalization process. In other embodiments of the present invention, other normalization methods can be selected according to the specific range of values, which will not be described in detail.
[0070] Among them, the length influence coefficient is the difference characteristic in length between the first line segment and the second line segment. Since the skeleton pixel point obtained by the skeleton analysis is the pixel point in the center of the connected domain, under the texture distribution of normal blood vessels, its skeleton is located in the central area of the blood vessel, and the length of the first line segment is the same as that of the second line segment. When the length of the first line segment is significantly different from that of the second line segment, that is, when the value of the length influence coefficient is larger, it can be characterized as less consistent with the morphological distribution characteristics of normal blood vessels.
[0071] The higher the similarity between the first analysis point and the second analysis point in grayscale and gradient, the more consistent with the morphological distribution characteristics of normal blood vessels. Further, in some embodiments of the present invention, the grayscale influence index is determined according to the grayscale difference and gradient difference between the first analysis point and the second analysis point, including: normalizing the absolute value of the grayscale value difference between the first analysis point and the second analysis point as the grayscale change coefficient; normalizing the absolute value of the gradient amplitude difference between the first analysis point and the second analysis point as the gradient change coefficient; determining the grayscale influence index according to the grayscale change coefficient and the gradient change coefficient, wherein the grayscale change coefficient and the gradient change coefficient are both positively correlated with the grayscale influence index.
[0072] In the embodiment of the present invention, since the grayscale values and gradient amplitudes of the first analysis point and the second analysis point under normal circumstances have great similarity, the grayscale variation coefficient is obtained by calculating the absolute value of the grayscale value difference, and the gradient variation coefficient is obtained by calculating the absolute value of the gradient amplitude difference. That is, the smaller the values of the grayscale variation coefficient and the gradient variation coefficient are, the more consistent with the normal texture distribution they are. Therefore, the present invention can calculate the product of the grayscale variation coefficient and the gradient variation coefficient as a grayscale influence index, and the smaller the value of the grayscale influence index is, the more consistent with the grayscale distribution characteristics of normal blood vessels.
[0073] The embodiment of the present invention determines the possibility coefficient according to the grayscale similarity, the length influence coefficient and the grayscale influence index, wherein the grayscale similarity is positively correlated with the possibility coefficient, the length influence coefficient and the grayscale influence index are both negatively correlated with the possibility coefficient, and the value of the possibility coefficient is a normalized value.
[0074] The possibility coefficient is specifically analyzed. In the embodiment of the present invention, the possibility coefficient is a possibility index of the point to be measured being a pixel point in the blood vessel region. That is, the larger the possibility coefficient is, the more likely the point to be measured is a pixel point in the blood vessel region.
[0075] Among them, when the value of the length influence coefficient is large, it can be represented that the corresponding morphological distribution characteristics are less consistent with normal blood vessels, and the smaller the value of the grayscale influence index is, the more consistent with the grayscale distribution characteristics of normal blood vessels, that is, the length influence coefficient and the grayscale influence index are negatively correlated with the possibility coefficient; and the grayscale similarity represents the grayscale similarity of the pixels on the first line segment and the second line segment. Therefore, the grayscale similarity is positively correlated with the possibility coefficient.
[0076] For example, an embodiment of the present invention can calculate the product of the length influence coefficient and the grayscale influence index, and multiply the inverse of the product by the grayscale similarity, and then use the maximum and minimum value normalization method to determine the possibility coefficient, or it can also calculate the sum of the length influence coefficient and the grayscale influence index, and multiply the negative of the sum by the grayscale similarity, and normalize to obtain the possibility coefficient, and there is no limitation on this.
[0077] S103: Determine the regional probability that the connected domain is a vascular region based on the distribution of the possibility coefficients of all skeleton pixels in the same connected domain and the morphological distribution of the connected domain; merge all connected domains based on the position distribution of any two connected domains and the gradient direction of the edge pixels to obtain a merged region; and determine the adaptive enhancement coefficient of the merged region based on the regional probability of all connected domains in each merged region.
[0078] The region probability is a possibility indicator that the connected domain is a blood vessel region. Therefore, the present invention can perform an overall analysis on all skeleton pixels in the connected domain.
[0079] Furthermore, in some embodiments of the present invention, the negative of the variance of the likelihood coefficients of all skeleton pixel points in a connected domain is normalized as a variance index; the product of the mean of the likelihood coefficients of all skeleton pixel points in a connected domain and the variance index is used as a possibility distribution index; the minimum circumscribed rectangle of the connected domain is obtained, and the aspect ratio of the minimum circumscribed rectangle is used as a connected domain morphological index; the regional probability that the connected domain is a vascular region is determined based on the possibility distribution index and the connected domain morphological index, wherein both the possibility distribution index and the connected domain morphological index are positively correlated with the regional probability, and the value of the regional probability is the normalized value.
[0080] Among them, the variance index represents the stability of the numerical distribution, and the product of the mean and variance index represents the overall numerical and distribution characteristics. The larger the value of the possibility distribution index is, the more the morphology and grayscale distribution of the corresponding connected domain conform to the characteristics of the normal vascular area.
[0081] Among them, the minimum circumscribed rectangle is a feature analysis corresponding to the characterization morphology. It can be understood that since the blood vessel area usually presents a slender feature, the present invention calculates the aspect ratio of the minimum circumscribed rectangle. The larger the value of the aspect ratio, that is, the larger the value of the connected domain morphological index, the more the morphological distribution of the blood vessel area conforms to the slender feature.
[0082] According to the above analysis, the embodiment of the present invention can combine the possibility distribution index and the connected domain morphology index to determine the regional probability that the connected domain is a vascular region; since the larger the value of the possibility distribution index, the more the morphology and grayscale distribution of the corresponding connected domain conform to the characteristics of the normal vascular region, and the larger the value of the connected domain morphology index, the more the morphological distribution of the vascular region conforms to the slender characteristics, therefore, in the embodiment of the present invention, the possibility distribution index and the connected domain morphology index are both positively correlated with the regional probability, and the product of the possibility distribution index and the connected domain morphology index can be calculated and normalized to obtain the regional probability, and there is no restriction on this.
[0083] According to the position distribution of any two connected domains and the gradient direction of the edge pixels, all connected domains are merged to obtain a merged area, wherein the distance between the two closest edge pixels in the two connected domains is determined as the merge distance; the angle between the gradient direction of the edge pixels of each connected domain and the preset horizontal direction is used as the gradient angle value of the corresponding gradient direction, the gradient angle values of all edge pixels of each connected domain are averaged as the mean gradient angle, the direction corresponding to the mean gradient angle is used as the regional change direction of the connected domain, and the cosine value of the angle between the two regional change directions is used as the gradient change index; the merge probability is determined according to the merge distance and the gradient change index; wherein the merge distance is negatively correlated with the merge probability, the gradient change index is positively correlated with the merge probability, and the merge probability is taken as the normalized value; according to the merge probability, it is determined whether the two connected domains are merged, and all connected domains are traversed to obtain the merged area.
[0084] Among them, the preset horizontal direction is the direction corresponding to the preset horizontal line. In order to calculate the direction, it is converted into an angle dimension, and the average value of all directions is expressed in the angle dimension, so as to realize the analysis of the direction of regional change. It can be understood that since the direction has two-sided meanings, the clockwise direction can be used as the positive direction and the counterclockwise direction can be used as the negative direction. The corresponding angles are divided into positive and negative. When the angles are averaged, the positive and negative of the final angle are used to reflect the relationship with the preset horizontal direction.
[0085] Of course, in other embodiments of the present invention, each gradient direction may be assigned a unit value of 1, thereby forming a vector with a unit value of 1 and a direction corresponding to the gradient direction, summing all vectors, and taking the direction corresponding to the sum as the direction of regional change.
[0086] In the embodiment of the present invention, the ratio of the gradient change index to the merging distance may be calculated, and the maximum and minimum values may be normalized to obtain the merging probability.
[0087] After obtaining the merging probability, the embodiments of the present invention may merge the connected domains according to the merging probability. Furthermore, in some embodiments of the present invention, it is determined whether two connected domains are to be merged according to the merging probability, including: when the merging probability is greater than a preset probability threshold, merging the corresponding two connected domains; when the merging probability is less than or equal to the preset probability threshold, determining that the corresponding two connected domains are not to be merged.
[0088] Among them, the preset probability threshold is the threshold value of the merging probability. The preset probability threshold in the embodiment of the present invention is 0.8. That is to say, when the merging probability is greater than 0.8, it indicates that the two connected domains are close in distance and have similar shapes and grayscale distributions. Therefore, the corresponding connected domains are merged, all connected domains are traversed, and all connected domains are merged and analyzed to obtain the merged area.
[0089] Furthermore, in some embodiments of the present invention, an adaptive enhancement coefficient of the merged region is determined based on the region probabilities of all connected regions in each merged region, including: negatively correlating and normalizing the mean of the region probabilities of all connected regions in each merged region as the adaptive enhancement coefficient of the merged region.
[0090] It is understandable that since the overall image is bright, the vascular area needs to be dimmed so that the dark details of the vascular area can be more effectively displayed. Therefore, in the embodiment of the present invention, when the vascular area is more obvious, its enhancement coefficient can be reduced accordingly, so that the grayscale of its pixels becomes lower, and the overall image of the vascular area is darkened to distinguish it from the tissue area.
[0091] The embodiment of the present invention calculates the mean of the regional probabilities of all connected domains in the merged area, negatively maps and normalizes them as the adaptive enhancement coefficient of the merged area, thereby determining the adaptive enhancement coefficient of each merged area, so as to implement image enhancement processing according to the adaptive enhancement coefficient.
[0092] S104: performing image enhancement on the position corresponding to the merged area in the grayscale image according to the adaptive enhancement coefficient to obtain a target image.
[0093] Furthermore, in some embodiments of the present invention, image enhancement is performed on positions corresponding to the merged areas in the grayscale image according to the adaptive enhancement coefficient to obtain a target image, including: linearly enhancing pixel points at all positions corresponding to the merged areas in the grayscale image according to the adaptive enhancement coefficient, traversing all merged areas, and obtaining the target image.
[0094] In an embodiment of the present invention, image enhancement can be achieved by using a linear transformation, wherein the corresponding pixel point is multiplied by the adaptive enhancement coefficient of the merged area in which it is located, and is mapped within the complete grayscale range to obtain a processed grayscale value, thereby processing all pixel points in all merged areas to obtain a target image.
[0095] Of course, in other embodiments of the present invention, other possible image enhancement algorithms may be combined to use the adaptive enhancement coefficient as the image enhancement coefficient of the corresponding merged area, thereby achieving image enhancement and obtaining the target image. Figure 4 , Figure 4 A schematic diagram of a target image provided by an embodiment of the present invention, comprising Figure 4 It can be seen that the target image obtained by processing according to the embodiment of the present invention has more obvious dark details and a stronger overall display effect.
[0096] The present invention uses the fact that cardiovascular and cerebrovascular tissues will be brighter overall during imaging, which will lead to loss of dark details, but the existing image enhancement algorithm will enhance the overall image, resulting in the problem that the enhancement effect of the vascular area is not obvious. By combining the grayscale distribution and gradient distribution of pixels in the image, adaptive image enhancement is achieved to improve the cardiovascular and cerebrovascular intelligent imaging effect and ensure that the texture details of the vascular area can be effectively retained. First, the present invention eliminates the highlight tissue background and retains the dark details through binary analysis and setting a mask, thereby reducing the interference of high grayscale value texture on image enhancement; through connected domain analysis and skeleton extraction, it is convenient to perform specific analysis on the grayscale distribution and morphology of the connected domain in the subsequent process; determine the probability coefficient of the skeleton pixel point being a pixel point in the vascular region, which is a combination of the position of the skeleton pixel point in the connected domain itself and the grayscale of the connected domain, so as to accurately perform similarity analysis with the skeleton features of the vascular region, and combine the distribution of the probability coefficient and the morphological distribution of the connected domain to determine the regional probability that the connected domain is a vascular region. Then, the regional probability can effectively characterize the similarity between the corresponding connected domain and the normal vascular region in morphology, grayscale and skeleton, and has stronger accuracy and reliability. The regions are first merged through the regional probability to determine the complete vascular region, and then, the adaptive enhancement coefficient is determined for the regional probability, and image enhancement is achieved according to the adaptive enhancement coefficient to obtain the target image. In summary, the present invention can effectively perform adaptive image enhancement on the vascular region, completely retain the dark details, and improve the enhancement effect of the vascular region.
[0097] An embodiment of the present invention also proposes a cardiovascular and cerebrovascular intelligent imaging system based on image recognition. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the aforementioned cardiovascular and cerebrovascular intelligent imaging method based on image recognition are implemented.
[0098] 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.
[0099] 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 cardiovascular and cerebrovascular intelligent imaging method based on image recognition, It is characterized in that The method comprises: Acquire a grayscale image of cardiovascular and cerebrovascular tissue, perform a binarization analysis on the grayscale image, and perform mask processing on the grayscale image according to the analysis result to obtain an image to be tested; perform a connected domain analysis and skeleton extraction on the image to be tested to determine edge pixel points and skeleton pixel points of the connected domain; Taking any skeleton pixel point as a test point, determining the edge pixel point closest to the test point as a first analysis point, connecting the first analysis point and the test point and extending them, taking another edge pixel point closest to the test point on the extension line as a second analysis point, and determining the probability coefficient of the test point being a pixel point in the blood vessel region according to the position distribution and grayscale distribution of the test point, the first analysis point and the second analysis point; According to the distribution of the possibility coefficients of all skeleton pixels in the same connected domain and the morphological distribution of the connected domain, the regional probability of the connected domain being a blood vessel region is determined; according to the position distribution of any two connected domains and the gradient direction of the edge pixels, all connected domains are merged to obtain a merged region; and according to the regional probability of all connected domains in each merged region, an adaptive enhancement coefficient of the merged region is determined; According to the adaptive enhancement coefficient, image enhancement is performed on the position corresponding to the merged area in the grayscale image to obtain a target image; The method for obtaining the probability coefficient of the point to be measured being a pixel point in the blood vessel region comprises: Connecting the point to be measured and the first analysis point to obtain a first line segment, and connecting the point to be measured and the second analysis point to obtain a second line segment; obtaining the grayscale similarity between the grayscale values of all pixels on the first line segment and the grayscale values of all pixels on the second line segment; determining a length difference between the first line segment and the second line segment as a length influence coefficient; Determine a grayscale impact index according to a grayscale difference and a gradient difference between the first analysis point and the second analysis point; Determine the possibility coefficient according to the grayscale similarity, the length influence coefficient and the grayscale influence index, wherein the grayscale similarity is positively correlated with the possibility coefficient, the length influence coefficient and the grayscale influence index are both negatively correlated with the possibility coefficient, and the value of the possibility coefficient is a normalized value; The step of determining the adaptive enhancement coefficient of each merged region according to the region probabilities of all connected regions in each merged region comprises: The average of the region probabilities of all connected regions in each merged region is negatively correlated and normalized as the adaptive enhancement coefficient of the merged region.
2. The method for intelligent cardiovascular and cerebrovascular imaging based on image recognition as claimed in claim 1, It is characterized in that The method for obtaining the grayscale impact index includes: Normalize the absolute value of the grayscale value difference between the first analysis point and the second analysis point as a grayscale variation coefficient; Normalize the absolute value of the difference between the gradient amplitudes of the first analysis point and the second analysis point as a gradient change coefficient; A grayscale influence index is determined according to the grayscale variation coefficient and the gradient variation coefficient, wherein both the grayscale variation coefficient and the gradient variation coefficient are positively correlated with the grayscale influence index.
3. The method for intelligent cardiovascular and cerebrovascular imaging based on image recognition as claimed in claim 1, It is characterized in that The method for obtaining the region probability that the connected domain is a blood vessel region includes: Normalizing the negative number of the variance of the likelihood coefficients of all skeleton pixels in the connected domain as a variance index; The product of the mean value and the variance index of the possibility coefficients of all skeleton pixels in the connected domain is used as the possibility distribution index; Obtaining a minimum bounding rectangle of the connected domain, and using the aspect ratio of the minimum bounding rectangle as a connected domain morphology indicator; The regional probability that the connected domain is a blood vessel region is determined according to the possibility distribution index and the connected domain morphology index, wherein both the possibility distribution index and the connected domain morphology index are positively correlated with the regional probability, and the value of the regional probability is a normalized value.
4. The method for intelligent cardiovascular and cerebrovascular imaging based on image recognition as claimed in claim 1, It is characterized in that The method for obtaining the merged area includes: Determine the distance between the two closest edge pixels in two connected domains as the merging distance; The angle between the gradient direction of the edge pixel points of each connected domain and the preset horizontal direction is taken as the gradient angle value of the corresponding gradient direction, the gradient angle values of all edge pixel points of each connected domain are averaged as the mean gradient angle, the direction corresponding to the mean gradient angle is taken as the regional change direction of the connected domain, and the cosine value of the angle between the two regional change directions is taken as the gradient change index; Determine a merging probability according to the merging distance and the gradient change index; wherein the merging distance is negatively correlated with the merging probability, the gradient change index is positively correlated with the merging probability, and the value of the merging probability is a normalized value; According to the merging probability, it is determined whether two connected domains are to be merged, and all connected domains are traversed to obtain a merged region.
5. The method for intelligent cardiovascular and cerebrovascular imaging based on image recognition as claimed in claim 4, It is characterized in that The step of judging whether to merge two connected domains according to the merging probability includes: When the merging probability is greater than a preset probability threshold, merging the corresponding two connected domains; When the merging probability is less than or equal to a preset probability threshold, it is determined that the corresponding two connected domains are not to be merged.
6. The method for intelligent cardiovascular and cerebrovascular imaging based on image recognition as claimed in claim 1, It is characterized in that The step of performing image enhancement on a position corresponding to the merged area in the grayscale image according to the adaptive enhancement coefficient to obtain a target image includes: Linear enhancement is performed on pixel points at all positions corresponding to the merged area in the grayscale image according to the adaptive enhancement coefficient, and all merged areas are traversed to obtain a target image.
7. The method for intelligent cardiovascular and cerebrovascular imaging based on image recognition as claimed in claim 1, It is characterized in that The method for acquiring the image to be tested comprises: Binarizing the grayscale image based on a maximum inter-class variance algorithm to obtain a binary image; Using the binary image as a mask of the grayscale image, calculating the product of each pixel in the grayscale image and the pixel at the same position in the binary image as the grayscale value of the pixel at the same position of the image to be tested; Traverse all pixel positions to obtain the image to be tested.
8. A cardiovascular and cerebrovascular intelligent imaging system based on image recognition, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
