A method for enhancing blood vessels in endoscopic images

By dividing the endoscopic vascular image into local image blocks and calculating the adaptive enhancement coefficient, the problem of poor overall enhancement effect of the vascular image due to the influence of illumination in the existing technology is solved, and better clarity of the vascular structure is achieved.

CN118297865BActive Publication Date: 2024-09-13LIAONING ANYAN MEDICAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410719430.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-13
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

When the existing technology linearly enhances the overall image of blood vessel images collected by endoscopes, it cannot effectively handle the uneven brightness caused by different areas being affected by illumination, resulting in poor enhancement effects in some areas and insufficient clarity of the blood vessel structure.

Method used

Divide the blood vessel image into local image blocks, calculate the reference brightness value based on the gray value difference between each local image block and the whole, determine the initial enhancement coefficient, and calculate the final enhancement coefficient through the gray texture similarity and position relationship, for each Adaptive image enhancement of local image patches.

Benefits of technology

By adaptively adjusting the enhancement coefficient of each local image block, the overall enhancement effect of the blood vessel image is improved, making the blood vessel structure clearer and more obvious.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118297865B
    Figure CN118297865B
Patent Text Reader

Abstract

The present invention relates to the technical field of image enhancement, and in particular to an endoscopic image blood vessel enhancement method. The method first divides a blood vessel image under an endoscope into blocks, obtains an initial enhancement coefficient of each local image block according to the overall grayscale value difference between the local image block and the overall blood vessel image; obtains a final enhancement coefficient according to the grayscale texture similarity between the local image block and an adjacent local image block in combination with the corresponding position; and then performs adaptive image enhancement on the blood vessel image according to the corresponding final enhancement coefficient of each local image block, so that the enhancement effect of the obtained blood vessel enhanced image is better.
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 for enhancing blood vessels in an endoscopic image. Background Art

[0002] Endoscope is a medical examination tool. After the endoscope lens is introduced into the vascular system, the internal structure of the blood vessels can be directly observed. Therefore, the vascular images observed by the endoscope are usually used for medical teaching. Due to the influence of factors such as the vascular image acquisition environment and acquisition equipment, the brightness of the vascular images acquired by the endoscope is poor, which makes the clarity of important vascular features in the vascular images poor. Therefore, it is necessary to enhance the acquired vascular images to make the vascular features in the vascular images clearer.

[0003] Considering that the reason why the clarity of important vascular features in the collected vascular image is poor is the brightness of the vascular image, the existing technology usually performs linear enhancement on the entire vascular image to obtain an enhanced vascular enhanced image. However, the vascular part usually has complex folds and concave-convex structures, so that the vascular images in different areas of the collected vascular image are affected by light differently, that is, the brightness is different, resulting in poor image enhancement effect on some image areas with poor brightness when the existing technology is used to perform linear enhancement on the entire vascular image, resulting in poor enhancement effect of the obtained vascular enhanced image. Summary of the invention

[0004] In order to solve the technical problem that when the prior art performs linear image enhancement on the entire vascular image, the image enhancement effect on the image area with poor brightness is poor, so that the enhancement effect of the obtained vascular enhanced image is poor, the purpose of the present invention is to provide an endoscopic image vascular enhancement method, and the technical solution adopted is as follows:

[0005] The present invention proposes a method for enhancing blood vessels in an endoscopic image, the method comprising:

[0006] Acquire a blood vessel image under an endoscope; divide the blood vessel image into at least two local image blocks;

[0007] According to the overall gray value difference between each local image block and the blood vessel image, a reference brightness value of each local image block is obtained; the local image block with the largest reference brightness value is used as a reference block; according to the reference brightness value difference between the reference block and each local image block, an initial enhancement coefficient of each local image block is obtained;

[0008] Obtaining a final enhancement coefficient for each local image block according to the grayscale texture similarity between each local image block and an adjacent local image block, the initial enhancement coefficient, and the relative position to the reference block;

[0009] Image enhancement is performed on each local image block in the blood vessel image according to the final enhancement coefficient to obtain a blood vessel enhanced image.

[0010] Furthermore, the method for obtaining the reference brightness value includes:

[0011] The grayscale value average of all pixels in the blood vessel image is used as the overall grayscale average; the grayscale value average of all pixels in each local image block is used as the local grayscale average of each local image block;

[0012] The difference between the local grayscale mean and the overall grayscale mean, and the ratio of the overall grayscale mean, are used as the reference brightness value of each local image block.

[0013] Furthermore, the calculation method of the initial enhancement coefficient includes:

[0014]

[0015] in, For the The initial enhancement coefficient of a local image block; Base block The preset baseline enhancement factor of Base block The reference brightness value of For the The reference brightness value of a local image block.

[0016] Furthermore, the method for obtaining the final enhancement coefficient includes:

[0017] Each local image block is regarded as a node; nodes corresponding to local image blocks within a preset neighborhood range of the local image block corresponding to each node are regarded as neighboring nodes of each node;

[0018] The node corresponding to the reference block is used as the starting traversal node for breadth-first traversal, and the unvisited nodes among all the neighboring nodes of the starting traversal node are used as new traversal nodes to continue traversing until there are no unvisited nodes, and the number of traversal layers corresponding to the nodes corresponding to each local image block is obtained;

[0019] Using the preset benchmark enhancement coefficient as the final enhancement coefficient of the benchmark block;

[0020] In order of traversal levels from low to high, the local image blocks of each new traversal node obtained after each breadth-first traversal are used as target image blocks; the local image blocks within the preset neighborhood range of the target image block in the previous traversal level of the target image block are used as neighborhood reference image blocks of the target image block;

[0021] According to the similarity of the reference brightness value between the target image block and each corresponding neighborhood reference image block, the illumination correction coefficient of each neighborhood reference image block to the target image block is obtained; according to the similarity of the grayscale distribution between the target image block and each corresponding neighborhood reference image block, the grayscale correction coefficient of each neighborhood reference image block to the target image block is obtained;

[0022] Obtaining a neighborhood enhancement coefficient of the target image block according to the grayscale correction coefficient of the target image block, the illumination correction coefficient, the final enhancement coefficient of the neighborhood reference image block in the previous traversal layer number of the target image block, and the reference brightness value difference between the target image block and the neighborhood reference image block;

[0023] The final enhancement coefficient of the target image is obtained according to the initial enhancement coefficient of the target image block, the neighborhood enhancement coefficient and the number of traversal layers corresponding to the nodes corresponding to the target image block.

[0024] Furthermore, the method for acquiring the blood vessel enhanced image includes:

[0025] The final enhancement coefficient of each local image block is used as the enhancement weight to perform image linear enhancement on the blood vessel image to obtain a blood vessel enhanced image.

[0026] Furthermore, the method for obtaining the illumination correction coefficient includes:

[0027] The difference between the reference brightness value of each neighborhood reference image block and the reference brightness value of the target image block is used as the reference illumination difference of each neighborhood reference image block; and the negative correlation mapping value of the normalized value of the reference illumination difference is used as the illumination correction coefficient of each neighborhood reference image block to the target image block.

[0028] Furthermore, the method for obtaining the grayscale correction coefficient includes:

[0029] Obtaining the grayscale histogram of the target image block and all corresponding neighborhood reference image blocks;

[0030] At each gray level, the difference between the number of pixels in the gray histogram of the target image block and the number of pixels in the neighborhood histogram of each neighborhood reference image block is used as the difference in the number of pixels between each neighborhood reference image block and the target image block at each gray level;

[0031] The accumulated sum of the differences in the number of pixels between each neighborhood reference image block and the target image block at all gray levels is used as the reference grayscale difference of each neighborhood reference image block; and the negative correlation mapping value of the normalized value of the reference grayscale difference is used as the grayscale correction coefficient of each neighborhood reference image block to the target image block.

[0032] Furthermore, the calculation formula of the neighborhood enhancement coefficient includes:

[0033]

[0034] in, The target image block Neighborhood enhancement coefficient; The target image block The number of corresponding neighborhood reference image blocks; The target image block The corresponding Grayscale correction coefficient of a neighborhood reference image block; The target image block The number of layers in the previous traversal The final enhancement coefficient of the neighborhood reference image block; The target image block The corresponding Brightness correction coefficient of a neighborhood reference image block; The target image block The corresponding The reference brightness value of the neighborhood reference image block; The target image block The reference brightness value of is the normalization function.

[0035] Furthermore, the method of obtaining the final enhancement coefficient of the target image according to the initial enhancement coefficient of the target image block, the neighborhood enhancement coefficient, and the number of traversal layers corresponding to the node corresponding to the target image block includes:

[0036] The negative correlation mapping value of the traversal layer number corresponding to the node corresponding to the target image block is used as the benchmark influence weight of the target image block; the negative correlation mapping value of the benchmark influence weight is used as the neighborhood influence weight of the target image block; the sum of the benchmark influence weight and the neighborhood influence weight is 1;

[0037] The product of the benchmark influence weight and the initial enhancement coefficient of the target image block is used as the weighted initial enhancement coefficient of the target image block; the product of the neighborhood influence weight and the neighborhood enhancement coefficient of the target image block is used as the weighted neighborhood enhancement coefficient of the target image block; and the sum of the weighted initial enhancement coefficient and the weighted neighborhood enhancement coefficient is used as the final enhancement coefficient of the target image block.

[0038] Furthermore, the method for obtaining the benchmark influence weight includes:

[0039] The inverse of the number of traversal layers corresponding to the node corresponding to the target image block is used as the benchmark influence weight of the target image block.

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

[0041] The reason why the enhancement effect of the blood vessel enhanced image obtained by performing linear image enhancement on the entire blood vessel image is poor is that the blood vessel part usually has complex folds and concave-convex structures, so that the blood vessel images in different areas of the collected blood vessel image are affected by light differently. If the same enhancement coefficient is used to perform linear image enhancement on all areas of the blood vessel image through the image linear enhancement method, due to the influence of contrast, there will be some image areas with poor brightness, and the enhancement effect will be poor, resulting in some blood vessel structures not being clear enough in the enhanced blood vessel image. Therefore, if it is possible to perform different degrees of image linear enhancement on different local image blocks according to the characteristics of different degrees of influence of light on different local image blocks in the blood vessel image, that is, adaptively adjust the enhancement coefficient of each local image block, the blood vessel image can be adaptively enhanced, so that the enhancement effect of the obtained blood vessel enhanced image is better. Therefore, the purpose of the present invention is to obtain a corresponding enhancement coefficient according to the light influence on each image area.

[0042] Since it is necessary to calculate the enhancement coefficient according to the illumination influence on different image areas, different image areas are first divided. The present invention divides the vascular image into at least two local image blocks. For the vascular image, different local image blocks may have different reference brightness values, and the reference brightness value will affect the overall grayscale value of each local image block. The larger the overall grayscale value of the local image block is relative to the overall grayscale value of the vascular image, the larger the corresponding reference brightness value is, that is, the greater the brightness is. Therefore, the present invention obtains the reference brightness value of each local image block based on the overall grayscale value difference between each local image block and the vascular image.

[0043] The larger the reference brightness value, the larger the overall grayscale value of the corresponding local image block, that is, the greater the brightness performance, and the less necessary it is for the local image block to be enhanced, that is, the smaller the enhancement coefficient; therefore, the local image block with the largest brightness value can be used as a benchmark to preliminarily calculate the enhancement coefficients of other local image blocks; the present invention uses the local image block with the largest reference brightness value as the benchmark block; that is, the smaller the necessity for enhancement of the benchmark block, the smaller the reference brightness values ​​of the remaining local image blocks are compared with the reference brightness value of the benchmark block, and the greater the degree to which the corresponding brightness needs to be enhanced, that is, the larger the enhancement coefficient, therefore, the present invention obtains the initial enhancement coefficient of each local image block according to the difference in reference brightness values ​​between the benchmark block and each local image block.

[0044] The initial enhancement coefficient is obtained based on the reference brightness value between the benchmark block and the local image block, that is, the difference in overall grayscale. The grayscale alone cannot accurately determine the degree of illumination influence, so further analysis is required based on the initial enhancement coefficient. In vascular images, the illumination influence is continuous in the region, so the final enhancement coefficients between adjacent local image blocks can refer to each other. The more similar the corresponding grayscale distribution is, the higher the credibility of the corresponding referenced neighborhood reference image block. In the vascular image, the reference block is the area with the largest reference brightness value, so the reference block often does not need to be enhanced or can be enhanced based on a preset enhancement coefficient, that is, the final enhancement coefficient of the reference block can be determined, so if the final enhancement coefficients of adjacent local image blocks are combined for mutual reference to further calculate the final enhancement coefficient, it is necessary to use the reference block as a starting point and gradually calculate the final enhancement coefficient for each local image block. Therefore, the present invention obtains the adaptive final enhancement coefficient corresponding to each local image block according to the grayscale texture similarity between each local image block and the adjacent local image blocks, the initial enhancement coefficient and the relative position with the reference block, so as to adaptively enhance the overall vascular image according to the final enhancement coefficients of each local image block in the vascular image, so that the enhancement effect of the obtained vascular enhanced image is better. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] 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.

[0046] Figure 1 A flow chart of a method for enhancing blood vessels in an endoscopic image provided by one embodiment of the present invention;

[0047] Figure 2 A schematic diagram of an endoscope image acquisition and display device provided by an embodiment of the present invention;

[0048] Figure 3 A schematic diagram of blood vessel image division provided by an embodiment of the present invention;

[0049] Figure 4 A schematic diagram of image block breadth traversal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0050] 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 an endoscopic image blood vessel enhancement method 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.

[0051] 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.

[0052] The specific scheme of the endoscopic image blood vessel enhancement method provided by the present invention is described in detail below with reference to the accompanying drawings.

[0053] See also Figure 1 , which shows a flow chart of a method for endoscopic image blood vessel enhancement provided by an embodiment of the present invention, the method comprising:

[0054] Step S1: Acquire a blood vessel image under an endoscope; divide the blood vessel image into at least two local image blocks.

[0055] An embodiment of the present invention aims to provide an endoscopic image blood vessel enhancement method, which is used to analyze the degree of illumination influence of each local image block in the blood vessel image obtained by the endoscope, obtain the final enhancement coefficient of each local image block, and then adaptively enhance the blood vessel image according to the final enhancement coefficient, so that the enhancement effect of the obtained blood vessel enhanced image is better.

[0056] Therefore, the embodiment of the present invention first obtains the vascular image under the endoscope. Specifically, the embodiment of the present invention introduces the endoscope device into the vascular system, collects the vascular image of the vascular part through the acquisition device of the endoscope device, and transmits the vascular image to the external display device for observation. Figure 2 , which shows a schematic diagram of an endoscope image acquisition and display device provided by an embodiment of the present invention. The display device displays the image acquired by the endoscope device through an electronic screen. Therefore, the embodiment of the present invention enhances the blood vessel image to be displayed on the electronic screen, so that the displayed blood vessel enhanced image is clearer.

[0057] The reason why the enhancement effect of the blood vessel enhanced image obtained by performing linear image enhancement on the entire blood vessel image is poor is that the blood vessel part usually has complex folds and concave-convex structures, so that the blood vessel images in different areas of the collected blood vessel image are affected by light differently. If the same enhancement coefficient is used to perform linear image enhancement on all areas of the blood vessel image by the image linear enhancement method, due to the influence of contrast, there will be some image areas with poor brightness, which will have poor enhancement effect, resulting in some blood vessel structures not being clear enough in the enhanced blood vessel image. Therefore, if it is possible to perform different degrees of image linear enhancement on different local image blocks according to the characteristics of different degrees of light influence on different local image blocks in the blood vessel image, that is, to adaptively adjust the enhancement coefficient of each local image block, the blood vessel image can be adaptively enhanced, so that the enhancement effect of the obtained blood vessel enhanced image is better. Therefore, the purpose of the present invention is to obtain a corresponding enhancement coefficient according to the light influence on each image area. Since it is necessary to calculate the enhancement coefficient according to the light influence on different image areas, it is necessary to divide the blood vessel image into at least two local image blocks. Due to uneven illumination, the pixels in each area of ​​the vascular image are affected differently by illumination. When the vascular image is divided into blocks, the more local image blocks are divided, the fewer pixels in a single local image block, and the less obvious the corresponding vascular texture distribution, but the more consistent the influence of relative illumination on a single local image block; conversely, the fewer local image blocks are divided, the more pixels in a single local image block, the more obvious the vascular texture distribution, but the possibility of uneven illumination is higher; therefore, when dividing the blocks, it is necessary to perform adaptive block division according to the illumination distribution of the vascular image and the distribution of blood vessels, so as to ensure that the illumination influence in each local image block is consistent while ensuring that the blood vessels in each local image block are clearly distributed. Please refer to Figure 3 , which shows a schematic diagram of blood vessel image division provided by an embodiment of the present invention. The embodiment of the present invention evenly divides the blood vessel image into 25 square local image blocks of equal size. The implementer can make adaptive adjustments according to the illumination distribution of the blood vessel image and the distribution of blood vessels according to the specific implementation environment.

[0058] Step S2: according to the overall gray value difference between each local image block and the vascular image, a reference brightness value of each local image block is obtained; the local image block with the largest reference brightness value is used as a reference block; according to the reference brightness value difference between the reference block and each local image block, an initial enhancement coefficient of each local image block is obtained.

[0059] For a vascular image, different local image blocks may have different reference brightness values, and the reference brightness value will affect the overall grayscale value of each local image block. The larger the overall grayscale value of the local image block relative to the overall grayscale value of the vascular image, the larger the corresponding reference brightness value, that is, the greater the brightness. Therefore, the embodiment of the present invention obtains the reference brightness value of each local image block according to the overall grayscale value difference between each local image block and the vascular image; the reference brightness value reflects the illumination influence on each local image block from the perspective of the overall grayscale value.

[0060] Preferably, the method for obtaining the reference brightness value includes:

[0061] The grayscale mean of all pixels in the vascular image is used as the overall grayscale mean; the grayscale mean of all pixels in each local image block is used as the local grayscale mean of each local image block; since the overall grayscale value of the local image block is larger relative to the overall grayscale value of the vascular image, the corresponding reference brightness value is larger. Therefore, the embodiment of the present invention uses the difference between the local grayscale mean and the overall grayscale mean, and the ratio of the overall grayscale mean, as the reference brightness value of each local image block; using the overall grayscale mean as the denominator can avoid the influence of different dimensions, so that the calculated reference brightness value is robust.

[0062] The larger the reference brightness value, the larger the overall grayscale value of the corresponding local image block, that is, the greater the brightness performance, and the less necessary it is to enhance the local image block, that is, the smaller the enhancement coefficient; therefore, if the reference brightness value of the local image block with the largest reference brightness value is used as a reference, the enhancement coefficient of each local image block can be fitted from the perspective of the overall grayscale value; therefore, the embodiment of the present invention takes the local image block with the largest reference brightness value as a reference block, and obtains the initial enhancement coefficient of each local image block based on the difference in reference brightness values ​​between the reference block and each local image block.

[0063] Preferably, the calculation method of the initial enhancement coefficient includes:

[0064]

[0065] in, For the The initial enhancement coefficient of a local image block; Base block The preset baseline enhancement factor of Base block The reference brightness value of For the The reference brightness value of each local image block. Since the reference brightness value of the benchmark block is the highest, the benchmark block can be considered as the local image block that least needs enhancement. A preset value is set for the enhancement coefficient of the benchmark block, and the initial enhancement coefficient of each local image block can be obtained based on the difference in reference brightness values ​​between the benchmark block and other local image blocks. In an embodiment of the present invention, the preset benchmark enhancement coefficient is set to 1, which means that the benchmark block does not need enhancement. Since the benchmark block is the local image block that least needs enhancement, the initial enhancement coefficients of the remaining local image blocks should be greater than or equal to the preset benchmark enhancement coefficient of the benchmark block. Moreover, the greater the difference in reference brightness values ​​between the benchmark block and the local image block, the smaller the reference brightness value of the corresponding local image block, the greater the necessity for enhancement, and the larger the required initial enhancement coefficient. Therefore, an embodiment of the present invention uses As a weight, the weight is further used to weight the preset benchmark enhancement coefficient, so that the initial enhancement coefficient of the local image block is always greater than the preset benchmark enhancement coefficient, while conforming to the characteristic that the greater the difference in reference brightness value between the benchmark block and the local image block, the greater the required initial enhancement coefficient.

[0066] Step S3: Obtain the final enhancement coefficient of each local image block according to the grayscale texture similarity between each local image block and adjacent local image blocks, the initial enhancement coefficient, and the relative position to the reference block.

[0067] The initial enhancement coefficient is obtained based on the reference brightness value between the benchmark block and the local image block, that is, the difference in overall grayscale. The grayscale alone cannot accurately determine the degree of illumination influence, so further analysis is required based on the initial enhancement coefficient. In vascular images, the illumination influence is continuous in the region, so the final enhancement coefficients between adjacent local image blocks can refer to each other. The more similar the corresponding grayscale distribution is, the higher the credibility of the corresponding referenced neighborhood reference image block. In the vascular image, the reference block is the area with the largest reference brightness value, so the reference block often does not need to be enhanced or can be enhanced based on a preset enhancement coefficient, that is, the final enhancement coefficient of the reference block can be determined, so if the final enhancement coefficients of adjacent local image blocks are to be combined for mutual reference to further calculate the final enhancement coefficient, it is necessary to use the reference block as the starting point and gradually calculate the final enhancement coefficient for each local image block. Therefore, the embodiment of the present invention obtains the final enhancement coefficient of each local image block according to the grayscale texture similarity between each local image block and the adjacent local image blocks, the initial enhancement coefficient and the relative position with the reference block, that is, the enhancement coefficient corresponding to the image phenomenon enhancement finally used.

[0068] Preferably, the method for obtaining the final enhancement coefficient includes:

[0069] The reference block is the local image block that least needs to be enhanced, so the final enhancement coefficient of the reference block can be set to a preset value, so that the final influence coefficients of the remaining local image blocks are radiated according to the final enhancement coefficient of the reference block to calculate the final enhancement coefficient of each local image block. The embodiment of the present invention uses the preset reference enhancement coefficient as the final enhancement coefficient of the reference block. The embodiment of the present invention sets the preset reference enhancement coefficient to 1, and the implementer can adjust it according to the specific implementation environment.

[0070] Since the final enhancement coefficients of adjacent local image blocks need to be referenced to each other to further calculate the final enhancement coefficient, and in the initial case, only the final enhancement coefficient of the reference block is uniquely determined for the vascular image, it is necessary to take the reference block as the starting point, and calculate the final influence coefficient of the local image blocks adjacent to the reference block according to the final enhancement coefficient of the reference block, and continue to calculate the final influence coefficients of the remaining images in the form of diffusion after calculating the final influence coefficient. Considering that the principle of the diffusion is similar to that of the breadth-first traversal, in order to characterize the calculation process of the final influence coefficient after each diffusion, the breadth-first traversal is combined for analysis. The embodiment of the present invention takes each local image block as a node. It should be noted that breadth-first traversal is a prior art well known to those skilled in the art, and is not further defined or elaborated herein.

[0071] Since the embodiment of the present invention uses the final influence coefficients of adjacent local image blocks as a reference, the range of each traversal is the adjacent local image blocks. The embodiment of the present invention uses the nodes corresponding to the local image blocks within the preset neighborhood range of the local image blocks corresponding to each node as the neighboring nodes of each node; the implementer can adopt preset neighborhood ranges of other sizes according to the specific implementation environment, such as four neighborhood ranges, which will not be further elaborated here.

[0072] The node corresponding to the benchmark block is used as the starting traversal node for breadth-first traversal, and the unvisited nodes among all the neighboring nodes of the starting traversal node are used as new traversal nodes to continue traversing until there are no unvisited nodes, and the number of traversal layers corresponding to the nodes corresponding to each local image block is obtained. Figure 4 , which shows a schematic diagram of image block breadth traversal provided by an embodiment of the present invention. Since the preset neighborhood range of the embodiment of the present invention is an eight-neighborhood range, the diffusion process is circle-by-circle diffusion outward.

[0073] The calculation of the final enhancement coefficient of each local image block needs to rely on the final influence coefficients of the adjacent local image blocks, that is, the final influence coefficients of the image blocks within the eight neighborhoods in the embodiment of the present invention; and in the initial case, only the final influence coefficient of the reference block is identifiable, so it is necessary to calculate the final influence coefficient of each local image block in sequence in the order of traversal layers from low to high according to the principle of breadth-first traversal, so as to ensure that there are as many local image blocks with known final influence coefficients as possible within the preset neighborhood of each local image block during the calculation process. Therefore, in the embodiment of the present invention, in the order of traversal layers from low to high, the local image blocks of each new traversal node obtained after each breadth-first traversal are used as the target image blocks; the local image blocks within the preset neighborhood of the target image block in the previous traversal layer of the target image block are used as the neighborhood reference image blocks of the target image blocks, thereby ensuring that the final influence coefficients of the neighborhood reference image blocks of the target image blocks have been calculated.

[0074] After obtaining the calculation order of the final influence coefficient, it is further necessary to analyze how to calculate the final influence coefficient of the target image block based on the final influence coefficient of the neighborhood reference image block of the target image block. Since the influence of illumination in the vascular image is continuous in the region, the final enhancement coefficients between adjacent local image blocks can refer to each other. The more similar the corresponding neighborhood reference image block is to the target image block, the higher the credibility of the corresponding referenced neighborhood reference image block of the neighborhood reference image block. Therefore, it is further necessary to calculate the similarity between the target image block and each corresponding neighborhood reference image block.

[0075] First, because the influence of illumination is continuous in the region, the greater the possibility that the neighborhood reference image block and the target image block are under the same illumination influence, the higher the corresponding similarity, that is, the higher the reliability, and the reference brightness value can characterize the influence of illumination from the perspective of grayscale value, so the embodiment of the present invention obtains the illumination correction coefficient of each neighborhood reference image block for the target image block according to the similarity of the reference brightness values ​​between the target image block and each corresponding neighborhood reference image block.

[0076] Preferably, the method for obtaining the illumination correction coefficient includes:

[0077] The difference between the reference brightness value of each neighborhood reference image block and the reference brightness value of the target image block is used as the reference illumination difference of each neighborhood reference image block; the negative correlation mapping value of the normalized value of the reference illumination difference is used as the illumination correction coefficient of each neighborhood reference image block to the target image block. The smaller the reference brightness difference between the neighborhood reference image block and the target reference image block, the closer the illumination influence reflected on the overall grayscale value, the higher the corresponding similarity, the higher the corresponding credibility, that is, the greater the influence of the neighborhood reference image block on the target image block; the embodiment of the present invention uses the illumination correction coefficient to characterize the greater influence of the neighborhood reference image block on the target image block from the perspective of the reference illumination value.

[0078] In the embodiment of the present invention, the target image block No. Neighborhood reference image blocks to target image blocks The method for obtaining the illumination correction coefficient is expressed in the formula as follows:

[0079]

[0080] in, The target image block No. Neighborhood reference image blocks to target image blocks The illumination correction factor is The target image block The corresponding The reference brightness value of the neighborhood reference image block, The target image block The corresponding The reference brightness difference of the neighboring reference image blocks; The target image block The reference brightness value of The target image block The corresponding The reference brightness value of the neighborhood reference image block, The target image block The corresponding The reference brightness difference of the neighboring reference image blocks; The target image block The corresponding number of neighborhood reference image blocks; normalizing the reference brightness difference by adding up the values ​​of all reference brightness differences can make the illumination correction and value of all neighborhood reference image blocks equal to 1, making subsequent corrections more robust.

[0081] The more similar the vascular texture of the neighborhood reference image block is to that of the target image block, the higher the corresponding credibility is, that is, the greater the influence of the neighborhood reference image block on the target image block is. Therefore, the embodiment of the present invention obtains the grayscale correction coefficient of each neighborhood reference image block for the target image block according to the similarity of the grayscale distribution between the target image block and each corresponding neighborhood reference image block.

[0082] Preferably, the method for obtaining the grayscale correction coefficient includes:

[0083] Obtain the grayscale histogram of the target image block and all the corresponding neighborhood reference image blocks; at each grayscale level, the difference between the number of pixels in the grayscale histogram of the target image block and the number of pixels in the neighborhood histogram of each neighborhood reference image block is used as the difference in the number of pixels between each neighborhood reference image block and the target image block at each grayscale level. At each grayscale level, the smaller the difference in the number of pixels, the more similar the number of pixels that meet the grayscale level is, that is, the more similar the grayscale distribution is. Therefore, combined with the difference in the number of pixels at all grayscale levels, the cumulative sum of the difference in the number of pixels between each neighborhood reference image block and the target image block at all grayscale levels is used as the reference grayscale difference of each neighborhood reference image block; thereby obtaining the overall difference in grayscale distribution between the neighborhood reference image block and the target image block. Since the greater the difference, the smaller the similarity, and the smaller the corresponding grayscale correction coefficient, the embodiment of the present invention uses the negative correlation mapping value of the normalized value of the reference grayscale difference as the grayscale correction coefficient of each neighborhood reference image block to the target image block. It should be noted that the grayscale histogram in the embodiment of the present invention is divided into 256 grayscale levels, which can be adjusted by the implementer according to the specific implementation environment, and will not be further elaborated here.

[0084] In the implementation of the present invention, the target image block No. Neighborhood reference image blocks to target image blocks The method for obtaining the grayscale correction coefficient is expressed in the formula as follows:

[0085]

[0086] in, The target image block No. Neighborhood reference image blocks to target image blocks Gray correction coefficient of The target image block No. The reference grayscale difference of the neighborhood reference image blocks; The target image block The number of corresponding neighborhood reference image blocks.

[0087] Further, according to the grayscale correction coefficient of the target image block, the illumination correction coefficient, the final enhancement coefficient of the neighborhood reference image block in the previous traversal layer of the target image block, and the reference brightness value difference between the target image block and the neighborhood reference image block, the neighborhood enhancement coefficient of the target image block is obtained.

[0088] Preferably, the target image block The calculation formula of the neighborhood enhancement coefficient includes:

[0089]

[0090] in, The target image block Neighborhood enhancement coefficient; The target image block The number of corresponding neighborhood reference image blocks; The target image block The corresponding Grayscale correction coefficient of a neighborhood reference image block; The target image block The number of layers in the previous traversal The final enhancement coefficient of the neighborhood reference image block; The target image block The corresponding Brightness correction coefficient of a neighborhood reference image block; The target image block The corresponding The reference brightness value of the neighborhood reference image block; The target image block The reference brightness value of is a normalization function. First, we need to consider that the larger the grayscale correction coefficient and brightness correction coefficient of the neighborhood reference image block, the greater the influence of the neighborhood reference image block on the target image block, that is, the more reference the final enhancement coefficient of the neighborhood reference image block has. In part, since the neighborhood enhancement coefficient is obtained based on the final enhancement coefficient of the neighborhood reference image block, it is calculated using the calculation method of the initial enhancement coefficient. At the same time, considering that different neighborhood reference image blocks have different influences on the target image block and the calculation method of the initial enhancement coefficient is based on brightness, it is weighted in combination with the brightness correction coefficient. The larger the grayscale correction coefficient, the greater the influence of the corresponding neighborhood image block, and the more reference-based the corresponding final enhancement coefficient is. Therefore, it is further weighted in combination with the grayscale correction coefficient to obtain the target image block. The corresponding The influence degree of the neighborhood reference image block on the target image block is Finally, the required neighborhood enhancement coefficient is obtained by accumulation, that is, the degree of influence of the enhancement coefficient of all neighborhood reference image blocks corresponding to the target image block on the target image block.

[0091] After obtaining the initial enhancement coefficient and the neighborhood enhancement coefficient, the two are further combined to obtain a more accurate final enhancement coefficient. In the vascular image, the initial enhancement coefficient is obtained by relying on the overall grayscale difference between the local image block and the reference block, while the neighborhood enhancement coefficient is obtained by analyzing the similarity of other local image blocks in the neighborhood of each local image block; the reason why the initial enhancement coefficient cannot be directly used as the final enhancement coefficient is that the vascular texture distribution and brightness distribution in the vascular image are different. The farther from the reference block, the greater the difference in vascular texture distribution, the smaller the reference value of the initial enhancement coefficient, and the more it needs to rely on the neighborhood enhancement coefficient; and according to the breadth traversal characteristics of the embodiment of the present invention, the larger the number of traversal layers of the image block, the farther the distance from the reference block, so the embodiment of the present invention obtains the final enhancement coefficient of the target image according to the initial enhancement coefficient of the target image block, the neighborhood enhancement coefficient and the number of traversal layers corresponding to the node corresponding to the target image block.

[0092] Preferably, the method of obtaining the final enhancement coefficient of the target image according to the initial enhancement coefficient of the target image block, the neighborhood enhancement coefficient, and the number of traversal layers corresponding to the node corresponding to the target image block includes:

[0093] Since the image block with a larger number of traversal layers is farther away from the reference block, the negative correlation mapping value of the traversal layer corresponding to the node corresponding to the target image block is used as the reference influence weight of the target image block, that is, the weight of the initial enhancement coefficient. Preferably, the method for obtaining the reference influence weight includes:

[0094] The inverse of the number of traversal layers corresponding to the node corresponding to the target image block is used as the baseline influence weight of the target image block; the implementer can also obtain the baseline influence weight through other methods, such as negative correlation mapping through an exponential function with a natural constant as the base, which will not be further elaborated here.

[0095] The farther away from the benchmark block, the greater the difference in vascular texture distribution, and the smaller the reference value of the initial enhancement coefficient, and the more it needs to rely on the neighborhood enhancement coefficient. Therefore, the negative correlation mapping value of the benchmark influence weight is further used as the neighborhood influence weight of the target image block; the sum of the benchmark influence weight and the neighborhood influence weight is 1 to ensure that the final enhancement coefficient is within a reasonable value range.

[0096] Further corresponding weighting is performed, and the product of the baseline influence weight and the initial enhancement coefficient of the target image block is used as the weighted initial enhancement coefficient of the target image block; the product of the neighborhood influence weight and the neighborhood enhancement coefficient of the target image block is used as the weighted neighborhood enhancement coefficient of the target image block; and the sum of the weighted initial enhancement coefficient and the weighted neighborhood enhancement coefficient is used as the final enhancement coefficient of the target image block.

[0097] In the embodiment of the present invention, the target image block The method for obtaining the final enhancement coefficient includes:

[0098]

[0099] in, The target image block The final enhancement factor of The target image block The initial enhancement factor of The target image block The neighborhood influence coefficient of The target image block The number of traversal layers corresponding to the corresponding nodes; The target image block The corresponding benchmark impact weights; The target image block The corresponding neighborhood influence weight; The target image block The weighted initial enhancement coefficient of The target image block The weighted neighborhood enhancement coefficient of Figure 4 Taking the case in as an example, in the initial situation, there is only the benchmark block in the previous traversal layer corresponding to the first traversal, so the final enhancement coefficient of the local image block of the first traversal can only be obtained based on the benchmark block; after obtaining the final enhancement coefficients of all the local image blocks of the first traversal, the neighborhood reference image block corresponding to the local image block of the second traversal is the local image block with a known final enhancement coefficient. Therefore, combined with the calculation method of the final enhancement coefficient, the final enhancement coefficient of the local image block of the second traversal can also be calculated. The same is true for the local image block of the third traversal. According to the final enhancement coefficient of the local image block of the second traversal, the local image block of the third traversal is calculated, thereby calculating the final enhancement coefficients of all local image blocks.

[0100] Step S4: performing image enhancement on each local image block in the blood vessel image according to the final enhancement coefficient to obtain a blood vessel enhanced image.

[0101] Further, image enhancement is performed according to the final enhancement coefficient of each local image block. In the embodiment of the present invention, image enhancement is performed on each local image block in the vascular image according to the final enhancement coefficient to obtain a more accurate vascular enhanced image. Preferably, the method for obtaining the vascular enhanced image includes:

[0102] The embodiment of the present invention uses the final enhancement coefficient of each local image block as the enhancement weight to perform linear image enhancement on the vascular image, thereby obtaining a vascular enhanced image with a better enhancement effect. Specifically, in the vascular image, the product of each RGB component corresponding to each pixel and the final enhancement coefficient of the local image block in which it is located is used as the enhanced RGB component of each RGB component of each pixel; based on all enhanced RGB components corresponding to each pixel, the enhanced pixel value of each pixel is obtained; and based on the enhanced pixel values ​​of all pixels, the vascular enhanced image is obtained.

[0103] In summary, the present invention first divides the vascular image under the endoscope into blocks, obtains the initial enhancement coefficient of each local image block according to the overall gray value difference between the local image block and the overall vascular image; obtains the final enhancement coefficient according to the gray texture similarity between the local image block and the adjacent local image blocks in combination with the corresponding position; and thus performs adaptive image enhancement on the vascular image according to the corresponding final enhancement coefficient of each local image block, so that the enhancement effect of the obtained vascular enhanced image is better.

[0104] It should be noted that the sequence of the above embodiments of the present invention is for description only 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.

[0105] 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 enhancing blood vessels in an endoscopic image, characterized in that: The method comprises: Acquire a blood vessel image under an endoscope; divide the blood vessel image into at least two local image blocks; According to the overall gray value difference between each local image block and the blood vessel image, a reference brightness value of each local image block is obtained; the local image block with the largest reference brightness value is used as a reference block; according to the reference brightness value difference between the reference block and each local image block, an initial enhancement coefficient of each local image block is obtained; Obtaining a final enhancement coefficient for each local image block according to the grayscale texture similarity between each local image block and an adjacent local image block, the initial enhancement coefficient, and the relative position to the reference block; Performing image enhancement on each local image block in the blood vessel image according to the final enhancement coefficient to obtain a blood vessel enhanced image; The method for obtaining the final enhancement coefficient includes: Each local image block is regarded as a node; nodes corresponding to local image blocks within a preset neighborhood range of the local image block corresponding to each node are regarded as neighboring nodes of each node; The node corresponding to the reference block is used as the starting traversal node for breadth-first traversal, and the unvisited nodes among all the neighboring nodes of the starting traversal node are used as new traversal nodes to continue traversing until there are no unvisited nodes, and the number of traversal layers corresponding to the nodes corresponding to each local image block is obtained; Using the preset benchmark enhancement coefficient as the final enhancement coefficient of the benchmark block; In order of traversal levels from low to high, the local image blocks of each new traversal node obtained after each breadth-first traversal are used as target image blocks; the local image blocks within the preset neighborhood range of the target image block in the previous traversal level of the target image block are used as neighborhood reference image blocks of the target image block; According to the similarity of the reference brightness value between the target image block and each corresponding neighborhood reference image block, the illumination correction coefficient of each neighborhood reference image block to the target image block is obtained; according to the similarity of the grayscale distribution between the target image block and each corresponding neighborhood reference image block, the grayscale correction coefficient of each neighborhood reference image block to the target image block is obtained; Obtaining a neighborhood enhancement coefficient of the target image block according to the grayscale correction coefficient of the target image block, the illumination correction coefficient, the final enhancement coefficient of the neighborhood reference image block in the previous traversal layer number of the target image block, and the reference brightness value difference between the target image block and the neighborhood reference image block; The final enhancement coefficient of the target image is obtained according to the initial enhancement coefficient of the target image block, the neighborhood enhancement coefficient and the number of traversal layers corresponding to the nodes corresponding to the target image block.

2. The method for endoscopic image blood vessel enhancement according to claim 1, characterized in that: The method for obtaining the reference brightness value includes: The grayscale value average of all pixels in the blood vessel image is used as the overall grayscale average; the grayscale value average of all pixels in each local image block is used as the local grayscale average of each local image block; The difference between the local grayscale mean and the overall grayscale mean, and the ratio of the overall grayscale mean, are used as the reference brightness value of each local image block.

3. The method for endoscopic image blood vessel enhancement according to claim 1, characterized in that: The calculation method of the initial enhancement coefficient includes: in, For the The initial enhancement coefficient of a local image block; Base block The preset baseline enhancement factor of Base block The reference brightness value of For the The reference brightness value of a local image block.

4. The method for endoscopic image blood vessel enhancement according to claim 1, characterized in that: The method for acquiring the blood vessel enhanced image comprises: The final enhancement coefficient of each local image block is used as the enhancement weight to perform image linear enhancement on the blood vessel image to obtain a blood vessel enhanced image.

5. The method for endoscopic image blood vessel enhancement according to claim 1, characterized in that: The method for obtaining the illumination correction coefficient includes: The difference between the reference brightness value of each neighborhood reference image block and the reference brightness value of the target image block is used as the reference illumination difference of each neighborhood reference image block; and the negative correlation mapping value of the normalized value of the reference illumination difference is used as the illumination correction coefficient of each neighborhood reference image block to the target image block.

6. The method for endoscopic image blood vessel enhancement according to claim 1, characterized in that: The method for obtaining the grayscale correction coefficient includes: Obtaining the grayscale histogram of the target image block and all corresponding neighborhood reference image blocks; At each gray level, the difference between the number of pixels in the gray histogram of the target image block and the number of pixels in the neighborhood histogram of each neighborhood reference image block is used as the difference in the number of pixels between each neighborhood reference image block and the target image block at each gray level; The accumulated sum of the differences in the number of pixels between each neighborhood reference image block and the target image block at all gray levels is used as the reference grayscale difference of each neighborhood reference image block; and the negative correlation mapping value of the normalized value of the reference grayscale difference is used as the grayscale correction coefficient of each neighborhood reference image block to the target image block.

7. The method for endoscopic image blood vessel enhancement according to claim 1, characterized in that: The calculation formula of the neighborhood enhancement coefficient includes: in, The target image block Neighborhood enhancement coefficient; The target image block The number of corresponding neighborhood reference image blocks; The target image block The corresponding Grayscale correction coefficient of a neighborhood reference image block; The target image block The number of layers in the previous traversal The final enhancement coefficient of the neighborhood reference image block; The target image block The corresponding Brightness correction coefficient of a neighborhood reference image block; The target image block The corresponding The reference brightness value of the neighborhood reference image block; The target image block The reference brightness value of is the normalization function.

8. The method for endoscopic image blood vessel enhancement according to claim 1, characterized in that: The method for obtaining the final enhancement coefficient of the target image according to the initial enhancement coefficient of the target image block, the neighborhood enhancement coefficient, and the number of traversal layers corresponding to the node corresponding to the target image block includes: The negative correlation mapping value of the traversal layer number corresponding to the node corresponding to the target image block is used as the benchmark influence weight of the target image block; the negative correlation mapping value of the benchmark influence weight is used as the neighborhood influence weight of the target image block; the sum of the benchmark influence weight and the neighborhood influence weight is 1; The product of the benchmark influence weight and the initial enhancement coefficient of the target image block is used as the weighted initial enhancement coefficient of the target image block; the product of the neighborhood influence weight and the neighborhood enhancement coefficient of the target image block is used as the weighted neighborhood enhancement coefficient of the target image block; and the sum of the weighted initial enhancement coefficient and the weighted neighborhood enhancement coefficient is used as the final enhancement coefficient of the target image block.

9. The method for endoscopic image blood vessel enhancement according to claim 8, characterized in that: The method for obtaining the benchmark influence weight includes: The inverse of the number of traversal layers corresponding to the node corresponding to the target image block is used as the benchmark influence weight of the target image block.