A method, apparatus, device, and medium for processing endoscopic images
By converting the RGB image into HSV image and adjusting its component values, the problem of unclear endoscope images in the case of bleeding is solved, and the image is high contrast and sharpness is achieved, which is suitable for image processing in endoscope surgery.
Patent Information
- Application Number
- CN202210311810.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2042-03-28
AI Technical Summary
When processing endoscopic images, existing endoscopic displays fail to effectively enhance color information, resulting in unclear images and blurred tissue edge features in the event of bleeding, affecting surgical efficiency.
Convert the RGB image to an HSV image, and increase and adjust it for each pixel point in the HSV image if its component value is within the preset adjustment range, and finally convert the adjusted HSV image to an RGB image.
It improves the contrast of the image, prevents color distortion, ensures the sharpness and accuracy of the image, and is suitable for image processing in case of bleeding.
Smart Images

Figure CN114648461B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of endoscopic image processing, and in particular to an endoscopic image processing method, device, equipment and medium. Background Art
[0002] As the terminal display of images, the endoscopic display device is a key link that endoscopic surgery relies on. At the same time, color optimization is performed on the endoscopic display to avoid signal transmission loss. At the same time, contrast display can be performed to provide endoscopic doctors with dual-screen contrast images, providing high-contrast, high-quality images for endoscopic surgery operations, and improving surgical efficiency.
[0003] The current endoscopic displays generally display the signals transmitted by the endoscope without loss, and do not enhance or optimize the color information in the transmitted signals. Therefore, ordinary displays can restore the endoscopic images normally. However, the main color of endoscopic images based on the human body is red, so it is difficult to distinguish different tissues in areas with similar colors, which is easy to confuse visually. Figure 1a A schematic diagram of an endoscopic image provided by the prior art, Figure 1b The second schematic diagram of the endoscopic image provided by the prior art is as follows: Figure 1a , Figure 1b As shown, existing endoscopic scenes are all normal restorations of the tissue structure in the human body, but the main color is red. In particular, due to the particularity of endoscopic surgery, bleeding is often accompanied during the operation and diagnosis of endoscopic surgery. When bleeding occurs, the blood will cover the tissue in the body and blur the edge features of the tissue, making it impossible to clearly identify the tissue structure, which is not conducive to the surgical environment. Figure 2 The schematic diagram of the endoscopic image of the bleeding situation provided by the prior art is as follows: Figure 2 As shown, the entire endoscopic image is more red and the tissue structure cannot be clearly identified.
[0004] At present, the color differentiation display of endoscopic images is mostly performed by color component processing at the endoscope end. The principle is to decompose the red, green and blue (RGB) image into three single-channel monochrome images of red, green and blue, and use histogram equalization and other similar algorithms to perform color correction and enhancement on the RGB image to finally enhance the image. However, this solution first processes the three channels of the RGB image separately, without considering the correlation of the three channels in the RGB image, which is easy to lose sight of one while focusing on another. During the processing, the image contrast may be reduced and the brightness of the original image may be lost. Treating the three monochrome images as independent images without connection will cause serious color distortion problems in the enhanced image. Secondly, color enhancement processing is performed on the endoscope end. The endoscope display needs to ensure that the signal processing process can correctly identify the signal transmitted after the endoscope processing, and that the image can be accurately restored without causing image distortion. Summary of the invention
[0005] The present application provides a method, apparatus, device and medium for processing endoscopic images, which are used to improve the unclear endoscopic images and image distortion problems caused by bleeding during endoscopic surgery.
[0006] In a first aspect, the present application provides a method for processing endoscopic images, the method comprising:
[0007] Converting the endoscopic image into a Hue Saturation Value (HSV) image;
[0008] For each pixel point in the HSV image, if the component value of any component of the pixel point is within the first component adjustment range corresponding to the component, the component value is adjusted to increase;
[0009] Converting the HSV image with the adjusted component values of the pixel points into an RGB image.
[0010] In a second aspect, the present application provides an apparatus for processing endoscopic images, the apparatus comprising:
[0011] A conversion module, configured to convert the endoscopic image into an HSV image;
[0012] An optimization module, configured to, for each pixel point in the HSV image, if the component value of any component of the pixel point is within the first component adjustment range corresponding to the component, adjust the component value to increase;
[0013] The conversion module is further configured to convert the HSV image with the adjusted component values of the pixel points into an RGB image.
[0014] In a third aspect, the present application provides a display device, the display device comprising:
[0015] A display, the display is used to display RGB images;
[0016] A controller, the controller is used to execute;
[0017] Converting the endoscopic image into an HSV image;
[0018] For each pixel point in the HSV image, if the component value of any component of the pixel point is within the first component adjustment range corresponding to the component, adjust the component value to increase;
[0019] Converting the HSV image with the adjusted component values of the pixel points into an RGB image.
[0020] In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program executable by an electronic device, wherein when the program runs on the electronic device, the electronic device executes the steps of any of the above-mentioned endoscopic image processing methods.
[0021] The present application provides an endoscopic image processing method, device, equipment and medium. The method first converts an RGB image into an HSV image, increases and adjusts the component value of each pixel in the HSV image according to the component value that is not within the component adjustment range, and converts the HSV image after the pixel component value is adjusted into a red, green and blue RGB image.
[0022] Since the RGB image is converted into an HSV image in the present application, the component values of each single-channel image in the HSV image are processed separately, and the processing process will not lose sight of one while the other, thereby improving the contrast of the image. In addition, the component values of each single-channel image in the HSV image are processed separately, which can also prevent the image color distortion, thereby accurately restoring the image and improving the clarity of the image. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the implementation methods in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technology descriptions. Obviously, the drawings described below are some embodiments of the present application, and a person of ordinary skill in the art can also obtain other drawings based on these drawings.
[0024] Figure 1a A schematic diagram of an endoscopic image provided by the prior art;
[0025] Figure 1b A second schematic diagram of an endoscopic image provided by the prior art;
[0026] Figure 2 A schematic diagram of an endoscopic image of a bleeding situation provided by the prior art;
[0027] Figure 3 A schematic diagram of the structure of a medical endoscope system provided in some embodiments of the present application;
[0028] Figure 4 A schematic diagram of an endoscopic image processing process provided in some embodiments of the present application;
[0029] Figure 5a A schematic diagram of a color model image of an HSV image provided in some embodiments of the present application;
[0030] Figure 5b A schematic diagram of a framework model image of an HSV image provided in some embodiments of the present application;
[0031] Figure 6a Schematic diagram of the original image of the endoscopic image provided by some embodiments of the present application;
[0032] Figure 6b Schematic diagram of the R-channel picture of the original image provided by some embodiments of the present application;
[0033] Figure 6c Schematic diagram of the G-channel picture of the original image provided by some embodiments of the present application;
[0034] Figure 6d Schematic diagram of the B-channel picture of the original image provided by some embodiments of the present application;
[0035] Figure 7a Schematic diagram of the H-component channel image in the HSV image obtained by converting the original image provided by some embodiments of the present application;
[0036] Figure 7b Schematic diagram of the S-component channel image in the HSV image obtained by converting the original image provided by some embodiments of the present application;
[0037] Figure 7c Schematic diagram of the V-component channel image in the HSV image obtained by converting the original image provided by some embodiments of the present application;
[0038] Figure 8a Schematic diagram of the H-component histogram in the HSV image obtained by converting the original image provided by some embodiments of the present application;
[0039] Figure 8b Schematic diagram of the S-component histogram in the HSV image obtained by converting the original image provided by some embodiments of the present application;
[0040] Figure 8c Schematic diagram of the V-component histogram in the HSV image obtained by converting the original image provided by embodiments of the present application;
[0041] Figure 9a Schematic diagram of the original image of the endoscopic image provided by some embodiments of the present application;
[0042] Figure 9b Schematic diagram of the RGB image processed by the processing method provided by embodiments of the present application provided by some embodiments of the present application;
[0043] Figure 10a Schematic diagram of the original image of the endoscopic image provided by some embodiments of the present application;
[0044] Figure 10b Schematic diagram of the RGB image with the corresponding components optimized in the RGB image provided by some embodiments of the present application;
[0045] Figure 11a Schematic diagram of the original image of the endoscopic image provided by some embodiments of the present application;
[0046] Figure 11b Schematic diagram of the first RGB effect image obtained according to the preset first optimization parameter provided by some embodiments of the present application;
[0047] Figure 11c Schematic diagram of the second RGB effect image obtained according to the preset second optimization parameter provided by some embodiments of the present application;
[0048] Figure 12 Schematic diagram of the structure of a processing device for endoscopic images provided by some embodiments of the present application;
[0049] Figure 13 Schematic diagram of the first display device provided by some embodiments of the present application. Detailed implementation manners
[0050] To make the objectives and implementation manners of the present application clearer, the following will clearly and completely describe the exemplary implementation manners of the present application with reference to the accompanying drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only a part of the embodiments of the present application, rather than all of the embodiments.
[0051] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the subsequent described implementation manners, rather than intending to limit the implementation manners of the present application. Unless otherwise specified, these terms should be understood in their ordinary and general meanings.
[0052] The terms "first", "second", "third", etc. in the description, claims and above-mentioned drawings of the present application are used to distinguish similar or like objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that such terms can be interchanged under appropriate circumstances.
[0053] The terms "comprising" and "having" and any variations thereof are intended to cover but not exclude inclusion. For example, a product or device including a series of components does not necessarily have to be limited to all the components clearly listed, but may include other components not clearly listed or inherent to these products or devices.
[0054] The term "module" refers to any known or later-developed hardware, software, firmware, artificial intelligence, fuzzy logic, or a combination of hardware or / and software code that can perform functions related to the element.
[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
[0056] For the sake of convenience of explanation, the above description has been made in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. According to the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, so that those skilled in the art can better use the embodiments and various different modified embodiments suitable for specific use considerations.
[0057] The medical endoscope display device generally includes: an endoscope system, an illumination system, and an image display system. Figure 3 The structural schematic diagram of the medical endoscope display device provided by some embodiments of the present application is as follows. Figure 3 As shown, the medical endoscope display device mainly includes: a charge-coupled device (CCD) photoelectric sensor, a display, and an image processing system. The principle of endoscope imaging is to use the light emitted by the light source of the illumination system, and the light is introduced into the body cavity to be examined through the light guide fiber in the endoscope. The CCD photoelectric sensor receives the light reflected from the mucosal surface in the body cavity, converts the light signal into an electrical signal, and then transmits the signal to the image processing system through a wire. The image processing system stores and processes these electrical signals, and finally transmits them to the display to display the color mucosal image of the organ to be examined.
[0058] When the color mucosal image, that is, the endoscope image, is displayed on the display, the signal generally used is the RGB signal format, that is, the displayed is an RGB image. The RGB image is the most commonly used display image for the display. R (red) is the red channel, G (green) is the green channel, and B (blue) is the blue channel. These three colors are superimposed in different amounts to display various colors. In the RGB image, (0, 0, 0) represents black, and (255, 255, 255) represents white. Taking R as an example, the higher the R value, the more the red component in the color.
[0059] The present application provides a method, apparatus, device and medium for processing endoscopic images. The method first converts an RGB image into an HSV image, increases the component value that is not within the component adjustment range for each pixel point in the HSV image, and converts the HSV image with adjusted pixel point component values into a red, green, and blue RGB image. Since the RGB image is converted into an HSV image in the present application, the component values of each single-channel image in the HSV image are processed separately, and the process will not neglect one thing while attending to another, thereby improving the contrast of the image. In addition, by processing the component values of each single-channel image in the HSV image separately, it is also possible to prevent color distortion of the image, thereby accurately restoring the image and improving the clarity of the image.
[0060] In order to improve the clarity of endoscopic images and ensure that the images are not distorted, the present application provides a method for processing endoscopic images.
[0061] Figure 4 The following is a schematic diagram of the processing process of an endoscopic image provided for some embodiments of the present application. The process includes the following steps:
[0062] S401: Convert the endoscopic image into an HSV image.
[0063] The method for processing endoscopic images provided by the embodiments of the present application is applied to an electronic device, which may be an endoscopic display.
[0064] The endoscopic image collected by the electronic device, that is, the original image, is an RGB image. In order to improve the clarity of the endoscopic image, in the embodiments of the present application, the electronic device converts the RGB image into an HSV image. R, G, and B are color spaces defined according to the colors recognized by the human eye. Three colors that are easy to reproduce are selected as the primary colors according to the characteristics of the human eye. Other colors can be obtained by mixing the three primary colors. However, when using the RGB color space, it is difficult to digitally adjust the details of the colors. It represents the three quantities of hue, brightness, and saturation together and is difficult to separate. Therefore, in order to better distinguish the details of the colors, in the present application, the RGB image is converted into an HSV image, and the HSV image is proposed for better digital processing of colors.
[0065] When converting the RGB image into an HSV image, it can be implemented by using the methods of the prior art. Specifically, in the embodiments of the present application, the following formula can be used to determine each component value in the HSV image:
[0066] max = max(R, G, B), min = min(R, G, B),
[0067] If max = R, then
[0068] If max = G, then
[0069] If max = B, then
[0070]
[0071]
[0072] The HSV image obtained after the above processing contains H, S, and V components. Figure 5a Schematic diagram of the color model image of the HSV image provided by some embodiments of the present application, Figure 5b Schematic diagram of the frame model image of the HSV image provided by some embodiments of the present application, as Figure 5a , Figure 5b shown. Since H is the hue, representing the color, measured in degrees, with a value range of 0° to 360°, so the angle conversion is performed on H, H = H * 60; if H < 0, H = H + 360; for the special gray-scale color where R = G = B, then H = 0°; for H, starting from red and calculating counterclockwise, red is 0°, green is 120°, and blue is 240°; S is the saturation component, with a value range of 0 to 1. When S is 0, there is only grayscale; V is the brightness component, with a value range of 0 to 1, where V = 0 is black and V = 1 is white.
[0073] S402: For each pixel point in the HSV image, if the component value of any component of the pixel point is within the corresponding first component adjustment range of the component, then increase the adjustment of the component value.
[0074] In order to improve the clarity of the endoscopic image, in the embodiments of the present application, the electronic device processes the component value of any component corresponding to each pixel point in the HSV image. For the convenience of processing, the HSV image can be decomposed into three single-channel images of hue, saturation, and brightness, and the component values of the pixel points in each single-channel image are processed respectively.
[0075] For each component, the corresponding component adjustment range can be set. When the corresponding component value is within the component adjustment range, increase the adjustment of the component value. When increasing the adjustment of the component value, the component value can be increased by a set multiple, or the difference between the component value and the threshold corresponding to the component adjustment range can be determined, and the greater the difference, the more it is increased.
[0076] For example, if the saturation value of a pixel is greater than a set threshold, then according to the difference between the saturation value and the threshold, the greater the difference, the more the saturation value is adjusted; if the brightness value of a pixel is within a preset component adjustment range, then determine the minimum value within the component adjustment range, determine the difference between the brightness value and the minimum value, and the greater the difference, the more the brightness value is adjusted; if the hue value of a pixel is within a preset component adjustment range, then determine the minimum value within the component adjustment range, determine the difference between the hue value and the minimum value, and the greater the difference, the more the hue value is adjusted.
[0077] In the embodiments of the present application, each component in the converted HSV image is processed separately. By separating the chrominance component and the luminance component of the endoscopic image and performing optimization and enhancement processing on the chrominance component, while ensuring no loss of luminance, the color performance is differentiated, and the color contrast of the endoscopic image is improved.
[0078] S403: Convert the HSV image with the adjusted component values of the pixel points into an RGB image.
[0079] After adjusting the corresponding component values of each pixel point in the HSV image, the HSV image can be converted into an RGB image. At this time, the obtained RGB image is the image after color enhancement, and the clarity of the image can be ensured at this time.
[0080] Since in the present application, the RGB image is converted into an HSV image, and the component values of each single-channel image in the HSV image are processed separately, the process will not neglect one thing while attending to another, which improves the contrast of the image. In addition, by processing the component values of each single-channel image in the HSV image separately, it is also possible to prevent color distortion of the image, thereby accurately restoring the image and improving the clarity of the image.
[0081] In order to further improve the clarity of the image, based on the above embodiments, in the embodiments of the present application, the increasing adjustment of the component when the component value of any component of the pixel point is within the first component adjustment range corresponding to the component includes:
[0082] If the saturation value of the pixel point is greater than a preset first threshold, then increase the saturation value by 1.1 times; if the brightness value of the pixel point is greater than a preset second threshold and less than a preset third threshold, then increase the brightness value by 1.5 times; if the hue value of the pixel point is greater than a preset fourth threshold and less than a preset fifth threshold, then increase the hue value by 1.1 times.
[0083] In the embodiments of the present application, a first component adjustment range corresponding to each component is preset in advance. If the component value corresponding to a certain component of a pixel point is within the first component adjustment range corresponding to the component, then the component value of the component is increased and adjusted.
[0084] Specifically, a first threshold is set for saturation. If the saturation value is greater than the first threshold, it indicates that the pixel is located in the blood or blood vessel area, and the saturation value needs to be increased. To further improve the clarity, the saturation value can be increased by 1.1 times, that is, the saturation value of the pixel located in the blood or blood vessel area is enhanced, thereby strengthening the recognizability of the blood vessels.
[0085] A second threshold and a third threshold are set for brightness, where the third threshold is greater than the second threshold. If the brightness value is greater than the second threshold and less than the third threshold, it indicates that the pixels are mainly concentrated deep in the image, and the brightness of this part of the pixels needs to be increased. To further improve the detail performance of the dark field, the brightness value can be increased by 1.5 times, thereby enhancing the dark field details.
[0086] A fourth threshold and a fifth threshold are set for hue, where the fifth threshold is greater than the fourth threshold. If the hue value is greater than the fourth threshold and less than the fifth threshold, it indicates that the pixel is near magenta and deep purple. To ensure the accuracy of the overall cavity environment color, the hue value can be increased by 1.1 times to ensure that its displayed color is in the range of pure red.
[0087] Figure 6a Schematic diagram of the original image of the endoscopic image provided by some embodiments of the present application. Figure 6b Schematic diagram of the R-channel image of the original image provided by some embodiments of the present application. Figure 6c Schematic diagram of the G-channel image of the original image provided by some embodiments of the present application. Figure 6d Schematic diagram of the B-channel image of the original image provided by some embodiments of the present application, as Figure 6a 、 Figure 6b 、 Figure 6c 、 Figure 6d shown. By performing channel analysis on the RGB signals of the original image, the R-channel image, G-channel image, and B-channel image can be obtained. According to the images of each channel, the proportion of each component of the original image can be clearly obtained. By analyzing the components corresponding to each channel, it can be clearly seen that the R component accounts for the largest proportion in the original image.
[0088] Figure 7a Schematic diagram of the H-component channel image in the HSV image obtained by converting the original image provided by some embodiments of the present application, Figure 7b Schematic diagram of the S-component channel image in the HSV image obtained by converting the original image provided by some embodiments of the present application, Figure 7c Schematic diagram of the V-component channel image in the HSV image obtained by converting the original image provided by some embodiments of the present application, as Figure 7a 、 Figure 7b 、 Figure 7cAs shown, through the schematic diagram of the H-component channel image, it can be seen that most of the colors are concentrated around magenta and purple. Through the schematic diagram of the S-component channel image, it can be seen that the saturation of blood vessels is relatively high. Through the schematic diagram of the V-component channel image, it can be seen that the light source hitting the muscle tissue causes the highest tissue brightness.
[0089] After converting the original RGB image into an HSV image, single-channel images corresponding to each component in the HSV image can be obtained. By analyzing each component in the HSV image, detailed optimization can be performed on each component of hue, saturation, and brightness. Through the single-channel image corresponding to the H component, it can be seen that most of the colors are concentrated around magenta and purple. Through the single-channel image corresponding to the S component, it can be seen that the saturation of blood vessels is relatively high. Through the single-channel image corresponding to the V component, it can be seen that the light source hitting the muscle tissue causes the highest tissue brightness.
[0090] Figure 8a Schematic diagram of the H-component histogram in the HSV image obtained by converting the original image provided by some embodiments of the present application Figure 8b Schematic diagram of the S-component histogram in the HSV image obtained by converting the original image provided by some embodiments of the present application Figure 8c Schematic diagram of the V-component histogram in the HSV image obtained by converting the original image provided by the embodiments of the present application, as Figure 8a 、 Figure 8b 、 Figure 8c shown. According to the histogram equalization, it is found that the saturation value is less than 0.6, the saturation of blood vessels is high, the brightness value is greater than 0.05 and less than 0.2, the light source hitting the muscle tissue causes the highest tissue brightness, and the hue value is equal to 0°, and the colors are concentrated in red.
[0091] Therefore, in the embodiments of the present application, based on the above analysis results, the first threshold can be set to 0.6, the second threshold to 0.05, the third threshold to 0.2, the fourth threshold to 350, and the fifth threshold to 360. The process of adjusting the component values of each pixel point in the HSV image according to the above thresholds, that is, the process of optimizing the HSV image, can be implemented based on the following algorithm:
[0092]
[0093] Based on the above algorithm, it can be determined whether the component value of the S component of any pixel point is greater than 0.6. If so, the component value of the S component is increased by 1.1 times; it is determined whether the component value of the V component of any pixel point is greater than 0.05 and less than 0.2. If so, the component value of the V component is increased by 1.5 times; it is determined whether the component value of the H component of any pixel point is greater than 350 and less than 360. If so, the component value of the H component is increased by 1.1 times, thereby realizing the optimization of the HSV image.
[0094] The above algorithm broadens the brightness range and extends the brightness to 1.2 times. For the pixel points with saturation S greater than 0.6, most of these pixel points are concentrated in the blood and blood vessel parts. The saturation of this part of pixel points is enhanced, and in the above algorithm, it is actually enhanced by 1.1 times to strengthen the recognizability of blood vessels. Secondly, for the pixel points with brightness between 0.05 and 0.2, this part of pixel points is mainly concentrated in the deep part of the image. Increasing the brightness of this part of pixel points can improve the detail performance of the dark field, and doctors can see the image clearly without moving the light source. In the above algorithm, it is actually increased by 1.5 times to enhance the dark field details. At the same time, for the hue values with relatively high hue, near magenta and deep purple, fine-tuning is performed to ensure the accuracy of the overall cavity environment color. In the above algorithm, the hue values between 350° and 360° are actually fine-tuned to ensure that the displayed color is around the positive red range.
[0095] Figure 9a Schematic diagram of the original image of the endoscopic image provided by some embodiments of the present application Figure 9b Schematic diagram of the RGB image processed by using the processing method provided by the embodiments of the present application provided by some embodiments of the present application, as Figure 9a and Figure 9b shown. The original image is an RGB image. The RGB image is converted into an HSV image. The RGB image obtained after optimizing the HSV image is compared with the original image without HSV optimization, and the RGB image obtained after optimization is shown more clearly.
[0096] In order to further improve the clarity of the image, on the basis of the above embodiments, the method described in the embodiments of the present application further includes:
[0097] For each pixel point in the HSV image after the component values of the pixel points are adjusted, if the component value of any component of the pixel point is within the second component adjustment range corresponding to the component, the corresponding RGB components of the corresponding pixel point in the RGB image corresponding to the HSV image are adjusted.
[0098] After optimizing the HSV image, the optimized HSV image is converted into an RGB image. Specifically, the process of converting the HSV image into an RGB image belongs to the prior art and will not be elaborated in the present application.
[0099] After converting the HSV image into an RGB image, each single-channel image of the RGB image can be obtained, that is, the single-channel image corresponding to the R component, the single-channel image corresponding to the G component, and the single-channel image corresponding to the B component in the RGB image are obtained. Each single-channel image of the optimized HSV image is obtained. In the present application, a second component adjustment range corresponding to each component in the HSV image can be preset. When the component value of a certain pixel point in the HSV image corresponding to a component is within the second component adjustment range corresponding to the component, the RGB components of the corresponding pixel point in the RGB image corresponding to the HSV image are adjusted. When adjusting the component values of the RGB components of the corresponding pixel point in the RGB image corresponding to the HSV image, the component values of the corresponding RGB components of the corresponding pixel point in the RGB image can be increased or decreased by a set percentage, or the difference between the component value and the threshold of the second component adjustment range can be determined according to the component value of the corresponding component of the pixel point corresponding to the HSV image. The greater the difference, the more the component values of the RGB components of the corresponding pixel point in the RGB image are adjusted.
[0100] For example, if the saturation value of the pixel point is greater than a certain set threshold, then according to the difference between the saturation value and the threshold, the greater the difference, the greater the reduction multiples of the red component value and the blue component value of the corresponding pixel point in the RGB image, and the greater the increase multiple of the green component value; if the brightness value of the pixel point is greater than a certain set threshold, then according to the difference between the brightness value and the threshold, the greater the difference, the greater the increase multiple of the blue component value of the corresponding pixel point in the RGB image.
[0101] In the embodiment of the present application, a second component adjustment range corresponding to each component in the HSV image is preset. If the component value of a certain pixel point in the HSV image corresponding to a component is within the second component adjustment range corresponding to the component, then the component values of the corresponding RGB components of the corresponding pixel point in the RGB image corresponding to the HSV image are adjusted.
[0102] Specifically, a sixth threshold is set for the saturation value. For each pixel point of the HSV image, if the saturation value of the pixel point is less than the sixth threshold, it means that the saturation value of the pixel point is low, and the red component value and the blue component value of the corresponding pixel point in the RGB image can be reduced, so as to increase the color range.
[0103] A seventh threshold is set for the saturation value. For each pixel point of the HSV image, if the saturation value of the pixel point is not less than the seventh threshold, it means that the saturation value of the pixel point is high, and the red component value of the corresponding pixel point in the RGB image can be reduced, and the green component value can be increased, so that the entire endoscopic image is not limited to the red area. The sixth threshold and the seventh threshold can be the same or different. If they are different, the sixth threshold is less than the seventh threshold.
[0104] An eighth threshold is set for the brightness value. For each pixel point of the HSV image, if the brightness value of the pixel point is greater than the eighth threshold, it indicates that the brightness value of the pixel point is high. The blue component value of the corresponding pixel point in the RGB image can be increased, thereby alleviating the overexposure phenomenon when the light source irradiates the muscle tissue.
[0105] In order to further improve the clarity of the image, based on the above embodiments, in the embodiments of the present application, the adjustment of the corresponding RGB components of the corresponding pixel points in the RGB image corresponding to the HSV image when the component value of any component of the pixel point is within the second component adjustment range corresponding to the component includes:
[0106] If the saturation value of the pixel point is less than a preset sixth threshold, the red component value and the blue component value of the corresponding pixel point in the RGB image are reduced; if the saturation value of the pixel point is not less than the seventh threshold, the red component value of the corresponding pixel point in the RGB image is reduced and the green component value is increased; if the brightness value of the pixel point is greater than the eighth threshold, the blue component value of the corresponding pixel point in the RGB image is increased.
[0107] In the embodiments of the present application, a second component adjustment range corresponding to each component is set in advance for the HSV image. When the component value of any component of a certain pixel point in the HSV image is within the second component adjustment range corresponding to the component, the component value of the corresponding RGB component of the corresponding pixel point in the RGB image corresponding to the HSV image is adjusted.
[0108] In the embodiments of the present application, after converting the HSV image into an RGB image, each single-channel image of the RGB image can be obtained, that is, the single-channel image corresponding to the R component, the single-channel image corresponding to the G component, and the single-channel image corresponding to the B component in the RGB image are obtained. Each single-channel image of the optimized HSV image is obtained. In the embodiments of the present application, a second component adjustment range corresponding to each component can be set in advance for the HSV image. When the component value of the corresponding component of a certain pixel point in the HSV image is within the second component adjustment range corresponding to the component, the corresponding RGB component of the corresponding pixel point in the RGB image is adjusted. When adjusting the component value of the corresponding RGB component of the corresponding pixel point in the RGB image, the component value of the corresponding RGB component of the corresponding pixel point in the RGB image can be increased or decreased by a set percentage, or the difference between the component value and the threshold can be determined according to the component value corresponding to the component in the HSV image and the threshold of the second component adjustment range. The greater the difference, the more the component value of the corresponding RGB component of the corresponding pixel point in the RGB image is adjusted.
[0109] For example, if the saturation value of a certain pixel point in the HSV image is greater than a certain set threshold, then according to the difference between the saturation value and the threshold, the greater the difference, the greater the reduction multiples of the red component value and the blue component value of the corresponding pixel point in the RGB image, and the greater the increase multiple of the green component value; if the brightness value of the pixel point is greater than another set threshold, then according to the difference between the brightness value and the threshold, the greater the difference, the greater the increase multiple of the blue component value of the corresponding pixel point in the RGB image.
[0110] In order to further improve the clarity of the image, based on the above embodiments, in the embodiments of the present application, if the saturation value of the pixel point is less than a preset sixth threshold, then reducing the red component value and the blue component value of the corresponding pixel point in the RGB image includes:
[0111] If the saturation value of the pixel point is less than the preset sixth threshold, then reduce the red component value of the corresponding pixel point in the RGB image by 0.7 times and reduce the blue component value by 0.8 times.
[0112] If the saturation value of the pixel point is not less than the seventh threshold, then reducing the red component value of the corresponding pixel point in the RGB image and increasing the green component value includes:
[0113] If the saturation value of the pixel point is not less than the seventh threshold, then reduce the red component value of the corresponding pixel point in the RGB image by 0.8 times and increase the green component value by 1.2 times.
[0114] If the brightness value of the pixel point is greater than the eighth threshold, then increasing the blue component value of the corresponding pixel point in the RGB image includes:
[0115] If the brightness value of the pixel point is greater than the eighth threshold, then increase the blue component value of the corresponding pixel point in the RGB image by 1.2 times.
[0116] In the embodiments of the present application, a corresponding second component adjustment range for each component is preset in advance. If the component value of any component of the pixel point is within the corresponding second component adjustment range of the component, then adjust the component value of the corresponding RGB component of the corresponding pixel point in the RGB image corresponding to the HSV image.
[0117] Specifically, a sixth threshold is set for saturation. For each pixel point of the HSV image, if the saturation value of the pixel point is less than the sixth threshold, it means that the saturation value of the pixel point is low. The red component value of the corresponding pixel point in the RGB image can be reduced by 0.7 times and the blue component value can be reduced by 0.8 times, thereby increasing the color range.
[0118] A seventh threshold is set for the saturation value. For each pixel point in the HSV image, if the saturation value of the pixel point is not less than the seventh threshold, it indicates that the saturation value of the pixel point is high. The red component value of the corresponding pixel point in the RGB image can be reduced by 0.8 times, and the green component value can be increased by 1.2 times, so that the entire endoscopic image is not limited to the red area. The sixth threshold and the seventh threshold can be the same or different. If they are different, the sixth threshold is less than the seventh threshold.
[0119] An eighth threshold is set for the brightness value. For each pixel point in the HSV image, if the brightness value of the pixel point is greater than the eighth threshold, it indicates that the brightness value of the pixel point is high. The blue component value of the corresponding pixel point in the RGB image can be increased by 1.2 times, so as to alleviate the phenomenon of overexposure when the light source irradiates the muscle tissue.
[0120] Therefore, in the embodiments of the present application, according to the above analysis results, the sixth threshold can be set to 0.8, the seventh threshold to 0.8, and the eighth threshold to 0.8. Based on the above thresholds, the process of adjusting the component values of each pixel point in the RGB image, that is, the process of optimizing the RGB image, can be implemented based on the following algorithm:
[0121]
[0122] Based on the above algorithm, it can be determined whether the S component value of any pixel point in the HSV image is less than 0.8. If so, the red component of the corresponding pixel point in the RGB image is reduced by 0.7 times, and the blue component is reduced by 0.8 times; if not, the red component of the corresponding pixel point in the RGB image is reduced by 0.8 times, and the green component is increased by 1.2 times; it is determined whether the V component value of any pixel point in the HSV image is greater than 0.8. If so, the blue component of the corresponding pixel point in the RGB image is increased by 1.2 times, so as to realize the optimization of the RGB image.
[0123] Through the distribution analysis of color, saturation, and brightness, the RGB channel components are optimized, and the color is adjusted, increasing the color range, so that the entire endoscopic image is not limited to the red area, and effectively alleviating the phenomenon of overexposure when the light source irradiates the muscle tissue.
[0124] Figure 10a Schematic diagram of the original image of the endoscopic image provided by some embodiments of the present application Figure 10b Schematic diagram of the RGB image after optimizing the corresponding components in the RGB image provided by some embodiments of the present application, as Figure 10a 、 Figure 10b shown. By comparing the RGB image obtained after optimizing the endoscopic image with the original image, the RGB image obtained after optimization is clearer.
[0125] After the optimization for HSV is completed, the HSV image is converted to an RGB image for display. At the same time, the distributions of hue, saturation, and brightness are analyzed, and each component in the RGB image is further optimized. In this way, the color can be subjectively adjusted in combination with the suggestions of clinicians. For the above algorithm, for pixels with low saturation, the red component of the corresponding pixel in the RGB image is reduced to 70% of the original, and the blue component is reduced to 80% of the original. While for pixels with high saturation, the red component of the corresponding pixel in the RGB image is reduced to 80% of the original, and the green component is increased to 120% of the original, increasing the color range so that the entire endoscopic image is not limited to the red area. At the same time, for pixels with high brightness, the blue component of the corresponding pixel in the RGB image is increased to 120% of the original, because subjectively, blue can effectively alleviate the overexposure phenomenon when the light source irradiates muscle tissue.
[0126] Of course, in the actual use process, based on the differences in the departments and sections applicable to the endoscopic image, the corresponding thresholds and increase amplitudes can be set to facilitate obtaining an image with color enhancement that meets the requirements of different departments, the usage effect, and is used for surgery. Figure 11a Schematic diagram of the original image of the endoscopic image provided by some embodiments of the present application, Figure 11b Schematic diagram of the first RGB effect image obtained according to the preset first optimization parameter provided by some embodiments of the present application, Figure 11c Schematic diagram of the second RGB effect image obtained according to the preset second optimization parameter provided by some embodiments of the present application, as Figure 11a 、 Figure 11b and Figure 11c shown. By comparing the RGB effect image obtained according to the preset optimization parameter with the original image of the endoscopic image, the obtained RGB image after optimization is clearer.
[0127] In the actual application process, during the endoscopic detection process, a video is collected. The key frame images collected during surgeries in different departments can be analyzed, and the thresholds and increase amplitudes can be set for different departments or even different diseases in the same department to meet the requirements of all types of surgical operations in the endoscopic image imaging of the hospital. The thresholds and increase amplitudes provided by the embodiments of the present application have a good effect on the processing of endoscopic images of the nasal cavity.
[0128] Based on the signals transmitted by the endoscope in this application, the generated RGB image is converted into an HSV image, the chrominance and luminance image signals are separated, and the chrominance component is optimized and enhanced. On the basis of ensuring that the brightness of the original image is not lost, the color performance is differentiated, the color contrast of the endoscopic image is improved, the distortion of the enhanced color image is reduced, and at the same time, the noise introduced by image color enhancement is greatly reduced. In addition, a comparison display before and after enhancement is provided, and a comparison mode display is established to help doctors improve the actual surgical diagnosis efficiency.
[0129] Figure 12 The following is a schematic structural diagram of a processing device for endoscopic images provided by some embodiments of this application. The device includes:
[0130] A conversion module 1201, configured to convert an endoscopic image into an HSV image;
[0131] An optimization module 1202, configured to, for each pixel point in the HSV image, if the component value of any component of the pixel point is within the first component adjustment range corresponding to the component, increase the component value;
[0132] The conversion module 1201 is further configured to convert the HSV image with the adjusted component values of the pixel points into an RGB image.
[0133] Further, the optimization module 1202 is specifically configured to, if the saturation value of the pixel point is greater than a preset first threshold, increase the saturation value by 1.1 times; if the brightness value of the pixel point is greater than a preset second threshold and less than a preset third threshold, increase the brightness value by 1.5 times; if the hue value of the pixel point is greater than a preset fourth threshold and less than a preset fifth threshold, increase the hue value by 1.1 times.
[0134] Further, the optimization module 1202 is further configured to, for each pixel point in the HSV image with the adjusted component values of the pixel points, if the component value of any component of the pixel point is within the second component adjustment range corresponding to the component, adjust the corresponding RGB components of the corresponding pixel points in the RGB image corresponding to the HSV image.
[0135] Further, the optimization module 1202 is specifically configured to, if the saturation value of the pixel point is less than a preset sixth threshold, reduce the red component value and the blue component value of the corresponding pixel point in the RGB image; if the saturation value of the pixel point is not less than a seventh threshold, reduce the red component value of the corresponding pixel point in the RGB image and increase the green component value; if the brightness value of the pixel point is greater than an eighth threshold, increase the blue component value of the corresponding pixel point in the RGB image.
[0136] Further, the optimization module 1202 is specifically configured to reduce the red component value of the corresponding pixel in the RGB image by 0.7 times and reduce the blue component value by 0.8 times if the saturation value of the pixel is less than a preset sixth threshold.
[0137] Further, the optimization module 1202 is specifically configured to reduce the red component value of the corresponding pixel in the RGB image by 0.8 times and increase the green component value by 1.2 times if the saturation value of the pixel is not less than a seventh threshold.
[0138] Further, the optimization module 1202 is specifically configured to increase the blue component value of the corresponding pixel in the RGB image by 1.2 times if the brightness value of the pixel is greater than an eighth threshold.
[0139] Since the RGB image is converted into an HSV image in this application, the component values of each single-channel image in the HSV image are processed separately, and the process will not neglect one thing while attending to another, thereby improving the contrast of the image. In addition, processing the component values of each single-channel image in the HSV image separately can also prevent color distortion of the image, thereby accurately restoring the image and improving the clarity of the image.
[0140] Figure 13 The first schematic diagram of a display device provided by some embodiments of this application is as Figure 13 shown, and the device includes:
[0141] A display 1301 for displaying an RGB image;
[0142] A controller 1302 for executing;
[0143] Converting the endoscopic image into a hue saturation value brightness HSV image;
[0144] For each pixel in the HSV image, if the component value of any component of the pixel is within the first component adjustment range corresponding to the component, increase the component value;
[0145] Converting the HSV image with the adjusted component values of the pixels into an RGB image.
[0146] In a possible implementation manner, the controller 1302 is used to execute:
[0147] If the saturation value of the pixel is greater than a preset first threshold, increase the saturation value by 1.1 times; if the brightness value of the pixel is greater than a preset second threshold and less than a preset third threshold, increase the brightness value by 1.5 times; if the hue value of the pixel is greater than a preset fourth threshold and less than a preset fifth threshold, increase the hue value by 1.1 times.
[0148] Further, in a possible implementation, the controller 1302 is further configured to execute:
[0149] For each pixel in the HSV image after the component values of the pixel are adjusted, if the component value of any component of the pixel is within the corresponding second component adjustment range of the component, adjust the corresponding RGB component of the corresponding pixel in the RGB image corresponding to the HSV image.
[0150] Further, in a possible implementation, the controller 1302 is configured to execute:
[0151] If the saturation value of the pixel is less than a preset sixth threshold, reduce the red component value and the blue component value of the corresponding pixel in the RGB image; if the saturation value of the pixel is not less than a seventh threshold, reduce the red component value of the corresponding pixel in the RGB image and increase the green component value; if the brightness value of the pixel is greater than an eighth threshold, increase the blue component value of the corresponding pixel in the RGB image.
[0152] Further, in a possible implementation, the controller 1302 is configured to execute:
[0153] If the saturation value of the pixel is less than a preset sixth threshold, reduce the red component value of the corresponding pixel in the RGB image by 0.7 times and reduce the blue component value by 0.8 times.
[0154] Further, in a possible implementation, the controller 1302 is configured to execute:
[0155] If the saturation value of the pixel is not less than a seventh threshold, reduce the red component value of the corresponding pixel in the RGB image by 0.8 times and increase the green component value by 1.2 times.
[0156] Further, in a possible implementation, the controller 1302 is configured to execute:
[0157] If the brightness value of the pixel is greater than an eighth threshold, increase the blue component value of the corresponding pixel in the RGB image by 1.2 times.
[0158] Based on the above embodiments, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program executable by an electronic device is stored. When the program runs on the electronic device, the electronic device is caused to perform the following steps when executing:
[0159] Convert the endoscopic image into an HSV image;
[0160] For each pixel point in the HSV image, if the component value of any component of the pixel point is within the corresponding first component adjustment range of the component, increase the component value;
[0161] Convert the HSV image with the adjusted component values of the pixel points into an RGB image.
[0162] Further, the step of increasing the adjustment of the component if the component value of any component of the pixel point is within the corresponding first component adjustment range of the component includes:
[0163] If the saturation value of the pixel point is greater than a preset first threshold, increase the saturation value by 1.1 times; if the brightness value of the pixel point is greater than a preset second threshold and less than a preset third threshold, increase the brightness value by 1.5 times; if the hue value of the pixel point is greater than a preset fourth threshold and less than a preset fifth threshold, increase the hue value by 1.1 times.
[0164] Further, the method further includes:
[0165] For each pixel point in the HSV image with the adjusted component values of the pixel points, if the component value of any component of the pixel point is within the corresponding second component adjustment range of the component, adjust the corresponding RGB components of the corresponding pixel point in the RGB image corresponding to the HSV image.
[0166] Further, the step of adjusting the corresponding RGB components of the corresponding pixel point in the RGB image corresponding to the HSV image if the component value of any component of the pixel point is within the corresponding second component adjustment range of the component includes:
[0167] If the saturation value of the pixel point is less than a preset sixth threshold, reduce the red component value and the blue component value of the corresponding pixel point in the RGB image; if the saturation value of the pixel point is not less than a seventh threshold, reduce the red component value of the corresponding pixel point in the RGB image and increase the green component value; if the brightness value of the pixel point is greater than an eighth threshold, increase the blue component value of the corresponding pixel point in the RGB image.
[0168] Further, the step of reducing the red component value and the blue component value of the corresponding pixel in the RGB image when the saturation value of the pixel is less than a preset sixth threshold includes:
[0169] If the saturation value of the pixel is less than a preset sixth threshold, reduce the red component value of the corresponding pixel in the RGB image by 0.7 times and reduce the blue component value by 0.8 times.
[0170] Further, the step of reducing the red component value and increasing the green component value of the corresponding pixel in the RGB image when the saturation value of the pixel is not less than a seventh threshold includes:
[0171] If the saturation value of the pixel is not less than a seventh threshold, reduce the red component value of the corresponding pixel in the RGB image by 0.8 times and increase the green component value by 1.2 times.
[0172] Further, the step of increasing the blue component value of the corresponding pixel in the RGB image when the brightness value of the pixel is greater than an eighth threshold includes:
[0173] If the brightness value of the pixel is greater than an eighth threshold, increase the blue component value of the corresponding pixel in the RGB image by 1.2 times.
[0174] In the embodiment of the present invention, first, the RGB image is converted into an HSV image. According to the component values of each pixel in the HSV image that are not within the component adjustment range, the component values are increased and adjusted, and the HSV image with the adjusted pixel component values is converted back into an RGB image. Since the RGB image is converted into an HSV image in this application, the component values of each single-channel image in the HSV image are processed separately. During the processing, no aspect is neglected, thereby improving the contrast of the image. Additionally, by processing the component values of each single-channel image in the HSV image separately, color distortion of the image can be prevented, thus accurately restoring the image and improving the clarity of the image.
[0175] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0176] The present invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to the invention. It will be understood that each flow and / or block of the flowchart illustrations and / or block diagrams, and combinations of flows and / or blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing apparatus create means for implementing the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram.
[0177] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means that implement the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram.
[0178] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more flows of the flowchart and / or one or more blocks of the block diagram.
[0179] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A method for processing endoscopic images, characterized in that, the method includes: Converting the endoscopic image into a Hue-Saturation-Value (HSV) image; For each pixel point in the HSV image, if the component value of any component of the pixel point is within the corresponding first component adjustment range of the component, then increase the component value; Converting the HSV image with the adjusted component values of the pixel points into a Red-Green-Blue (RGB) image; The step of increasing the component value if the component value of any component of the pixel point is within the corresponding first component adjustment range of the component includes: If the saturation value of the pixel point is greater than a preset first threshold, then increase the saturation value by 1.1 times to enhance the saturation values of the pixel points located in the blood and blood vessel parts; if the brightness value of the pixel point is greater than a preset second threshold and less than a preset third threshold, then increase the brightness value by 1.5 times to enhance the dark field brightness; if the hue value of the pixel point is greater than a preset fourth threshold and less than a preset fifth threshold, then increase the hue value by 1.1 times to ensure that the displayed color is within the positive red range.
2. The method according to claim 1, characterized in that, the method further includes: For each pixel point in the HSV image with the adjusted component values of the pixel points, if the component value of any component of the pixel point is within the corresponding second component adjustment range of the component, then adjust the corresponding RGB components of the corresponding pixel point in the RGB image corresponding to the HSV image.
3. The method according to claim 2, characterized in that, the step of adjusting the corresponding RGB components of the corresponding pixel point in the RGB image corresponding to the HSV image if the component value of any component of the pixel point is within the corresponding second component adjustment range of the component includes: If the saturation value of the pixel point is less than a preset sixth threshold, then reduce the red component value and the blue component value of the corresponding pixel point in the RGB image; if the saturation value of the pixel point is not less than a seventh threshold, then reduce the red component value of the corresponding pixel point in the RGB image and increase the green component value; if the brightness value of the pixel point is greater than an eighth threshold, then increase the blue component value of the corresponding pixel point in the RGB image.
4. The method according to claim 3, characterized in that, the step of reducing the red component value and the blue component value of the corresponding pixel point in the RGB image if the saturation value of the pixel point is less than a preset sixth threshold includes: If the saturation value of the pixel point is less than a preset sixth threshold, then reduce the red component value of the corresponding pixel point in the RGB image by 0.7 times and reduce the blue component value by 0.8 times.
5. The method according to claim 3, characterized in that, the step of reducing the red component value of the corresponding pixel point in the RGB image and increasing the green component value if the saturation value of the pixel point is not less than a seventh threshold includes: If the saturation value of the pixel point is not less than a seventh threshold, then reduce the red component value of the corresponding pixel point in the RGB image by 0.8 times and increase the green component value by 1.2 times.
6. The method according to claim 3, characterized in that, If the brightness value of the pixel is greater than the eighth threshold, increasing the blue component value of the corresponding pixel in the RGB image includes: If the brightness value of the pixel is greater than the eighth threshold, increasing the blue component value of the corresponding pixel in the RGB image by 1.2 times.
7. An endoscope image processing device, characterized in that the device includes: a conversion module for converting an endoscope image into an HSV image; an optimization module for, for each pixel in the HSV image, if the component value of any component of the pixel is within the first component adjustment range corresponding to the component, increasing the component value; the conversion module is further configured to convert the HSV image with adjusted component values of pixels into a red, green, and blue RGB image; specifically, the optimization module is configured to, if the saturation value of the pixel is greater than a preset first threshold, increase the saturation value by 1.1 times to enhance the saturation values of the pixels located in the blood and blood vessel parts; if the brightness value of the pixel is greater than a preset second threshold and less than a preset third threshold, increase the brightness value by 1.5 times to enhance the dark field brightness; if the hue value of the pixel is greater than a preset fourth threshold and less than a preset fifth threshold, increase the hue value by 1.1 times to ensure that the displayed color is within the range of positive red.
8. A display device, characterized in that the display device includes: a display for displaying an RGB image; a controller for executing; converting an endoscope image into a hue, saturation, value HSV image; for each pixel in the HSV image, if the component value of any component of the pixel is within the first component adjustment range corresponding to the component, increasing the component value; converting the HSV image with adjusted component values of pixels into a red, green, and blue RGB image; wherein, if the component value of any component of the pixel is within the first component adjustment range corresponding to the component, increasing the component includes: if the saturation value of the pixel is greater than a preset first threshold, increasing the saturation value by 1.1 times to enhance the saturation values of the pixels located in the blood and blood vessel parts; if the brightness value of the pixel is greater than a preset second threshold and less than a preset third threshold, increasing the brightness value by 1.5 times to enhance the dark field brightness; if the hue value of the pixel is greater than a preset fourth threshold and less than a preset fifth threshold, increasing the hue value by 1.1 times to ensure that the displayed color is within the range of positive red.
9. A computer-readable storage medium, characterized in that it stores a computer program executable by an electronic device, and when the program runs on the electronic device, the electronic device is caused to execute the steps of the method for processing an endoscope image according to any one of claims 1-6.
Citation Information
Patent Citations
Method and system for improving display color gamut
CN107742507A
Endoscope image enhancement algorithm
CN113298737A