High-definition digital imaging method suitable for ear-nose-throat endoscope
By analyzing the superpixel real-time blocking of the endoscopic image, calculating the correlation coefficient and correcting the grid, and applying the CLAHE algorithm, the problem that the grid size cannot adapt to the dynamically changing areas in the prior art is solved, and high-quality image enhancement is achieved.
Patent Information
- Application Number
- CN202510329783.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-03-20
AI Technical Summary
In the prior art, the grid size set by experience cannot adapt to the contrast enhancement requirements of dynamically changing areas, resulting in poor imaging effects and possible block effects or loss of details.
By acquiring multiple superpixel real-time blocks of real-time endoscope images, the dark area probability parameters, dark area structure activity coefficient, pixel overall correlation and shadow interference coefficient of each block are calculated, and the detail blur coefficient is obtained, the initial grid is corrected, and the image enhancement is applied to the CLAHE algorithm.
Adaptive contrast enhancement is achieved, imaging quality is improved, computational complexity is reduced, and block effects and details are avoided.
Smart Images

Figure CN119850495A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of endoscope imaging, and in particular to a high-definition digital imaging method suitable for an ENT endoscope. Background Art
[0002] With the development of medical imaging technology, the emergence of high-definition digital endoscopy technology has significantly improved image quality and facilitated the observation of lesions. However, due to the complex internal structure of tissues and mutual occlusion, and the relatively single light source of the endoscope, the image is affected differently by light, resulting in dark images, limited imaging clarity and details. Therefore, endoscopic images need to be enhanced.
[0003] In the prior art, an adaptive histogram equalization CLAHE algorithm is performed on the endoscopic image according to an empirically set grid, thereby enhancing the contrast and improving the clarity of the image. However, since the influence of the light source is not taken into account, different regional structures have different detail characteristics, and the empirically set grid cannot adapt to the contrast enhancement needs of dynamically changing areas. If the grid is small, it may lead to excessive local contrast enhancement, resulting in obvious block effects. If the grid is large, it may lead to insufficient local contrast enhancement, resulting in loss of image details and poor imaging effect. Summary of the invention
[0004] In order to solve the technical problem that the empirically set grid size cannot adapt to the contrast enhancement requirements of dynamically changing areas and the imaging effect is poor, the purpose of the present invention is to provide a high-definition digital imaging method suitable for ENT endoscopes, and the technical solution adopted is as follows: The present invention proposes a high-definition digital imaging method suitable for ENT endoscopes, the method comprising: Acquiring endoscopic images of the observation site in time sequence; A plurality of superpixel real-time blocks of a real-time endoscopic image are obtained; a dark area probability parameter of each superpixel real-time block is obtained according to the difference in pixel value distribution between different superpixel real-time blocks; a dark area structure activity coefficient of each superpixel real-time block is obtained according to the pixel value distribution of the corresponding area between different adjacent endoscopic images of each superpixel real-time block and the dark area probability parameter; According to the pixel similarity between each superpixel real-time block and different superpixel real-time blocks within the corresponding neighborhood in all corresponding areas of the endoscopic image, the overall pixel correlation of each superpixel real-time block is obtained; according to the fluctuation degree distribution of pixel values between each superpixel real-time block and different superpixel real-time blocks within the corresponding neighborhood, and the overall pixel correlation, the shadow interference coefficient of each superpixel real-time block is obtained; According to the dark area structure activity coefficient and shadow interference coefficient of each superpixel real-time block, the detail fuzzy coefficient of each superpixel real-time block is obtained; according to the detail fuzzy coefficient of each superpixel real-time block, the initial grid is corrected to obtain a corrected grid; The CLAHE algorithm is performed on each superpixel in the endoscopic image in real time according to the modified grid to obtain an enhanced endoscopic image.
[0005] Furthermore, the method for obtaining the dark area probability parameter includes: The mean value of all pixel values in each superpixel real-time block is obtained as the block pixel level; the dark area possible coefficient is obtained according to the difference distribution of block pixel levels between different superpixel real-time blocks; According to the difference in block pixel levels between each superpixel real-time block and different superpixel real-time blocks in the corresponding neighborhood, as well as the dark area possibility coefficient, the dark area probability parameter of each superpixel real-time block is obtained, and the difference in block pixel levels and the dark area possibility coefficient are positively correlated with the dark area probability parameter.
[0006] Furthermore, the method for obtaining the possible coefficients of the dark area includes: Obtain the difference in block pixel level between different superpixel real-time blocks and normalize them as the block difference index; If the block difference index between the super-pixel real-time blocks is less than the preset difference threshold, the corresponding super-pixel real-time blocks are regarded as the same type of blocks; The ratio of the number of similar blocks corresponding to each superpixel real-time block to the number of all superpixel real-time blocks is obtained, and negative correlation mapping is performed as the possible coefficient of the dark area of each superpixel real-time block.
[0007] Furthermore, the method for obtaining the dark area structure activity coefficient includes: A corner point detection method is used to obtain the corner points of each superpixel real-time block in the corresponding area of each endoscopic image; the difference in the number of corresponding corner points of each superpixel real-time block between different adjacent endoscopic images is obtained as a first difference feature; Obtaining the mean square error of a set of all pixel values in a corresponding area between different adjacent endoscopic images for each superpixel real-time block as a second difference feature; According to the first difference feature, the second difference feature and the dark area probability parameter corresponding to each superpixel real-time block, the dark area structure activity coefficient of each superpixel real-time block is obtained, and the first difference feature, the second difference feature and the dark area probability parameter are all positively correlated with the dark area structure activity coefficient.
[0008] Furthermore, the method for obtaining the overall pixel correlation includes: For each superpixel real-time block and each superpixel real-time block in the corresponding neighborhood, the correlation coefficient of the set of block pixel levels in the corresponding area of all endoscopic images between the superpixel real-time blocks is obtained as the pixel local correlation; The average of the local correlations of the corresponding pixels between each superpixel real-time block and all superpixel real-time blocks in the corresponding neighborhood is obtained as the overall correlation of the pixels of each superpixel real-time block.
[0009] Furthermore, the method for obtaining the shadow interference coefficient includes: Obtain the fluctuation degree of all pixel values in each superpixel real-time block as the block pixel fluctuation feature; Obtain the average of the block pixel fluctuation characteristics of all superpixels in real time within the neighborhood as the neighborhood pixel fluctuation characteristic; The difference between the block pixel fluctuation characteristics and the neighborhood pixel fluctuation characteristics of each superpixel real-time block is obtained, and a negative correlation mapping is performed as the distribution stability degree; the corresponding distribution stability degree is weighted according to the overall pixel correlation of each superpixel real-time block to obtain the shadow interference coefficient of each superpixel real-time block.
[0010] Furthermore, the method for obtaining the detail fuzzy coefficient includes: The dark area structure activity coefficient and shadow interference coefficient of each superpixel real-time block are fused to obtain the detail fuzzy coefficient of each superpixel real-time block.
[0011] Furthermore, the method for obtaining the modified grid includes: Get the initial size of the initial grid; Negative correlation mapping is performed on the detail fuzzy coefficient of each superpixel real-time block, and the product of the negative correlation mapping result and the initial size is obtained as the correction size to obtain the correction grid.
[0012] Furthermore, the preset difference threshold is 0.3.
[0013] Furthermore, the correlation coefficient is a Pearson correlation coefficient.
[0014] The present invention has the following beneficial effects: The present invention obtains multiple superpixel real-time blocks of a real-time endoscopic image, which helps to more conveniently process and analyze local features of the image and reduce computational complexity; based on the difference in pixel value distribution between different superpixel real-time blocks, a dark area probability parameter of each superpixel real-time block is obtained, and by evaluating the distribution difference of pixel values within the superpixel real-time block, the dark area in the image can be identified; based on the pixel value distribution of the corresponding area between different adjacent endoscopic images of each superpixel real-time block and the dark area probability parameter, the dark area structure activity coefficient of each superpixel real-time block is obtained to evaluate the dynamic change of the dark area; based on the pixel similarity between each superpixel real-time block and different superpixel real-time blocks within the corresponding neighborhood in the corresponding area of all endoscopic images, the overall pixel correlation of each superpixel real-time block is obtained to evaluate the superpixel real-time block. The similarity between the block and other blocks in its neighborhood reflects the degree of influence of the superpixel real-time block by other blocks; the shadow interference coefficient of each superpixel real-time block is obtained according to the fluctuation degree distribution of the pixel values between each superpixel real-time block and different superpixel real-time blocks in the corresponding neighborhood, as well as the overall correlation of the pixels; the detail fuzziness coefficient of each superpixel real-time block is obtained according to the dark area structure activity coefficient and the shadow interference coefficient of each superpixel real-time block, which reflects the degree of fuzziness of different areas in the image and helps to identify the detail areas that need to be enhanced; the initial grid is corrected according to the detail fuzziness coefficient of each superpixel real-time block to obtain a corrected grid so that it can better adapt to the detail changes in the image; the CLAHE algorithm is performed on each superpixel real-time block in the endoscopic image according to the corrected grid to obtain an enhanced endoscopic image. The present invention improves the imaging quality by obtaining a suitable grid for endoscopic image enhancement processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] 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.
[0016] Figure 1 A flowchart of a high-definition digital imaging method applicable to an ENT endoscope provided by an embodiment of the present invention; Figure 2 A flow chart of a method for obtaining a dark area structure activity coefficient provided by an embodiment of the present invention; Figure 3 A flow chart of a method for obtaining a shadow interference coefficient provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] 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 high-definition digital imaging method suitable for ENT endoscopes proposed according to the present invention, its specific implementation, structure, features and effects, 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.
[0018] 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.
[0019] The following is a detailed description of a specific scheme of a high-definition digital imaging method applicable to an ENT endoscope provided by the present invention in conjunction with the accompanying drawings.
[0020] See also Figure 1 , which shows a flow chart of a high-definition digital imaging method applicable to an ENT endoscope provided by an embodiment of the present invention, and the specific method includes: Step S1: Acquire endoscopic images of the observation site in time series.
[0021] In the embodiments of the present invention, since the internal structure of the observed part is complex and there are mutual occlusions, the detailed features of the local area may be difficult to present clearly when the image light source is insufficiently illuminated. Therefore, in order to improve the quality of image imaging, it is necessary to analyze the endoscopic image; first, a multi-camera endoscope is used, and a high-intensity cold light source such as an LED or fiber optic light source is set at the front end of the camera to provide a stable light source, and a CMOS high-definition camera at the front end of the endoscope is used to capture the endoscopic image of the observed part in real time, and the image is automatically stored in the device cloud storage system according to the acquisition time; the endoscopic image of the observed part is acquired in time sequence; wherein, in the embodiments of the present invention, the observed parts are the ear, nose, and throat.
[0022] It should be noted that in order to facilitate the subsequent image processing process, the acquired endoscopic image is preprocessed to enhance the image quality. It should be noted that the image preprocessing operation is a technical means well known to those skilled in the art, which can be specifically set according to the specific implementation scenario. In one embodiment of the present invention, a denoising and cleaning algorithm is used for image processing to remove interference signals in the image, which can highlight the contour and details of the image and make the image clearer. The image is then linearly normalized to unify the contrast and brightness differences between different images. The specific means are technical means well known to those skilled in the art and will not be described in detail here.
[0023] Step S2: obtaining multiple superpixel real-time blocks of the real-time endoscopic image; obtaining the dark area probability parameter of each superpixel real-time block according to the difference in pixel value distribution between different superpixel real-time blocks; obtaining the dark area structure activity coefficient of each superpixel real-time block according to the pixel value distribution of the corresponding area between different adjacent endoscopic images of each superpixel real-time block and the dark area probability parameter.
[0024] Endoscopic images usually contain rich details and complex texture information, which makes it difficult to process pixels directly. In order to reduce computational complexity, images are segmented into multiple superpixel blocks, which helps to simplify the image analysis and understanding process. Multiple superpixel real-time blocks of real-time endoscopic images are obtained.
[0025] It should be noted that, in one embodiment of the present invention, for real-time endoscopic images, superpixel segmentation is used to obtain multiple superpixel real-time blocks. Among them, superpixel segmentation can aggregate the pixels in the real-time endoscopic image into several larger pixel blocks according to similarity criteria such as color, texture or shape, that is, superpixel real-time blocking, which helps to greatly reduce the dimension of image processing while retaining important information of the image. Specific superpixel segmentation is a technical means well known to those skilled in the art and will not be elaborated here.
[0026] Due to the differences in spatial position and light reflection characteristics of different tissue structures, the light reflection characteristics are random, which makes some areas of the image reflect less light, resulting in the formation of local dark areas in the image. The light reflection changes between regions are quite significant. By analyzing the differences in pixel value distribution between different superpixel real-time blocks, the changes in light between different regions in the image can be reflected. The greater the change, the more likely it is to present a single feature, and the larger the dark area probability parameter. According to the differences in pixel value distribution between different superpixel real-time blocks, the dark area probability parameter of each superpixel real-time block is obtained.
[0027] Preferably, in one embodiment of the present invention, the method for obtaining the dark area probability parameter includes: The mean value of all pixel values in each superpixel real-time block is obtained as the block pixel level; the dark area possible coefficient is obtained according to the difference distribution of block pixel levels between different superpixel real-time blocks; According to the difference in block pixel levels between each superpixel real-time block and different superpixel real-time blocks in the corresponding neighborhood, as well as the dark area possibility coefficient, the dark area probability parameter of each superpixel real-time block is obtained. The difference in block pixel levels and the dark area possibility coefficient are positively correlated with the dark area probability parameter.
[0028] Among them, the greater the difference in the pixel level between superpixel real-time blocks, the more inconsistent the pixel distribution between superpixel real-time blocks, the more single features the superpixel real-time blocks present, the greater the dark area possibility coefficient, and the greater the credibility of the existence of dark areas.
[0029] In one embodiment of the present invention, the formula of the dark area probability parameter is expressed as: ; in, Indicates Dark area probability parameter of superpixel real-time segmentation; Indicates the neighborhood The dark area probability coefficient of superpixel real-time block; Indicates The block pixel level of superpixel real-time block; Indicates the neighborhood The block pixel level of superpixel real-time block; Indicates The number of superpixel real-time blocks within the neighborhood of a superpixel real-time block; Indicates taking the absolute value; Represents the normalization function.
[0030] In the formula for the dark zone probability parameter, Indicates the calculation The superpixel is divided into blocks in real time and the corresponding neighborhood is The difference in pixel level between superpixel real-time blocks is greater, indicating that the pixel distribution between blocks is less similar, and the more likely there is a dark area influence. The greater the dark area possibility coefficient, the greater the dark area probability parameter.
[0031] It should be noted that, in one embodiment of the present invention, the neighborhood range is a range consisting of all adjacent superpixel real-time blocks centered on each superpixel real-time block, and the central superpixel real-time block is not included in the range; in other embodiments of the present invention, the neighborhood range can be set according to specific circumstances, and is not limited or elaborated here.
[0032] Preferably, considering that the smaller the difference in the pixel level of the block is, the closer the pixel distribution of the superpixel real-time block is, the more likely it is to correspond to the same type of tissue area; in one embodiment of the present invention, the method for obtaining the possible coefficient of the dark area includes: Obtain the difference in block pixel level between different superpixel real-time blocks and normalize them as the block difference index; If the block difference index between the super-pixel real-time blocks is less than the preset difference threshold, the corresponding super-pixel real-time blocks are regarded as the same type of blocks; The ratio of the number of similar blocks corresponding to each superpixel real-time block to the number of all superpixel real-time blocks is obtained, and negative correlation mapping is performed as the possible coefficient of the dark area of each superpixel real-time block.
[0033] It should be noted that, in one embodiment of the present invention, the preset difference threshold is 0.3; in other embodiments of the present invention, the preset difference threshold may be specifically set according to specific circumstances, which is not limited or elaborated herein.
[0034] It should be noted that, in one embodiment of the present invention, since the ratio of the number of similar blocks corresponding to each superpixel real-time block to the number of all superpixel real-time blocks is 0-1, the difference between the positive integer 1 and the ratio can be calculated to represent the contrast value for negative correlation mapping, and the larger the ratio, the smaller the difference; in other embodiments of the present invention, the inverse of the contrast value can also be taken for negative correlation mapping, wherein, in order for the denominator of the formula to be 0, it is necessary to add an artificially set threshold, such as 0.01, and the specific means are technical means well known to those skilled in the art and will not be elaborated here.
[0035] In one embodiment of the present invention, the formula for the dark area possible coefficient is expressed as: ; in, Indicates The dark area probability coefficient of superpixel real-time block; Indicates The number of similar blocks corresponding to each superpixel real-time block; Represents the number of all superpixel real-time patches.
[0036] Taking into account that the lesion area of the observation site is affected by the change of light reflection characteristics and the dark area of the lesion appears, the pixel value distribution changes accordingly when the light source angle changes. By analyzing the pixel value distribution of the corresponding area between adjacent endoscopic images, the changes of the dark area in the image can be captured; the dark area probability parameter is used to quantify the possibility of the appearance of dark areas in the image. The larger the dark area probability parameter, the more dark area structures there are; according to the pixel value distribution of the corresponding area between different adjacent endoscopic images of each superpixel real-time block and the dark area probability parameter, the dark area structure activity coefficient of each superpixel real-time block is obtained.
[0037] Preferably, in one embodiment of the present invention, the method for obtaining the dark area structure activity coefficient can be found in Figure 2 , which shows a flow chart of a method for obtaining the dark area structure activity coefficient, including: Step S201: Use a corner point detection method to obtain the corner points of each superpixel real-time block in the corresponding area of each endoscopic image; obtain the difference in the number of corresponding corner points of each superpixel real-time block between different adjacent endoscopic images as the first difference feature.
[0038] When the dark area of the image is affected by a lesion, since the lesion area usually has the characteristics of a depression or a mass, the distribution of corner points is relatively complex, which causes the number of corner points to change significantly when the light source changes. The greater the difference in the number of corner points, the greater the first difference feature.
[0039] It should be noted that, in the embodiments of the present invention, existing corner point detection algorithms may be used to obtain corner points in a region, such as the Shi-Tomasi corner point detection algorithm; specific means are well known to those skilled in the art and will not be elaborated herein.
[0040] Step S202: Obtain the mean square error of a set of all pixel values in corresponding areas between different adjacent endoscopic images of each superpixel real-time block as a second difference feature.
[0041] The mean square error is used to measure the difference in pixel value distribution in the corresponding area of each superpixel real-time block between different adjacent endoscopic images to reflect the changes in tissue structure. Since the pixel value distribution changes significantly when the light source angle changes in the dark area of the lesion, the greater the difference in pixel value distribution, the greater the mean square error and the greater the second difference feature.
[0042] Step S203: According to the first difference feature, the second difference feature and the dark area probability parameter corresponding to each superpixel real-time block, the dark area structure activity coefficient of each superpixel real-time block is obtained, and the first difference feature, the second difference feature and the dark area probability parameter are all positively correlated with the dark area structure activity coefficient.
[0043] Among them, the larger the first difference feature, the greater the difference in the number of corner points in the corresponding areas between adjacent endoscopic images; the larger the second difference feature, the greater the difference in pixel value distribution in the corresponding areas between adjacent endoscopic images, and the more likely it is that there is a dark area with lesions; the larger the dark area probability parameter, the greater the dark area structure activity coefficient.
[0044] In one embodiment of the present invention, the formula of the dark area structure activity coefficient is expressed as: ; in, Indicates The dark area structure activity coefficient of superpixels real-time block; Indicates Dark area probability parameter of superpixel real-time segmentation; Indicates Superpixel real-time block A set of all pixel values in the corresponding area of an endoscopic image; Indicates Superpixel real-time block A set of all pixel values in the corresponding area of an endoscopic image; Indicates Superpixel real-time block and The difference in the number of corner points in the corresponding area between the endoscopic images is the first difference feature; Indicates Superpixel real-time block and The mean square error of the set of all pixel values in the corresponding area between the endoscopic images is the second difference feature; Represents the number of all endoscopic images.
[0045] In the formula of the dark area structure activity coefficient, Indicates the calculation Superpixel real-time block and The product of the first difference feature and the second difference feature in the corresponding area between the endoscopic images is larger, the larger the first difference feature is, the larger the second difference feature is, the more likely the structure is to change, and the more likely there is a dark area of lesions. It means to quantify the relationship between all adjacent endoscopic images by taking the mean. The larger the mean, the more significant the change, the greater the possibility of lesions, the larger the dark area probability parameter, and the more active the dark area structure.
[0046] Step S3: According to the pixel similarity between each superpixel real-time block and different superpixel real-time blocks in the corresponding area of all endoscopic images, the overall pixel correlation of each superpixel real-time block is obtained; according to the fluctuation degree distribution of pixel values between each superpixel real-time block and different superpixel real-time blocks in the corresponding neighborhood, as well as the overall pixel correlation, the shadow interference coefficient of each superpixel real-time block is obtained.
[0047] In actual situations, local areas of images are affected by the surrounding complex structures. The closer the pixel values of adjacent areas are, the more consistent the global features of the corresponding areas of all endoscopic images between superpixel real-time blocks are. This reflects the overall structure of the image. Based on the pixel similarity between each superpixel real-time block and the corresponding areas of all endoscopic images between different superpixel real-time blocks in the corresponding neighborhood, the overall pixel correlation of each superpixel real-time block is obtained.
[0048] Preferably, in one embodiment of the present invention, the method for obtaining the overall pixel correlation includes: For each superpixel real-time block and each superpixel real-time block in the corresponding neighborhood, the correlation coefficient of the set of block pixel levels in the corresponding area of all endoscopic images between the superpixel real-time blocks is obtained as the pixel local correlation; The average of the local correlations of the corresponding pixels between each superpixel real-time block and all superpixel real-time blocks in the corresponding neighborhood is obtained as the overall correlation of the pixels of each superpixel real-time block.
[0049] In one embodiment of the present invention, the formula for the overall pixel correlation is expressed as: ; in, Indicates The overall pixel correlation of superpixels in real-time blocks; Indicates The number of different superpixel real-time blocks within the neighborhood of a superpixel real-time block; Indicates A superpixel real-time block is a set of block pixel levels in the corresponding area of all endoscopic images; Indicates the neighborhood A superpixel real-time block is a set of block pixel levels in the corresponding area of all endoscopic images; Indicates Superpixels are divided into blocks in real time and the The correlation coefficient of the set composed of the block pixel levels in the corresponding area of all endoscopic images between the real-time blocks of the superpixel is the local correlation of the pixels between the local correlations of the corresponding pixels.
[0050] In the overall pixel correlation, Indicates The average value of the local pixel correlation between a superpixel real-time block and all superpixel real-time blocks in the neighborhood, that is, the overall pixel correlation. The more similar the pixel value distribution is, the more consistent the block pixel level is, the greater the local pixel correlation is, and the greater the overall pixel correlation is.
[0051] It should be noted that, in one embodiment of the present invention, the correlation coefficient is a Pearson correlation coefficient. The specific Pearson correlation coefficient is a technical means well known to those skilled in the art and will not be elaborated herein.
[0052] The fluctuation degree of pixel value reflects the brightness or color change of the superpixel real-time block in the image. In the case of shadow interference, there is a significant difference in the pixel value between the shadow area and the surrounding normal area, which leads to the fluctuation of pixel value. By combining the fluctuation degree distribution of pixel value and the overall correlation of pixels, the impact of shadow interference on the image can be more comprehensively evaluated. Therefore, according to the fluctuation degree distribution of pixel values between each superpixel real-time block and different superpixel real-time blocks in the corresponding neighborhood range, as well as the overall correlation of pixels, the shadow interference coefficient of each superpixel real-time block is obtained.
[0053] Preferably, in one embodiment of the present invention, the method for obtaining the shadow interference coefficient can be found in Figure 3 , which shows a flow chart of a method for obtaining a shadow interference coefficient, including: Step S301: Obtain the fluctuation degree of all pixel values in each superpixel real-time block as the block pixel fluctuation feature.
[0054] The fluctuation degree of all pixel values reflects the distribution characteristics of pixel values. The greater the fluctuation degree, the more uneven the pixel value distribution is, and the less interference from shadows is. The smaller the fluctuation degree, the more uniform the pixel value distribution is, and the more the light source of the endoscope is blocked by tissue or equipment, causing the brightness of the area to decrease or disappear completely, and the greater the interference from shadows.
[0055] It should be noted that, in one embodiment of the present invention, the degree of fluctuation is expressed by calculating the variance, the larger the variance, the larger the degree of fluctuation, and the smaller the variance, the smaller the degree of fluctuation; in other embodiments of the present invention, the standard deviation and range may also be used to express the degree of fluctuation, and the specific means are well known to those skilled in the art and will not be elaborated here.
[0056] Step S302: Obtain the average of the block pixel fluctuation characteristics of all superpixels in real time within the neighborhood as the neighborhood pixel fluctuation characteristic.
[0057] The overall level of block pixel fluctuation characteristics of all superpixel real-time blocks in the neighborhood is quantified by taking the average value, which serves as the benchmark for subsequent comparisons.
[0058] Step S303: Obtain the difference between the block pixel fluctuation characteristics and the neighborhood pixel fluctuation characteristics of each superpixel real-time block, and perform negative correlation mapping as the distribution stability degree; weight the corresponding distribution stability degree according to the overall pixel correlation of each superpixel real-time block to obtain the shadow interference coefficient of each superpixel real-time block.
[0059] In one embodiment of the present invention, the shadow interference coefficient is expressed as: ; in, Indicates Shadow interference coefficient of superpixel real-time block; Indicates The fluctuation degree of all pixel values in a superpixel real-time block, i.e., the pixel fluctuation characteristics of the block; Indicates The average value of the block pixel fluctuation characteristics of all superpixel real-time blocks within the neighborhood of a superpixel real-time block, that is, the neighborhood pixel fluctuation characteristics; Indicates The overall pixel correlation of superpixels in real-time blocks; Represents a natural constant.
[0060] In the formula for the shadow interference coefficient, The exponential function with the natural constant as the base will be Conduct negative correlation mapping, i.e., the degree of distribution stability; Indicates the calculation The difference between the block pixel fluctuation characteristics of a superpixel real-time block and the neighborhood pixel fluctuation characteristics, the larger the difference, the larger the block pixel fluctuation characteristics of the corresponding superpixel real-time block, the more uneven the pixel value distribution in the block, the smaller the distribution stability, and the less interference from shadows. Conversely, the larger the difference, the smaller the block pixel fluctuation characteristics of the corresponding superpixel real-time block, the more uniform the pixel value distribution in the block, the greater the distribution stability, and the greater the shadow interference; the distribution stability is weighted based on the overall pixel correlation. Therefore, the greater the overall pixel correlation, the more each superpixel real-time block is affected by the surrounding blocks containing complex structures, the greater the distribution stability, the greater the shadow interference, and the larger the shadow interference coefficient.
[0061] Step S4: Obtain the detail fuzziness coefficient of each superpixel real-time block according to the dark area structure activity coefficient and the shadow interference coefficient of each superpixel real-time block; and correct the initial grid according to the detail fuzziness coefficient of each superpixel real-time block to obtain a corrected grid.
[0062] By comprehensively considering the dark area structure activity coefficient and the shadow interference coefficient, the detail blur of the superpixel real-time block is more comprehensively evaluated; the dark area structure activity coefficient evaluates the possibility that the superpixel real-time block belongs to the lesion dark area. The larger the dark area structure activity coefficient, the higher the possibility of belonging to the lesion dark area. The shadow interference coefficient reflects the degree to which the superpixel real-time block is blocked by shadows. The larger the shadow interference coefficient, the greater the degree of shadow blocking, resulting in more complex and more numerous detail features, and the detail features become more blurred and unclear. According to the dark area structure activity coefficient and shadow interference coefficient of each superpixel real-time block, the detail blur coefficient of each superpixel real-time block is obtained.
[0063] Preferably, in one embodiment of the present invention, the method for obtaining the detail blur coefficient includes: The dark area structure activity coefficient and shadow interference coefficient of each superpixel real-time block are fused to obtain the detail fuzzy coefficient of each superpixel real-time block.
[0064] It should be noted that, in some embodiments of the present invention, the dark area structure activity coefficient and the shadow interference coefficient can be fused by addition or multiplication. The specific means are well known to those skilled in the art and will not be elaborated here.
[0065] In one embodiment of the present invention, the formula of the detail blur coefficient is expressed as: ;in, Indicates The detail blur coefficient of superpixel real-time block; Indicates Shadow interference coefficient of superpixel real-time block; Indicates The dark area structure activity coefficient of superpixels real-time block.
[0066] If the window size is set to a smaller size, although the local detail information can be better captured, the global information may be ignored; if the window size is set to a larger size, although the global information can be better considered, more noise and computational complexity may be introduced; obtaining the detail fuzzy coefficient to reflect the distribution state of the detail features within the block helps to adjust the size of the initial grid; the initial grid is corrected according to the detail fuzzy coefficient of each superpixel real-time block to obtain a corrected grid.
[0067] Preferably, in one embodiment of the present invention, the method for obtaining the modified grid includes: Get the initial size of the initial grid; The detail fuzzy coefficient of each superpixel real-time block is negatively mapped, and the product of the negative correlation mapping result and the initial size is obtained as the correction size to obtain the correction grid.
[0068] In one embodiment of the present invention, the formula for correcting the size is expressed as: ; in, Indicates The real-time block of superpixels corresponds to the corrected size of the initial grid; Indicates The detail blur coefficient of superpixel real-time block; Indicates Superpixels are divided into blocks corresponding to the initial grid in real time; Represents a natural constant.
[0069] In the formula for correcting the size, It means that the exponential function with the natural constant as the base is used to convert For negative correlation mapping, the larger the detail blur coefficient, the lower the contrast of the corresponding area, the more targeted local enhancement is needed, the smaller the initial size is adjusted, and the smaller the correction size is.
[0070] Step S5: Perform the CLAHE algorithm on each superpixel in the endoscopic image in real time according to the corrected grid to obtain an enhanced endoscopic image.
[0071] After obtaining the corrected grid of each superpixel real-time block, the superpixel real-time block is adaptively enhanced based on the CLAHE algorithm to enhance the detail information in the block, so that the originally hidden or blurred image details are fully displayed, thereby increasing the amount of information in the image; the specific CLAHE algorithm is a technical means well known to those skilled in the art and will not be described in detail here.
[0072] It should be noted that the superpixel real-time blocks are enhanced in sequence from the upper left corner to the lower right corner of the endoscopic image. After the enhanced endoscopic image is obtained, it can also be smoothed by Gaussian filtering to eliminate the fast effect within the superpixel real-time blocks, ensuring that the final endoscopic image is smoother and clearer, which helps to understand the tissue structure within the observation area and improve the efficiency of subsequent diagnostic analysis.
[0073] In summary, the present invention analyzes the pixel value distribution between different superpixel real-time blocks in the real-time endoscopic image to obtain the dark area structure activity coefficient of each superpixel real-time block; according to the pixel similarity between each superpixel real-time block and different superpixel real-time blocks in the corresponding area of all endoscopic images within the corresponding neighborhood, the overall pixel correlation of each superpixel real-time block is obtained; combined with the fluctuation degree distribution of the pixel values between each superpixel real-time block and different superpixel real-time blocks within the corresponding neighborhood, the shadow interference coefficient of each superpixel real-time block is obtained; and then the detail fuzzy coefficient of each superpixel real-time block is obtained, the initial grid is corrected, the corrected grid is obtained, and the enhanced endoscopic image is obtained. The present invention improves the imaging quality by obtaining a suitable grid during the endoscopic image enhancement process.
[0074] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0075] 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 high-definition digital imaging method suitable for ENT endoscope, characterized in that: The method comprises: Acquiring endoscopic images of the observation site in time sequence; A plurality of superpixel real-time blocks of a real-time endoscopic image are obtained; a dark area probability parameter of each superpixel real-time block is obtained according to the difference in pixel value distribution between different superpixel real-time blocks; a dark area structure activity coefficient of each superpixel real-time block is obtained according to the pixel value distribution of the corresponding area between different adjacent endoscopic images of each superpixel real-time block and the dark area probability parameter; According to the pixel similarity between each superpixel real-time block and different superpixel real-time blocks within the corresponding neighborhood in all corresponding areas of the endoscopic image, the overall pixel correlation of each superpixel real-time block is obtained; according to the fluctuation degree distribution of pixel values between each superpixel real-time block and different superpixel real-time blocks within the corresponding neighborhood, and the overall pixel correlation, the shadow interference coefficient of each superpixel real-time block is obtained; According to the dark area structure activity coefficient and shadow interference coefficient of each superpixel real-time block, the detail fuzzy coefficient of each superpixel real-time block is obtained; according to the detail fuzzy coefficient of each superpixel real-time block, the initial grid is corrected to obtain a corrected grid; The CLAHE algorithm is performed on each superpixel in the endoscopic image in real time according to the modified grid to obtain an enhanced endoscopic image.
2. A high-definition digital imaging method suitable for ENT endoscope according to claim 1, characterized in that: The method for obtaining the dark area probability parameter includes: The mean value of all pixel values in each superpixel real-time block is obtained as the block pixel level; the dark area possible coefficient is obtained according to the difference distribution of block pixel levels between different superpixel real-time blocks; According to the difference in block pixel levels between each superpixel real-time block and different superpixel real-time blocks in the corresponding neighborhood, as well as the dark area possibility coefficient, the dark area probability parameter of each superpixel real-time block is obtained, and the difference in block pixel levels and the dark area possibility coefficient are positively correlated with the dark area probability parameter.
3. A high-definition digital imaging method suitable for ENT endoscope according to claim 2, characterized in that: The method for obtaining the possible coefficient of the dark area includes: Obtain the difference in block pixel level between different superpixel real-time blocks and normalize them as the block difference index; If the block difference index between the super-pixel real-time blocks is less than the preset difference threshold, the corresponding super-pixel real-time blocks are regarded as the same type of blocks; The ratio of the number of similar blocks corresponding to each superpixel real-time block to the number of all superpixel real-time blocks is obtained, and negative correlation mapping is performed as the possible coefficient of the dark area of each superpixel real-time block.
4. A high-definition digital imaging method suitable for ENT endoscope according to claim 1, characterized in that: The method for obtaining the dark area structure activity coefficient includes: A corner point detection method is used to obtain the corner points of each superpixel real-time block in the corresponding area of each endoscopic image; the difference in the number of corresponding corner points of each superpixel real-time block between different adjacent endoscopic images is obtained as a first difference feature; Obtaining the mean square error of a set of all pixel values in a corresponding area between different adjacent endoscopic images for each superpixel real-time block as a second difference feature; According to the first difference feature, the second difference feature and the dark area probability parameter corresponding to each superpixel real-time block, the dark area structure activity coefficient of each superpixel real-time block is obtained, and the first difference feature, the second difference feature and the dark area probability parameter are all positively correlated with the dark area structure activity coefficient.
5. A high-definition digital imaging method suitable for ENT endoscope according to claim 2, characterized in that: The method for obtaining the overall pixel correlation comprises: For each superpixel real-time block and each superpixel real-time block in the corresponding neighborhood, the correlation coefficient of the set of block pixel levels in the corresponding area of all endoscopic images between the superpixel real-time blocks is obtained as the pixel local correlation; The average value of the local pixel correlation between each superpixel real-time block and all superpixel real-time blocks in the corresponding neighborhood is obtained as the overall pixel correlation of each superpixel real-time block.
6. A high-definition digital imaging method suitable for ENT endoscope according to claim 1, characterized in that: The method for obtaining the shadow interference coefficient includes: Obtain the fluctuation degree of all pixel values in each superpixel real-time block as the block pixel fluctuation feature; Obtain the average of the block pixel fluctuation characteristics of all superpixels in real time within the neighborhood as the neighborhood pixel fluctuation characteristic; The difference between the block pixel fluctuation characteristics and the neighborhood pixel fluctuation characteristics of each superpixel real-time block is obtained, and a negative correlation mapping is performed as the distribution stability degree; the corresponding distribution stability degree is weighted according to the overall pixel correlation of each superpixel real-time block to obtain the shadow interference coefficient of each superpixel real-time block.
7. A high-definition digital imaging method suitable for ENT endoscope according to claim 1, characterized in that: The method for obtaining the detail fuzzy coefficient includes: The dark area structure activity coefficient and shadow interference coefficient of each superpixel real-time block are fused to obtain the detail fuzzy coefficient of each superpixel real-time block.
8. The high-definition digital imaging method applicable to ENT endoscope according to claim 1, characterized in that: The method for obtaining the modified grid includes: Get the initial size of the initial grid; Negative correlation mapping is performed on the detail fuzzy coefficient of each superpixel real-time block, and the product of the negative correlation mapping result and the initial size is obtained as the correction size to obtain the correction grid.
9. A high-definition digital imaging method suitable for ENT endoscope according to claim 3, characterized in that: The preset difference threshold is 0.
3.
10. A high-definition digital imaging method suitable for ENT endoscope according to claim 5, characterized in that: The correlation coefficient is the Pearson correlation coefficient.
Citation Information
Patent Citations
Image processing method and capsule type endoscope device
CN101043841A
Front-mounted lens online intelligent self-cleaning device and method based on lens fuzzy detection
CN113814212A
Image processing method and system in thoracoscopic surgery
CN115937144A
Lens shadow correction method and device for endoscope imaging and endoscope system
CN116681624A
Defogging implementation method and system based on improved dark channel algorithm
CN117726547A