Spine endoscopic surgery visualization enhancement method and system based on artificial intelligence

By analyzing the distribution of R, G, and B channel values ​​of spinal endoscopic images, calculating the fog parameters and Gaussian scaling factors, and adjusting the Retinex algorithm parameters in real time, the problem of unsatisfactory defogging effect of spinal endoscopic images is solved, the image clarity and recognition are improved, and doctors are assisted in treatment.

CN120807380AActive Publication Date: 2025-10-17XIAN HONGHUI HOSPITAL
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511312060.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-15
Publication Date
2025-10-17
Estimated Expiration
2045-09-15

AI Technical Summary

Technical Problem

The default Gaussian scaling factor in the existing Retinex algorithm is not suitable for images collected by spinal endoscopy, resulting in unsatisfactory dehazing effect and affecting the clarity and recognition of surgical images.

Method used

By analyzing the value distribution of pixels in the R, G, and B channels of spinal endoscopic images, the fogging parameters and Gaussian scaling factors are calculated, and the parameters of the Retinex algorithm are adjusted in real time to adapt to the image defogging requirements at different times.

Benefits of technology

It improves the clarity and recognition of spinal endoscopic surgical images, assists doctors in performing treatment more accurately, and solves the problem of inapplicability of Gaussian scaling factors in existing algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120807380A_ABST
    Figure CN120807380A_ABST
Patent Text Reader

Abstract

The invention provides a spinal endoscopic surgery visualization enhancement method and system based on artificial intelligence, and belongs to the field of image processing, and the method comprises the steps: obtaining the value of each pixel point in each frame of spinal internal image in each second under R, G and B channels and the distribution of the gray values of the pixel points, the atomization parameter of the lens in each second and the atomization degree of the image in each second are obtained; and obtaining a Gaussian scale factor of a convolution kernel when the image is subjected to convolution operation in each second by combining the information entropy of the gray value of the pixel point in each frame of the spine internal image in each second, and completing image enhancement. The objective of the invention is to solve the problem that the effect is not ideal when the image acquired by the spine endoscope is defogged by the current algorithm because the default value of a Gaussian scale factor in the existing Retinex algorithm is not suitable for defogging the image acquired by the spine endoscope.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of image processing, and particularly relates to a spine endoscope surgery visualization enhancement method and system based on artificial intelligence. BACKGROUND

[0002] The spine endoscope surgery visualization enhancement technology significantly improves the accuracy and safety of surgery by fusing image navigation, intelligent algorithms and instrument innovation. The preoperative CT / MRI three-dimensional reconstruction model is superimposed on the real surgical field, and virtual-real fusion is realized through AR glasses or head-mounted devices. The doctor can directly view the patient's anatomical structure and virtual navigation path, avoiding frequent head turning to check the screen. The endoscope video signal is fused with AR navigation, and key structures such as nerves and blood vessels are marked through virtual staining technology to enhance the recognition under the endoscope. The visualization enhancement technology is promoting the spine endoscope from "minimally invasive" to "precise and intelligent".

[0003] In the spine endoscope surgery, due to the temperature difference between the lens and the patient's body, the water in the patient's body is liquefied when it meets the cold lens, resulting in fogging of the lens, covering the high-frequency detail information in the image, increasing the low-frequency information, and reducing the clarity and recognition of the image. Therefore, the image collected by the spine endoscope needs to be dehazed. Since the default Gaussian scale factor in the existing Retinex algorithm is not suitable for dehazing the image collected by the spine endoscope, the dehazing result is not very ideal when the existing Retinex algorithm is used to dehaze the image. SUMMARY

[0004] In order to solve the problem that the current dehazing algorithm cannot well dehaze the image obtained in the spine endoscope surgery, the application provides a spine endoscope surgery visualization enhancement method and system based on artificial intelligence.

[0005] In order to achieve the above-mentioned purpose, the present invention provides the following technical scheme: a plurality of internal spinal images are acquired to obtain the value of each pixel in the internal spinal image under the three channels of R, G, and B and the gray value of each pixel; each internal spinal image corresponds to an acquisition time; according to the distribution of the value of the pixel in the internal spinal image of each frame in each second under each of the three channels of R, G, and B, the distribution degree of the pixel in the internal spinal image of each frame in each second under each channel is obtained; according to the difference in the distribution degree of the pixel in the internal spinal image of each frame in each second under different channels and the distribution of the gray value of the pixel, the clarity of the internal spinal image of each frame in each second is obtained, and then the image quality of the internal spinal image of each frame in each second is obtained. The clarity of the shot at each second; the difference between the clarity of the shot at each second and the clarity of the shot at the first second, as well as the clarity of the shot at the first second, is used to obtain the fog parameter of the shot at each second; the grayscale dispersion of the image of the inside of the spine in each frame within each second is obtained according to the distribution of the grayscale values ​​of the pixels in the image of the inside of the spine in each frame within each second, and thus the degree of fog of the image within each second is obtained; the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image within each second is obtained according to the fog parameter of the shot at each second, the degree of fog of the image within each second, and the information entropy of the grayscale values ​​of the pixels in the image of the inside of the spine in each frame within each second, and thus the enhanced image of the image of the inside of the spine is obtained to assist doctors in treatment.

[0006] Furthermore, the specific calculation formula for obtaining the distribution of pixel points in each channel of the spinal column internal image of each frame within each second is as follows: Where, Indicates the Seconds The pixel point in the spine image of the frame is The distribution degree under channels, of which 3 channels are Channel, G channel and B channel, Represents an order value, Indicates the Seconds Frame of the spine image within the first The value of each channel is The number of pixels.

[0007] Furthermore, the specific calculation formula for obtaining the clarity of the spinal internal image of each frame within each second is as follows: Where, Indicates the Seconds The clarity of the image inside the spine of the frame, Indicates the Seconds The pixel point in the spine image of the frame is The distribution degree under the channel is The absolute value of the difference in distribution under the channels; when hour, Indicates the Seconds The distribution of the pixels in the spine image of the frame under the third channel is the same as that under the first channel. The absolute value of the difference in distribution under the channels; Indicates the Seconds The grayscale value of the spine image inside the frame is The number of pixels, Indicates the Seconds The number of pixels in the internal image of the spine of the frame, represents the hyperbolic tangent function.

[0008] Furthermore, the specific steps of obtaining the clarity of each second of footage are as follows: The average value of the clarity of the spinal internal image of all frames within seconds is recorded as The clarity of the second lens.

[0009] Furthermore, the specific calculation formula for obtaining the fogging parameter of the lens per second is as follows: Where: Indicates the The fog parameters of the second lens, Indicates the clarity of the first second of the shot. Indicates the The clarity of the second lens.

[0010] Furthermore, the specific calculation formula for obtaining the grayscale dispersion of each frame of the spinal internal image within each second is as follows: Set a grayscale range [ , ], constantly adjusting and The value of Seconds The grayscale value of the spine image in the frame is greater than or equal to and less than or equal to The number of pixels is the same as the Seconds When the ratio of the number of pixels in the internal image of the spine of the frame is greater than or equal to 0.8, the corresponding The value obtained after Seconds Grayscale dispersion of the internal spinal image of the frame; , through continuous adjustment and the minimum value of the gray scale dispersion of the spine internal image of the frame in the second the minimum value of the gray scale dispersion of the spine internal image of the frame in the second the minimum value of the gray scale dispersion of the spine internal image of the frame in the second the minimum value of the gray scale dispersion of the spine internal image of the frame in the second the minimum value of the gray scale dispersion of the spine internal image of the frame in the second the minimum value of the gray scale dispersion of the spine internal image of the frame in the second the minimum value of the gray scale dispersion of the spine internal image of the frame in the second

[0011] Further, the specific calculation formula of the fogging degree of the image in each second is as follows: in the formula, represents the fogging degree of the image in the second represents the fogging degree of the image in the second represents the average value of the gray scale dispersion of the spine internal image of all frames in the second represents the average value of the gray scale dispersion of the spine internal image of all frames in the second

[0012] Further, the specific calculation steps of obtaining the Gaussian scale factor of the convolution kernel when the image in each second is convolved according to the fogging parameter of each second lens, the fogging degree of the image in each second, and the information entropy of the pixel gray scale value in the spine internal image of each frame in each second, and then obtaining the enhanced image of the spine internal image are as follows: the average value of the information entropy of the pixel gray scale value in the spine internal image of all frames in the second the average value of the information entropy of the pixel gray scale value in the spine internal image of all frames in the second The information entropy of the image within the second; let the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image within the first second be 0, and let the fog parameter of the first second lens be the fog parameter after the first second lens is defogged; according to the fog parameter of the second second lens, the fog degree of the image within the second second and the information entropy of the image within the second second, the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image within the second second is obtained, and according to the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image within the second second, the internal image of the spine of each frame within the second second is enhanced using the Retinex algorithm to obtain the enhanced image of the internal image of the spine of each frame within the second second; according to The image of the spine interior of each frame in the second second is enhanced, and the value of each pixel in the image of the spine interior after each frame in the second second is obtained under the three channels of R, G, and B, as well as the grayscale value of each pixel; a method for obtaining the fog parameter of the second second lens is used according to the distribution of the value of each pixel in the spine interior image of each frame in every two seconds under the three channels of R, G, and B and the grayscale value; a new fog parameter is obtained by the distribution of the value of each pixel in the image of the spine interior after each frame in the second second and the grayscale value, which is recorded as the fog parameter after the second second lens is defogged. number; according to the fog parameters of the first second lens after defogging, the fog parameters of the second second lens after defogging, the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image in the second second, the fog parameters of the third second lens, the fog degree of the image in the third second and the information entropy of the image in the third second, the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image in the third second is obtained, and then the enhanced image of the internal image of the spine of each frame in the third second is obtained; the fog parameters of the third second lens are obtained by using the distribution of the values ​​and grayscale values ​​of the pixels in each of the three channels of R, G, and the internal image of the spine of each frame in every three seconds; through the third The distribution of the values ​​of each pixel in the R, G, and B channels and the grayscale values ​​of each pixel in the enhanced image of the spine in each frame within a second is used to obtain a new fog parameter, which is recorded as the fog parameter of the third second lens after defogging; according to the fog parameter of the second second lens after defogging, the fog parameter of the third second lens after defogging, the Gaussian scale factor of the convolution kernel when performing a convolution operation on the image within the third second, the fog parameter of the fourth second lens, the fog degree of the image within the fourth second, and the information entropy of the image within the fourth second, the Gaussian scale factor of the convolution kernel when performing a convolution operation on the image within the fourth second is obtained, and then the fog parameter of the fourth second lens after defogging is obtained; according to the The fog parameters after defogging the second lens, The fog parameters after defogging the second lens, The Gaussian scale factor of the convolution kernel when the image is convolved within seconds, Second lens fog parameters, The degree of fogging of the image within seconds and the The information entropy of the image within seconds is obtained The Gaussian scale factor of the convolution kernel when the image is convolved within seconds is obtained. The fog parameters after defogging the second lens; The Gaussian scale factor of the convolution kernel when performing convolution operation on the image within seconds, using the Retinex algorithm to The internal image of the spine is enhanced in each frame within seconds to obtain the first Enhanced image of the interior of the spine, frame by frame within seconds.

[0013] Further, the obtained The specific calculation formula of the Gaussian scale factor of the convolution kernel when performing convolution operation on the image within seconds is as follows: Where, Indicates the The Gaussian scale factor of the convolution kernel when performing convolution operations on images within seconds, Indicates the The fog parameters of the second lens, Indicates the The degree of image fogging within seconds, Indicates the Information entropy of the image within seconds, Indicates the The Gaussian scale factor of the convolution kernel when performing convolution operations on images within seconds, Indicates the The fog parameters after the second lens is defogged, Indicates the The fog parameters after the second lens is defogged, represents the floor function, represents the hyperbolic tangent function, , ,when hour, .

[0014] The present invention also proposes an artificial intelligence-based spinal endoscopic surgery visualization enhancement system, which includes a memory, a processor, and a computer program stored in the memory and running on the processor. The processor executes the computer program to implement the steps of the above method.

[0015] The application provides a kind of based on artificial intelligence's endoscopic spinal surgery visual enhancement method and system, which has the following beneficial effects: when the image obtained by the endoscopic spinal surgery is de-fogged, the image obtained by the endoscopic spinal surgery is mostly red in the human body region corresponding to the image, so that the pixel value in the R channel is larger and the value in the G and B channels is relatively smaller in the image without fogging, and when the image is affected by fogging, the difference between the value in the R channel and the value in the G and B channels is smaller, according to the distribution difference of the pixel value in the R, G and B channels in each image, the degree of influence of fog on each image is quantified, i.e. the clarity of each image, which makes it easier to use different parameters of Retinex algorithm to enhance the image at different collection times; then, when de-fogging each second image, the number of detail information contained in each second image is determined according to the distribution of pixel gray value in each second image, so that the Retinex algorithm with different parameters is used to de-fog the image at different times, which solves the problem that the default Gaussian scale factor in the Retinex algorithm is not suitable for de-fogging the image obtained by the endoscopic spinal surgery; and when calculating the Gaussian scale factor of each second image, the change of the degree of influence of fog on the image de-fogged by the image of the previous two seconds before each second is calculated, and a real-time feedback is made to the selection of the Gaussian scale factor of the next second, so that the obtained image is easier to assist the doctor in treatment. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the embodiments of the present application and the design scheme thereof, the following will briefly introduce the drawings needed by the present embodiment. The drawings in the following description are only part of the embodiments of the present application, and those skilled in the art can obtain other drawings according to these drawings without creating labor.

[0017] Figure 1 The flow chart of the method for visual enhancement of endoscopic spinal surgery based on artificial intelligence according to the present embodiment. DETAILED DESCRIPTION

[0018] In order to make those skilled in the art better understand the technical scheme of the present application and can be implemented, the present application will be described in detail below in combination with the drawings and specific embodiments. The following embodiments are only used to more clearly illustrate the technical scheme of the present application, and cannot limit the protection scope of the present application.

[0019] Embodiment 1: The present application provides a method for visual enhancement of endoscopic spinal surgery based on artificial intelligence, specifically as Figure 1As shown, comprising: step S001: obtaining several internal spine images, obtaining the value of each pixel point in R, G, B three channels in the internal spine image and the gray value of each pixel point.

[0020] Specifically, during the endoscopic spinal surgery, first, the lesion position is located under the guidance of the image, a working channel directly reaching the internal spine region is established through a skin incision puncture of about 7-10 millimeters, the endoscope containing a high-resolution lens and a light source is placed through the channel, and the internal spine region is magnified through the endoscope The frame frequency real-time transmission of the internal spine magnified image to the display obtains a plurality of initial images of the internal spine region, and each initial image of the internal spine region corresponds to a collection time. In this embodiment, the preset frame number is 30. Other values can be set in other embodiments. The lesion position is located under the guidance of the image, which is a known technology, and this embodiment will not be described in detail.

[0021] Further, the first initial image of the internal spine region is transmitted to the computer for processing to obtain the value of each pixel point in R, G, B three channels in the first initial image of the internal spine region. The first initial image of the internal spine region is processed to obtain the value of each pixel point in R, G, B three channels in the first internal spine image. The value of the first pixel point in R, G, B three channels in the first initial image of the internal spine region is recorded as the value of the first pixel point in R, G, B three channels in the first internal spine image. The collection time corresponding to the first initial image of the internal spine region is recorded as the collection time of the first internal spine image. The gray processing of the image and the acquisition of the value of each pixel point in R, G, B three channels in the image are known technologies, and this embodiment will not be described in detail.

[0022] At this point, several internal spine images and the value of each pixel point in R, G, B three channels in each internal spine image are obtained.

[0023] Step S002: According to the distribution of the value of each pixel in the spine internal image in each channel in each frame per second, the distribution degree of each pixel in each channel in each frame per second is obtained; according to the difference between the distribution degrees of the pixels in different channels and the distribution of the pixel gray value, the definition of each frame of the spine internal image per second is obtained, and then the definition of each second lens is obtained; according to the difference between the definition of each second lens and the definition of the first second lens, and the definition of the first second lens, the fogging parameter of each second lens is obtained.

[0024] It should be noted that when the spine endoscope enters the patient's body through the working channel, because the patient's body contains water, and there is a certain temperature difference between the lens and the patient's body, the water in the patient's body will be liquefied on the lens of the spine endoscope due to the cold, causing the lens of the spine endoscope to appear fogging phenomenon, so that the relevant images collected by the spine endoscope will produce a lot of low-frequency information. Therefore, the spine internal image is de-fogged to restore the original high-frequency information in the image. When the image is de-fogged by the Retinex algorithm, because the default Gaussian scale factor in the Retinex algorithm is not suitable for the image taken by the spine endoscope, and the images collected at different times are affected by fog to different degrees. Therefore, the fogging parameter of each second lens is calculated, and different Gaussian scale factors are set for different images.

[0025] It should be further noted that the Retinex algorithm is an image enhancement technology that simulates the color constancy of the human visual system, and its core idea is to decompose the image into illumination component and reflection component, and recover the essential color and details of the object by suppressing the influence of illumination change, i.e. illumination component. And Retinex theory believes that the color perceived by the human eye is determined by the reflection ability of the object surface to R, G, B three primary colors, not by the intensity of light. Therefore, by analyzing the distribution of the values of the pixels in the R, G, B three channels in the image obtained by the spine endoscope, the fogging information of each image is calculated.

[0026] It should be further noted that when the spine endoscope acquires the image in the patient's body, the region corresponding to the image in the patient's body is necessarily red, which is biased towards the color of blood. Therefore, in the image of the internal spine region not affected by fogging, the number of pixel points with high R channel value is necessarily large, while the number of pixel points with high G channel and B channel value is small or even almost none. This results in a very large difference in the distribution of pixel points in the R, G, B three channels in the image of the internal spine region not affected by fogging. At the same time, due to the complexity of the body structure, it is inevitable that shadows will appear in some image regions during image acquisition, resulting in a certain number of pixels with low gray value in the gray image.

[0027] It's also worth noting that when fog accumulates on a spinal endoscope, fog scattering reduces light penetration, causing low-grayscale areas of distant or dark objects to appear whiter and significantly reducing areas of true deep black. This results in the number of pixels with low grayscale values ​​in fogged images being far lower than in unaffected images. In other words, fog reduces the grayscale distribution of the scene, weakening the difference between light and dark, making the image appear grayish. Consequently, when fog is present on a spinal endoscope, the number of pixels with low grayscale values ​​is smaller. While fog scattering doesn't affect all wavelengths of light uniformly, it generally shifts the image toward white. This forces the distribution of pixel values ​​across different channels within an image to become closer, reducing the differences between different color channels. Therefore, the degree of fog impact on each image, i.e., the image's sharpness, is calculated based on the pixel grayscale values ​​and their distribution across the R, G, and B channels within each image. The sharpness of each second's footage is then calculated based on the sharpness of multiple frames within that second.

[0028] It's also worth noting that when imaging the interior of the spine through a spinal endoscope, the lens isn't fogged by moisture from the patient's body until the endoscope enters the body. This means the first second of footage can be considered unaffected by fog. Therefore, the clarity of the first second of footage is used as a reference value to derive the fogging parameters for each second of footage.

[0029] Specifically, get the Seconds The pixel point in the spine image of the frame is The specific calculation formula for the distribution degree under each channel is as follows: Where, Indicates the Seconds The pixel point in the spine image of the frame is The distribution degree under channels, of which 3 channels are Channel, G channel and B channel, Represents an order value, Indicates the Seconds Frame of the spine image within the first The value of each channel is The number of pixels.

[0030] It should be noted that since the grayscale values ​​of the pixels in the un-absorbed spine area are mostly red, the values ​​of the pixels in the image of the spine area under the R channel are relatively large. To quantify the Seconds The pixel point in the spine image of the frame is The distribution degree under each channel.

[0031] Further, obtain the Seconds The specific calculation formula for the clarity of the internal spinal image of a frame is as follows: Where, Indicates the Seconds The clarity of the image inside the spine of the frame, Indicates the Seconds The pixel point in the spine image of the frame is The distribution degree under the channel is The absolute value of the difference in distribution under the channels; when hour, Indicates the Seconds The distribution of the pixels in the spine image of the frame under the third channel is the same as that under the first channel. The absolute value of the difference in distribution under the channels; Indicates the Seconds The grayscale value of the spine image inside the frame is The number of pixels, Indicates the Seconds The number of pixels in the internal image of the spine of the frame, represents the hyperbolic tangent function, which is used for normalization processing in this embodiment.

[0032] It should be noted that the present invention defines pixels with grayscale values ​​below 50 as low grayscale points. To quantify the number of pixels with lower gray values ​​in the image, in order to prevent The value of is low, and the present invention multiplies it by 2, The larger the value, the Seconds The more the internal image of the spine in the frame conforms to the characteristics of the lower gray value of certain pixels in the non-fog image, that is, Seconds The internal image of the spine of the frame is less affected by fogging. The value of is large; Is used to respond to Seconds The distribution difference of pixels in the internal image of the spine of the frame under the three channels of R, G, and B; The larger the value, the Seconds The more the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel and the less the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel, the less the fogging degree of the image in the first second is. The more the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel and the less the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel, the less the fogging degree of the image in the first second is. The more the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel and the less the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel, the less the fogging degree of the image in the first second is. The more the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel and the less the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel, the less the fogging degree of the image in the first second is. The more the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel and the less the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel, the less the fogging degree of the image in the first second is. The more the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel and the less the pixel value in the spine internal image of the frame is close to the pixel value in the un-fogged image in the B channel, the less the fogging degree of the image in the first second is.

[0033] Further, the average value of the definition of the spine internal image of all frames in the first second is denoted as the definition of the first second shot. Further, the average value of the definition of the spine internal image of all frames in the first second is denoted as the definition of the first second shot.

[0034] Further, the specific calculation formula of the fogging parameter of the first second shot is as follows: In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot.

[0035] In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot. In the formula, F1 represents the fogging parameter of the first second shot, D1 represents the definition of the first second shot, and D2 represents the definition of the second second shot.

[0036] Thus far, the fogging parameter of each second shot is obtained.

[0037] Step S003: According to the distribution of the pixel gray value in the spine internal image of each frame in each second, the gray dispersion of the spine internal image of each frame in each second is obtained, and then the fogging degree of the image in each second is obtained; according to the fogging parameter of each second shot, the fogging degree of the image in each second, and the information entropy of the pixel gray value in the spine internal image of each frame in each second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in each second is obtained, and then the enhanced image of the spine internal image is obtained, which assists the doctor in treatment.

[0038] It should be noted that when the image is photographed, the image in the lens can be regarded as the reflected light formed by the incident light irradiating on the reflecting object, which is obtained by entering the lens. The image in the lens is affected by the illumination component and the reflection component, i.e., the property of the object itself. Therefore, if the directly obtained image is I, the reflection component is R, and the illumination component is L, then I = R + L, wherein the reflection component R is affected by the illumination component L. ​​​​It is the original image we want to be unaffected. After taking the logarithm of both sides of the formula, the expression of the image is , and wherein, represents a convolution operation, represents a convolution kernel. That is, the illumination component is obtained by performing Gaussian convolution on the image . Therefore, the illumination component is obtained by Gaussian convolution, and then the reflection component, that is, the enhanced image, is obtained.

[0039] It should be further explained that when the illumination component is obtained by performing Gaussian convolution on the gray image of the internal region of the spine, when the set Gaussian scale factor is large, the dehazing effect on the image is strong, but more detailed information in the image is lost. When the set Gaussian scale factor is small, the dehazing effect on the image is weak, but less information in the image is lost. Therefore, the degree of influence of each image by fog and the detailed information contained in each image are calculated.

[0040] It should be further explained that for the fogged image, the fog reduces the gray scale range of the pixel points in the scene, weakens the light and dark difference, and makes the distribution curve of the gray histogram of the fogged image more concentrated in the middle region, and steeply decreases on both ends. Compared with the non-fogged image, the number of pixel points with large and small gray values in the fogged image is less, and there are more pixel points with close gray values. Therefore, according to the distribution of the gray values of the pixel points in the gray image, the degree of influence of each image by fog is calculated.

[0041] It should be further explained that when there is more detailed information of the pixel points in the image, there are more pixel points with different gray values in the image, and at this time, the information entropy of the gray values of the pixel points in the image is larger. Therefore, the detailed information contained in the image is quantified according to the information entropy of the gray values of the pixel points in the image, and the Gaussian scale factor of the convolution kernel is determined.

[0042] ​It should be further explained that because the images acquired by spinal endoscopy are continuous in time, that is, the footage captured by the spinal endoscopy is displayed in the form of a video, when dehazing spinal endoscopy images, the image processing results of the previous second will have a certain impact on the image processing results of the next second. Specifically, if the dehazing effect of the image in the previous second is not ideal after processing it with the Gaussian scaling factor of the previous second, then the Gaussian scaling factor should be increased in the next second to enhance the dehazing effect. If the dehazing effect of the image in the previous second is too strong after processing it with the Gaussian scaling factor of the previous second, then the Gaussian scaling factor should be reduced in the next second to protect the high-frequency information in the image. Therefore, when obtaining the Gaussian scaling factor for dehazing each second's image, the Gaussian scaling factor for dehazing each second's image is calculated based on the dehazing effect of the dehazing image in the previous second.

[0043] It should be further explained that, when judging the defogging effect of the image at each second, the present invention judges the defogging effect by the difference in fogging parameters between the defogging image at each second and the defogging image at the previous second.

[0044] Specifically, set a grayscale range [ , ], constantly adjusting and The value of Seconds The grayscale value of the spine image in the frame is greater than or equal to and less than or equal to The number of pixels is the same as the Seconds When the ratio of the number of pixels in the internal image of the spine of the frame is greater than or equal to 0.8, the corresponding The value obtained after Seconds The grayscale dispersion of the internal spinal image of the frame. By constantly adjusting and , and get the value of Seconds All grayscale discreteness of the spine interior image of the frame.

[0045] Further, the Seconds The minimum value of the grayscale discreteness of the spinal internal image of the frame is recorded as Seconds Grayscale dispersion of the spine internal image of the frame.

[0046] It should be noted that, The smaller the value of the obtained value is, the greater the influence of the fog on the image collected by the endoscopic spine in the first second is, and the greater the value of the obtained value is. The closer the gray scale values of the pixel points with more pixels in the image of the spine inside of the frame in the first second are, the more the image conforms to the characteristic that the gray scale values of the pixel points with more pixels are closer when the image is affected by the fog, that is, the greater the influence of the fog on the image of the spine inside of the frame in the first second is.

[0047] Further, the specific calculation formula of the fogging degree of the image in the first second is as follows: In the formula, denotes the fogging degree of the image in the first second, denotes the average value of the gray scale dispersion degrees of the images of the spine inside of all the frames in the first second.

[0048] It should be noted that, The smaller the value of the obtained value is, the greater the influence of the fog on the image collected by the endoscopic spine in the first second is, and the greater the value of the obtained value is.

[0049] Further, the average value of the information entropy of the pixel gray scale values in the images of the spine inside of all the frames in the first second is denoted as the information entropy of the image in the first second. The information entropy of the pixel gray scale values in an image is obtained by using the known technology, and thus the present embodiment will not be described in detail.

[0050] Further, the specific steps of obtaining the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the first second are as follows: first, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the first second is set to 0, and the fogging parameter of the first second lens is set to the fogging parameter after the de-fogging of the first second lens. According to the fogging parameter of the second second lens, the fogging degree of the image in the second second, and the information entropy of the image in the second second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the second second is obtained. According to the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the second second, the Retinex algorithm is used to enhance the image of the spine inside of each frame in the second second, and the enhanced image of the spine inside of each frame in the second second is obtained.

[0051] ​Further, using the prior art, the enhanced image of the spine internal image of each frame in the second second is restored to an RGB image to obtain the value of each pixel point in the enhanced image of the spine internal image of each frame in the second second under R, G and B three channels. According to the value of each pixel point in the spine internal image of each frame in the second second under each channel of R, G and B and the distribution of the gray value, the atomization parameter of the second second lens is obtained. Through the value of each pixel point in the enhanced image of the spine internal image of each frame in the second second under R, G and B three channels and the distribution of the pixel gray value, a new atomization parameter is obtained, which is recorded as the atomization parameter of the second second lens after defogging. The Retinex algorithm is used to enhance the image, which is a known technology, and the embodiment will not be described in detail.

[0052] Further, according to the atomization parameter of the first second lens after defogging, the atomization parameter of the second second lens after defogging, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the second second, the atomization parameter of the third second lens, the atomization degree of the image in the third second and the information entropy of the image in the third second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the third second is obtained. Referring to the method for obtaining the atomization parameter of the second second lens after defogging, the atomization parameter of the third second lens after defogging is obtained.

[0053] Further, according to the atomization parameter of the second second lens after defogging, the atomization parameter of the third second lens after defogging, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the third second, the atomization parameter of the fourth second lens, the atomization degree of the image in the fourth second and the information entropy of the image in the fourth second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the fourth second is obtained, and further the atomization parameter of the fourth second lens after defogging is obtained.

[0054] Further, according to the atomization parameter of the second second lens after defogging, the atomization parameter of the third second lens after defogging, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the third second, the atomization parameter of the fourth second lens, the atomization degree of the image in the fourth second and the information entropy of the image in the fourth second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the fourth second is obtained, and further the atomization parameter of the fourth second lens after defogging is obtained. Further, according to the atomization parameter of the second second lens after defogging, the atomization parameter of the third second lens after defogging, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the third second, the atomization parameter of the fourth second lens, the atomization degree of the image in the fourth second and the information entropy of the image in the fourth second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the fourth second is obtained, and further the atomization parameter of the fourth second lens after defogging is obtained. Further, according to the atomization parameter of the second second lens after defogging, the atomization parameter of the third second lens after defogging, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the third second, the atomization parameter of the fourth second lens, the atomization degree of the image in the fourth second and the information entropy of the image in the fourth second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the fourth second is obtained, and further the atomization parameter of the fourth second lens after defogging is obtained. Further, according to the atomization parameter of the second second lens after defogging, the atomization parameter of the third second lens after defogging, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the third second, the atomization parameter of the fourth second lens, the atomization degree of the image in the fourth second and the information entropy of the image in the fourth second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the fourth second is obtained, and further the atomization parameter of the fourth second lens after defogging is obtained. Further, according to the atomization parameter of the second second lens after defogging, the atomization parameter of the third second lens after defogging, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the third second, the atomization parameter of the fourth second lens, the atomization degree of the image in the fourth second and the information entropy of the image in the fourth second, the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the fourth second is obtained, and further the atomization parameter of the fourth second lens after defogging is obtained.

[0055] Further, the specific calculation formula of the Gaussian scale factor of the convolution kernel when the convolution operation is performed on the image in the fourth second is as follows: In the formula, the atomization parameter of the fourth second lens after defogging is represented as the atomization parameter of the fourth second lens after defogging. ​​​​​​The Gaussian scale factor of the convolution kernel when performing convolution operations on images within seconds, Indicates the The fog parameters of the second lens, Indicates the The degree of image fogging within seconds, Indicates the Information entropy of the image within seconds, Indicates the The Gaussian scale factor of the convolution kernel when performing convolution operations on images within seconds, Indicates the The fog parameters after the second lens is defogged, Indicates the The fog parameters after the second lens is defogged, represents the floor function, represents the hyperbolic tangent function, which is used for normalization processing in this embodiment; , ,when hour, .

[0056] What needs to be explained is that The smaller the value, the better the spinal endoscopy is at the The images collected within seconds contain more detailed information, so When performing convolution operations on intrasecond images, a smaller Gaussian scaling factor is selected; and The larger the value is, the better the spinal endoscopy is at the The more the image is collected within seconds, the greater the impact of fog is. Therefore, when performing Gaussian convolution on the image, a larger Gaussian scale factor needs to be selected. Since the Gaussian scale factor has different effects in different ranges, and its value within 20 is more suitable for foggy images and can better preserve image details, that is, when defogging images collected during spinal endoscopic surgery, a Gaussian scale factor value of about 20 is more suitable. Therefore, As a parameter of the calculated Gaussian scale factor; The larger the value of When defogging an image within seconds, the defogging effect is not ideal. add , get the first Gaussian scaling factor of the convolution kernel when performing convolution operations on images within seconds.

[0057] Furthermore, the Retinex algorithm is used to The internal image of the spine is enhanced in each frame within seconds to obtain the first The enhanced image of the spinal column inside each frame within seconds is converted into the first The enhanced image of the spine internal image of each frame in a second is restored to an RGB image, which assists the doctor in treatment. The use of a Retinex algorithm for image enhancement and the acquisition of a convolution kernel under a Gaussian scale factor are both known technologies, and the present embodiment will not be described in detail.

[0058] Thus, the present embodiment is completed.

[0059] Another embodiment of the present application provides an artificial intelligence-based spine endoscopy surgery visualization enhancement system, which comprises a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the above method steps S001 to S003 when executing the computer program.

[0060] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A visualization enhancement method for spinal endoscopic surgery based on artificial intelligence, characterized in that: include: Acquire several images of the spine's interior, and obtain the values ​​of each pixel in the spine's interior images in the R, G, and B channels, as well as the grayscale value of each pixel; Each of the internal spinal column images corresponds to an acquisition time; According to the distribution of the values ​​of the pixels in the internal spinal image of each frame in each second under each of the three channels R, G, and B, the distribution degree of the pixels in the internal spinal image of each frame in each second under each channel is obtained; according to the difference in the distribution degrees of the pixels in the internal spinal image of each frame in each second under different channels and the distribution of the grayscale values ​​of the pixels, the clarity of the internal spinal image of each frame in each second is obtained, and then the clarity of the shot of each second is obtained; according to the difference between the clarity of the shot of each second and the clarity of the shot of the first second, and the clarity of the shot of the first second, the fog parameter of the shot of each second is obtained; according to the distribution of the grayscale values ​​of the pixels in the internal spinal image of each frame in each second, the grayscale dispersion of the internal spinal image of each frame in each second is obtained, and then the degree of fog of the image of each second is obtained; according to the fog parameter of the shot of each second, the degree of fog of the image of each second and the information entropy of the grayscale values ​​of the pixels in the internal spinal image of each frame in each second, the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image of each second is obtained, and then the enhanced image of the internal spinal image is obtained to assist doctors in treatment.

2. 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 distribution of pixels in each channel of the spinal internal image of each frame within each second is as follows: Where, Indicates the Seconds The pixel point in the spine image of the frame is The distribution degree under channels, of which 3 channels are Channel, G channel and B channel, Represents an order value, Indicates the Seconds Frame of the spine image within the first The value of each channel is The number of pixels.

3. The method for enhancing visualization of spinal endoscopic surgery based on artificial intelligence according to claim 1, characterized in that: The specific calculation formula for obtaining the clarity of the spinal internal image of each frame within each second is as follows: Where, Indicates the Seconds The clarity of the image inside the spine of the frame, Indicates the Seconds The pixel point in the spine image of the frame is The distribution degree under the channel is The absolute value of the difference in distribution under the channels; when hour, Indicates the Seconds The distribution of the pixels in the spine image of the frame under the third channel is the same as that under the first channel. The absolute value of the difference in distribution under the channels; Indicates the Seconds The grayscale value of the spine image inside the frame is The number of pixels, Indicates the Seconds The number of pixels in the internal image of the spine of the frame, represents the hyperbolic tangent function.

4. The method for enhancing visualization of spinal endoscopic surgery based on artificial intelligence according to claim 1, characterized in that: The specific steps of obtaining the clarity of each second of footage are as follows: The average value of the clarity of the spinal internal image of all frames within seconds is recorded as The clarity of the second lens.

5. 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 fogging parameters of the lens per second is as follows: Where: Indicates the The fog parameters of the second lens, Indicates the clarity of the first second of the shot. Indicates the The clarity of the second lens.

6. The method for enhancing visualization of spinal endoscopic surgery based on artificial intelligence according to claim 1, characterized in that: The specific calculation formula for obtaining the grayscale dispersion of the spinal internal image of each frame within each second is as follows: Set a grayscale range [ , ], constantly adjusting and The value of Seconds The grayscale value of the spine image in the frame is greater than or equal to and less than or equal to The number of pixels is the same as the Seconds When the ratio of the number of pixels in the internal image of the spine of the frame is greater than or equal to 0.8, the corresponding The value obtained after Seconds Grayscale dispersion of the internal spinal image of the frame; , through continuous adjustment and The value of Seconds All grayscale discreteness of the spinal internal image of the frame; Seconds The minimum value of the grayscale discreteness of the spinal internal image of the frame is recorded as Seconds Grayscale dispersion of the spine internal image of the frame.

7. The artificial intelligence-based visualization enhancement method for spinal endoscopic surgery according to claim 1, characterized in that: The specific calculation formula for the fogging degree of the image in each second is as follows: Where, Indicates the The degree of image fogging within seconds, Indicates the The mean grayscale dispersion of the spinal column internal image for all frames within 1 second.

8. The method for enhancing visualization of spinal endoscopic surgery based on artificial intelligence according to claim 5, characterized in that: The Gaussian scale factor of the convolution kernel when performing the convolution operation on the image within each second is obtained according to the fog parameter of the lens in each second, the fog degree of the image in each second, and the information entropy of the grayscale value of the pixel in the spinal internal image of each frame in each second, and then the specific calculation steps for obtaining the enhanced image of the spinal internal image are as follows: The mean information entropy of the grayscale values ​​of the pixels in the spinal column images of all frames within a second is recorded as The information entropy of the image within the second; let the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image within the first second be 0, and let the fog parameter of the first second lens be the fog parameter after the first second lens is defogged; according to the fog parameter of the second second lens, the fog degree of the image within the second second and the information entropy of the image within the second second, the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image within the second second is obtained, and according to the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image within the second second, the internal image of the spine of each frame within the second second is enhanced using the Retinex algorithm to obtain the enhanced image of the internal image of the spine of each frame within the second second; according to The image of the spine interior of each frame in the second second is enhanced, and the value of each pixel in the image of the spine interior after each frame in the second second is obtained under the three channels of R, G, and B, as well as the grayscale value of each pixel; a method for obtaining the fog parameter of the second second lens is used according to the distribution of the value of each pixel in the spine interior image of each frame in every two seconds under the three channels of R, G, and B and the grayscale value; a new fog parameter is obtained by the distribution of the value of each pixel in the image of the spine interior after each frame in the second second and the grayscale value, which is recorded as the fog parameter after the second second lens is defogged. number; according to the fog parameters of the first second lens after defogging, the fog parameters of the second second lens after defogging, the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image in the second second, the fog parameters of the third second lens, the fog degree of the image in the third second and the information entropy of the image in the third second, the Gaussian scale factor of the convolution kernel when performing the convolution operation on the image in the third second is obtained, and then the enhanced image of the internal image of the spine of each frame in the third second is obtained; the fog parameters of the third second lens are obtained by using the distribution of the values ​​and grayscale values ​​of the pixels in each of the three channels of R, G, and the internal image of the spine of each frame in every three seconds; through the third The distribution of the values ​​of each pixel in the R, G, and B channels and the grayscale values ​​of each pixel in the enhanced image of the spine in each frame within a second is used to obtain a new fog parameter, which is recorded as the fog parameter of the third second lens after defogging; according to the fog parameter of the second second lens after defogging, the fog parameter of the third second lens after defogging, the Gaussian scale factor of the convolution kernel when performing a convolution operation on the image within the third second, the fog parameter of the fourth second lens, the fog degree of the image within the fourth second, and the information entropy of the image within the fourth second, the Gaussian scale factor of the convolution kernel when performing a convolution operation on the image within the fourth second is obtained, and then the fog parameter of the fourth second lens after defogging is obtained; according to the The fog parameters after defogging the second lens, The fog parameters after defogging the second lens, The Gaussian scale factor of the convolution kernel when the image is convolved within seconds, Second lens fog parameters, The degree of fogging of the image within seconds and the The information entropy of the image within seconds is obtained The Gaussian scale factor of the convolution kernel when the image is convolved within seconds is obtained. The fog parameters after defogging the second lens; The Gaussian scale factor of the convolution kernel when performing convolution operation on the image within seconds, using the Retinex algorithm to The internal image of the spine is enhanced in each frame within seconds to obtain the first Enhanced image of the interior of the spine, frame by frame within seconds.

9. The method for enhancing visualization of spinal endoscopic surgery based on artificial intelligence according to claim 8, characterized in that: The obtained The specific calculation formula of the Gaussian scale factor of the convolution kernel when performing convolution operation on the image within seconds is as follows: Where, Indicates the The Gaussian scaling factor of the convolution kernel when performing convolution operations on images within seconds, Indicates the The fog parameters of the second lens, Indicates the The degree of image fogging within seconds, Indicates the Information entropy of the image within seconds, Indicates the The Gaussian scaling factor of the convolution kernel when performing convolution operations on images within seconds, Indicates the The fog parameters after the second lens is defogged, Indicates the The fog parameters after the second lens is defogged, represents the floor function, represents the hyperbolic tangent function, , ,when hour, .

10. 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, the steps of the artificial intelligence-based spinal endoscopic surgery visualization enhancement method as described in any one of claims 1 to 9 are implemented.

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

  • Scale-adaptive Retinex algorithm image defogging method and device

    CN118279196A

  • Endoscope image processing method and device, computer equipment and storage medium

    CN119515882A

  • Image restoration method and image processing apparatus using the same

    US20160078605A1