A vascular model for image enhancement in digestive endoscopy
The vascular pattern enhanced by digestive endoscopic images and image chunking and histogram processing are solved, and the problem of unclear blood vessel display in the prior art is achieved, which enhances blood vessel contrast and clear images are displayed, helping clinicians to accurately diagnose.
Patent Information
- Application Number
- CN202210620150.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-01
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-06-01
AI Technical Summary
Existing digestive endoscopy technology is difficult to clearly show the effusion of submucosal blood vessels in the gastrointestinal tract, resulting in blurred images. In tumor lesions, neovascular branches are complex and it is difficult to distinguish arteries, veins and capillaries.
A vascular mode enhanced by digestive endoscopic image is adopted. By chunking images, counting BGR and L histograms of each block, color correction, cropping and smoothing of the block histograms, each block histogram mapping table is generated, and finally mapping the original image to generate a new vascular mode enhancement map.
By enhancing the contrast of blood vessels, clearly distinguishing the vascular area from the non-vascular area, significantly improving the image contrast, making the location, range and branching of the blood vessels more clearly visible, helping clinicians to accurately diagnose.
Smart Images

Figure CN114998260B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the medical field, and in particular to a vascular model for digestive endoscopy image enhancement. Background Art
[0002] Early lesions of the digestive tract, such as esophageal mucosal dysplasia, early gastric cancer, and malignant polyps of the large intestine, are generally accompanied by manifestations of vascular hyperplasia. The texture of the lesion surface is different from that of the surrounding normal tissue, and the color may also be different. Ordinary endoscopes can only display ordinary images of lesion tissues related to the disease, and cannot display subtle changes in blood vessels at all levels of the lesions. With the widespread use of magnifying endoscopes and chromoendoscopy, endoscopic diagnosis of early digestive tract tumors has been significantly improved, but chromoendoscopy is time-consuming and cumbersome, and requires high clinical operation skills. With the development of endoscopic technology, a newly developed simulated chromoendoscopy technology has been widely used in endoscopic examinations in recent years.
[0003] This technology mainly includes narrow-wavelength light imaging technology and intelligent spectroscopic colorimetry technology, which can more clearly display the glandular duct opening morphology and microvascular texture of the lesion tissue. Its display of the lesion tissue has the same image effect as that of staining endoscopy, so it is called "electronic staining technology". In a broad sense, it is an image enhancement technology.
[0004] However, the above-mentioned model is not effective enough in displaying vascular lesions. The gastrointestinal mucosa is congested and edematous, and the submucosal blood vessels are exuding, resulting in blurred images. In tumor lesions, the new blood vessels have complex branches. Therefore, it is necessary to clearly display the blood vessels and surrounding tissues separately. In view of this, this case came into being. Summary of the invention
[0005] In order to fill the gap in the market, the present invention provides a vascular model for digestive endoscopy image enhancement.
[0006] The object of the present invention is to provide a vascular model for digestive endoscopy image enhancement to solve the problems raised in the above-mentioned background technology.
[0007] To achieve the above object, the present invention provides the following technical solution: a vascular pattern for digestive endoscopy image enhancement, wherein the image enhancement method comprises the following steps: image segmentation, statistics of BGR and L histograms of each segment, color correction of BGR and L histograms of the segment, clipping and smoothing the histogram, and generating a histogram mapping table of each segment:
[0008] Step A. Image segmentation: Divide the input image into 8x8 blocks, a total of 64 blocks;
[0009] Step B. Count the BGR and L histograms of each block: Count the histogram of the original image and the histogram of each small block on the BGR color channel, as well as the brightness histogram L;
[0010] Step C. Correct the color of the BGR and L histograms of the blocks: According to the histogram of the original image, the BGRL of the block histogram is adaptively adjusted in proportion, and then according to the color correction coefficient, the BGR histogram of the block is combined with its own brightness L histogram for color correction;
[0011] Step D. Crop and smooth the histogram: perform histogram cropping and smoothing on the adjusted block histogram to obtain the final histogram distribution of each block;
[0012] Step E. Generate a histogram mapping table for each block: Generate a histogram mapping table of BGR in each block, and finally map the original image according to the mapping table to generate a new blood vessel pattern enhancement image.
[0013] Furthermore, in step B: the image is evenly divided into 8x8 small blocks, the length and width of each small block is 1 / 8 of the length and width of the original image, rounded up, the length and width of the rightmost and bottommost small blocks are obtained by subtracting the length and width of the first 7 small blocks from the length and width of the image, as the adaptive result; the color histogram of the BGR3 channels of the original image is counted separately, and then the BGR histogram of each of the 64 blocks is counted, and then the grayscale images of the original image and each small block are calculated, and the calculation formula for obtaining the brightness L from the BGR color channel is as follows:
[0014] L = 0.299R + 0.587G + 0.114B.
[0015] Furthermore, in step C: adaptively adjusting the BGRL of the block histogram according to the proportion requires adjusting the parameter Ada, and the specific calculation formula is as follows:
[0016] X ijkv '=(AdaX ijkv +(100-Ada)H kv / 64) / 100
[0017] Where i, j ∈ (1, 8), k ∈ {B, G, R}, Ada ∈ (0, 100), represents the ratio of the adjusted block histogram to the block histogram value, X ijkv represents the value of brightness v in the histogram statistics of color space k in the i-row and j-column block, H kv It represents the value of brightness v in the histogram statistics of the original image in color space k. Since the large image has more pixels than the small image, its value should be divided by 64 to balance the values in the block image.
[0018] Furthermore, in the formula of step C: ijkv ' represents the value of brightness v in the histogram statistics of the block in the color space k after adjustment.
[0019] Furthermore, in step C: color correction of the BGR histogram of the blocks requires parameter Cor, and the specific formula is as follows:
[0020] X ijkv =(CorX ijkv '+(100-Cor)L ijv ) / 100
[0021] Where i,j∈(1,8), k∈{B,G,R}, Cor∈(0,100), represents the proportion of the adjusted block histogram in color correction, X ijkv ' represents the value of the histogram brightness v of the color space k in the i row and j column block, L ij Represents the value of brightness v in the brightness statistical histogram of the i-row and j-column block.
[0022] Furthermore, in step D: histogram clipping, the parameter CutLimit is used here to indicate the restriction condition for clipping the histogram: as follows:
[0023] MinClip = SizeX * SizeY / 256;
[0024] ClipLimit = MinClip + CutLimit * (SizeX * SizeY - MinClip) / 1000; SizeX represents the length of the block, SizeY represents the width of the block, and ClipLimit is obtained, which represents the height limit of the histogram; the part that still exceeds ClipLimit after clipping is clipped again, and the clipping results are evenly distributed to the position that does not exceed the limit, and finally the clipped histogram C is obtained ijk .
[0025] Furthermore, in step D: ijk For smoothing, the specific process is as follows:
[0026] (i) First find the brightness mapping relationship x→T ijkx
[0027]
[0028] (ii) For T ijkx For smoothing, the formula is as follows:
[0029] T ijkx '=(T ijk(x-3) +2T ijk(x-2) +3T ijk(x-1) +4T ijkx +3T ijk(x+1) +2T ijk(x+2) +T ijk(x+3) ) / 16
[0030] T ijkx =T ijkx '
[0031] Repeat the above steps 4 times to get T ijkx , which is the final mapping result.
[0032] Furthermore, in step E: the operation steps are:
[0033] (i) The mapping formula of BGR in each block is as follows:
[0034]
[0035] where f ijk (x) represents the mapping function of channel k (k∈{B,G,R}) in the i-th row and j-th column block;
[0036] (ii) Finally, the vascular pattern enhancement map D is generated, and the formula is as follows:
[0037] D xyk =f ijk (S xyk )
[0038] Where k∈{B,G,R} represents the color channel, D xyk represents the value of channel k in row x, column y of the enhanced graph D, S xyk It represents the value of the k channel of the original image S at the xth row and yth column. The coordinate point (x, y) belongs to the (i, j) block.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] 1. Combining the CLAHE algorithm with the local enhancement algorithm to enhance the contrast of blood vessels and distinguish between vascular and non-vascular areas; by analyzing and statistically analyzing the attenuation characteristics of the color channel components of the image and weighting them with the global histogram, the color contrast between blood vessels and surrounding tissues is adjusted to enhance the image contrast, which is helpful for clinicians to accurately estimate the location, range and branching of blood vessels;
[0041] 2. The focus of gastrointestinal endoscopic image enhancement is placed on the local contrast between blood vessels and surrounding tissues, clearly showing the position, range and branching of blood vessels, while maintaining the color of blood vessels, and clearly distinguishing arteries, veins and capillaries. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 It is a schematic diagram of the operation flow of the present invention.
[0043] Figure 2 This is a schematic diagram of the first step of the cutting process of the present invention;
[0044] Figure 3 This is a schematic diagram of the second step of cutting process of the present invention. DETAILED DESCRIPTION
[0045] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0046] Specific implementation method 1: Please refer to Figure 1 The present invention provides a technical solution: a vascular pattern for digestive endoscopy image enhancement, wherein the image enhancement method comprises the following steps: image segmentation, statistics of BGR and L histograms of each segment, color correction of BGR and L histograms of each segment, clipping and smoothing the histogram, and generating a histogram mapping table of each segment:
[0047] Step A. Image segmentation: Divide the input image into 8x8 blocks, a total of 64 blocks;
[0048] Step B. Count the BGR and L histograms of each block: Count the histogram of the original image and the histogram of each small block on the BGR color channel, as well as the brightness histogram L;
[0049] Step C. Correct the color of the BGR and L histograms of the blocks: According to the histogram of the original image, the BGRL of the block histogram is adaptively adjusted in proportion, and then according to the color correction coefficient, the BGR histogram of the block is combined with its own brightness L histogram for color correction;
[0050] Step D. Crop and smooth the histogram: perform histogram cropping and smoothing on the adjusted block histogram to obtain the final histogram distribution of each block;
[0051] Step E. Generate a histogram mapping table for each block: Generate a histogram mapping table of BGR in each block, and finally map the original image according to the mapping table to generate a new blood vessel pattern enhancement image.
[0052] Working principle: First, the image of the digestive endoscope is input, and the image is enhanced through step AE; this mode adopts a contrast-limited adaptive histogram equalization algorithm; in gastrointestinal inflammatory lesions, the gastrointestinal mucosa is congested and edematous, and the submucosal blood vessels exude, causing image blur. In tumor lesions, the new blood vessels have complex branches; in order to improve the contrast of blood vessels and clearly display the branching of blood vessels, this patent uses the enhanced CLAHE model, image enhancement and image restoration technology, to study the images and videos of gastrointestinal blood vessels.
[0053] Specific implementation method 2: This implementation method is a further limitation of specific implementation method 1. In step B: the image is evenly divided into 8x8 small blocks, the length and width of each small block is 1 / 8 of the length and width of the original image, rounded up, the length and width of the rightmost and bottommost small blocks are obtained by subtracting the length and width of the first 7 small blocks from the length and width of the image, as the result of adaptation; the color histogram of the BGR3 channels of the original image is counted separately, and then the BGR histogram of each of the 64 blocks is counted, and then the grayscale images of the original image and each small block are calculated, and the calculation formula for obtaining the brightness L from the BGR color channel is as follows:
[0054] L = 0.299R + 0.587G + 0.114B.
[0055] like Figure 1 As shown: The algorithm combines the CLAHE algorithm and the local enhancement algorithm to effectively distinguish between vascular areas and non-vascular areas. By analyzing and statistically analyzing the attenuation characteristics of the RGB three-channel components of the image, weighting the attenuation coefficients between different channels with the proportion of the global brightness true square map, adjusting the color contrast between blood vessels and surrounding tissues, and enhancing the image contrast, it is helpful for clinicians to accurately estimate the location, range, and branching of blood vessels.
[0056] Specific implementation method three: This implementation method is a further limitation of specific implementation method one. In step C, the parameter Ada needs to be adjusted to make adaptive adjustments to the BGRL of the block histogram according to the proportion. The specific calculation formula is as follows:
[0057] X ijkv '=(AdaX ijkv +(100-Ada)H kv / 64) / 100
[0058] Where i, j ∈ (1, 8), k ∈ {B, G, R}, Ada ∈ (0, 100), represents the ratio of the adjusted block histogram to the block histogram value, X ijkv represents the value of brightness v in the histogram statistics of color space k in the i-row and j-column block, H kv It represents the value of brightness v in the histogram statistics of the original image in color space k. Since the large image has more pixels than the small image, its value should be divided by 64 to balance the values in the block image.
[0059] Specific implementation method 4: This implementation method is a further limitation of specific implementation method 3. In the formula of step C: ijkv ' represents the value of brightness v in the histogram statistics of the block in the color space k after adjustment.
[0060] Specific implementation method 5: This implementation method is a further limitation of specific implementation method 1. In step C, color correction of the BGR histogram of the blocks requires parameter Cor. The specific formula is as follows:
[0061] X ijkv =(CorX ijkv '+(100-Cor)L ijv ) / 100
[0062] Where i,j∈(1,8), k∈{B,G,R}, Cor∈(0,100), represents the proportion of the adjusted block histogram in color correction, X ijkv ' represents the value of the histogram brightness v of the color space k in the i row and j column block, L ij Represents the value of brightness v in the brightness statistical histogram of the i-row and j-column block.
[0063] Specific implementation method 6: This implementation method is a further limitation of specific implementation method 1. In step D: histogram clipping, the parameter CutLimit is used here to indicate the restriction condition for clipping the histogram: as follows:
[0064] MinClip = SizeX * SizeY / 256;
[0065] ClipLimit = MinClip + CutLimit * (SizeX * SizeY - MinClip) / 1000; SizeX represents the length of the block, SizeY represents the width of the block, and ClipLimit is obtained, which represents the height limit of the histogram; the part that still exceeds ClipLimit after clipping is clipped again, and the clipping results are evenly distributed to the position that does not exceed the limit, and finally the clipped histogram C is obtained ijk .
[0066] SizeX represents the length of the block, SizeY represents the width of the block, and ClipLimit represents the height limit of the histogram. The specific clipping process is as follows: Figure 2 As shown:
[0067] like Figure 2 , in Figure i: the oblique line shaded part exceeding CLIpLimit is evenly divided into each value, and the result shown in Figure ii is obtained, and the next step of processing is performed on Figure ii, such as Figure 3 As shown:
[0068] like Figure 3 , as shown in Figure iii-iiii: crop the part that still exceeds ClipLimit after cropping, and evenly distribute the cropping results to the position that does not exceed the limit, and finally get the cropped histogram C ijk .
[0069] Specific implementation method 7: This implementation method is a further limitation of specific implementation method 6. In step D: ijk For smoothing, the specific process is as follows:
[0070] (i) First find the brightness mapping relationship x→T ijkx
[0071]
[0072] (ii) For T ijkx For smoothing, the formula is as follows:
[0073] T ijkx '=(T ijk(x-3) +2T ijk(x-2) +3T ijk(x-1) +4T ijkx +3T ijk(x+1) +2T ijk(x+2) +T ijk(x+3) ) / 16
[0074] T ijkx =T ijkx '
[0075] Repeat the above steps 4 times to get T ijkx , which is the final mapping result.
[0076] Specific implementation eight: This implementation is a further limitation of specific implementation one. In step E: the operation steps are:
[0077] (i) The mapping formula of BGR in each block is as follows:
[0078]
[0079] where f ijk (x) represents the mapping function of channel k (k∈{B,G,R}) in the i-th row and j-th column block;
[0080] (ii) Finally, the vascular pattern enhancement map D is generated, and the formula is as follows:
[0081] D xyk =f ijk (S xyk )
[0082] Where k∈{B,G,R} represents the color channel, D xyk represents the value of channel k in row x, column y of the enhanced graph D, S xyk It represents the value of the k channel of the original image S at the xth row and yth column. The coordinate point (x, y) belongs to the (i, j) block.
[0083] The CLAHE algorithm is combined with the local enhancement algorithm to enhance the contrast of blood vessels and distinguish between vascular areas and non-vascular areas. By analyzing and statistically analyzing the attenuation characteristics of the color channel components of the image and weighting them with the global histogram, the color contrast between blood vessels and surrounding tissues is adjusted to enhance the image contrast, which is helpful for clinicians to accurately estimate the location, range and branching of blood vessels.
[0084] The focus of gastroenteroscopic image enhancement is placed on the local contrast between blood vessels and surrounding tissues, clearly showing the position, range and branching of blood vessels, while maintaining the color of blood vessels, and being able to clearly distinguish arteries, veins and capillaries.
[0085] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for enhancing digestive endoscopy images, the image enhancement method comprising the following steps: image segmentation, statistics of BGR and L histograms of each segment, color correction of BGR and L histograms of each segment, clipping and smoothing the histograms, and generating a histogram mapping table of each segment, characterized in that: Step A. Image segmentation: Divide the input image into 8x8 blocks, a total of 64 blocks; Step B. Count the BGR and L histograms of each block: Count the histogram of the original image and the histogram of each small block on the BGR color channel, as well as the brightness histogram L; Step C. Correct the color of the BGR and L histograms of the blocks: According to the histogram of the original image, the BGRL of the block histogram is adaptively adjusted in proportion, and then the BGR histogram of the block is combined with its own brightness L histogram for color correction according to the color correction coefficient; the adaptive adjustment of the BGRL of the block histogram in proportion requires adjustment of the parameter Ada, and the specific calculation formula is as follows: X ijkv '=(AdaX ijkv +(100-Ada)H kv / 64) / 100 Where i, j ∈ (1, 8), k ∈ {B, G, R}, Ada ∈ (0, 100), represents the ratio of the adjusted block histogram to the block histogram value, X ijkv represents the value of brightness v in the histogram statistics of color space k in the i-row and j-column block, H kv It represents the value of brightness v in the histogram statistics of the original image in color space k. Since the large image has more pixels than the small image, its value should be divided by 64 to balance the values in the block image. X ijkv ' represents the value of brightness v in the histogram statistics of the block in the color space k after adjustment; The parameter Cor is required to perform color correction on the BGR histogram of the block. The specific formula is as follows: X ijkv ”=(CorX ijkv '+(100-Cor)L ijv ) / 100 Where i,j∈(1,8), k∈{B,G,R}, Cor∈(0,100), represents the proportion of the adjusted block histogram in color correction, L ij Represents the value of brightness v in the brightness statistical histogram of the i-row and j-column block; Step D. Crop and smooth the histogram: perform histogram cropping and smoothing on the adjusted block histogram to obtain the final histogram distribution of each block; Step E. Generate a histogram mapping table for each block: Generate a histogram mapping table of BGR in each block, and finally map the original image according to the mapping table to generate an enhanced image of the new method.
2. A method for digestive endoscopy image enhancement according to claim 1, characterized in that: In the step B: the image is evenly divided into 8x8 small blocks, the length and width of each small block is 1 / 8 of the length and width of the original image, rounded up, the length and width of the rightmost and bottommost small blocks are obtained by subtracting the length and width of the first 7 small blocks from the length and width of the image, as the result of adaptation; the color histograms of the BGR3 channels of the original image are counted separately, and then the BGR histograms of the 64 blocks are counted, and then the grayscale images of the original image and each small block are calculated, and the calculation formula for obtaining the brightness L from the BGR color channel is as follows: L = 0.299R + 0.587G + 0.114B.
3. The method for digestive endoscopy image enhancement according to claim 1, characterized in that: In the step D: histogram clipping, the parameter CutLimit is used here to indicate the restriction condition for clipping the histogram: as follows: MinClip = SizeX * SizeY / 256; ClipLimit = MinClip + CutLimit * (SizeX * SizeY - MinClip) / 1000; SizeX represents the length of the block, SizeY represents the width of the block, and ClipLimit is obtained, which represents the height limit of the histogram; the part that still exceeds ClipLimit after clipping is clipped again, and the clipping results are evenly distributed to the position that does not exceed the limit, and finally the clipped histogram C is obtained ijk .
4. A method for digestive endoscopy image enhancement according to claim 3, characterized in that: In the step D: ijk For smoothing, the specific process is as follows: (i) First find the brightness mapping relationship x→T ijkx (ii) For T ijkx For smoothing, the formula is as follows: T ijkx '=(T ijk(x-3) +2T ijk(x-2) +3T ijk(x-1) +4T ijkx +3T ijk(x+1) +2T ijk(x+2) +T ijk(x+3) ) / 16 T ijkx =T ijkx ' Repeat the above steps 4 times to get T ijkx , which is the final mapping result.
5. The method for digestive endoscopy image enhancement according to claim 1, characterized in that: In step E: the operation steps are: (i) The mapping formula of BGR in each block is as follows: where f ijk (x) represents the mapping function of color space k in the i-th row and j-th column block; (ii) The final generated method enhanced graph D is as follows: D xyk =f ijk (S xyk ) Where k∈{B,G,R} represents the color channel, D xyk represents the value of the enhanced image D in the color space k at row x and column y, S xyk Represents the value of the original image S in the color space k at the xth row and yth column, and the coordinate point (x, y) belongs to the (i, j) block.
Citation Information
Patent Citations
Image processing system and method
CN105825485A
A high dynamic range image tone mapping method with detail enhancement and brightness self-adaptation
CN109410126A