Artificial intelligence-based endoscopic spine surgery visualization enhancement method and system
By analyzing the distribution of R, G, and B channel values in spinal endoscopy images, calculating atomization parameters and Gaussian scaling factors, and combining this with the Retinex algorithm for image enhancement, the problem of the inapplicability of Gaussian scaling factors in existing technologies is solved, improving image clarity and recognition, and assisting doctors in performing precise surgeries.
Patent Information
- Application Number
- CN202511312060.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-15
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2045-09-15
AI Technical Summary
The default Gaussian scaling factor in the existing Retinex algorithm is not suitable for images acquired by spinal endoscopy, resulting in unsatisfactory dehazing effects and affecting image clarity and recognizability.
By analyzing the value distribution of pixels in the R, G, and B channels of spinal endoscopy images, fogging parameters and Gaussian scaling factors are calculated. Image enhancement is then performed using the Retinex algorithm, and the Gaussian scaling factor is adjusted in real time to adapt to the degree of fogging at different times.
It improves the clarity and recognition of spinal endoscopy images, assists doctors in performing precise surgeries, solves the problem of the inapplicability of the Gaussian scaling factor in the Retinex algorithm, and achieves better dehazing effect.
Smart Images

Figure CN120807380B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of image processing, specifically relating to an artificial intelligence-based method and system for enhancing the visualization of spinal endoscopic surgery. Background Technology
[0002] Visualization enhancement technology for spinal endoscopic surgery significantly improves surgical precision and safety by integrating image navigation, intelligent algorithms, and instrument innovation. It overlays preoperative CT / MRI 3D reconstruction models onto the real surgical field, achieving virtual-real fusion through AR glasses or head-mounted displays. Surgeons can directly view the patient's anatomical structures and the virtual navigation path, avoiding frequent head turns to check the screen. By fusing endoscopic video signals with AR navigation and using virtual staining technology to mark key structures such as nerves and blood vessels, it enhances endoscopic identification. Visualization enhancement technology is driving spinal endoscopy from "minimally invasive" to "precise and intelligent."
[0003] During spinal endoscopic surgery, a temperature difference between the lens and the patient's body causes fluids within the patient's body to liquefy upon contact with the lens, resulting in fogging. This fogging obscures high-frequency details and increases low-frequency information, reducing image clarity and discernibility. Therefore, dehazing is necessary for images acquired via spinal endoscopy. However, the default Gaussian scaling factor in the existing Retinex algorithm is not suitable for dehazing images acquired via spinal endoscopy, leading to less than ideal dehazing results. Summary of the Invention
[0004] To address the problem that current dehazing algorithms cannot effectively dehaze images acquired during spinal endoscopic surgery, this invention proposes an artificial intelligence-based visualization enhancement method and system for spinal endoscopic surgery.
[0005] To achieve the above objectives, the present invention provides the following technical solution: acquiring several images of the interior of the spine, obtaining the values of each pixel in the R, G, and B channels and the grayscale value of each pixel in the images; each image of the interior of the spine corresponds to an acquisition time; based on the distribution of pixel values in each of the R, G, and B channels in each frame of the images of the interior of the spine within each second, obtaining the distribution degree of pixel values in each channel in each frame of the images of the interior of the spine within each second; based on the difference in the distribution degree of pixel values in different channels and the distribution of pixel grayscale values in each frame of the images of the interior of the spine within each second, obtaining the clarity of the images of the interior of the spine within each frame of the images of the interior of the spine within each second, and thus obtaining... The image sharpness of each second of footage is analyzed. Based on the difference between the sharpness of each second of footage and the sharpness of the first second of footage, and considering the sharpness of the first second of footage, the fogging parameters for each second of footage are obtained. Based on the distribution of grayscale values of pixels within each frame of the spinal cavity image within each second, the grayscale dispersion of each frame of the spinal cavity image within each second is obtained, thus determining the degree of fogging in each second of the image. Based on the fogging parameters of each second of footage, the degree of fogging in each second of the image, and the information entropy of the grayscale values of pixels within each frame of the spinal cavity image within each second, the Gaussian scaling factor of the convolution kernel when performing convolution operations on the image within each second is obtained, thus producing an enhanced image of the spinal cavity image to assist doctors in treatment.
[0006] Furthermore, the specific calculation formula for obtaining the distribution of pixels in each channel of the internal image of the spine in each frame per second is as follows: In the formula, Indicates the first Within seconds The number of pixels within the spine of the frame in the image. The distribution degree under each channel, of which 3 channels are respectively Channel, G channel, and B channel, Represents an ordinal value. Indicates the first Within seconds The first frame of the internal image of the spine The value under each channel is The number of pixels.
[0007] Furthermore, the specific formula for calculating the sharpness of the internal spinal image for each frame within each second is as follows: In the formula, Indicates the first Within seconds The clarity of the frame's internal spinal images. Indicates the first Within seconds The number of pixels within the spine of the frame in the image. The distribution degree under the first channel and the first The absolute value of the difference in distribution degree under each channel; when hour, Indicates the first Within seconds The distribution of pixels within the spine interior image of the frame in the third channel is compared with the first. The absolute value of the difference in distribution degree under each channel; Indicates the first Within seconds The grayscale value within the spine of the frame is The number of pixels, Indicates the first Within seconds The number of pixels within the spine of the frame. This represents the hyperbolic tangent function.
[0008] Furthermore, the specific steps for obtaining the sharpness of each second of the shot are as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] The mean sharpness of the internal spine images in all frames within a second is denoted as the th frame. The clarity of the second-second shot.
[0009] Furthermore, the specific calculation formula for obtaining the fogging parameters of the lens per second is as follows: In the formula: Indicates the first The fogging parameters of the second-second lens, This indicates the sharpness of the footage in the first second. Indicates the first The clarity of the second-second shot.
[0010] Furthermore, the specific calculation formula for obtaining the grayscale dispersion of the internal spinal image for each frame within each second is as follows: A grayscale range is set [ , ], constantly adjusting and The value of the first Within seconds The grayscale value within the spine of the frame is greater than or equal to and less than or equal to The number of pixels and the first Within seconds When the ratio of the number of pixels within the spine of a frame is greater than or equal to 0.8, the corresponding... The value obtained later is denoted as the first value. Within seconds The grayscale dispersion of the internal image of the spine in a frame; where Through continuous adjustment and The value is obtained to get the first Within seconds All grayscale discrete values of the internal spine image of the frame; the first Within seconds The minimum grayscale dispersion of the internal spine image in frame is denoted as the th . Within seconds Gray-scale dispersion of the internal image of the spine in a frame.
[0011] Furthermore, the specific calculation formula for the degree of fogging of the image per second is as follows: In the formula, Indicates the first The degree of fogging in the image within seconds. Indicates the first The mean grayscale dispersion of all frames of the internal spine image within a second.
[0012] Furthermore, the specific calculation steps for obtaining the Gaussian scaling factor of the convolution kernel when performing convolution operations on the images within each second, based on the fogging parameters of each second's shot, the degree of fogging in each second's image, and the information entropy of the grayscale values of pixels in each frame's internal spine image within each second, and thus obtaining the enhanced image of the internal spine image, are as follows: [The text then abruptly shifts to a different topic, mentioning the first second's image being enhanced.] The mean of the information entropy of the grayscale values of pixels within the spine's internal images of all frames within a second is denoted as the i-th. The information entropy of the image within the first second; setting the Gaussian scaling factor of the convolution kernel to 0 when performing convolution on the image within the first second, and setting the fogging parameter of the first second shot to the fogging parameter after defogging; based on the fogging parameter of the second second shot, the degree of fogging of the image within the second second, and the information entropy of the image within the second second, the Gaussian scaling factor of the convolution kernel when performing convolution on the image within the second second is obtained; based on the Gaussian scaling factor of the convolution kernel when performing convolution on the image within the second second, the Retinex algorithm is used to enhance the internal spine image of each frame within the second second, obtaining the enhanced internal spine image of each frame within the second second; based on The enhanced images of the spine's interior in each frame within the second second are used to obtain the values of each pixel in the R, G, and B channels, as well as the grayscale value of each pixel. The fogging parameters for the second-second shot are obtained based on the distribution of pixel values and grayscale values in each of the R, G, and B channels within each frame of the spine's interior image within the second second. A new fogging parameter is obtained from the distribution of pixel values and grayscale values in the R, G, and B channels within each frame of the enhanced spine's interior image within the second second, and this parameter is recorded as the fogging parameter after defogging the second-second shot. The method involves calculating the fog parameters after defogging the first second shot, the second second shot, the Gaussian scaling factor of the convolution kernel when performing convolution on the image within the second second, the fog parameters of the third second shot, the degree of fogging in the image within the third second, and the information entropy of the image within the third second. This yields the Gaussian scaling factor of the convolution kernel when performing convolution on the image within the third second, and thus the enhanced image of the spine's internal structure in each frame within the third second. The method also involves calculating the fog parameters of the third second shot based on the distribution of pixel values and grayscale values in each of the R, G, and X channels of the spine's internal structure image within each frame of every three seconds. The distribution of the values and grayscale values of each pixel in the enhanced image of the spine's interior in each frame within a second is used to obtain a new fogging parameter, which is denoted as the fogging parameter after defogging the third second shot. Based on the fogging parameters after defogging the second and third second shots, the Gaussian scaling factor of the convolution kernel when performing convolution operations on the images within the third second, the fogging parameters of the fourth second shot, the degree of fogging in the image within the fourth second, and the information entropy of the image within the fourth second, the Gaussian scaling factor of the convolution kernel when performing convolution operations on the image within the fourth second is obtained, thus yielding the fogging parameter after defogging the fourth second shot. Fog parameters after lens defogging, 1 second The fogging parameters after defogging the lens, and the fogging parameters of the second lens. When performing a convolution operation on an image within seconds, the Gaussian scaling factor of the convolution kernel is... The fogging parameters of the second lens, the first The degree of fogging in the image within seconds and the first The information entropy of the image within a second is obtained for the first second. The Gaussian scaling factor of the convolution kernel when performing convolution operations on an image within a second is used to obtain the first... The fogging parameters after defogging the lens; based on the first... When performing convolution operations on images within seconds, the Gaussian scaling factor of the convolution kernel is used, and the Retinex algorithm is applied to the image at the 1st second. Each frame of the internal spine image within a second is enhanced to obtain the [number]th [frame]. Enhanced images of the interior of the spine in each frame within a second.
[0013] Furthermore, the obtained result is for the first... The specific formula for calculating the Gaussian scaling factor of the convolution kernel when performing convolution operations on images within seconds is as follows: In the formula, Indicates the first The Gaussian scaling factor of the convolution kernel when performing convolution operations on images within a second. Indicates the first The fogging parameters of the second-second lens, Indicates the first The degree of fogging in the image within seconds. Indicates the first Information entropy of an image within seconds Indicates the first The Gaussian scaling factor of the convolution kernel when performing convolution operations on images within a second. Indicates the first Fog parameters after defogging of a 12-second lens. Indicates the first Fog parameters after defogging of a 12-second lens. This represents the floor function. Represents the hyperbolic tangent function. , ,when hour, .
[0014] The present invention also proposes an artificial intelligence-based visualization enhancement system for spinal endoscopic surgery, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the above method.
[0015] The present invention provides an artificial intelligence-based visualization enhancement method and system for spinal endoscopic surgery, which has the following beneficial effects: When dehazing images acquired by spinal endoscopy, the present invention first utilizes the characteristic that the human body area corresponding to the image acquired by spinal endoscopy is mostly red, resulting in pixels in the unhazed spinal endoscopy image having larger values in the R channel and relatively smaller values in the G and B channels. When the image is affected by haze, the difference between the pixel values in the R channel and the G and B channels becomes smaller. Based on the distribution differences of pixel values in the R, G, and B channels in each image, the degree of haze influence on each image is quantified, i.e., the clarity of each image. This provides a basis for subsequent enhancement of images acquired at different times using the Retinex algorithm with different parameters. Having laid the groundwork, this invention then determines the amount of detail information contained in each second's image based on the distribution of pixel grayscale values during the dehazing operation. This balances dehazing intensity with image detail preservation, allowing the Retinex algorithm with different parameters to dehaze images at different times. This solves the problem that the default Gaussian scaling factor in the Retinex algorithm is unsuitable for dehazing images acquired via spinal endoscopy. Furthermore, when calculating the Gaussian scaling factor for each second's image, this invention provides real-time feedback on the selection of the Gaussian scaling factor for the next second based on the change in the degree of fog influence on the dehazed image from the previous two seconds, making the acquired images more easily assist doctors in treatment. Attached Figure Description
[0016] To more clearly illustrate the embodiments and design schemes of the present invention, the accompanying drawings required for this embodiment will be briefly described below. The drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of an artificial intelligence-based visualization enhancement method for spinal endoscopic surgery, according to an embodiment of the present invention. Detailed Implementation
[0018] To enable those skilled in the art to better understand and implement the technical solutions of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical solutions of the present invention and should not be construed as limiting the scope of protection of the present invention.
[0019] Example 1: This invention provides an artificial intelligence-based visualization enhancement method for spinal endoscopic surgery, specifically as follows: Figure 1As shown, the process includes: Step S001: Acquire several images of the interior of the spine, and obtain the values of each pixel in the R, G, and B channels and the grayscale value of each pixel in the images of the interior of the spine.
[0020] Specifically, during spinal endoscopic surgery, the lesion is first located under image guidance. A working channel is established through a skin incision of approximately 7–10 mm, directly reaching the internal region of the spine. The spinal endoscope, containing a high-resolution lens and light source, is then inserted through the channel, and the procedure is completed in about one second. The system transmits magnified images of the interior of the spine to a display in real time at a frame rate, resulting in multiple initial images of the internal spinal region. Each initial image of the internal spinal region corresponds to a specific acquisition time. The preset frame number in this embodiment... This example is used for illustration; other values can be set in other embodiments. Locating lesions under image guidance is a well-known technique and will not be elaborated upon in this embodiment.
[0021] Furthermore, the first Initial images of the internal regions of the spine are transmitted to a computer for processing to obtain the... The values of each pixel in the R, G, and B channels of the initial image of the internal region of the spine. For the first... The initial image of the internal region of the spine is converted to grayscale. The grayscale image is denoted as the [number missing]. Image of the interior of the spine. (The image is from the first...) The first image of the internal region of the spine The value of the nth pixel in the R, G, and B channels is denoted as the nth pixel. The first image of the internal spine The values of the nth pixel in the R, G, and B channels. The nth... The acquisition time corresponding to the initial image of the internal region of the spine is denoted as the acquisition time of the first image. The acquisition time of the internal images of the spine. The grayscale conversion of the images and the acquisition of the R, G, and B channel values of each pixel in the image are existing known techniques and will not be described in detail in this embodiment.
[0022] Thus, we obtained several images of the interior of the spine and the values of each pixel in each image in the R, G, and B channels.
[0023] Step S002: Based on the distribution of pixel values in each of the R, G, and B channels of the internal spine image in each frame within each second, obtain the distribution degree of pixel values in each channel of the internal spine image in each second; based on the difference in the distribution degree of pixel values in different channels and the distribution of pixel grayscale values in the internal spine image in each frame within each second, obtain the sharpness of the internal spine image in each frame within each second, and thus obtain the sharpness of the shot in each second; based on the difference between the sharpness of the shot in each second and the sharpness of the shot in the first second, and the sharpness of the shot in the first second, obtain the fogging parameters of the shot in each second.
[0024] It should be noted that when the spinal endoscope enters the patient's body through the working channel, the patient's body contains water, and there is a certain temperature difference between the lens and the patient's body. This water in the patient's body liquefies upon contact with the cool surface of the spinal endoscope lens, causing fogging. This results in the images acquired by the spinal endoscope containing more low-frequency information. Therefore, dehazing is performed on the internal spinal images to restore the original high-frequency information. When using the Retinex algorithm for image dehazing, the default Gaussian scaling factor is not suitable for images acquired by the spinal endoscope, and the degree of fog influence varies in images acquired at different times. Therefore, the fogging parameters of the lens are calculated every second, and different Gaussian scaling factors are set for different images.
[0025] It's important to further clarify that the Retinex algorithm is an image enhancement technique that simulates the color constancy of the human visual system. Its core idea is to decompose an image into illumination and reflection components, and by suppressing the influence of illumination variations (i.e., the illumination component), it restores the essential color and details of objects. Furthermore, Retinex theory posits that the color perceived by the human eye is determined by the reflectivity of an object's surface to the three primary colors (R, G, and B), rather than by the intensity of light. Therefore, by analyzing the distribution of pixel values in the R, G, and B channels of an image obtained from a spinal endoscope, the fogging information of each image can be calculated.
[0026] It's important to further clarify that when acquiring images of a patient's body using a spinal endoscope, the corresponding areas within the patient's body are inherently predominantly red, resembling the color of blood. This results in a higher number of pixels with higher R-channel values in images of the unaffected spinal cavity, while the number of pixels with higher G-channel and B-channel values is lower or even negligible. This leads to significant differences in the distribution of pixels across the R, G, and B channels within images of the unaffected spinal cavity. Furthermore, the complexity of the body's structure inevitably results in shadows appearing in some image areas during image acquisition, causing some pixels to have lower grayscale values in the grayscale image.
[0027] It's important to further explain that when fog forms on the spinal endoscope, fog scattering weakens light penetration, causing low-grayscale areas of distant or dark objects to appear whiter, while significantly reducing true deep black areas. This results in a much smaller number of low-grayscale pixels in the fogged image compared to the unaffected image. In other words, fog reduces the grayscale distribution range of the scene, weakening the contrast between light and dark, making the image appear hazy. Consequently, when the spinal endoscope contains fog, the resulting grayscale image has fewer low-grayscale pixels. Since fog scattering doesn't affect all wavelengths of light uniformly, it generally tends to make the image appear whiter, forcibly narrowing the distribution of pixels across different channel values within an image, thus reducing the differences between different color channels. Therefore, based on the pixel grayscale values and their distribution across the R, G, and B channels in each image, the degree of fog impact on each image is calculated, i.e., the sharpness of each image. Then, based on the sharpness of multiple frames within one second, the sharpness of each second of the shot is obtained.
[0028] It should be further explained that when imaging the internal region of the spine using a spinal endoscope, the patient's body fluids have not yet had time to fog up on the lens when the endoscope first enters the body. Therefore, the first second of the image can be considered a lens without fogging interference. Thus, the clarity of the first second of the image is used as a reference value to obtain the fogging parameters for each subsequent second of the image.
[0029] Specifically, to obtain the first Within seconds The number of pixels within the spine of the frame in the image. The specific formula for calculating the distribution degree under each channel is as follows: In the formula, Indicates the first Within seconds The number of pixels within the spine of the frame in the image. The distribution degree under each channel, of which 3 channels are respectively Channel, G channel, and B channel, Represents an ordinal value. Indicates the first Within seconds The first frame of the internal image of the spine The value under each channel is The number of pixels.
[0030] It should be noted that because the grayscale values of pixels within the un-fogmed internal region of the spine are mostly red, the values of pixels in this region are relatively large in the R channel. Therefore, [the text abruptly ends here, likely due to an incomplete sentence or missing information]. To quantify the first Within seconds The number of pixels within the spine of the frame in the image. Distribution degree under each channel.
[0031] Furthermore, obtain the first Within seconds The specific formula for calculating the sharpness of the internal spine image of a frame is as follows: In the formula, Indicates the first Within seconds The clarity of the frame's internal spinal images. Indicates the first Within seconds The number of pixels within the spine of the frame in the image. The distribution degree under the first channel and the first The absolute value of the difference in distribution degree under each channel; when hour, Indicates the first Within seconds The distribution of pixels within the spine interior image of the frame in the third channel is compared with the first. The absolute value of the difference in distribution degree under each channel; Indicates the first Within seconds The grayscale value within the spine of the frame is The number of pixels, Indicates the first Within seconds The number of pixels within the spine of the frame. This represents the hyperbolic tangent function, which is used for normalization in this embodiment.
[0032] It should be noted that this invention defines pixels with a grayscale value below 50 as low grayscale pixels, therefore... To quantify the number of pixels with low grayscale values within an image, in order to prevent The value is low, so this invention multiplies it by 2. The larger the value, the more significant the [value]. Within seconds The more a frame of the internal image of the spine matches the characteristics of an unfog-free image, the more likely it is to have a certain number of pixels with low grayscale values, i.e., the first frame... Within seconds The image of the spine inside the frame is less affected by fogging, at this time The value is relatively large; It is used to react to the first Within seconds Differences in the distribution of pixels within the spine of a frame in the R, G, and B channels; The larger the value, the more significant the [value]. Within seconds The more closely the internal image of the spine in the frame matches the pixels within the unfogmed image, the better. The value on the channel is larger and The characteristic of smaller values under channel B, i.e., the first Within seconds The image of the spine inside the frame is less affected by fogging, at this time The value is relatively large.
[0033] Furthermore, the first The mean sharpness of the internal spine images in all frames within a second is denoted as the th frame. The clarity of the second-second shot.
[0034] Furthermore, obtain the first The specific formula for calculating the fogging parameters of a second-second lens is as follows: In the formula: Indicates the first The fogging parameters of the second-second lens, This indicates the sharpness of the footage in the first second. Indicates the first The clarity of the second-second shot.
[0035] It should be noted that, The smaller the value, the more... The smaller the difference between the image acquired in the first second and the image acquired in the first second, the better. The less fog affects the lens.
[0036] At this point, the fogging parameters for each second of the shot are obtained.
[0037] Step S003: Based on the distribution of grayscale values of pixels in the internal spinal images of each frame within each second, obtain the grayscale dispersion of the internal spinal images of each frame within each second, and then obtain the degree of fogging of the images within each second; based on the fogging parameters of the lens within each second, the degree of fogging of the images within each second, and the information entropy of the grayscale values of pixels in the internal spinal images of each frame within each second, obtain the Gaussian scaling factor of the convolution kernel when performing convolution operations on the images within each second, and then obtain the enhanced image of the internal spinal images to assist doctors in treatment.
[0038] It should be noted that when taking a photograph, the image captured by the lens can be considered as incident light shining on a reflecting object, forming reflected light, which then enters the lens. Therefore, the image captured by the lens is affected by both the illumination component and the reflection component, i.e., the properties of the object itself. Thus, if the directly obtained image is... The reflection component is The light component is ,but The reflection component This is the unaffected original image we want. After logarithmizing both sides of the formula, the image is expressed as follows: ,but ,and ,in, This represents the convolution operation. This represents the convolution kernel, i.e., the illumination component. By analyzing images This is obtained after performing Gaussian convolution. Therefore, the illumination component is obtained through Gaussian convolution, and then the reflection component is obtained, which is the enhanced image.
[0039] It should be further noted that when obtaining the illumination component by performing Gaussian convolution on the grayscale image of the spine's internal region, a larger Gaussian scaling factor results in a stronger dehazing effect, but also leads to a greater loss of detail. Conversely, a smaller Gaussian scaling factor results in a weaker dehazing effect, but with less loss of information. Therefore, it is necessary to calculate the degree of fog impact on each image and the amount of detail contained within each image.
[0040] It's important to further explain that for fogged images, the fog reduces the grayscale range of pixels within the scene, weakening the difference between light and dark areas. This causes the distribution curve in the grayscale histogram of the fogged image to be more concentrated in the central region, with a steep drop at both ends. Consequently, compared to the unfogged image, the fogged image has fewer pixels with both large and small grayscale values, and many pixels have similar grayscale values. Therefore, the degree of fog's influence on each image can be calculated based on the distribution of pixel grayscale values within the grayscale image.
[0041] It should be further noted that the more detailed information a pixel contains, the more pixels with different gray values there are, and the greater the information entropy of the pixel gray values. Therefore, the Gaussian scaling factor of the convolution kernel can be determined by quantifying the detailed information contained in the image based on the information entropy of the pixel gray values.
[0042] It's important to further clarify that because the images acquired by spinal endoscopy are continuous in time—meaning the footage captured by the spinal endoscope is displayed as video—the processing of the previous second's image during dehazing significantly impacts the processing of the next second's image. Specifically, if the dehazing effect of the previous second's image after processing with the previous second's Gaussian scaling factor is not ideal, then the Gaussian scaling factor should be increased in the next second to enhance the dehazing effect. Conversely, if the dehazing effect of the previous second's image after processing with the previous second's Gaussian scaling factor is too strong, it may affect high-frequency information in the image. Therefore, the Gaussian scaling factor for dehazing the image in each second is calculated based on the dehazing effect of the image in the previous second.
[0043] It should be further explained that, in order to determine the dehazing effect of the image after dehazing for each second, the present invention makes the determination by the difference between the fogging parameters of the image after dehazing for each second and the image after dehazing for the previous second.
[0044] Specifically, set a grayscale range. , ], constantly adjusting and The value of the first Within seconds The grayscale value within the spine of the frame is greater than or equal to and less than or equal to The number of pixels and the first Within seconds When the ratio of the number of pixels within the spine of a frame is greater than or equal to 0.8, the corresponding... The value obtained later is denoted as the first value. Within seconds The grayscale dispersion of the internal image of the spine in the frame. Through continuous adjustments and The value is obtained to get the first Within seconds All grayscale discreteness of the image inside the spine of the frame.
[0045] Furthermore, the first Within seconds The minimum grayscale dispersion of the internal spine image in frame is denoted as the th . Within seconds Gray-scale dispersion of the internal image of the spine in a frame.
[0046] It should be noted that, The smaller the value obtained later, the better. Within seconds The image of the spine's interior in frame 1 shows that many pixels have similar grayscale values, further indicating that this image closely matches the characteristic of images affected by fog, where many pixels have similar grayscale values. Within seconds The greater the influence of fog on the internal spine image of a frame, the more necessary it is to perform convolution operations with a larger Gaussian scaling factor.
[0047] Furthermore, obtain the first The specific formula for calculating the degree of fogging in an image within a second is as follows: In the formula, Indicates the first The degree of fogging in the image within seconds. Indicates the first The mean grayscale dispersion of all frames of the internal spine image within a second.
[0048] It should be noted that, The smaller the value, the better the spinal endoscopy was performed at the first [stage / time]. The greater the impact of fog on images acquired within a few seconds, the more likely they are to be affected. The larger the value, the better.
[0049] Furthermore, the first The mean of the information entropy of the grayscale values of pixels within the spine's internal images of all frames within a second is denoted as the i-th. The information entropy of an image within a second. The method of obtaining the information entropy of the grayscale values of pixels within an image is a well-known existing technique and will not be elaborated upon in this embodiment.
[0050] Furthermore, obtain information about the first The specific steps for determining the Gaussian scaling factor of the convolution kernel when performing convolution operations on images within a second are as follows: First, set the Gaussian scaling factor of the convolution kernel to 0 when performing convolution operations on images within the first second, and set the fogging parameters of the first second shot to the fogging parameters after defogging. Based on the fogging parameters of the second second shot, the degree of fogging in the second second image, and the information entropy of the second second image, obtain the Gaussian scaling factor of the convolution kernel when performing convolution operations on images within the second second. Based on the Gaussian scaling factor of the convolution kernel when performing convolution operations on images within the second second, use the Retinex algorithm to enhance the internal spine image of each frame within the second second, obtaining the enhanced internal spine image of each frame within the second second.
[0051] Furthermore, using existing technology, the enhanced images of the internal spine image of each frame within the second second are restored to RGB images, obtaining the values of each pixel in the enhanced images of the internal spine image of each frame within the second second in the R, G, and B channels. Based on the distribution of the values and grayscale values of the pixels in the internal spine image of each frame within each two-second period in the R, G, and B channels, a method for obtaining the fogging parameters of the second-second shot is derived. A new fogging parameter is obtained through the values of each pixel in the enhanced images of the internal spine image of each frame within the second second period in the R, G, and B channels, as well as the distribution of the pixel grayscale values, and this parameter is recorded as the fogging parameter after defogging the second-second shot. Using the Retinex algorithm for image enhancement is a well-known existing technique, and this embodiment will not elaborate on it in detail.
[0052] Furthermore, based on the fogging parameters after defogging the first second shot, the fogging parameters after defogging the second second shot, the Gaussian scaling factor of the convolution kernel when performing convolution operations on the image within the second second, the fogging parameters of the third second shot, the degree of fogging in the image within the third second, and the information entropy of the image within the third second, the Gaussian scaling factor of the convolution kernel when performing convolution operations on the image within the third second is obtained. Referring to the method for obtaining the fogging parameters after defogging the second second shot, the fogging parameters after defogging the third second shot are obtained.
[0053] Furthermore, based on the fogging parameters after defogging the second-second shot, the fogging parameters after defogging the third-second shot, the Gaussian scaling factor of the convolution kernel when performing convolution operation on the image within the third second, the fogging parameters of the fourth-second shot, the degree of fogging of the image within the fourth second, and the information entropy of the image within the fourth second, the Gaussian scaling factor of the convolution kernel when performing convolution operation on the image within the fourth second is obtained, and thus the fogging parameters after defogging the fourth-second shot are obtained.
[0054] Furthermore, according to the first Fog parameters after lens defogging, 1 second The fogging parameters after defogging the lens, and the fogging parameters of the second lens. When performing a convolution operation on an image within seconds, the Gaussian scaling factor of the convolution kernel is... The fogging parameters of the second lens, the first The degree of fogging in the image within seconds and the first The information entropy of the image within a second is obtained for the first second. The Gaussian scaling factor of the convolution kernel when performing convolution operations on an image within a second is used to obtain the first... The fogging parameters after the lens is defogging.
[0055] Furthermore, obtain information about the first The specific formula for calculating the Gaussian scaling factor of the convolution kernel when performing convolution operations on images within seconds is as follows: In the formula, Indicates the first The Gaussian scaling factor of the convolution kernel when performing convolution operations on images within a second. Indicates the first The fogging parameters of the second-second lens, Indicates the first The degree of fogging in the image within seconds. Indicates the first Information entropy of an image within seconds Indicates the first The Gaussian scaling factor of the convolution kernel when performing convolution operations on images within a second. Indicates the first Fog parameters after defogging of a 12-second lens. Indicates the first Fog parameters after defogging of a 12-second lens. This represents the floor function. This represents the hyperbolic tangent function, which is used for normalization in this embodiment. , ,when hour, .
[0056] It should be noted that, The smaller the value, the more likely the spinal endoscopy was performed at the [number]th [stage]. Images acquired within seconds contain a great deal of detailed information, therefore, for the... When performing convolution operations on images within a second, choose a smaller Gaussian scaling factor; and The higher the value, the more likely the spinal endoscopy was performed at the [number]th [stage]. Images acquired within a few seconds are more susceptible to fog effects; therefore, a larger Gaussian scaling factor is needed when performing Gaussian convolution on these images. Since different values of the Gaussian scaling factor have different effects, values below 20 are more suitable for hazy images, better preserving image details. Therefore, when dehazing images acquired during spinal endoscopic surgery, a Gaussian scaling factor of around 20 is more appropriate. It is used as a parameter for calculating the Gaussian scaling factor; The larger the value, the better for the th... When dehazing an image within seconds, the dehazing effect is not ideal. Therefore, at this time... add , to obtain the first The Gaussian scaling factor of the convolution kernel when performing convolution operations on an image within a second.
[0057] Furthermore, the Retinex algorithm was used to analyze the th... Each frame of the internal spine image within a second is enhanced to obtain the [number]th [frame]. Enhanced images of the interior of the spine in each frame within a second, using existing technology, will be used to... Within seconds, each frame of the spinal cavity image is enhanced and then restored to an RGB image to assist doctors in treatment. The use of a Retinex algorithm for image enhancement and the acquisition of a convolution kernel with a Gaussian scaling factor are both well-known techniques and will not be described in detail in this embodiment.
[0058] This concludes the embodiment.
[0059] Another embodiment of the present invention provides an artificial intelligence-based visualization enhancement system for spinal endoscopic surgery. The system includes a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the above-described method steps S001 to S003.
[0060] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the principles of the present invention should be included within the protection scope of the present invention.
Claims
1. An artificial intelligence-based visualization enhancement method for spinal endoscopic surgery, characterized in that, include: Acquire several images of the interior of the spine, and obtain the values of each pixel in the R, G, and B channels, as well as the grayscale value of each pixel. Each image of the internal spine corresponds to a specific acquisition time. Based on the distribution of pixel values in each of the R, G, and B channels of the internal spine image in each frame within each second, the distribution degree of pixels in each channel of the internal spine image in each frame within each second is obtained. Based on the difference in the distribution degree of pixels in different channels and the distribution of pixel grayscale values in the internal spine image in each frame within each second, the sharpness of the internal spine image in each frame within each second is obtained, and thus the sharpness of each second shot is obtained. Based on the difference between the sharpness of each second shot and the sharpness of the first second shot, and the sharpness of the first second shot, the fogging parameters of each second shot are obtained. Based on the distribution of pixel grayscale values in each frame of the internal spine image within each second, the grayscale dispersion of the internal spine image within each frame of each second is obtained, thus yielding the degree of fogging in the image within each second. Based on the fogging parameters of the lens within each second, the degree of fogging in the image within each second, and the information entropy of pixel grayscale values in each frame of the internal spine image within each second, the Gaussian scaling factor of the convolution kernel when performing convolution operations on the image within each second is obtained, thus producing an enhanced image of the internal spine image to assist doctors in treatment. The specific formula for calculating the clarity of the internal spine image within each frame of each second is as follows: In the formula, Indicates the first Within seconds The clarity of the frame's internal spinal images. Indicates the first Within seconds The number of pixels within the spine of the frame in the image. The distribution degree under the first channel and the first The absolute value of the difference in distribution degree under each channel; when hour, Indicates the first Within seconds The distribution of pixels within the spine interior image of the frame in the third channel is compared with the first. The absolute value of the difference in distribution degree under each channel; Indicates the first Within seconds The grayscale value within the spine of the frame is The number of pixels, Indicates the first Within seconds The number of pixels within the spine of the frame. Representing the hyperbolic tangent function; the specific steps to obtain the sharpness of each second of the shot are as follows: [The text abruptly ends here, likely due to an incomplete translation or a formatting error.] The mean sharpness of the internal spine images in all frames within a second is denoted as the th frame. The clarity of the second-second shot.
2. The artificial intelligence-based visualization enhancement method for spinal endoscopic surgery according to claim 1, characterized in that, The specific formula for calculating the distribution of pixels in each channel of the internal spinal image of each frame within each second is as follows: In the formula, Indicates the first Within seconds The number of pixels within the spine of the frame in the image. The distribution degree under each channel, of which 3 channels are respectively Channel, G channel, and B channel, Represents an ordinal value. Indicates the first Within seconds The first frame of the internal image of the spine The value under each channel is The number of pixels.
3. The artificial intelligence-based visualization enhancement method for spinal endoscopic surgery according to claim 1, characterized in that, The specific calculation formula for obtaining the lens fogging parameters per second is as follows: In the formula: Indicates the first The fogging parameters of the second-second lens, This indicates the sharpness of the footage in the first second. Indicates the first The clarity of the second-second shot.
4. The artificial intelligence-based visualization enhancement method for spinal endoscopic surgery according to claim 1, characterized in that, The specific formula for calculating the grayscale dispersion of the internal spinal image for each frame within each second is as follows: A grayscale range is set [ , ], constantly adjusting and The value of the first Within seconds The grayscale value within the spine of the frame is greater than or equal to and less than or equal to The number of pixels and the first Within seconds When the ratio of the number of pixels within the spine of a frame is greater than or equal to 0.8, the corresponding... The value obtained later is denoted as the first value. Within seconds The grayscale dispersion of the internal image of the spine in a frame; where Through continuous adjustment and The value is obtained to get the first Within seconds All grayscale discrete values of the internal spine image of the frame; the first Within seconds The minimum grayscale dispersion of the internal spine image in frame is denoted as the th . Within seconds Gray-scale dispersion of the internal image of the spine in a frame.
5. The artificial intelligence-based visualization enhancement method for spinal endoscopic surgery according to claim 1, characterized in that, The specific formula for calculating the degree of fogging of the image per second is as follows: In the formula, Indicates the first The degree of fogging in the image within seconds. Indicates the first The mean grayscale dispersion of all frames of the internal spine image within a second.
6. The artificial intelligence-based visualization enhancement method for spinal endoscopic surgery according to claim 3, characterized in that, The specific calculation steps for obtaining the enhanced image of the spine interior image are as follows: Based on the fogging parameters of each second of the shot, the degree of fogging in each second of the image, and the information entropy of the grayscale values of the pixels in each frame of the spine interior image within each second, the Gaussian scaling factor of the convolution kernel is obtained when performing convolution operations on the images within each second. The mean of the information entropy of the grayscale values of pixels within the spine's internal images of all frames within a second is denoted as the i-th. The information entropy of the image within the first second; setting the Gaussian scaling factor of the convolution kernel to 0 when performing convolution on the image within the first second, and setting the fogging parameter of the first second shot to the fogging parameter after defogging; based on the fogging parameter of the second second shot, the degree of fogging of the image within the second second, and the information entropy of the image within the second second, the Gaussian scaling factor of the convolution kernel when performing convolution on the image within the second second is obtained; based on the Gaussian scaling factor of the convolution kernel when performing convolution on the image within the second second, the Retinex algorithm is used to enhance the internal spine image of each frame within the second second, obtaining the enhanced internal spine image of each frame within the second second; based on The enhanced images of the spine's interior in each frame within the second second are used to obtain the values of each pixel in the R, G, and B channels, as well as the grayscale value of each pixel. The fogging parameters for the second-second shot are obtained based on the distribution of pixel values and grayscale values in each of the R, G, and B channels within each frame of the spine's interior image within the second second. A new fogging parameter is obtained from the distribution of pixel values and grayscale values in the R, G, and B channels within each frame of the enhanced spine's interior image within the second second, and this parameter is recorded as the fogging parameter after defogging the second-second shot. The method involves calculating the fog parameters after defogging the first second shot, the second second shot, the Gaussian scaling factor of the convolution kernel when performing convolution on the image within the second second, the fog parameters of the third second shot, the degree of fogging in the image within the third second, and the information entropy of the image within the third second. This yields the Gaussian scaling factor of the convolution kernel when performing convolution on the image within the third second, and thus the enhanced image of the spine's internal structure in each frame within the third second. The method also involves calculating the fog parameters of the third second shot based on the distribution of pixel values and grayscale values in each of the R, G, and X channels of the spine's internal structure image within each frame of every three seconds. The distribution of the values and grayscale values of each pixel in the enhanced image of the spine's interior in each frame within a second is used to obtain a new fogging parameter, which is denoted as the fogging parameter after defogging the third second shot. Based on the fogging parameters after defogging the second and third second shots, the Gaussian scaling factor of the convolution kernel when performing convolution operations on the images within the third second, the fogging parameters of the fourth second shot, the degree of fogging in the image within the fourth second, and the information entropy of the image within the fourth second, the Gaussian scaling factor of the convolution kernel when performing convolution operations on the image within the fourth second is obtained, thus yielding the fogging parameter after defogging the fourth second shot. Fog parameters after lens defogging, 1 second The fogging parameters after defogging the lens, and the fogging parameters of the second lens. When performing a convolution operation on an image within seconds, the Gaussian scaling factor of the convolution kernel is... The fogging parameters of the second lens, the first The degree of fogging in the image within seconds and the first The information entropy of the image within a second is obtained for the first second. The Gaussian scaling factor of the convolution kernel when performing convolution operations on an image within a second is used to obtain the first... The fogging parameters after defogging the lens; based on the first... When performing convolution operations on images within seconds, the Gaussian scaling factor of the convolution kernel is used, and the Retinex algorithm is applied to the image at the 1st second. Each frame of the internal spine image within a second is enhanced to obtain the [number]th [frame]. Enhanced images of the interior of the spine in each frame within a second.
7. The artificial intelligence-based visualization enhancement method for spinal endoscopic surgery according to claim 6, characterized in that, The obtained for the first The specific formula for calculating the Gaussian scaling factor of the convolution kernel when performing convolution operations on images within seconds is as follows: In the formula, Indicates the first The Gaussian scaling factor of the convolution kernel when performing convolution operations on images within a second. Indicates the first The fogging parameters of the second-second lens, Indicates the first The degree of fogging in the image within seconds. Indicates the first Information entropy of an image within seconds Indicates the first The Gaussian scaling factor of the convolution kernel when performing convolution operations on images within a second. Indicates the first Fog parameters after defogging of a 12-second lens. Indicates the first Fog parameters after defogging of a 12-second lens. This represents the floor function. Represents the hyperbolic tangent function. , ,when hour, .
8. An artificial intelligence-based visualization enhancement system for spinal endoscopic surgery, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the artificial intelligence-based visualization enhancement method for spinal endoscopic surgery as described in any one of claims 1-7.
Citation Information
Patent Citations
Image processing method and device, mobile terminal and computer readable storage medium
CN107277299A
Method for removing haze in urban remote sensing image
CN111275652A