Spinal endoscope image enhancement method, device, equipment, medium and product
The color and texture enhancement of spinal endoscopic images is solved through the light attenuation model and the CLAHE algorithm, which solves the color shift and blur problems of spinal endoscopic images, realizes high-contrast image fusion, and improves the visual effect of the image and the feature point extraction ability of the SLAM system.
Patent Information
- Application Number
- CN202510596082.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-09
- Publication Date
- 2025-08-26
AI Technical Summary
The existing classic image enhancement algorithms and laparoscopic image enhancement methods cannot effectively solve the color shift and blurring of spinal endoscopic images, resulting in poor visual effects and failure to extract feature points in SLAM system.
Color recovery is performed based on light attenuation model, and texture enhancement is performed on spinal endoscopic images with the adaptive histogram equalization algorithm, and color and texture information are fused through the IHS method to form a high-contrast fusion image.
It improves the enhancement effect of spinal endoscopic images, retains image color information and improves the contrast of texture information, solves the color shift and blur problems, and enhances the visual effect of the image and the feature point extraction ability of the SLAM system.
Smart Images

Figure CN120543391A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a spinal endoscopy image enhancement method, device, equipment, medium and product. Background Art
[0002] During the use of spinal endoscopes, in order to maintain a clear surgical field of view and control bleeding, physiological saline is continuously infused into the endoscope. Physiological saline not only helps stop bleeding and reduce the risk of infection, but also promptly removes pollutants such as tissue debris, particles, and blood generated during the surgical operation from the surgical area to prevent interference with endoscopic imaging and surgical operations. Due to the contamination of tissue particles and blood in the endoscopic scene, endoscopic images may have problems such as color deviation and blurring. The color deviation problem of endoscopic images will affect the visual effect of the image and the identification of tissues under the microscope. The blurring problem of endoscopic images may cause the subsequent visual simultaneous localization and mapping (SLAM) system in this article to be unable to extract and match enough feature points, resulting in system tracking failure. Therefore, it is necessary to enhance the spinal endoscopic images to increase the number of feature point extraction and matching probability.
[0003] Classic image enhancement algorithms and methods for enhancing laparoscopic and other endoscopic images often fail to specifically address the imaging issues unique to spinal endoscopic images, resulting in unsatisfactory results in their applications. Classic image enhancement methods such as histogram equalization often only partially enhance image texture but cannot address image color casts. Most enhancement methods for laparoscopic and other endoscopic images also address image texture and lighting issues, and these methods are similarly unsatisfactory when applied to spinal endoscopic images. Summary of the Invention
[0004] The purpose of this application is to provide a spinal endoscopy image enhancement method, device, equipment, medium and product to restore color and enhance texture of images, thereby improving the enhancement effect of spinal endoscopy images.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides a spinal endoscopic image enhancement method, comprising:
[0007] Perform color restoration on the target spinal endoscopy image based on the light attenuation model to obtain a color restored image;
[0008] Using a contrast-limited adaptive histogram equalization algorithm to process the grayscale image of the target spinal endoscopic image to obtain a texture-enhanced grayscale image;
[0009] The color restored image and the texture enhanced grayscale image are fused to obtain an enhanced target spinal endoscopic image.
[0010] Optionally, color restoration is performed on the target spinal endoscopy image based on the light attenuation model to obtain a color restored image, specifically including:
[0011] The target spinal endoscopy image is divided into three color regions according to the HSV color space, namely white region, red region and light yellow region;
[0012] Optimizing the coefficients of each color region separately to obtain the coefficients of each color region, wherein the coefficients are the coefficients for calculating the image transmittance of the corresponding color region;
[0013] An image transmittance map of each color region is obtained according to the coefficient of each color region, and a composite image transmittance map is obtained from the image transmittance maps of the three color regions;
[0014] Using the preset endoscopic image as a guide image, the synthesized image transmittance map is subjected to guided filtering optimization to obtain the final image transmittance map;
[0015] Taking the average brightness of the white area as the ambient light;
[0016] A color restored image is obtained according to the target spinal endoscopy image, the final image transmittance map and the ambient light.
[0017] Optionally, coefficient optimization is performed on each color region to obtain coefficients of each color region, where the coefficients are coefficients for calculating the image transmittance of the corresponding color region, specifically including:
[0018] The objective function for coefficient optimization of each color region is expressed as:
[0019]
[0020] Among them, L is the likelihood function, k0, k1, k2 and σ are the coefficients for calculating the transmittance of the current color area, k0, k1, k2 and σ satisfy t(x i )=k0+k1·V(x i )+k2·S(x i )+ε(x i ), t(x i ) is the true value of the transmittance of the i-th point in the current color area, x i represents the coordinates of point i, V(x i ) is the brightness value of point i, S(x i ) is the saturation of point i, ε(x i ) is the random error of the i-th point represented by the zero-bias Gaussian distribution, ε(xi )~N(0,σ 2 ), n is the number of pixels.
[0021] Optionally, obtaining a color restored image according to the target spinal endoscopic image, the final image transmittance map, and the ambient light specifically includes:
[0022] The color restored image is obtained according to the scene radiation restoration formula, which is expressed as:
[0023]
[0024] Where J(x) represents the color restored image, x represents the coordinate, I(x) represents the target spinal endoscopy image, A represents the ambient light, t(x) is the transmittance, t min and t max are the minimum and maximum values of the transmittance t(x).
[0025] Optionally, fusing the color-restored image and the texture-enhanced grayscale image to obtain an enhanced target spinal endoscopic image specifically includes:
[0026] The color restored image and the texture enhanced grayscale image are fused using the IHS method to obtain an enhanced target spinal endoscopic image.
[0027] Optionally, the color-restored image and the texture-enhanced grayscale image are fused using an IHS method to obtain an enhanced target spinal endoscopic image, specifically comprising:
[0028] Performing an IHS forward transformation on the color restored image to obtain a hue component and a saturation component;
[0029] The hue component, the saturation component and the intensity component of the texture-enhanced grayscale image are subjected to an IHS inverse transformation to obtain an enhanced target spinal endoscopic image.
[0030] In a second aspect, the present application provides a spinal endoscopic image enhancement device, wherein the spinal endoscopic image enhancement device applies any of the spinal endoscopic image enhancement methods described above, and the spinal endoscopic image enhancement device comprises:
[0031] A color restoration module, used to restore the color of the target spinal endoscopy image based on the light attenuation model to obtain a color restored image;
[0032] A texture enhancement module, configured to process the grayscale image of the target spinal endoscopy image using a contrast-limited adaptive histogram equalization algorithm to obtain a texture-enhanced grayscale image;
[0033] The image fusion module is used to fuse the color-restored image and the texture-enhanced grayscale image to obtain an enhanced target spinal endoscopic image.
[0034] In a third aspect, the present application provides a computer device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any one of the above-described spinal endoscopic image enhancement methods.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any one of the above-mentioned spinal endoscopic image enhancement methods.
[0036] In a fifth aspect, the present application provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any one of the above-mentioned spinal endoscopic image enhancement methods.
[0037] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0038] The present application provides a spinal endoscopic image enhancement method, apparatus, equipment, medium and product, which performs color restoration on a target spinal endoscopic image based on an illumination attenuation model to obtain a color-restored image; uses a contrast-limited adaptive histogram equalization (CLAHE) algorithm to process the grayscale image of the target spinal endoscopic image to obtain a texture-enhanced grayscale image, thereby obtaining a fused image that retains both image color information and high-contrast texture information, thereby improving the enhancement effect of the spinal endoscopic image. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0040] Figure 1 A schematic flow chart of a spinal endoscopic image enhancement method provided in one embodiment of the present application;
[0041] Figure 2 A schematic diagram of the principle of a spinal endoscopy image enhancement method provided in one embodiment of the present application;
[0042] Figure 3A schematic diagram of a spinal endoscopy image provided in one embodiment of the present application;
[0043] Figure 4 A schematic diagram of three color regions of a spinal endoscopy image provided in one embodiment of the present application;
[0044] Figure 5 A schematic diagram of a transmittance diagram of an endoscopic image provided in one embodiment of the present application;
[0045] Figure 6 A schematic diagram of a light attenuation model provided in one embodiment of the present application;
[0046] Figure 7 Schematic diagram of the original spinal endoscopy image and the image after CLAHE processing provided in one embodiment of the present application;
[0047] Figure 8 A schematic diagram of the histogram corresponding to the original spinal endoscopy image and the CLAHE-processed image provided in one embodiment of the present application;
[0048] Figure 9 A schematic diagram of the IHS image fusion process provided in one embodiment of the present application;
[0049] Figure 10 A schematic diagram of the functional modules of a spinal endoscopy image enhancement device provided in one embodiment of the present application;
[0050] Figure 11 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0052] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0053] In an exemplary embodiment, the present application provides a spinal endoscopy image enhancement method, such as Figure 1 As shown, the spinal endoscopy image enhancement method includes steps 101 to 103.
[0054] Step 101: Perform color restoration on the target spinal endoscopy image based on the light attenuation model to obtain a color restored image.
[0055] Step 102: Processing the grayscale image of the target spinal endoscopy image using a contrast-limited adaptive histogram equalization algorithm to obtain a texture-enhanced grayscale image.
[0056] Step 103: Fusing the color-restored image and the texture-enhanced grayscale image to obtain an enhanced target spinal endoscopic image.
[0057] The color restoration algorithm for endoscopic images based on the light attenuation model estimates the transmittance map of the image, that is, the degree of absorption and scattering of light in different parts of the image, and combines it with the light irradiance restoration formula to obtain an image close to that imaged in air. For texture enhancement, the method based on histogram equalization can effectively enhance the texture information of grayscale images. This application uses the CLAHE method to enhance the grayscale image of the endoscope. Finally, the color restored color image and the texture enhanced grayscale image are fused through the IHS method to obtain the final enhanced image, such as Figure 2 shown.
[0058] This application overcomes the color deviation and blurring problems caused by the absorption and scattering effects of particulate pollutants on light. It simulates the degradation process of spinal endoscopic images based on the light attenuation model, and thereby corrects the color deviation problem of endoscopic images. For the image blurring problem, the grayscale image is processed by the histogram equalization method, and finally it is fused with the color restored image to obtain a fused image that retains the image color information and has high-contrast texture information, thereby improving the enhancement effect of spinal endoscopic images.
[0059] The spinal endoscopic images of this application are obtained through the camera of the endoscope.
[0060] In an exemplary embodiment, step 101 specifically includes steps 11 to 16.
[0061] Step 11: Divide the target spinal endoscopy image into three color areas according to the HSV color space, namely, white area, red area and light yellow area. Here, the hue (H), saturation (S) and value (V) channels of the image are used to divide different color areas. The value ranges of H, S and V for the white area are 0-360, 0-20 and 65-100, respectively. The value ranges of H, S and V for the light yellow area are 5-30, 25-100 and 0-100, respectively. The rest of the area except the white area and light yellow area is regarded as the red area. Figure 3 (a) and (b) are two spinal endoscopy images, both containing white, red, and light yellow areas. Figure 3In the two spinal endoscopic images (a) and (b), the images are relatively monochromatic and often lack shadows. In most cases, endoscopic images contain only three primary colors: pale yellow corresponding to the ligamentum flavum and fat, red corresponding to blood vessels, and white corresponding to the nucleus pulposus and ligaments. Therefore, for spinal endoscopic images, different transmittance estimation parameters can be set for each of these three colors to achieve better color restoration.
[0062] Step 12: Optimize the coefficients of each color region respectively to obtain the coefficients of each color region, where the coefficients are used to calculate the image transmittance of the corresponding color region.
[0063] Since spinal endoscopy images have few color types, in order to achieve better transmittance estimation, the spinal endoscopy images are divided into three regions according to the three colors of white, red and light yellow, such as Figure 4 As shown, the coefficients of the three color areas are optimized respectively to obtain different coefficients corresponding to the three colors.
[0064] Step 13: Obtain an image transmittance map for each color region according to the coefficient of each color region, and obtain a composite image transmittance map from the image transmittance maps of the three color regions.
[0065] Step 14: Use the preset endoscopic image as a guide image to perform guided filtering optimization on the synthesized image transmittance map to obtain the final image transmittance map.
[0066] Step 15: The average brightness of the white area is taken as the ambient light.
[0067] Step 16: Obtain a color-restored image based on the target spinal endoscopy image, the final image transmittance map, and the ambient light.
[0068] Since different coefficients are used to calculate the image transmittance map for each of the three color regions, significant transmittance variations may occur at the edges of the three color regions. Therefore, in order to eliminate the drastic changes at the edges and make the transmittance map more uniform and continuous, the estimated transmittance map needs to be optimized.
[0069] The transmittance of an image is related to the brightness and saturation of the image, and a linear model is used to describe this relationship: t(x) = k0 + k1·V(x) + k2·S(x) + ε(x).
[0070] Where ε(x) is a random value describing the random error of the model, and the zero-biased Gaussian distribution is used here to represent the random value, that is, ε(x)~N(0,σ 2 ). k0, k1, k2 and σ are unknown coefficients, N(0,σ 2 ) is a zero-bias Gaussian distribution.
[0071] The above linear models are established for the three color regions, namely:
[0072]
[0073] Among them, t r (x) is the transmittance of the red area, and are coefficients, ε r (x) is the random error of the transmittance of the red area; t w (x) is the transmittance of the white area, and are coefficients, ε w (x) is the random error of the transmittance of the white area; t y (x) is the transmittance of the light yellow area, and are coefficients, ε y (x) is the random error of the transmittance of the white area.
[0074] To obtain the optimal values of the coefficients k0, k1, k2, and σ for spinal endoscopy images, a degraded endoscopic image is generated using a high-quality endoscopic image and a synthesized transmittance map. Based on the synthesized data samples, a supervised learning method is used to optimize the optimal values of the coefficients k0, k1, k2, and σ. For a given synthesized data sample, the likelihood function L between the model coefficients and the data can be written as:
[0075]
[0076] Where n is the total number of pixels in the training data.
[0077] Optimize the coefficients of each color region separately to obtain the coefficients of each color region. The coefficients are the coefficients for calculating the image transmittance of the corresponding color region, specifically including:
[0078] The objective function for coefficient optimization of each color region is expressed as:
[0079]
[0080] Among them, k0, k1, k2 and σ are coefficients for calculating the transmittance of the current color area, and k0, k1, k2 and σ satisfy t(x i )=k0+k1·V(x i )+k2·S(x i )+ε(x i ), t(x i ) is the true value of the transmittance of the i-th point in the current color area, x i represents the coordinates of point i, V(x i ) is the brightness value of point i, S(xi ) is the saturation of point i, ε(x i ) is the random error of the i-th point represented by the zero-bias Gaussian distribution, ε(x i )~N(0,σ 2 ), n is the number of pixels.
[0081] After the color attenuation prior is used to estimate the transmittance of different regions and optimize the guided filter, the final transmittance map is as follows: Figure 5 As shown, Figure 5 The first row (a), (b) and (c) are the original images, and the second row (e), (d) and (f) are the transmittance maps corresponding to (a), (b) and (c) in the first row.
[0082] In an exemplary embodiment, the method of the present application further includes: estimating ambient light A.
[0083] Ambient light can often be estimated based on the brightest portion of an image. In endoscopic images, white areas are the brightest, so the average brightness of the brightest white areas is used to estimate ambient light. Unlike the white areas used for transmittance estimation, a higher threshold is used to select the white areas, resulting in a more accurate estimate of ambient light.
[0084] Transmittance estimation and ambient light estimation are performed, and color restoration of the image is performed based on the light attenuation model to obtain a color-restored endoscopic image.
[0085] Light attenuation model such as Figure 6 As shown, according to the light attenuation model, the total light intensity received by the camera can be expressed as:
[0086] I(x)=E d (x)+E f (x)+E b (x).
[0087] Where I(x) represents the image captured by the camera, E d (x) represents the direct reflection component, E f (x) represents the forward scattering component, E b (x) represents the backscattered component.
[0088] Among them: the direct reflection component can be expressed as the product of the reflected light of the scene surface and the transmittance, that is:
[0089] E d (x) = J(x)·t(x).
[0090] Where J(x) represents the light reflected from the scene surface, i.e., the reflected light without attenuation; t(x) represents the transmittance of the light propagation medium, which can be expressed as t(x) = e-c(λ)·d(x) , where c(λ) represents the attenuation coefficient of the light propagation medium, and d(x) represents the distance the light propagates.
[0091] The backscattered component represents the light that enters the camera due to large-scale scattering by suspended particles in the medium. The backscattered component can be expressed as:
[0092] E b (x) = A·(1-t(x)).
[0093] Where A represents the ambient light brightness.
[0094] The forward scattered component refers to the light that enters the camera after slight scattering of the directly reflected light. Its impact on imaging is much smaller than that of the backscattered component, so it is often ignored.
[0095] Therefore, the light attenuation model can be simplified as:
[0096] I(x)=J(x)·t(x)+A·(1-t(x)).
[0097] If the transmittance t(x) and the ambient light A are known, the scene surface reflected light J(x) in the above formula can be obtained, that is, the image after color restoration:
[0098]
[0099] However, since the transmittance t(x) may be close to or equal to zero, this will cause the noise to be amplified after image restoration. Therefore, in practical applications, the minimum and maximum values of the transmittance t(x) are often restricted. The final formula for scene radiation restoration is:
[0100]
[0101] Where, t min and t max is the boundary of the transmittance t(x).
[0102] The scene radiance J(x) is the final color-restored image. Compared with the original image I(x), the restored image obtained by illumination restoration can effectively improve the color distortion of the endoscopic image caused by debris particles and blood contamination.
[0103] In an exemplary embodiment, step 16 specifically includes:
[0104] The color restored image is obtained according to the scene radiation restoration formula, which is expressed as:
[0105]
[0106] Where J(x) represents the color restored image, x represents the coordinate, I(x) represents the target spinal endoscopy image, A represents the ambient light, t(x) is the transmittance, t min and t max are the minimum and maximum values of the transmittance t(x).
[0107] This application uses the histogram equalization method to improve the contrast and texture of the image. The CLAHE algorithm is an improved histogram equalization method. The CLAHE algorithm divides the image into multiple sub-regions, then classifies the histogram of each sub-region, and then performs histogram equalization on each sub-region. This method is more suitable for spinal endoscopic images with uneven local contrast. Figure 7 (a) is the original spinal endoscopy image, and (b) is the image processed by the CLAHE algorithm. Figure 8 (a) is the histogram of the original spinal endoscopy image, and (b) is the histogram of the image after processing by the CLAHE algorithm. It can be seen from the histogram that the grayscale range of the image is more balanced, and the contrast and texture information of the corresponding endoscopic image are effectively improved.
[0108] In an exemplary embodiment, step 103 specifically includes: fusing the color-restored image and the texture-enhanced grayscale image using an IHS method to obtain an enhanced target spinal endoscopic image.
[0109] In an exemplary embodiment, the color restored image and the texture enhanced grayscale image are fused using an IHS method to obtain an enhanced target spinal endoscopic image, specifically comprising:
[0110] The color restored image is subjected to IHS forward transformation to obtain a hue component and a saturation component.
[0111] The hue component, the saturation component and the intensity component of the texture-enhanced grayscale image are subjected to an IHS inverse transformation to obtain an enhanced target spinal endoscopic image.
[0112] This application performs color restoration on spinal endoscopy images based on the light attenuation model and uses the CLAHE method to enhance the texture and contrast of the endoscopic grayscale image, and fuses the information of the color image and the grayscale image into a single output image, which can effectively merge the complementary color and detail texture information in the two images to obtain a comprehensive image that contains both good image color and high-contrast texture.
[0113] The core idea of the IHS image fusion method is to convert the image from the RGB color space to the IHS (Intensity-Hue-Saturation) color space, then process each component, and finally convert it back to the RGB space to obtain the fused image. The IHS image fusion process is as follows Figure 9 As shown in FIG, the color components H and S of the color restored image after IHS forward transformation are first separated, and then the intensity component I of the texture enhanced grayscale image replaces the intensity component of the color restored image, and finally the fused image is obtained by IHS inverse transformation.
[0114] More specifically, step 103 includes:
[0115] 1) Separate the color components H and S of the color-restored image after IHS positive transformation.
[0116] The IHS color space is a color model based on human visual perception, which decomposes color into three independent components: intensity, hue, and saturation.
[0117] The conversion of RGB color space to IHS color space is called IHS forward transformation. Assuming R, G, B are the components of RGB color space, the IHS forward transformation method is:
[0118]
[0119] Where I is the intensity component of the IHS color space, T ihs is the HIS forward transformation matrix, v1 and v2 are intermediate variables of hue and saturation, and the hue component H and saturation component S can be obtained as follows:
[0120]
[0121] 2) The intensity component I of the texture-enhanced grayscale image is replaced by the intensity component of the color-restored image.
[0122] 3) Obtain the fused image through IHS inverse transformation.
[0123] Converting the IHS color space image after replacing the intensity component into the RGB color space requires an IHS inverse transformation, and the inverse transformation formula is:
[0124]
[0125] The method of the present application respectively addresses the color cast and blurring problems of spinal endoscopy images, and performs color restoration and texture enhancement on the images. In terms of color restoration, the present application restores the image color based on the illumination attenuation model and color attenuation prior. Since the color of the spinal endoscopy scene is relatively single, the transmittance of different color areas in the scene is estimated. In terms of texture enhancement, the present application uses the CLAHE method based on histogram equalization to enhance the grayscale image of the spinal endoscopy image. Finally, the IHS method is used to fuse the color-restored image with the texture-enhanced grayscale image, and a fused image is obtained that retains the image color information and has high-contrast texture information.
[0126] Based on the same inventive concept, embodiments of the present application also provide a spinal endoscopic image enhancement device for implementing the aforementioned spinal endoscopic image enhancement method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more spinal endoscopic image enhancement device embodiments provided below can be found in the aforementioned limitations of the spinal endoscopic image enhancement method and will not be further elaborated here.
[0127] In an exemplary embodiment, Figure 10 As shown, a spinal endoscope image enhancement device is provided, comprising:
[0128] The color restoration module is used to restore the color of the target spinal endoscopy image based on the light attenuation model to obtain a color restored image.
[0129] The texture enhancement module is used to process the grayscale image of the target spinal endoscopy image using a limited contrast adaptive histogram equalization algorithm to obtain a texture-enhanced grayscale image.
[0130] The image fusion module is used to fuse the color-restored image and the texture-enhanced grayscale image to obtain an enhanced target spinal endoscopic image.
[0131] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 11As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store spinal endoscopic image enhancement data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a spinal endoscopic image enhancement method is implemented.
[0132] Those skilled in the art will understand that Figure 11 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present application and does not constitute a limitation on the computer device to which the solution of the present application is applied. A specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement. In an exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps of the above-mentioned method embodiments when executing the computer program.
[0133] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0134] In an exemplary embodiment, a computer program product is provided, including a computer program. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0135] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0136] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0137] The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units, graphics processing units, digital signal processors, data processing logic of programmable logic devices, and the like.
[0138] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0139] This document uses specific examples to illustrate the principles and implementation methods of this application. The description of the above examples is only intended to help understand the method and core concept of this application. At the same time, for those skilled in the art, based on the concept of this application, there may be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A spinal endoscopy image enhancement method, characterized in that: The spinal endoscopy image enhancement method comprises: Perform color restoration on the target spinal endoscopy image based on the light attenuation model to obtain a color restored image; Using a contrast-limited adaptive histogram equalization algorithm to process the grayscale image of the target spinal endoscopic image to obtain a texture-enhanced grayscale image; The color restored image and the texture enhanced grayscale image are fused to obtain an enhanced target spinal endoscopic image.
2. The spinal endoscopy image enhancement method according to claim 1, characterized in that: The color of the target spinal endoscopy image is restored based on the light attenuation model to obtain a color restored image, specifically including: The target spinal endoscopy image is divided into three color regions according to the HSV color space, namely white region, red region and light yellow region; Optimizing the coefficients of each color region separately to obtain the coefficients of each color region, wherein the coefficients are the coefficients for calculating the image transmittance of the corresponding color region; An image transmittance map of each color region is obtained according to the coefficient of each color region, and a composite image transmittance map is obtained from the image transmittance maps of the three color regions; Using the preset endoscopic image as a guide image, the synthesized image transmittance map is subjected to guided filtering optimization to obtain the final image transmittance map; Taking the average brightness of the white area as the ambient light; A color restored image is obtained according to the target spinal endoscopy image, the final image transmittance map and the ambient light.
3. The spinal endoscopy image enhancement method according to claim 2, characterized in that: Optimize the coefficients of each color region separately to obtain the coefficients of each color region. The coefficients are the coefficients for calculating the image transmittance of the corresponding color region, specifically including: The objective function for coefficient optimization of each color region is expressed as: Among them, L represents the likelihood function, k0, k1, k2 and σ are the coefficients for calculating the transmittance of the current color area, and k0, k1, k2 and σ satisfy t(x i )=k0+k1·V(x i )+k2·S(x i )+ε(x i ), t(x i ) is the true value of the transmittance of the i-th point in the current color area, x i represents the coordinates of point i, V(x i ) is the brightness value of point i, S(x i ) is the saturation of point i, ε(x i ) is the random error of the i-th point represented by the zero-bias Gaussian distribution, ε(x i )~N(0,σ 2 ), n is the number of pixels.
4. The spinal endoscopy image enhancement method according to claim 2, characterized in that: Obtaining a color restored image according to the target spinal endoscopic image, the final image transmittance map, and the ambient light, specifically comprising: The color restored image is obtained according to the scene radiation restoration formula, which is expressed as: Where J(x) represents the color restored image, x represents the coordinate, I(x) represents the target spinal endoscopy image, A represents the ambient light, t(x) is the transmittance, t min and t max are the minimum and maximum values of the transmittance t(x).
5. The spinal endoscopy image enhancement method according to claim 1, characterized in that: Fusing the color-restored image and the texture-enhanced grayscale image to obtain an enhanced target spinal endoscopic image specifically includes: The color restored image and the texture enhanced grayscale image are fused using the IHS method to obtain an enhanced target spinal endoscopic image.
6. The spinal endoscopy image enhancement method according to claim 5, characterized in that: The color restored image and the texture enhanced grayscale image are fused using the IHS method to obtain an enhanced target spinal endoscopic image, specifically including: Performing an IHS forward transformation on the color restored image to obtain a hue component and a saturation component; The hue component, the saturation component and the intensity component of the texture-enhanced grayscale image are subjected to an IHS inverse transformation to obtain an enhanced target spinal endoscopic image.
7. A spinal endoscope image enhancement device, characterized in that: The spinal endoscopic image enhancement device applies the spinal endoscopic image enhancement method according to any one of claims 1 to 6, and the spinal endoscopic image enhancement device comprises: A color restoration module, used to restore the color of the target spinal endoscopy image based on the light attenuation model to obtain a color restored image; A texture enhancement module, configured to process the grayscale image of the target spinal endoscopy image using a contrast-limited adaptive histogram equalization algorithm to obtain a texture-enhanced grayscale image; The image fusion module is used to fuse the color-restored image and the texture-enhanced grayscale image to obtain an enhanced target spinal endoscopic image.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the spinal endoscopic image enhancement method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the spinal endoscopy image enhancement method according to any one of claims 1 to 6 is implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the spinal endoscopy image enhancement method according to any one of claims 1 to 6 is implemented.