Medical endoscope equipment and image processing method

By converting the image of the medical endoscope device from the RGB color space to the HSI or HSV color space and performing saturation and brightness correction, the color change problem caused by light changes is solved, real color feature display of the image is realized, helping doctors to Accurate diagnosis in minimally invasive surgery.

CN119014791AActive Publication Date: 2024-11-26QINGDAO HISENSE INTELLIGENT MEDICAL TECHNOLOGY CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202310614839.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-26
Publication Date
2024-11-26
Estimated Expiration
2043-05-26

AI Technical Summary

Technical Problem

Under different lighting conditions, the image color obtained by medical endoscopic devices will change, resulting in the loss of true color characteristics and it is difficult to help doctors accurately diagnose.

Method used

By converting the original image of the RGB color space to the HSI or HSV color space, the image is corrected according to the histogram distribution mean value and brightness adjustment parameters of pixel saturation, eliminating the influence of light changes, and obtaining real color characteristics.

Benefits of technology

Effectively eliminate the impact of light changes on image color, so that the image presents real color characteristics, and helps doctors accurately identify organ lesions during minimally invasive surgery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119014791A_ABST
    Figure CN119014791A_ABST
Patent Text Reader

Abstract

The invention provides medical endoscope equipment and an image processing method, and belongs to the technical field of computers. After the original image of the RGB color space is converted into the HSI color space or the HSV color space to obtain the converted image, the saturation value of each pixel point of the converted image is corrected according to the histogram distribution mean value of the pixel saturation of the converted image, so that the influence of illumination variation on the image color can be eliminated, and the image quality is improved. Therefore, the image shows real color features; then, the brightness value of each pixel point of the conversion image can be corrected according to the set brightness adjustment parameter, the corrected conversion image is converted to an RGB color space, and a target image presenting real color features can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a medical endoscope device and an image processing method. Background Art

[0002] When using medical endoscope equipment for minimally invasive surgery, doctors need to use medical endoscope equipment to obtain images of human organs for diagnosis. The correct organ color in the image helps doctors identify lesions.

[0003] However, under different lighting conditions, the images of human organs are constantly changing and may even lose their original colors.

[0004] Therefore, how to process the images acquired by medical endoscope equipment to obtain the true color characteristics of human organs in the images is an urgent problem to be solved. Summary of the invention

[0005] In order to solve the above-mentioned problems in the prior art, the embodiments of the present application provide a medical endoscope device and an image processing method, which can eliminate the influence of light changes on image color, so that the image presents real color characteristics.

[0006] In a first aspect, an embodiment of the present application provides a medical endoscope device, including: a display, a camera, and a camera host;

[0007] The camera is configured to: collect original images;

[0008] The camera host is configured to: convert an original image in an RGB color space into an HSI color space or an HSV color space to obtain a converted image; determine a histogram distribution mean of pixel saturation of the converted image, and correct the saturation value of each pixel point of the converted image according to the histogram distribution mean of the pixel saturation of the converted image; correct the brightness value of each pixel point of the converted image according to a set brightness adjustment parameter; convert the corrected converted image into an RGB color space to obtain a target image;

[0009] The display is configured to display the target image.

[0010] In a possible implementation manner, the camera host is specifically configured as follows:

[0011] Determine a difference between an average value of pixel saturation of the conversion image and a target saturation value, and use the difference as a histogram distribution mean of pixel saturation of the conversion image, wherein the target saturation value is a user-defined value;

[0012] For each pixel in the converted image, perform the following operations respectively:

[0013] Determining a square root value according to the saturation value of the pixel before correction;

[0014] Determining a corrected saturation value according to the square of the sum of the difference value and the square root value;

[0015] The saturation value of the pixel point is corrected to the corrected saturation value.

[0016] In a possible implementation manner, the camera host is specifically configured as follows:

[0017] Determine a first product of a first saturation adjustment parameter and a logarithmic value of the saturation value of the pixel before correction;

[0018] The square root of the first product is used as the square root value; the first saturation adjustment parameter is determined according to the skewness trend of the histogram of the pixel saturation of the converted image.

[0019] In a possible implementation manner, the camera host is specifically configured as follows:

[0020] The corrected saturation value is determined based on a second product of the square of the sum of the difference value and the square root value and a second saturation adjustment parameter; the second saturation adjustment parameter is determined based on the sharpness of a histogram of pixel saturation of the converted image.

[0021] In a possible implementation manner, the camera host is specifically configured as follows:

[0022] For each pixel in the converted image, perform the following operations respectively:

[0023] Determining a third product of the brightness adjustment parameter and the brightness value of the pixel before correction; the brightness adjustment parameter is set according to the brightness of the converted image;

[0024] Taking the sum of the third product and the set constant as the corrected brightness value;

[0025] Correct the brightness value of the pixel to the corrected brightness value.

[0026] In a possible implementation manner, the camera host is specifically configured as follows:

[0027] Determine the H, S, I color components of the pixel points of the converted image according to the R, G, B color components of the pixel points of the original image;

[0028] A conversion image is determined according to the H, S, and I color components of the pixel points of the conversion image.

[0029] In a possible implementation manner, the camera host is specifically configured as follows:

[0030] according to Determine the I color component of the pixel point of the converted image;

[0031] according to Determine the S color component of the pixel point of the converted image;

[0032] according to The H color component of the pixel point of the converted image is determined.

[0033] In a possible implementation manner, the camera host is specifically configured as follows:

[0034] Determine the H, S, V color components of the pixel points of the converted image according to the R, G, B color components of the pixel points of the original image;

[0035] A conversion image is determined according to H, S, and V color components of the pixel points of the conversion image.

[0036] In a possible implementation manner, the camera host is specifically configured as follows:

[0037] According to V=max(R,G,B) / 255, determine the V color component of the pixel point of the converted image;

[0038] according to Determine the S color component of the pixel point of the converted image;

[0039] according to The H color component of the pixel point of the converted image is determined.

[0040] In a second aspect, an embodiment of the present application provides an image processing method, which is applied to a medical endoscope device, and the method includes:

[0041] Convert the original image in RGB color space to HSI color space or HSV color space to obtain a converted image;

[0042] Determining a histogram distribution mean of pixel saturation of the conversion image, and correcting the saturation value of each pixel point of the conversion image according to the histogram distribution mean of the pixel saturation of the conversion image;

[0043] Correcting the brightness value of each pixel of the converted image according to the set brightness adjustment parameter;

[0044] The corrected converted image is converted to RGB color space to obtain the target image.

[0045] In a third aspect, an embodiment of the present application provides an image processing device, including:

[0046] A conversion unit, used for converting the original image in the RGB color space into the HSI color space or the HSV color space to obtain a converted image;

[0047] a correction unit, used to determine a histogram distribution mean of the pixel saturation of the conversion image, and correct the saturation value of each pixel point of the conversion image according to the histogram distribution mean of the pixel saturation of the conversion image;

[0048] Correcting the brightness value of each pixel of the converted image according to the set brightness adjustment parameter;

[0049] The corrected converted image is converted to RGB color space to obtain the target image.

[0050] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a camera host, the method described in the second aspect is implemented.

[0051] A medical endoscope device and an image processing method provided in an embodiment of the present application convert an original image in an RGB color space into an HSI color space or an HSV color space to obtain a converted image. Then, the saturation value of each pixel point of the converted image is corrected according to the histogram distribution mean of the pixel saturation of the converted image, thereby eliminating the influence of illumination changes on the image color, so that the image presents true color characteristics. Then, the brightness value of each pixel point of the converted image can be corrected according to the set brightness adjustment parameters, and the corrected converted image is converted to the RGB color space to obtain a target image presenting true color characteristics. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0053] Figure 1 A schematic diagram of the structure of a medical endoscope device provided in an embodiment of the present application;

[0054] Figure 2 A schematic diagram of a medical endoscope device diagnosis provided in an embodiment of the present application;

[0055] Figure 3A flowchart of an image processing method provided in an embodiment of the present application;

[0056] Figure 4 A flowchart of an image processing method provided in an embodiment of the present application;

[0057] Figure 5 A flowchart of an image processing method provided in an embodiment of the present application;

[0058] Figure 6 A flowchart of an image processing method provided in an embodiment of the present application;

[0059] Figure 7 A flowchart of an image processing method provided in an embodiment of the present application;

[0060] Figure 8 A flowchart of an image processing method provided in an embodiment of the present application;

[0061] Fig. 9 A schematic diagram of a display provided in an embodiment of the present application;

[0062] Fig.10 A schematic diagram of a display provided in an embodiment of the present application;

[0063] Fig.11 A schematic diagram of a display provided in an embodiment of the present application;

[0064] Fig.12 A schematic diagram of a display provided in an embodiment of the present application;

[0065] Fig.13 A schematic diagram of a display provided in an embodiment of the present application;

[0066] Fig.14 A schematic diagram of a display provided in an embodiment of the present application;

[0067] Fig.15 A flowchart of an image processing method provided in an embodiment of the present application;

[0068] Fig.16 A flowchart of an image processing method provided in an embodiment of the present application;

[0069] Fig.17 A schematic diagram of an image processing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0070] In order to make the purpose, technical solutions and advantages of this application clearer, this application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0071] It should be noted that the application scenarios described in the following embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. A person of ordinary skill in the art can know that with the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.

[0072] Color refers to the perception of light by the human visual system. A large number of experiments have shown that the human visual system can eliminate or reduce the impact of changes in light sources on the true color of the surface of an object. Unfortunately, existing image acquisition devices, such as medical endoscopes, digital cameras, smart phones, tablets, etc., do not have this intelligent automatic adjustment capability. Since the image color obtained by the photosensitive element is determined by the light source, the reflectivity of the imaging object and the spectral response function of the imaging system, the image of the object obtained by the photosensitive element is constantly changing under different lighting conditions, and sometimes even loses its original color. At the same time, when designing and processing product function algorithms, it will more or less affect the color of the object and produce color cast. In minimally invasive surgery, doctors need to make diagnoses based on the images collected by medical endoscopes. The correct color of the organ helps doctors identify lesions and distinguish organs with similar structures and similar colors in the human body, so as to make decisions quickly and accurately. Therefore, in order to restore the true color of the organ and display the true state of the organ, it is necessary to use digital image processing technologies such as color cast correction to eliminate the impact of light changes, so as to obtain the true color characteristics of the object surface that are independent of light.

[0073] At present, most color cast correction methods are aimed at fixed fields and fixed scenes. The effect of transferring the ideas of attenuation compensation, dynamic stretching, color enhancement, etc. to the abdominal environment with a relatively single color and a large red-yellow ratio is not ideal. The learning-based color cast correction method also has great limitations, such as high time complexity, correction delay, and high resource occupancy rate. In addition, the ISP (Image Signal Processing) color cast correction algorithm embedded in medical endoscope equipment is mostly based on the three color channels of red (Red, R), green (Green, G), and blue (Blue, B) in RGB. The principle is to adjust the gain of the three color channels of RGB respectively to achieve an effect closer to the color perception of the human eye. Since the response curves of the human eye to light of different wavelengths have overlapping parts, the colors of the three color channels of R, G, and B affect each other. This method of directly adjusting the balance of the three colors is easy to ignore the correlation between the three color channels of RGB, and it is difficult to find the balance point of the image color. If the adjustment is improper, the color cast phenomenon will still exist.

[0074] HSI / HSV is a color space created based on the intuitive characteristics of color. The HSI color space includes three color channels: hue H (Hue), saturation S (Saturation) and brightness I (Intensity), and the HSV color space includes three color channels: hue H (Hue), saturation S (Saturation) and brightness V (Value). Since the colors in the abdominal cavity are relatively single and the saturation S in the HSI / HSV color space is closely related to the R, G, and B components of the pixel, that is, the greater the difference between R, G, and B, the smaller the color saturation will be, and the smaller the difference, the greater the color saturation will be. Therefore, controlling the histogram distribution of the size of each pixel in the saturation S channel can more directly control the proportional relationship and difference size of the three channels of R, G, and B, and the adjustment of the brightness space helps to control the brightness and darkness of the image.

[0075] Based on this, an embodiment of the present application provides a medical endoscope device and an image processing method. A converted image can be obtained by converting an original image in an RGB color space into an HSI color space or an HSV color space. According to the mean value of the histogram distribution of the pixel saturation of the converted image, the saturation value of each pixel point of the converted image can be corrected, and according to the set brightness adjustment parameter, the brightness value of each pixel point of the converted image can be corrected, and the corrected converted image is converted to an RGB color space, so that a target image showing real color characteristics can be obtained. According to the mean value of the histogram distribution of the pixel saturation of the converted image, the saturation value of each pixel point of the converted image is corrected respectively, so as to eliminate the influence of illumination changes on the image color, so that the image presents real color characteristics.

[0076] Figure 1 The schematic diagram of the structure of a medical endoscope device in an embodiment of the present application is exemplarily shown, wherein the camera host is a device for photographing endoscopic examinations and surgeries to display the images of the examinations and surgeries, and its key components include a camera, a button, a camera host, a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor, a video cable, an optical adapter, a mirror rod, a communication port, and a video output interface. The camera host can be connected to the display through the video output interface, and connected to the cold light source host through the communication port. The cold light source is a device that provides illumination light to the endoscope during endoscopic examinations and surgeries, and its key components generally include: a cold light source host, a light guide, and a cold light source light output interface.

[0077] Combination Figure 2 As shown, in the actual operation stage, medical endoscope equipment inspection or surgery basically uses dynamic video to assist the doctor's operation. After the doctor operates the medical endoscope equipment to enter the human body, the image of the human body is collected and displayed through the camera on the medical endoscope equipment, and as the camera of the medical endoscope equipment moves, the range illuminated by the camera will be presented on the display connected to the medical endoscope equipment. The environment around the lesion can be clearly seen, and with the help of surgical instruments, movement and surgical operations can be performed in three dimensions and intuitively.

[0078] Figure 3 A flowchart of an image processing method provided by an embodiment of the present application is shown. The method can be applied to Figure 1 The method can be used to eliminate the color cast caused by changes in illumination on the image color. The following is an example of a doctor performing a medical endoscope examination on a patient during minimally invasive surgery. Figure 3 As shown, the method may include the following steps:

[0079] Step S301, converting the original image in the RGB color space into the HSI color space to obtain a converted image.

[0080] In the RGB color space, there are three color channels, namely the R channel (red channel), the G channel (green channel) and the B channel (blue channel). In the HSI color space, there are also three color channels, namely the H channel (hue channel), the S channel (saturation channel) and the I channel (brightness channel), among which the saturation channel S is closely related to the components of the R channel, the G channel and the B channel. Since there are overlapping parts in the response curves of the human eye to light of different bands, the colors of the R, G and B channels affect each other. It is difficult to find the balance point of the image color by directly adjusting the color values ​​of the R, G and B channels. Therefore, in order to adjust the proportional relationship and the difference between the R channel, the G channel and the B channel, the original image can be first converted from the RGB color space to the HSI color space to obtain a converted image, and then the converted image of the HSI color space can be corrected.

[0081] In an optional implementation, the original image in the RGB color space is converted to the HSI color space to obtain a converted image, such as Figure 4 As shown, the following steps may be included:

[0082] Step S3011, determining the H, S, I color components of the pixel points of the converted image according to the R, G, B color components of the pixel points of the original image.

[0083] Specifically, the R, G, and B color components of each pixel in the original image can be determined first. After the R, G, and B color components of each pixel in the original image are determined, the I (brightness) color component of the pixel in the converted image can be determined according to formula (1). Formula (1) can be expressed as:

[0084]

[0085] Among them, R, G, B represent the red, green, and blue color components of the pixel respectively, and I represents the brightness color component of the pixel.

[0086] Furthermore, the S (saturation) color component of the pixel of the converted image can be determined according to formula (2), which can be expressed as:

[0087]

[0088] Among them, R, G, B represent the red, green, and blue color components of the pixel respectively, and S represents the saturation color component of the pixel.

[0089] Furthermore, the H (hue) color component of the pixel point of the converted image can be determined according to formula (3), which can be expressed as:

[0090]

[0091] Step S3012, determining a conversion image according to the H, S, and I color components of the pixel points of the conversion image.

[0092] After determining the H, S, I color components of the pixels of the converted image according to the R, G, B color components of the pixels of the original image, the converted image can be determined according to the H, S, I color components of the pixels of the converted image.

[0093] Step S302, determining the mean value of the histogram distribution of the pixel saturation of the converted image.

[0094] In an optional implementation, the mean of the histogram distribution of pixel saturation of the converted image is determined, such as Figure 5 As shown, the following steps may be included:

[0095] Step S3021, performing histogram statistics on the S (saturation) channel of each pixel point of the converted image to obtain the pixel saturation of the converted image.

[0096] Specifically, the histogram statistics array pHsitS of the S channel and the pixel saturation of the S channel can be created first, and the values ​​in the array pHsitS and the pixel saturation of the S channel are initialized to 0. Then, statistics are performed on each pixel point in the converted image, that is, pHsitS[S*256]=pHsit[S*256]+1, SumS=SumS+S.

[0097] Among them, S is the saturation value of the S channel of each pixel in the converted image, and SumS is the pixel saturation of the converted image.

[0098] Step S3022: Determine the histogram distribution mean of the pixel saturation of the converted image according to the pixel saturation of the converted image.

[0099] After obtaining the pixel saturation of the converted image, the ratio of the pixel saturation of the converted image to the number of pixels in the converted image can be determined, and the ratio is used as the average pixel saturation of the converted image, that is:

[0100]

[0101] Among them, SumS represents the pixel saturation of the converted image, and W*H represents the number of pixels in the converted image.

[0102] After determining the average pixel saturation value of the converted image, a difference μ between the average pixel saturation value of the converted image and the target saturation value may be determined, and the difference μ is used as the histogram distribution mean of the pixel saturation of the converted image.

[0103] The target saturation value is the average value of the ideal pixel saturation of the target image, which can be customized by the user. By adjusting the histogram distribution mean μ of the pixel saturation of the converted image, the distribution mean trend of the histogram of the pixel saturation can be adjusted.

[0104] Step S303, correcting the saturation value of each pixel point of the converted image according to the histogram distribution mean of the pixel saturation of the converted image.

[0105] According to the mean value of the histogram distribution of the pixel saturation of the converted image, the saturation value of each pixel point of the converted image is corrected respectively. Figure 6 As shown, the following steps may be included:

[0106] Step S601, determining the difference between the average pixel saturation value of the converted image and the target saturation value.

[0107] The target saturation value may be expressed as Avgs, that is, the difference between the average pixel saturation value of the converted image and the target saturation value is μ=AvgS-Avgs.

[0108] Step S602, determining a square root value according to the saturation value of the pixel before correction.

[0109] In some embodiments, determining the square root value based on the saturation value of the pixel before correction may include: Figure 7 The following steps are shown:

[0110] Step S6021, determining a first product of a first saturation adjustment parameter and a logarithmic value of the saturation value of the pixel before correction.

[0111] Specifically, the logarithm of the saturation value before pixel correction, ie, logS, may be determined first, and then the first product of the first saturation parameter a and the logarithm of the saturation value before pixel correction, ie, -a*logS, may be determined.

[0112] The first saturation adjustment parameter a is determined according to the skewness trend of the pixel value histogram of the converted image.

[0113] Step S6022: taking the square root of the first product as the square root value.

[0114] Specifically, the square root of the first product, that is, sqrt(-a*logS), may be determined first, and then sqrt(-a*logS) may be used as the square root value, where sqrt represents square root.

[0115] After the square root value is determined, the corrected saturation value may be determined according to the square of the sum of the difference value and the square root value and the second product of the second saturation adjustment parameter.

[0116] Specifically, we can first determine the square of the sum of the difference and the square root value, that is, (sqrt(-a*logS)+AvgS-Avgs) 2 , and then determine the second saturation adjustment parameter b and (sqrt(-a*logS)+AvgS-Avgs) 2 The second product, that is, -b*(sqrt(-a*logS)+AvgS-Avgs) 2 Finally, find the second product power of the constant e, that is, exp{-b*(sqrt(-a*logS)+AvgS-Avgs) 2}, and exp{-b*(sqrt(-a*logS)+AvgS-Avgs) 2} as the corrected saturation value.

[0117] The second saturation adjustment parameter is determined according to the sharpness of the pixel value histogram of the converted image.

[0118] After the corrected saturation value of each pixel in the converted image is determined, the saturation value of each pixel in the converted image can be corrected respectively according to the corrected saturation value of each pixel in the converted image.

[0119] Step S304: Correct the brightness value of each pixel of the converted image according to the set brightness adjustment parameter.

[0120] After correcting the saturation value of each pixel of the converted image, further, in order to adjust the brightness of the image, the brightness value of each pixel of the converted image can be corrected according to the set brightness adjustment parameters, such as Figure 8 As shown, correcting the brightness value of each pixel of the converted image may include the following steps:

[0121] Step S801, determining a third product of the brightness adjustment parameter and the brightness value of the pixel before correction.

[0122] The third product of the brightness adjustment parameter and the brightness value of the pixel before correction is determined, that is, c*I is determined.

[0123] The brightness adjustment parameter c is set according to the brightness of the converted image.

[0124] Step S802: taking the sum of the third product and the set constant as the corrected brightness value.

[0125] The sum of the third product and the set constant is taken as the corrected brightness value, that is, I′ in I′=c*I+d is taken as the corrected brightness value.

[0126] Wherein, d is a constant, and its value range can be -1 to 1.

[0127] Step S803, correcting the brightness value of the pixel to a corrected brightness value.

[0128] After determining the corrected brightness value of each pixel in the converted image, each pixel in the converted image may be corrected to the corrected brightness value.

[0129] Step S305, converting the corrected converted image into the RGB color space to obtain a target image.

[0130] After correcting the saturation value and brightness value of each pixel in the converted image, the HSI color space of the corrected converted image can be converted back to the RGB color space to obtain the target image.

[0131] In some embodiments, when 0 0 ≤H≤120 0 When the color component B of the blue channel in the RGB color space can be determined ′ =I′*(1-S), the color component of the red channel in the RGB color space The color component of the green channel of the RGB color space is G′=3*I′-(R′+B′).

[0132] Among them, R′, G′, B′ are the color components of the corresponding pixels in the RGB color space of the target image, and S′, I′ are the color components of the corresponding pixels in the HSI color space of the corrected conversion image.

[0133] In other embodiments, when 120 0 ≤H≤240 0 When the hue value is H=H-120, 0 Then, the color component R′=I′*(1-S′) of the red channel in the RGB color space can be determined, and the color component R′=I′*(1-S′) of the green channel in the RGB color space can be determined. Determine the color component B′=3*I′-(R′+G′) of the blue channel of the RGB color space.

[0134] In other embodiments, when 240 0 ≤H≤360 0 When the hue value is H=H-240, 0 Then, the color component of the green channel of the RGB color space can be determined G′=I′*(1-S′), and the color component of the blue channel of the RGB color space can be determined Determine the color component R′=3*I′-(B′+G′) of the red channel of the RGB color space.

[0135] After determining the color components of the pixels corresponding to the RGB color space in the target image, the converted image can be converted back to the RGB color space according to the color components of the pixels corresponding to the RGB color space of each pixel to generate the target image.

[0136] After obtaining the target image, the target image can be rendered to a display connected to the medical endoscope device, and the doctor can diagnose the patient based on the corrected target image.

[0137] When a doctor uses a medical endoscope to diagnose a patient, changes in the external light environment may cause the doctor to have different perceptions of the color of the image captured by the medical endoscope. Therefore, in some embodiments, the doctor may adjust the first saturation adjustment parameter, the second saturation adjustment parameter, the brightness adjustment parameter, and the mean of the histogram distribution of pixel saturation in this document to achieve a better color presentation effect for the light environment of the department currently performing the diagnosis.

[0138] For example, Fig. 9 As shown, the doctor can trigger the skew adjustment button in the display connected to the medical endoscope device. The skew adjustment button is used to adjust the first saturation adjustment parameter a, which is used to adjust the skew direction of the histogram of the pixel saturation of the saturation S channel. That is, the smaller a is, the more obvious the tendency of the histogram of the pixel saturation to the left is, and the larger a is, the more obvious the tendency of the histogram of the pixel saturation to the right is. After the doctor triggers the skew adjustment button, as shown in FIG. Fig.10 As shown, the doctor can adjust the skewness coefficient (ie, the first saturation adjustment parameter a). In some embodiments, to prevent the doctor from over-adjusting the skewness coefficient, a range can be set for the skewness coefficient, for example, it can be 0 to 3.

[0139] In another embodiment, if Fig.11 As shown, the doctor can also trigger the sharpness adjustment button in the display connected to the medical endoscope device. The sharpness adjustment button is used to adjust the second saturation adjustment parameter b, which is used to adjust the sharpness of the distribution of the pixel saturation histogram, that is, the smaller b is, the more dispersed the pixel saturation histogram is, and the larger b is, the more concentrated the pixel saturation histogram is. After the doctor triggers the sharpness adjustment button, as shown in FIG. Fig.12 As shown, the doctor can adjust the sharpness coefficient (ie, the second saturation adjustment parameter b). In some embodiments, to prevent the doctor from over-adjusting the sharpness coefficient, a range can be set for the sharpness coefficient, for example, it can be 0 to 5.

[0140] In another embodiment, if Fig.13As shown, the doctor can also trigger the brightness adjustment button in the display connected to the medical endoscope device. The brightness adjustment button is used to adjust the brightness adjustment parameter c, which is used to adjust the brightness of the image, that is, the smaller c is, the darker the image is, and the larger c is, the brighter the image is. After the doctor triggers the brightness adjustment button, as shown in FIG. Fig.14 As shown, the doctor can make adjustments to the brightness (ie, the brightness adjustment parameter c).

[0141] Based on the same inventive concept, another image processing method is also provided in the embodiment of the present application, such as Fig.15 As shown, the following steps are included:

[0142] Step S1501, converting the original image in the RGB color space into the HSV color space to obtain a converted image.

[0143] In an optional implementation, the original image in the RGB color space is converted to the HSV color space to obtain a converted image, such as Fig.16 As shown, the following steps may be included:

[0144] Step S1601, determining the H, S, V color components of the pixel points of the converted image according to the R, G, B color components of the pixel points of the original image.

[0145] Specifically, the R, G, and B color components of each pixel in the original image can be determined first. After the R, G, and B color components of each pixel in the original image are determined, the V (brightness) color component of the pixel of the converted image can be determined according to formula (1). Formula (1) can be expressed as:

[0146] V=max(R,G,B) / 255 (1)

[0147] Among them, R, G, B represent the red, green, and blue color components of the pixel respectively, and V represents the brightness color component of the pixel.

[0148] Furthermore, the S (saturation) color component of the pixel of the converted image can be determined according to formula (2), which can be expressed as:

[0149]

[0150] Furthermore, the H (hue) color component of the pixel point of the converted image can be determined according to formula (3), which can be expressed as:

[0151]

[0152] Step S1602, determining a conversion image according to the H, S, and V color components of the pixel points of the conversion image.

[0153] After determining the H, S, V color components of the pixels of the converted image according to the R, G, B color components of the pixels of the original image, the converted image can be determined according to the H, S, V color components of the pixels of the converted image.

[0154] Step S1502, determining the mean value of the histogram distribution of the pixel saturation of the converted image.

[0155] The step of determining the mean value of the histogram distribution of the pixel saturation of the converted image is the same as the step of determining the mean value of the histogram distribution of the pixel saturation of the converted image in step S402 above, and will not be repeated here.

[0156] Step S1503, correcting the saturation value of each pixel point of the converted image according to the histogram distribution mean of the pixel saturation of the converted image.

[0157] The steps of respectively correcting the saturation value of each pixel point of the converted image according to the histogram distribution mean of the pixel saturation of the converted image are the same as the above step S403 and will not be repeated here.

[0158] Step S1504: Correct the brightness value of each pixel of the converted image according to the set brightness adjustment parameter.

[0159] Correcting the brightness value of each pixel of the converted image according to the set brightness adjustment parameter is the same as the above step S304, which will not be repeated here.

[0160] Step S1505, converting the corrected converted image into the RGB color space to obtain a target image.

[0161] After correcting the saturation value and brightness value of each pixel in the converted image, the HSV color space of the corrected converted image can be converted back to the RGB color space to obtain the target image.

[0162] In some embodiments, when 0 0 ≤H<60 0 When , we can determine the color components of the three channels of the RGB color space (R″, G″, B″) = (C, X, 0). 0 ≤H<120 0 When , we can determine the color components of the three channels of the RGB color space (R″, G″, B″) = (X, C, 0). When 120 0 ≤H<180 0 When , we can determine the color components of the three channels of the RGB color space (R″, G″, B″) = (0, C, X). 0 ≤H<240 0When , we can determine the color components of the three channels of the RGB color space (R″, G″, B″) = (0, X, C). When 240 0 ≤H<300 0 When , we can determine the color components of the three channels of the RGB color space (R″, G″, B″) = (X, 0, C). When 300 0 ≤H<360 0 When , the color components of the three channels of the RGB color space can be determined as (R″, G″, B″) = (C, 0, X), where C = V′×S′,

[0163] After determining the color components (R″, G″, B″) of the three channels of the RGB color space, the color values ​​of the three channels of the RGB color space can be determined, that is, (R′, G′, B′) = ((R″+m)×255, (G″+m)×255, (B″+m)×255). Wherein, m = V′-C.

[0164] After determining the color value of the pixel corresponding to the RGB color space in the target image, the converted image can be converted to the target image in the RGB color space according to the color value of the pixel corresponding to each pixel in the RGB color space.

[0165] It should be noted that the usage scenarios of the present application include but are not limited to the above-mentioned doctors using medical endoscope equipment to diagnose patients, and can also be applied to various usage scenarios for eliminating the effects of light color cast on images, and can be dynamically adjusted according to user usage needs.

[0166] The present application corrects the saturation value of each pixel of the converted image according to the mean value of the histogram distribution of the pixel saturation of the converted image, which can eliminate the impact of lighting changes on the image color, so that the image presents true color characteristics.

[0167] Based on the same inventive concept, an image processing device is also provided in the embodiment of the present application, such as Fig.17 As shown, the image processing device comprises:

[0168] The conversion unit 1701 is used to convert the original image in the RGB color space into the HSI color space or the HSV color space to obtain a converted image.

[0169] The correction unit 1702 is used to determine the mean value of the pixel saturation histogram distribution of the converted image, and correct the saturation value of each pixel point of the converted image according to the mean value of the histogram distribution of the pixel saturation of the converted image, and correct the brightness value of each pixel point of the converted image according to the set brightness adjustment parameter, and convert the corrected converted image into the RGB color space to obtain the target image.

[0170] In a possible implementation, the correction unit 1702 is specifically configured to:

[0171] Determine the difference between the average pixel saturation value of the converted image and the target saturation value, and use the difference as the histogram distribution mean of the pixel saturation of the converted image. The target saturation value is a user-defined value. For each pixel in the converted image, perform the following operations: determine the square root value according to the saturation value of the pixel before correction, determine the corrected saturation value according to the square of the sum of the difference and the square root value, and correct the saturation value of the pixel to the corrected saturation value.

[0172] In a possible implementation, the correction unit 1702 is specifically configured to:

[0173] Determine a first product of a first saturation adjustment parameter and a logarithmic value of the saturation value of the pixel before correction, and take the square root of the first product as the square root value. The first saturation adjustment parameter is determined based on a skewed trend of a histogram of pixel saturation of the converted image.

[0174] In a possible implementation, the correction unit 1702 is specifically configured to:

[0175] The corrected saturation value is determined based on the square of the sum of the difference value and the square root value and the second product of the second saturation adjustment parameter, where the second saturation adjustment parameter is determined based on the sharpness of the histogram of the pixel saturation of the converted image.

[0176] In a possible implementation, the correction unit 1702 is specifically configured to:

[0177] For each pixel in the converted image, the following operations are performed respectively: determine the third product of the brightness adjustment parameter and the brightness value of the pixel before correction, the brightness adjustment parameter is set according to the brightness of the converted image, and take the sum of the third product and the set constant as the corrected brightness value, and correct the brightness value of the pixel to the corrected brightness value.

[0178] In a possible implementation, the correction unit 1702 is specifically configured to:

[0179] According to the R, G, B color components of the pixels of the original image, the H, S, I color components of the pixels of the converted image are determined, and according to the H, S, I color components of the pixels of the converted image, the converted image is determined.

[0180] In a possible implementation, the correction unit 1702 is specifically configured to:

[0181] according to Determine the I color component of the pixel of the converted image;

[0182] according to Determine the S color component of the pixel of the converted image;

[0183] according to Determines the H color component of the pixel in the converted image.

[0184] In a possible implementation, the correction unit 1702 is specifically configured to:

[0185] The H, S, V color components of the pixels of the converted image are determined according to the R, G, B color components of the pixels of the original image, and the converted image is determined according to the H, S, V color components of the pixels of the converted image.

[0186] In a possible implementation, the correction unit 1702 is specifically configured to:

[0187] According to V=max(R,G,B) / 255, determine the V color component of the pixel point of the converted image;

[0188] according to Determine the S color component of the pixel of the converted image;

[0189] according to Determines the H color component of the pixel in the converted image.

[0190] An embodiment of the present application further provides a computer storage medium, in which computer executable instructions are stored. The computer executable instructions are used to implement the image processing method described in any embodiment of the present application.

[0191] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0192] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0193] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0194] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0195] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A medical endoscope device, characterized in that: include: Display, camera and camera host; The camera is configured to: collect original images; The camera host is configured to: convert an original image in an RGB color space into an HSI color space or an HSV color space to obtain a converted image; determine a histogram distribution mean of pixel saturation of the converted image, and correct the saturation value of each pixel point of the converted image according to the histogram distribution mean of the pixel saturation of the converted image; correct the brightness value of each pixel point of the converted image according to a set brightness adjustment parameter; convert the corrected converted image into an RGB color space to obtain a target image; The display is configured to display the target image.

2. The medical endoscope device according to claim 1, characterized in that: The camera host is specifically configured as follows: Determine a difference between an average value of pixel saturation of the conversion image and a target saturation value, and use the difference as a histogram distribution mean of pixel saturation of the conversion image, wherein the target saturation value is a user-defined value; For each pixel in the converted image, perform the following operations respectively: Determining a square root value according to the saturation value of the pixel before correction; Determining a corrected saturation value according to the square of the sum of the difference value and the square root value; The saturation value of the pixel point is corrected to the corrected saturation value.

3. The medical endoscope device according to claim 2, characterized in that: The camera host is specifically configured as follows: Determine a first product of a first saturation adjustment parameter and a logarithmic value of the saturation value of the pixel before correction; The square root of the first product is used as the square root value; the first saturation adjustment parameter is determined according to the skewness trend of the histogram of the pixel saturation of the converted image.

4. The medical endoscope device according to claim 2, characterized in that: The camera host is specifically configured as follows: The corrected saturation value is determined based on a second product of the square of the sum of the difference value and the square root value and a second saturation adjustment parameter; the second saturation adjustment parameter is determined based on the sharpness of a histogram of pixel saturation of the converted image.

5. The medical endoscope device according to claim 1, characterized in that: The camera host is specifically configured as follows: For each pixel in the converted image, perform the following operations respectively: Determining a third product of the brightness adjustment parameter and the brightness value of the pixel before correction; the brightness adjustment parameter is set according to the brightness of the converted image; Taking the sum of the third product and the set constant as the corrected brightness value; Correct the brightness value of the pixel to the corrected brightness value.

6. The medical endoscope device according to claim 1, characterized in that: The camera host is specifically configured as follows: Determine the H, S, I color components of the pixel points of the converted image according to the R, G, B color components of the pixel points of the original image; A conversion image is determined according to the H, S, and I color components of the pixel points of the conversion image.

7. The medical endoscope device according to claim 6, characterized in that: The camera host is specifically configured as follows: according to Determine the I color component of the pixel point of the converted image; The H color component of the pixel.

8. The medical endoscope device according to claim 1, characterized in that: The camera host is specifically configured as follows: Determine the H, S, V color components of the pixel points of the converted image according to the R, G, B color components of the pixel points of the original image; A conversion image is determined according to H, S, and V color components of the pixel points of the conversion image.

9. The medical endoscope device according to claim 8, characterized in that: The camera host is specifically configured as follows: According to V=max(R,G,B) / 255, determine the V color component of the pixel point of the converted image; according to Determine the S color component of the pixel point of the converted image; according to The H color component of the pixel point of the converted image is determined.

10. An image processing method, characterized in that: Applied to medical endoscope equipment, the method comprises: Convert the original image in RGB color space to HSI color space or HSV color space to obtain a converted image; Determining a histogram distribution mean of pixel saturation of the conversion image, and correcting the saturation value of each pixel point of the conversion image according to the histogram distribution mean of the pixel saturation of the conversion image; Correcting the brightness value of each pixel of the converted image according to the set brightness adjustment parameter; The corrected converted image is converted into RGB color space to obtain the target image.

Citation Information

Patent Citations

  • Color enhancement for graphic images

    CN101621704A

  • Image color enhancement method and device

    CN103780797A

  • Video foreground image extraction method and device

    CN106504264A

  • An adaptive contrast enhancement method for color images

    CN109146811A

  • Color-merged drawing image processing method, device and equipment and storage medium

    CN111062993A