A method for enhancing spinal endoscope data visualization
By analyzing the multi-channel color-level histogram of spinal endoscopic images and the pixel value changes of adjacent frames, the pixel values of the target points of fogging are corrected frame by frame, solving the problem that lens fogging affects surgical recognition during spinal endoscopy, real-time, high-definition visualization enhancement of spinal endoscopic data is achieved.
Patent Information
- Application Number
- CN202510511253.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2045-04-23
AI Technical Summary
Existing spondylosis intraoperative fogging of lenses has affected the accuracy of surgical identification, and the existing defogging methods are limited in effect and are difficult to achieve real-time high-definition requirements.
By analyzing the multi-channel color level histogram of spinal endoscopic images, the effective target position and the possible area of aerosol diffusion are determined, and combined with the changes in pixel values of adjacent frames, the pixel values of the defog target points are corrected frame by frame to achieve real-time defog removal effect.
It improves the identification accuracy during spinal endoscopic surgery, meets the requirements of real-time high definition, and ensures the visualization of spinal endoscopic data.
Smart Images

Figure CN120031751B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and specifically to a method for enhancing the visualization of spinal endoscope data. Background Art
[0002] During spinal endoscopy, due to the temperature imbalance between the lens and the organ, water vapor condensation will occur on the endoscope lens. At the same time, the surgical cutting tool will cause the splashing of body fluids, contaminating the imaging surface of the lens. Additionally, the aerosol generated by tissue cutting during the surgical process will accumulate in the narrow internal space, and the smooth part of the tissue surface will scatter the light of the endoscope, thus exacerbating the interference of the fog on imaging, and further causing the lens to fog up and affecting the recognition accuracy of the surgical operator during the operation. The existing methods, such as heating the lens and applying anti-fog materials, have limited defogging effects. The endoscopic image defogging algorithm can further assist in improving the clarity of the imaging effect.
[0003] During the process of continuous frame defogging of endoscopic images in the prior art, robust points in the current frame are screened, and based on the occlusion changes of the robust points between frames, the fog occlusion situation of subsequent endoscopic imaging frames is evaluated. However, for the unstable generation and spread occlusion rate changes of fog caused by the variable optical environment in the lesion area where the endoscope is located, the posterior update is difficult to meet the real-time high-definition requirements, resulting in a lag in the defogging effect, interfering with the recognition of the image content during the operation, and affecting the safety of the operation process. Summary of the Invention
[0004] The present invention provides a method for enhancing the visualization of spinal endoscope data to solve the problem that the lens of the existing spinal endoscope fogs up and is blocked during the operation, affecting surgical identification. The specific technical solution adopted is as follows:
[0005] The present invention proposes a method for enhancing the visualization of spinal endoscope data, which includes the following steps:
[0006] Obtain continuous frame endoscopic images through a spinal endoscope;
[0007] Analyze the pixel point quantity distribution of each color level in each channel of each frame of endoscopic image to determine several effective target positions and their target areas in each frame of endoscopic image; analyze the color level distribution between different effective target positions, and combine the number of pixel points in the target area to obtain each effective target position and its possible aerosol diffusion area;
[0008] Analyze the area change between the possible aerosol diffusion areas of the same effective target position in adjacent frames of endoscopic images to determine several defogging target points in the subsequent frame of endoscopic image in the adjacent frames;
[0009] Based on the changes in pixel values of each channel in adjacent-frame endoscopic images for the defogging target point, and in combination with the area change of the possible aerosol diffusion region in adjacent-frame endoscopic images, correct the pixel values of each channel of the defogging target point.
[0010] Optionally, the specific method for analyzing the pixel point quantity distribution of each color level in each channel of each frame of endoscopic image to determine several effective target positions and their target regions in each frame of endoscopic image includes:
[0011] For the frame of endoscopic image, construct a color level histogram for each channel of the pixel points according to their color levels, and superimpose the color level histograms of all channels to obtain the multi-channel color level superimposed histogram of the frame of endoscopic image;
[0012] For any color level, if the number of pixel points in any one channel of this color level is greater than the sum of the number of pixel points in other channels of this color level, record this color level as an effective target position of the frame of endoscopic image;
[0013] Take the channel corresponding to the maximum number of pixel points at this color level as the identification channel of this effective target position; take several regions formed by several pixel points corresponding to the identification channel of this effective target position in the frame of endoscopic image as several target regions of this effective target position.
[0014] Optionally, the specific method for analyzing the color level distribution between different effective target positions and combining the number of pixel points in the target region to obtain each effective target position and its possible aerosol diffusion region includes:
[0015] Based on the number of pixel points in the identification channel of the effective target position in the endoscopic image and the total number of pixel points in the endoscopic image, obtain the identification pixel point ratio of each effective target position;
[0016] Obtain the effective target position with the smallest absolute value of the difference in color level from the th effective target position, and take the absolute value of the difference in color level between this effective target position and the th effective target position as the minimum identification color difference of the th effective target position;
[0017] The th effective target position's target recognition degree is calculated as:
[0018]
[0019] where represents the The recognition pixel point ratio of the th valid target position in the frame endoscope data, represents the minimum recognition color difference of the th valid target position in the th frame of endoscope data, represents the maximum color level value in the th frame of endoscope image, represents the minimum color level value in the th frame of endoscope image;
[0020] According to the target recognition rate of the valid target position and the number of pixel points in its target area, several possible aerosol diffusion areas of each valid target position are obtained.
[0021] Optionally, the specific method for obtaining several possible aerosol diffusion areas of each valid target position is as follows:
[0022] For the th valid target position, obtain the number of pixel points in each of its target areas, and sort each target area in descending order according to the number of pixel points. Using the target recognition rate of the th valid target position as the judgment threshold, accumulate the number of pixel points in each target area, and calculate the ratio of the obtained sum value to the number of pixel points in the recognition channel of the th valid target position;
[0023] When the ratio is greater than the judgment threshold for the first time, stop accumulating, and use the target areas participating in the accumulation as the possible aerosol diffusion areas of the th valid target position.
[0024] Optionally, the specific method for analyzing the area change between the possible aerosol diffusion areas of the same valid target position in adjacent frames of endoscope images and determining several defogging target points in the subsequent frame of endoscope image in the adjacent frames includes:
[0025] For the possible aerosol diffusion areas of the same valid target position in adjacent frames of endoscope images, respectively construct the minimum circumscribed circle and obtain the center and its radius, and obtain the diffusion radii of each valid target position in the two frames of endoscope images;
[0026] Sort the diffusion radii of the valid target positions in the two frames of endoscope images respectively, and compare the obtained sequences to determine several foggy positions in the adjacent frames of endoscope images;
[0027] According to the pixel point difference between the target areas of the foggy positions in the adjacent frames of endoscope images, obtain several defogging target points in the subsequent frame of endoscope image in the adjacent frames.
[0028] Optionally, the method for obtaining the diffusion radius of each effective target position in two endoscopic images specifically includes:
[0029] Record that in the th and th endoscopic images, the multi-channel color level superposition histograms both have effective target positions, and the color levels with the same identification channels, to obtain several identical effective target positions in the two endoscopic images;
[0030] For any one of the two aerosol diffusion possible regions corresponding to an identical effective target position in the two endoscopic images, obtain the minimum circumscribed circle for any one of the aerosol diffusion possible regions, and obtain the center and radius of the minimum circumscribed circle, and take the radius as the diffusion radius of the aerosol diffusion possible region of this identical effective target position.
[0031] Optionally, the method for respectively sorting the diffusion radii of the effective target positions in the two endoscopic images, comparing the obtained sequences, and determining several foggy positions in adjacent endoscopic images specifically includes:
[0032] Sort the several corresponding aerosol diffusion possible regions of all identical effective target positions in the th endoscopic image corresponding to the two endoscopic images, and arrange them in ascending order of the diffusion radius to obtain the aerosol diffusion possible region sequence of the th endoscopic image;
[0033] Sort the several corresponding aerosol diffusion possible regions of the th endoscopic image corresponding to the diffusion radius, and arrange them in ascending order to obtain the aerosol diffusion possible region sequence of the th endoscopic image;
[0034] Compare the aerosol diffusion possible region sequences of the two endoscopic images, extract several aerosol diffusion possible regions with different order values of the same aerosol diffusion possible region in the two sequences, and use their corresponding effective target positions as the foggy positions in the two endoscopic images.
[0035] Optionally, the method for obtaining several defogging target points in the latter endoscopic image of adjacent frames based on the pixel point differences between the target regions of the foggy positions in adjacent endoscopic images specifically includes:
[0036] For any one of the foggy positions in the two endoscopic images, mark the pixel points in all target regions corresponding to the foggy position in the two endoscopic images, and perform frame difference calculation by subtracting the previous frame from the latter frame of the two endoscopic images. After frame difference, several pixel points with still existing marks are obtained, and the pixel points with still existing marks are used as the foggy pixel points of this foggy position;
[0037] Obtain a number of foggy pixels at the foggy positions in two frames of endoscopic images, and mark them in the frame of endoscopic image as the defogging target points in the frame of endoscopic image.
[0038] Optionally, the method for correcting the pixel values of each channel of the defogging target points according to the change of pixel values in each channel in adjacent frames of endoscopic images and combining the area change of the possible aerosol diffusion regions in adjacent frames of endoscopic images includes the following specific methods:
[0039] For the th defogging target point in the frame of endoscopic image, whose corresponding foggy position is foggy position , first obtain the difference between the pixel values of the th defogging target point in the frame of endoscopic image minus the frame of endoscopic image at the corresponding foggy position in the identification channel as the identification pixel change amount of the th defogging target point;
[0040] The calculation method of the enhancement ratio of the defogging target point at the foggy position is:
[0041]
[0042] where represents the average diffusion radius of several possible aerosol diffusion regions where the diffusion radius changes at the foggy position in two frames of endoscopic images; represents the radius of the endoscopic image; represents the maximum value of several diffusion radii obtained in two frames of endoscopic images;
[0043] Enhance the defogging target points based on the pixel values of each channel of the defogging target points, their identification pixel change amounts, and the enhancement ratio of the defogging target points at the corresponding foggy positions.
[0044] Optionally, the method for enhancing the defogging target points based on the pixel values of each channel of the defogging target points, their identification pixel change amounts, and the enhancement ratio of the defogging target points at the corresponding foggy positions includes the following specific methods:
[0045] For the th defogging target point, multiply the difference obtained by subtracting the enhancement ratio of the defogging target point at the foggy position from 1 by the identification pixel change amount of the th defogging target point as the The pixel correction amount of a defogging target point, and use the pixel correction amount and the th defogging target point at the foggy position corresponding to the endoscopic image of the sum value of the pixel values in the identification channel as the pixel correction value of the th defogging target point in the endoscopic image of the
[0046] For all defogging target points in the frame endoscopic image, obtain the pixel correction values, and superimpose them with other channels whose pixel values have not changed, and replace the corresponding pixel points in the frame endoscopic image.
[0047] The beneficial effects of the present invention are as follows: By superimposing the multi-channel color histograms of the endoscopic image, the present invention determines the target area that prominently shows the color of a single channel and its corresponding effective target position (color level), and further, through the color level distribution corresponding to the effective target position, combines the number of pixel points under the color level and the number of pixel points in the target area to screen several possible aerosol diffusion areas that may affect the identification effect of the target area, providing a basis for obtaining the pixel points of consecutive frames affected by aerosol diffusion in the subsequent process; By analyzing the possible aerosol diffusion areas of the effective target positions that exist in adjacent frames, if the area size changes, the identification effect of the corresponding effective target position may change, and the recognition rate under the corresponding channel color level may decrease accordingly. It is necessary to perform frame difference analysis on its target area to determine the defogging target point; By analyzing the changes of the effective target positions and their target areas in the endoscopic images between adjacent frames frame by frame, the changed effective target positions are screened, that is, the tissue area corresponding to the target area may be blurred due to aerosol diffusion, and it is necessary to perform visual enhancement on it. Moreover, the time complexity of pixel point distribution and multi-channel pixel value analysis is relatively low, which can meet the real-time video update during the observation of the spinal endoscope, thereby ensuring the real-time nature of the visual enhancement of the spinal endoscope data and improving the identification accuracy during the spinal endoscope surgery. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0049] Figure 1 It is a schematic flowchart of a method for visual enhancement of spinal endoscope data provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0051] Please refer to Figure 1 , which shows a flowchart of a method for enhancing the visualization of spinal endoscope data provided by an embodiment of the present invention. The method includes the following steps:
[0052] Step S001: Obtain consecutive frame endoscope images through a spinal endoscope.
[0053] In the scenario of this embodiment, during the spinal endoscopy procedure, the endoscope imaging is blocked by aerosols. One is the liquefaction of water vapor due to the temperature difference of the lens, which condenses aerosols on the lens, or the water vapor generated by operations such as tissue cutting and grinding, as well as the evaporated body fluids, etc., which will cause the endoscope image to be affected by aerosols and interfere with the recognition.
[0054] The purpose of this embodiment is to analyze the change in the multi-channel pixel values of pixel points brought by the aerosol diffusion in adjacent frame endoscope images, judge and screen the areas affected by the aerosol diffusion, and then gradually smooth the affected areas to complete real-time defogging operations. Therefore, it is first necessary to obtain consecutive endoscope videos through a spinal endoscope to obtain consecutive frame endoscope images.
[0055] Specifically, before the spinal endoscopy, place the patient in the correct position, and use a marker pen to mark the puncture point on the patient's skin; after disinfecting and locally anesthetizing the area near the puncture point, drill a catheter through the skin incision, and then guide the endoscope and other operating components into the patient's body space through the catheter.
[0056] Furthermore, connect the endoscope to the image processing unit through a cable to collect consecutive frame endoscope images. The endoscope images are collected from the moment when the operating device starts to process the tissue. Since there is basically no aerosol influence at the beginning, the first frame of endoscope image does not need to be analyzed and processed for defogging in the subsequent process.
[0057] Step S002: Analyze the pixel point quantity distribution of each color level in each channel of each frame of endoscope image to determine several effective target positions and their target areas in each frame of endoscope image; analyze the color level distribution between different effective target positions, and combine the number of pixel points in the target area to obtain each effective target position and its possible aerosol diffusion area.
[0058] It should be noted that if the endoscopic image is a color RGB image, the clearer areas usually show that the number of pixel points in one channel is much higher than that in other channels at the same color level (gray level of each channel), so as to present a clear color difference between tissues. Therefore, it is necessary to obtain the effective target positions in such multi-channel color-level superimposed histograms and obtain their corresponding target areas in the endoscopic image.
[0059] Preferably, in an embodiment of the present invention, the method for analyzing the distribution of the number of pixel points of each color level in each channel of each frame of endoscopic image and determining several effective target positions and their target areas in each frame of endoscopic image specifically includes:
[0060] Taking the th frame of endoscopic image as an example, for the pixel points in each channel of the th frame of endoscopic image, construct the color-level histogram of each channel according to their color levels (the color level is the gray level of each channel), and superimpose the color-level histograms of all channels. Then, for each color level, it corresponds to the number of pixel points of the three channels at this color level, and the multi-channel color-level superimposed histogram of the th frame of endoscopic image is obtained.
[0061] Furthermore, for any color level, if the number of pixel points in any one channel in this color level is greater than the sum of the number of pixel points in other channels at this color level, mark this color level as an effective target position of the th frame of endoscopic image. At the same time, take the channel corresponding to the maximum number of pixel points at this color level as the identification channel of this effective target position; the several regions formed by several pixel points corresponding to the identification channel of this effective target position in the th frame of endoscopic image are used as several target areas of this effective target position.
[0062] Furthermore, obtain all the effective target positions and their respective corresponding several target areas of the th frame of endoscopic image according to the above method.
[0063] It should be noted that since the effective target position is obtained according to the identification channel of its corresponding color level, the subsequent regional identification analysis of the effective target position is carried out according to the pixel point distribution under the identification channel, so the acquisition of the target area needs to be constructed according to the pixel point distribution of the identification channel.
[0064] Preferably, in an embodiment of the present invention, the method for analyzing the color-level distribution between different effective target positions and combining the number of pixel points in the target area to obtain several aerosol diffusion possible areas of each effective target position specifically includes:
[0065] It should be noted that the closer the distribution between different effective target positions is, that is, the smaller the color scale difference is, the less distinct the distinction of their tissue targets will be. It may be affected by the aerosol in the body space, resulting in blurring in the corresponding area of the endoscopic image. Therefore, it is necessary to screen the target areas of the effective target positions according to their distributions to extract the target areas with poor recognition under each effective target position and use them as the possible areas of aerosol diffusion for subsequent analysis.
[0066] For any effective target position in the th frame of endoscopic image, the ratio of the number of pixel points in the identification channel of this effective target position to the total number of pixel points in the
[0067] th frame of endoscopic image is used as the identification pixel point ratio of this effective target position. Furthermore, for the th effective target position, since each effective target position corresponds to a color scale, obtain the effective target position with the smallest absolute value of the difference from the color scale of the th effective target position, and use the absolute value of the difference between the color scales of this effective target position and the th effective target position as the minimum identification color difference of the th effective target position; then the target recognition degree of the
[0068]
[0069] th effective target position is calculated as follows: where represents the identification pixel point ratio of the th effective target position in the th frame of endoscopic data, represents the minimum identification color difference of the th effective target position in the th frame of endoscopic data, represents the maximum color scale value in the th frame of endoscopic image, represents the minimum color scale value in the
[0070] It should be noted that the proportion of the minimum identification color difference in the overall color scale range reflects the pixel points that may be blurred due to aerosol diffusion. Therefore, the identification pixel point ratio is used to remove them to quantify the target recognition degree of the effective target position; and in the subsequent process, the target areas are screened based on the target recognition degree to obtain the possible areas of aerosol diffusion.
[0071] Furthermore, for the For each valid target position, obtain the number of pixels in each target area, and sort each target area in descending order according to the number of pixels. Using the target recognition degree of the nd valid target position as the judgment threshold, accumulate the number of pixels in each target area, and calculate the ratio of the obtained sum value to the number of pixels in the recognition channel of the th valid target position. When the ratio is greater than the judgment threshold for the first time, stop accumulating, and use the target areas participating in the accumulation as the th valid target position's aerosol diffusion possible area; Obtain several valid target positions and their respective several aerosol diffusion possible areas in each frame of endoscope image according to the above method.
[0072] So far, by superimposing the multi-channel color level histograms of the endoscope image, the target areas that highlight a single-channel color and their corresponding valid target positions (color levels) are determined. Further, through the color level distribution corresponding to the valid target positions, combined with the number of pixels under the color level and the number of pixels in the target area, several aerosol diffusion possible areas that may affect the target area recognition effect are screened, providing a basis for obtaining consecutive frame pixels affected by aerosol diffusion in the future.
[0073] Step S003: Analyze the area change between the aerosol diffusion possible areas of the same valid target position in adjacent frames of endoscope images, and determine several defogging target points in the latter frame of endoscope image in adjacent frames.
[0074] It should be noted that there are differences in the valid target positions between adjacent frames of endoscope images. If the aerosol diffusion possible areas corresponding to the existing valid target positions change, that is, after aerosol diffusion, the distinction between it and the surrounding areas will become blurred, and the determination of the target area is usually constructed based on the distribution of tissues within the endoscope viewing range. Then, the change between the aerosol diffusion possible areas can reflect the aerosol diffusion process.
[0075] Furthermore, it should be noted that by constructing the minimum circumscribed circle of the aerosol diffusion possible area and obtaining the center and radius, relying on the change in the radius arrangement, the radius that changes in the sequence can be determined. Then, under the corresponding aerosol diffusion possible area and valid target position, the aerosol may diffuse, and the corresponding area should be regarded as the foggy area and the pixel change of the corresponding aerosol diffusion possible area should be analyzed to obtain the foggy pixels.
[0076] Preferably, in an embodiment of the present invention, the specific method included in this step is:
[0077] For the aerosol diffusion possible areas of the same valid target position in adjacent frames of endoscope images, construct the minimum circumscribed circle respectively and obtain the center and its radius, and obtain the diffusion radii of each valid target position in the two frames of endoscope images;
[0078] Sort the diffusion radii of the effective target positions in two endoscopic images respectively, compare the obtained sequences, and determine several foggy positions in adjacent endoscopic images;
[0079] Based on the pixel differences between the target areas of the foggy positions in adjacent endoscopic images, obtain several defogging target points in the latter endoscopic image of the adjacent frames.
[0080] As an example, for the possible areas of aerosol diffusion at the same effective target positions in adjacent endoscopic images, construct the minimum circumscribed circles respectively, obtain the centers and their radii, and get several diffusion radii of each effective target position in the two endoscopic images. The specific method included is:
[0081] Specifically, taking the th frame and the
[0082] th frame of endoscopic images as an example, since each effective target position corresponds to a color level, record the color levels that are effective target positions in the multi-channel color level superposition histograms of the two endoscopic images and have the same corresponding identification channels, and obtain several same effective target positions in the two endoscopic images.
[0083] It should be noted that in the two endoscopic images, after determining the target areas of the same effective target positions, obtain the minimum circumscribed circles and their centers for all target areas, and the two target areas with overlapping centers or the closest distances correspond to the same target area.
[0084] As an example, sort the diffusion radii of the effective target positions in two endoscopic images respectively, compare the obtained sequences, and determine several foggy positions in adjacent endoscopic images. The specific method included is:
[0085] Specifically, sort the possible areas of aerosol diffusion corresponding to several corresponding diffusion radii of all the same effective target positions in the th frame of endoscopic images, arrange them in ascending order of the diffusion radius, and obtain the sequence of possible areas of aerosol diffusion in the th frame of endoscopic images; similarly, for the Sort the possible aerosol diffusion regions corresponding to several corresponding diffusion radii of the endoscopic image of the frame. Similarly, arrange them in ascending order of the diffusion radius to obtain the sequence of possible aerosol diffusion regions of the endoscopic image of the frame.
[0086] Furthermore, compare the sequences of possible aerosol diffusion regions of two frames of endoscopic images, extract several possible aerosol diffusion regions with different order values of the same possible aerosol diffusion region in the two sequences, and use their corresponding effective target positions as the foggy positions in the two frames of endoscopic images.
[0087] It should be noted that after determining the diffusion radius corresponding to the possible aerosol diffusion region, if the arrangement of the diffusion radii of the same possible aerosol diffusion region changes, the recognition degree of the corresponding region between adjacent frames will change, and it may be affected by aerosol diffusion. It is necessary to analyze whether each target region under the corresponding effective target position changes blur, so as to determine the defogging target point.
[0088] As an example, according to the pixel difference between the target regions of the foggy positions in adjacent frames of endoscopic images, several defogging target points in the latter frame of endoscopic image in adjacent frames are obtained. The specific method included is:
[0089] Specifically, for any foggy position in two frames of endoscopic images, mark the pixel points in all target regions corresponding to the foggy position in the two frames of endoscopic images, and perform frame difference calculation on the two frames of endoscopic images by subtracting the previous frame from the latter frame. After frame difference, several pixel points with still existing marks are obtained, and the pixel points with still existing marks are used as the foggy pixel points of the foggy position; according to the above method, obtain several foggy pixel points of each foggy position in the two frames of endoscopic images, and mark them in the endoscopic image of the frame as the defogging target points in the endoscopic image of the frame; according to the above method, for each frame of endoscopic image except the first frame in the continuous frames of endoscopic images, obtain the corresponding several defogging target points frame by frame.
[0090] So far, by analyzing the possible aerosol diffusion regions of the effective target positions existing in adjacent frames, if the area size changes, the recognition effect of the corresponding effective target position may change, and the recognition degree under the corresponding channel color level may decrease. It is necessary to perform frame difference analysis on all its target regions to determine the defogging target points.
[0091] Step S004: According to the change of the pixel values of each channel of the defogging target points in adjacent frames of endoscopic images, combined with the area change of the possible aerosol diffusion regions in adjacent frames of endoscopic images, correct the pixel values of each channel of the defogging target points to realize the visual real-time enhancement of the spinal endoscopy data.
[0092] It should be noted that the defogging target points are obtained based on the identification channels corresponding to the foggy positions, so they need to be corrected according to the pixel value changes in the identification channels of adjacent frames. During the correction process, it is necessary to analyze the diffusion radius of the changed foggy positions. The larger the changed diffusion radius, it indicates that the target area itself is larger, and the overall part affected by the aerosol diffusion has a smaller impact on the target area judgment, so no large pixel value correction is required; if the changed diffusion radius is smaller, the target area is smaller, and a small change in the diffusion radius will cause a greater degree of change to the target area, so a greater degree of pixel value correction is required to ensure that the target area is not affected by the aerosol diffusion.
[0093] Specifically, taking the endoscopic images of the th frame and the th frame as an example, for the th endoscopic image, for the th defogging target point, its corresponding foggy position is the foggy position . First, obtain the difference between the pixel values of the th defogging target point in the th endoscopic image minus the th endoscopic image under the identification channel corresponding to the foggy position as the identification pixel change amount of the th defogging target point; the calculation method of the enhancement ratio of the defogging target point at the foggy position is:
[0094]
[0095] Among them, represents the average diffusion radius of several aerosol diffusion possible areas where the diffusion radius changes at the foggy position in two endoscopic images; represents the radius of the endoscopic image, where the endoscopic image is defaulted to a circular image; represents the maximum value of several diffusion radii obtained from two endoscopic images.
[0096] Furthermore, for the th defogging target point, the difference obtained by subtracting the enhancement ratio of the defogging target point at the foggy position from 1, multiplied by the identification pixel change amount of the th defogging target point, is used as the pixel correction amount of the th defogging target point. Add the pixel correction amount to the sum of the pixel values of the th defogging target point at the foggy position in the th endoscopic image under the identification channel corresponding to the foggy position The pixel correction value of the nth defogging target point in the frame endoscopic image; according to the above method, obtain the pixel correction values for all defogging target points in the nth frame endoscopic image, and superimpose them with other channels whose pixel values remain unchanged, and replace the corresponding pixel points in the nth frame endoscopic image to achieve the visualization enhancement of the nth frame endoscopic image (only adjust the pixel values under the corresponding identification channels through the pixel correction values, and do not adjust the pixel values under other channels).
[0097] So far, by analyzing the effective target positions and the changes in their target areas in adjacent frame endoscopic images frame by frame, screening the changed effective target positions, that is, the tissue areas corresponding to the target areas may be blurred due to aerosol diffusion and need to be visually enhanced. And the time complexity of pixel point distribution and multi-channel pixel value analysis is relatively low, which can meet the real-time video update during the observation of the spinal endoscope, thereby ensuring the real-time nature of the visualization enhancement of spinal endoscope data and improving the identification accuracy during the spinal endoscope surgery.
[0098] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for enhancing spine endoscopy data visualization, characterized in that, The method includes the following steps: Obtain consecutive frame endoscopic images through a spinal endoscope; Analyze the pixel point quantity distribution of each color level in each channel of each frame of endoscopic image to determine several effective target positions and their target areas in each frame of endoscopic image; analyze the color level distribution between different effective target positions, and combine the pixel point quantity in the target area to obtain each effective target position and its possible aerosol diffusion area; Among them, the method for obtaining the positions of several effective targets and their target regions in each frame of endoscopic image is as follows: For the pixel points of each channel in the endoscopic image of the frame, construct the color level histogram of each channel according to its color level, and superimpose the color level histograms of all channels to obtain the multi-channel color level superimposed histogram of the endoscopic image of the frame; for any color level, if the number of pixel points in any one channel in this color level is greater than the sum of the number of pixel points in other channels at this color level, record this color level as an effective target position in the endoscopic image of the frame; take the channel corresponding to the maximum value of the number of pixel points at this color level as the identification channel of this effective target position; take the several regions formed by several pixel points corresponding to the identification channel of this effective target position in the endoscopic image of the frame as the several target regions of this effective target position; Analyze the area change between the possible aerosol diffusion areas of the same effective target position in adjacent frames of endoscopic images to determine several defogging target points in the latter frame of endoscopic image in adjacent frames; Correct the pixel values of each channel of the defogging target points according to the change of pixel values of each channel in adjacent frames of endoscopic images and combine the area change of the possible aerosol diffusion area in adjacent frames of endoscopic images.
2. The method for enhancing visualization of spinal endoscopy data according to claim 1, wherein The specific method included in analyzing the color level distribution between different effective target positions, combining the pixel point quantity in the target area, and obtaining each effective target position and its possible aerosol diffusion area is as follows: Obtain the identification pixel point ratio of each effective target position according to the pixel point quantity of the identification channel in the effective target position in the endoscopic image and the total pixel point quantity of the endoscopic image; Obtain the valid target position with the smallest absolute value of the difference in color levels from the th valid target position, and use the absolute value of the difference in color levels between this valid target position and the th valid target position as the th valid target position's minimum recognition color difference; The target recognition degree of the effective target positions is calculated as follows: Among them, represents the identification pixel point ratio of the th valid target position in the th frame of endoscopic data, represents the minimum identification color difference of the th valid target position in the th frame of endoscopic data, represents the maximum color level value in the th frame of endoscopic image, represents the minimum color level value in the th frame of endoscopic image; Obtain several possible aerosol diffusion areas of each effective target position according to the target recognition degree of the effective target position and the pixel point quantity of its target area.
3. A method for enhancing spinal endoscopy data visualization according to claim 2, characterized in that, The specific method for obtaining several possible aerosol diffusion areas of each effective target position is as follows: For the th valid target position, obtain the number of pixel points in each target area, and sort the target areas in descending order according to the number of pixel points. Using the target recognition threshold of the th valid target position, accumulate the number of pixel points in each target area, and calculate the ratio of the obtained sum value to the number of pixel points in the recognition channel of the th valid target position; When the ratio is greater than the judgment threshold for the first time, stop the accumulation, and use the target area participating in the accumulation as the aerosol diffusion possible area of the effective target position of the 4. A method for enhancing spine endoscopy data visualization according to claim 1, characterized in that, The specific method included in analyzing the area change between the possible aerosol diffusion areas of the same effective target position in adjacent frames of endoscopic images to determine several defogging target points in the latter frame of endoscopic image in adjacent frames is as follows: For the possible aerosol diffusion areas of the same effective target position in adjacent frames of endoscopic images, respectively construct the minimum circumscribed circle and obtain the center and its radius, and obtain the diffusion radius of each effective target position in the two frames of endoscopic images; Sort the diffusion radii of the effective target positions in the two frames of endoscopic images respectively, and compare the obtained sequences to determine several foggy positions in the adjacent frames of endoscopic images; Obtain several defogging target points in the latter frame of endoscopic image in adjacent frames according to the pixel point difference between the target areas of the foggy positions in adjacent frames of endoscopic images.
5. A method for enhancing spinal endoscopy data visualization according to claim 4, characterized in that The specific method included in obtaining the diffusion radius of each effective target position in the two frames of endoscopic images respectively is as follows: Recorded in the frame and the frames are all valid target positions in the multi-channel color level superimposed histograms of the endoscopic images, and the color levels corresponding to the same identification channels are obtained, and several identical valid target positions in the two frames of endoscopic images are obtained; For two possible aerosol diffusion areas corresponding to the same effective target position in two frames of endoscopic images, obtain the minimum circumscribed circle for any one of the possible aerosol diffusion areas, and obtain the center and radius of the minimum circumscribed circle, and take the radius as the diffusion radius of this possible aerosol diffusion area of the same effective target position.
6. A method for enhancing spinal endoscopy data visualization according to claim 5, characterized in that The specific method included in sorting the diffusion radii of the effective target positions in the two frames of endoscopic images respectively, and comparing the obtained sequences to determine several foggy positions in the adjacent frames of endoscopic images is as follows: For all the same valid target positions in two frames of endoscopic images, in the frame of endoscopic image, the possible aerosol diffusion regions corresponding to several corresponding diffusion radii are sorted and arranged in ascending order of the diffusion radius to obtain the sequence of possible aerosol diffusion regions for the frame of endoscopic image; Sort the possible aerosol diffusion regions corresponding to several corresponding diffusion radii of the endoscopic image in the th frame, and arrange them in ascending order of the diffusion radius to obtain the sequence of possible aerosol diffusion regions of the endoscopic image in the th frame; Compare the sequences of the possible aerosol diffusion areas of the two frames of endoscopic images, extract several possible aerosol diffusion areas with different order values of the same possible aerosol diffusion area in the two sequences, and take the corresponding effective target positions as the foggy positions in the two frames of endoscopic images.
7. A method for enhancing spinal endoscope data visualization according to claim 6, characterized in that Obtaining a number of defogging target points in the endoscopic image of the latter frame in adjacent frames according to the pixel point difference between the target areas at the foggy positions in the endoscopic images of adjacent frames, the specific method included is as follows: For any foggy position in two endoscopic images, mark the pixel points in all target areas corresponding to the foggy position in the two endoscopic images, and perform frame difference calculation on the two endoscopic images by subtracting the former frame from the latter frame. After frame difference, a number of pixel points with still existing marks are obtained, and the pixel points with still existing marks are used as the foggy pixel points at this foggy position; Obtain a number of foggy pixels at each foggy position in two frames of endoscopic images, and mark them in the -th frame of endoscopic image as the defogging target points in the -th frame of endoscopic image.
8. A method for enhancing the visualization of spinal endoscopy data according to claim 1, characterized in that The method of correcting the pixel values of each channel of the defogging target points according to the change of pixel values in each channel in the endoscopic images of adjacent frames and combining the area change of the possible area of aerosol diffusion in the endoscopic images of adjacent frames, the specific method included is as follows: For the th defogging target point in the endoscopic image of the th frame, its corresponding foggy position is the foggy position . First, obtain the difference between the pixel values in the identification channel corresponding to the foggy position th defogging target point in the endoscopic image of the th frame and the endoscopic image of the th frame, as the identification pixel change amount of the th defogging target point; Foggy location Enhancement ratio to the defogging target point The calculation method is as follows: Among them, represents the positions with fog in two frames of endoscopic images the average diffusion radius of several aerosol diffusion possible regions where the downward diffusion radius changes; represents the radius of the endoscopic image; represents the maximum value of several diffusion radii obtained from two frames of endoscopic images; Enhance the defogging target points based on the pixel values of each channel of the defogging target points, their identified pixel change amounts, and the enhancement ratio of the defogging target points at the corresponding foggy positions.
9. A method for enhancing spinal endoscopy data visualization according to claim 8, characterized in that, The method of enhancing the defogging target points based on the pixel values of each channel of the defogging target points, their identified pixel change amounts, and the enhancement ratio of the defogging target points at the corresponding foggy positions, the specific method included is as follows: For the Defogging target point, subtract the foggy position from 1 The difference between the enhancement ratio of the defogging target point and the The product of the pixel changes of the defogging target points is used as the The pixel correction amount of the defogging target point is added to the pixel correction amount of the The defogging target point is The mirror image in the frame corresponds to the foggy position The sum of the pixel values under the identification channel is used as the In the endoscopic image Pixel correction value of the defogging target point; For the frame, obtain the pixel correction values for all defogging target points in the endoscopic image, and superimpose them with other channels whose pixel values remain unchanged. For the frame, replace the corresponding pixel points in the endoscopic image.
Citation Information
Patent Citations
Video defogging method based on spectral clustering
CN105898111A
Method and device for analyzing surgical smoke, and storage medium
CN110749599A