Medical endoscope apparatus and image processing method

By converting the RGB color space to the HSI or HSV color space and performing pixel correction, the problem of image color changes in medical endoscopes under different lighting conditions has been solved, achieving true color representation of images and improving diagnostic accuracy.

CN119014791BActive Publication Date: 2025-11-28QINGDAO HISENSE INTELLIGENT MEDICAL TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Under different lighting conditions, the color of images acquired by medical endoscopes changes, making it difficult to reproduce the true color characteristics of human organs and affecting the accuracy of doctors' diagnoses.

Method used

The image is converted from RGB color space to HSI or HSV color space. By analyzing the histogram distribution mean of pixel saturation and brightness adjustment parameters, the saturation and brightness values ​​of each pixel in the image are corrected. Finally, it is converted back to RGB color space to present true color characteristics.

Benefits of technology

It effectively eliminates the influence of lighting changes on image color, allowing the image to present true color characteristics and improving the accuracy of doctors' identification and diagnosis of human organs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119014791B_ABST
    Figure CN119014791B_ABST
Patent Text Reader

Abstract

The application provides a medical endoscope device and an image processing method, and belongs to the technical field of computers. After an original image in an RGB color space is converted to an HSI color space or an HSV color space to obtain a converted image, the saturation values of each pixel point of the converted image are respectively corrected according to the histogram distribution mean value of the pixel saturation of the converted image, the influence of illumination change on the color of the image can be eliminated, so that the image presents real color characteristics. Then, the luminance values of each pixel point of the converted image can be corrected according to the set luminance adjustment parameter, and the corrected converted image is converted to the RGB color space, so that a target image presenting real color characteristics can be obtained.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computers, in particular to a medical endoscope device and an image processing method. BACKGROUND

[0002] When using a medical endoscope device to perform minimally invasive surgery, a doctor needs to obtain an image of a human organ by using the medical endoscope device for diagnosis, and correct organ colors in the image help the doctor identify lesions.

[0003] However, under different lighting conditions, the image of the human organ is constantly changing, and even the original color may be lost.

[0004] Therefore, how to process the image obtained by the medical endoscope device to obtain the true color characteristics of the human organ in the image is a problem to be solved. SUMMARY

[0005] In order to solve the above 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 lighting changes on image colors, so that the image presents true color characteristics.

[0006] In a first aspect, the embodiments of the present application provide a medical endoscope device, comprising a display, a camera and a camera host;

[0007] The camera is configured to collect an original image.

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

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

[0010] In a possible implementation, the camera host is specifically configured to:

[0011] determine a difference value between the average value of pixel saturation of the converted image and a target saturation value, take the difference value as the histogram distribution mean value of pixel saturation of the converted image, and the target saturation value is a value defined by a user;

[0012] For each pixel point in the converted image, the following operations are performed respectively:

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

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

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

[0016] In a possible implementation, the camera host is specifically configured to:

[0017] determining a first product of a first saturation adjustment parameter and a logarithm value of the saturation value of the pixel point before correction;

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

[0019] In a possible implementation, the camera host is specifically configured to:

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

[0021] In a possible implementation, the camera host is specifically configured to:

[0022] respectively performing the following operations for each pixel point in the converted image:

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

[0024] taking a sum of the third product and a set constant as a corrected luminance value;

[0025] correcting the luminance value of the pixel point to the corrected luminance value.

[0026] In a possible implementation, the camera host is specifically configured to:

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

[0028] determining the converted image according to the H, S, I color components of the pixel point of the converted image.

[0029] In a possible implementation, the camera host is specifically configured to:

[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 determine the H color component of the pixel point of the converted image.

[0033] In a possible implementation, the camera host is specifically configured to:

[0034] According to the R, G, and B color components of the pixel point of the original image, determine the H, S, and V color components of the pixel point of the converted image;

[0035] According to the H, S, and V color components of the pixel point of the converted image, determine the converted image.

[0036] In a possible implementation, the camera host is specifically configured to:

[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 determine the H color component of the pixel point of the converted image.

[0040] In a possible implementation, the camera host is specifically configured to:

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

[0042] determine the histogram distribution mean of the 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;

[0043] correct the luminance value of each pixel point of the converted image according to a set luminance adjustment parameter;

[0044] convert the corrected converted image to the RGB color space to obtain a target image.

[0045] In a third aspect, the embodiments of the present application provide an image processing apparatus, comprising:

[0046] a conversion unit configured to convert an original image in an RGB color space to an HSI color space or an HSV color space to obtain a converted image;

[0047] a correction unit configured to determine a histogram distribution mean of pixel saturation of the converted image, and correct saturation values of each pixel point of the converted image according to the histogram distribution mean of pixel saturation of the converted image;

[0048] correct the luminance values of each pixel point of the converted image according to a set luminance adjustment parameter;

[0049] convert the corrected converted image to the RGB color space to obtain a target image.

[0050] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a camera host to implement the method in the second aspect.

[0051] The medical endoscope device and the image processing method provided by the embodiments of the present application can eliminate the influence of illumination change on image color, so that the image presents real color characteristics, and then the luminance values of each pixel point of the converted image can be corrected according to a set luminance adjustment parameter, and the corrected converted image can be converted to the RGB color space to obtain a target image presenting real color characteristics. BRIEF DESCRIPTION OF DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0053] Figure 1 a structural schematic diagram of a medical endoscope device provided by the embodiments of the present application;

[0054] Figure 2 a schematic diagram of diagnosis of a medical endoscope device provided by the embodiments of the present application;

[0055] Figure 3A flow chart of an image processing method provided for an embodiment of the present application;

[0056] Figure 4 A flow chart of an image processing method provided for an embodiment of the present application;

[0057] Figure 5 A flow chart of an image processing method provided for an embodiment of the present application;

[0058] Figure 6 A flow chart of an image processing method provided for an embodiment of the present application;

[0059] Figure 7 A flow chart of an image processing method provided for an embodiment of the present application;

[0060] Figure 8 A flow chart of an image processing method provided for an embodiment of the present application;

[0061] Figure 9 A schematic diagram of a display provided for an embodiment of the present application;

[0062] Figure 10 A schematic diagram of a display provided for an embodiment of the present application;

[0063] Figure 11 A schematic diagram of a display provided for an embodiment of the present application;

[0064] Figure 12 A schematic diagram of a display provided for an embodiment of the present application;

[0065] Figure 13 A schematic diagram of a display provided for an embodiment of the present application;

[0066] Figure 14 A schematic diagram of a display provided for an embodiment of the present application;

[0067] Figure 15 A flow chart of an image processing method provided for an embodiment of the present application;

[0068] Figure 16 A flow chart of an image processing method provided for an embodiment of the present application;

[0069] Figure 17 A schematic diagram of an image processing apparatus provided for an embodiment of the present application. DETAILED DESCRIPTION

[0070] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.

[0071] It should be noted that the application scenarios described in the following embodiments of the present application are for more clearly illustrating 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. Those of ordinary skill in the art can know that, with the appearance 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 a kind of perception of human visual system to light. A large number of experiments show that the human visual system can eliminate or reduce the influence of light source change on the true color of object surface. Unfortunately, existing image acquisition devices, such as medical endoscope devices, digital cameras, smart phones, tablet computers and the like, do not have such intelligent automatic adjustment capability. Since the image color obtained by the photosensitive element is determined by the light source, the reflectivity of the imaged object and the spectral response function of the imaging system, under different lighting conditions, the object image obtained by the photosensitive element is constantly changing, sometimes even losing the original color. At the same time, during the product function algorithm design processing, the color of the object is more or less affected, resulting in color cast phenomenon. In minimally invasive surgery, doctors need to diagnose according to the images collected by the medical endoscope device. Correct color of organs helps doctors to identify lesions and distinguish organs with similar structures and similar colors in the human body, so as to make quick and accurate decisions. Therefore, to restore the true color of organs and display the true state of organs, digital image processing techniques such as color cast correction are needed to eliminate the influence of lighting changes, so as to obtain the true color characteristics of the object surface independent of lighting.

[0073] Most of the current color cast correction methods are fixed field and fixed scene methods, which transfer the ideas of attenuation compensation, dynamic stretching, color enhancement, etc. to the abdominal cavity environment with relatively single color and high proportion of red and yellow, and the effect is not ideal. The learning-based color cast correction method also has great limitations, such as high time complexity, correction delay, high resource occupancy, etc. In addition, most of the ISP (Image Signal Processing) color cast correction algorithms embedded in medical endoscope equipment are based on the red (R), green (G) and blue (B) color channels in RGB. The principle is to adjust the gain of the RGB three-color channels to make them closer to the color perception of the human eye. Since the response curve of the human eye to different wavebands of light has overlapping parts, the colors of the R, G and B channels affect each other. This direct adjustment of three-color balance method easily ignores the correlation between the RGB three-color channels, and it is difficult to find the balance point of the image color. If the adjustment is not proper, the color cast phenomenon will still exist.

[0074] HSI / HSV is a color space created according to the intuitive characteristics of color. The HSI color space includes three color channels of hue H, saturation S and intensity I. The HSV color space includes three color channels of hue H, saturation S and value V. 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, and the smaller the difference, the greater the color saturation. Therefore, controlling the histogram distribution of the size of each pixel point in the saturation S channel can more directly control the proportion relationship and difference size of the R, G and B three channels, and the adjustment of the brightness space helps to control the light and dark performance of the picture.

[0075] Based on this, the embodiment of the present application provides a medical endoscope equipment and an image processing method. By converting the original image of the RGB color space to the HSI color space or the HSV color space, a converted image can be obtained. According to the histogram distribution mean of the pixel saturation of the converted image, the saturation values of each pixel point of the converted image can be corrected, and according to the set brightness adjustment parameter, the brightness values of each pixel point of the converted image can be corrected. By converting the corrected converted image to the RGB color space, a target image with real color characteristics can be obtained. According to the histogram distribution mean of the pixel saturation of the converted image, the saturation values of each pixel point of the converted image are corrected respectively, which can eliminate the influence of light changes on the image color, so that the image presents real color characteristics.

[0076] Figure 1 An exemplary structural schematic diagram of a medical endoscope device in the embodiments of the present application is shown, wherein the camera host is a device for taking pictures during endoscopy and surgery to display the pictures of the endoscopy and surgery, and the key components thereof include a camera, a button, a camera host, a CMOS (Complementary Metal-Oxide-Semiconductor) image sensor, a video line, an optical adapter, a mirror rod, a communication port, and a video output interface. The camera host can be connected with a display through the video output interface and connected with a cold light source host through the communication port. The cold light source is a device for providing illumination light for the endoscope during endoscopy and surgery, and the key components thereof usually include a cold light source host, a light guide beam, and a cold light source light output interface.

[0077] In combination Figure 2 As shown, the medical endoscope device examination or surgery is basically in the form of dynamic video to assist the doctor in the actual operation stage. After the doctor operates the medical endoscope device to enter the human body, the image of the human body is collected by the camera on the medical endoscope device and displayed, and the range irradiated by the camera is presented on the display connected with the medical endoscope device as the camera of the medical endoscope device moves, so that the environment around the lesion can be clearly seen, and the three-dimensional intuitive movement and surgical operation can be performed with the aid of surgical instruments.

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

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

[0080] In the RGB color space, three color channels are included, which are R channel (red channel), G channel (green channel) and B channel (blue channel). In the HSI color space, three color channels are also included, which are H channel (hue channel), S channel (saturation channel) and I channel (intensity channel), wherein the saturation channel S is closely related to the R channel, the G channel and the B channel. Since there is an overlapping part in the response curve of the human eye to light of different wavebands, the colors of the R, G and B channels affect each other, and it is difficult to find a 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 gap size of 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 in the HSI color space is corrected.

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

[0082] In step S3011, the H, S and I color components of the pixel point of the converted image are determined according to the R, G and B color components of the pixel point of the original image.

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

[0084]

[0085] Wherein, R, G and B represent the red, green and blue color components of the pixel point, and I represents the intensity color component of the pixel point.

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

[0087]

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

[0089] Further, 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 the conversion image according to the H, S, I color components of the pixel points of the conversion image.

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

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

[0094] In an optional embodiment, determining the histogram distribution mean value of the pixel saturation of the conversion image, as shown in Figure 5 may include the following steps:

[0095] Step S3021, performing histogram statistics on the S (saturation) channel of each pixel point of the conversion image to obtain the pixel saturation of the conversion 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 conversion image, that is, pHsitS[S*256]=pHsit[S*256]+1, SumS=SumS+S.

[0097] wherein S is the saturation value of the S channel of each pixel point in the conversion image, and SumS is the pixel saturation of the conversion image.

[0098] Step S3022, determining the histogram distribution mean value of the pixel saturation of the conversion image according to the pixel saturation of the conversion image.

[0099] After obtaining the pixel saturation of the conversion image, the ratio of the pixel saturation of the conversion image to the number of pixel points of the conversion image can be determined, and the ratio is taken as the average value of the pixel saturation of the conversion image, that is:

[0100]

[0101] wherein SumS represents the pixel saturation of the conversion image, and W*H represents the number of pixel points of the conversion image.

[0102] After determining the average value of the pixel saturation of the conversion image, the difference μ between the average value of the pixel saturation of the conversion image and the target saturation value can be determined, and the difference μ is taken as the histogram distribution mean value of the pixel saturation of the conversion image.

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

[0104] Step S303: Correct the saturation value of each pixel in the converted image according to the mean of the histogram distribution of pixel saturation.

[0105] Based on the mean of the histogram distribution of pixel saturation in the converted image, the saturation value of each pixel in the converted image is corrected. For example... Figure 6 As shown, it may include the following steps:

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

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

[0108] Step S602: Determine the square root value based on the saturation value before pixel correction.

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

[0110] Step S6021: Determine the first product of the first saturation adjustment parameter and the logarithm of the saturation value before pixel correction.

[0111] Specifically, we can first determine the logarithm of the saturation value before pixel correction, i.e., logS, and then determine the first product of the first saturation parameter a and the logarithm of the saturation value before pixel correction, logS, i.e., -a*logS.

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

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

[0114] Specifically, we can first determine the square root of the first product, i.e., sqrt(-a*logS), and then use sqrt(-a*logS) as the square root value, where sqrt means to take the square root.

[0115] After determining the square root value, the corrected saturation value can be determined by multiplying the square of the sum of the difference and the square root value with 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, i.e., (sqrt(-a*logS)+AvgS-Avgs). 2 Then determine the second saturation adjustment parameter b and (sqrt(-a*logS)+AvgS-Avgs) 2 The second product, i.e., -b*(sqrt(-a*logS)+AvgS-Avgs). 2 Finally, calculate the second power of the constant e, i.e., exp{-b*(sqrt(-a*logS)+AvgS-Avgs)} 2}, and exp{-b*(sqrt(-a*logS)+AvgS-Avgs) 2} is used as the corrected saturation value.

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

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

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

[0120] After correcting the saturation values ​​of each pixel in the converted image, further adjustments can be made to the image's brightness, such as adjusting the brightness values ​​of each pixel according to the set brightness adjustment parameters. Figure 8 As shown, correcting the brightness values ​​of each pixel in the converted image can include the following steps:

[0121] Step S801: Determine the third product of the brightness adjustment parameter and the brightness value before pixel correction.

[0122] Determine the third product of the brightness adjustment parameter and the brightness value before pixel correction, i.e., determine c*I.

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

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

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

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

[0127] Step S803, the luminance value of the pixel point is corrected to the corrected luminance value.

[0128] After determining the corrected luminance value of each pixel point in the conversion image, each pixel point in the conversion image can be corrected to the corrected luminance value.

[0129] Step S305, the corrected conversion image is converted to the RGB color space to obtain the target image.

[0130] After correcting the saturation value and the luminance value of each pixel point in the conversion image, the HSI color space of the corrected conversion 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 , the color component B′ of the blue channel of the RGB color space can be determined as B′=I′*(1-S′). ′ The color component R′ of the red channel of the RGB color space can be determined as R′=I′*S′. The color component G′ of the green channel of the RGB color space can be determined as G′=3*I′-(R′+B′).

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

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

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

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

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

[0137] When the doctor uses the medical endoscope device to diagnose the patient, changes in the external light environment can cause the doctor to have different perceptions of the colors of the images collected by the medical endoscope device. Therefore, in some embodiments, the doctor can adjust the first saturation adjustment parameter, the second saturation adjustment parameter, the brightness adjustment parameter, and the mean value of the histogram distribution of the pixel saturation in this paper to achieve better color presentation effect for the light environment of the department currently being diagnosed.

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

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

[0140] In another embodiment, as shown in Figure 13As shown, the doctor can also trigger a brightness adjustment button in the display connected to the medical endoscope device, the brightness adjustment button being used to adjust a brightness adjustment parameter c, c being used to adjust the brightness of the image, i.e. 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. 6B, the brightness adjustment parameter c is adjusted, and the image is adjusted according to the adjusted brightness adjustment parameter c. Figure 14 As shown, the doctor can adjust the brightness (i.e. the brightness adjustment parameter c).

[0141] Based on the same inventive concept, another image processing method is also provided in the embodiments of the present application, as shown in FIG. 6A, the method comprising the following steps: Figure 15 As shown, the method comprises the following steps:

[0142] In step S1501, the original image in the RGB color space is converted to the HSV color space to obtain a converted image.

[0143] In an optional embodiment, the original image in the RGB color space is converted to the HSV color space to obtain a converted image, as shown in FIG. 5B, the method can comprise the following steps: Figure 16 As shown, the method can comprise the following steps:

[0144] In step S1601, the H, S, V color components of the pixel points of the converted image are determined according to the R, G, B color components of the pixel points of the original image.

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

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

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

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

[0149]

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

[0151]

[0152] In step S1602, the converted image is determined according to the H, S, V color components of the pixel points of the converted image.

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

[0154] In step S1502, the histogram distribution mean of the saturation of the pixel points of the conversion image is determined.

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

[0156] In step S1503, the saturation values of the pixel points of the conversion image are respectively corrected according to the histogram distribution mean of the saturation of the pixel points of the conversion image.

[0157] The step of correcting the saturation values of the pixel points of the conversion image respectively according to the histogram distribution mean of the saturation of the pixel points of the conversion image is the same as step S403, and will not be repeated here.

[0158] In step S1504, the luminance values of the pixel points of the conversion image are respectively corrected according to the set luminance adjustment parameter.

[0159] The step of correcting the luminance values of the pixel points of the conversion image respectively according to the set luminance adjustment parameter is the same as step S304, and will not be repeated here.

[0160] In step S1505, the corrected conversion image is converted to the RGB color space to obtain a target image.

[0161] After correcting the saturation values and the luminance values of the pixel points of the conversion image, the HSV color space of the corrected conversion image can be converted back to the RGB color space to obtain a target image.

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

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

[0164] After determining the color values ​​of the corresponding pixels in the RGB color space of the target image, the converted image can be converted to the target image in the RGB color space based on the color values ​​of each pixel in the RGB color space.

[0165] It should be noted that the application scenarios of this application include, but are not limited to, the aforementioned use of medical endoscopes by doctors to diagnose patients. It can also be applied to various application scenarios for eliminating the effects of light and color distortion on images, and can be dynamically adjusted according to the user's needs.

[0166] This application corrects the saturation value of each pixel in the converted image based on the mean histogram distribution of pixel saturation, thereby eliminating the influence of illumination changes on image color and making the image present true color characteristics.

[0167] Based on the same inventive concept, this application also provides an image processing apparatus, such as... Figure 17 As shown, the image processing apparatus includes:

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

[0169] The correction unit 1702 is configured to determine a mean value of a histogram distribution of pixel saturation of the converted image, and correct saturation values of respective pixel points of the converted image according to the mean value of the histogram distribution of the pixel saturation of the converted image, correct luminance values of the respective pixel points of the converted image according to a set luminance adjustment parameter, and convert the corrected converted image to the RGB color space to obtain the target image.

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

[0171] determine a difference value between the mean value of the pixel saturation of the converted image and a target saturation value, take the difference value as the mean value of the histogram distribution of the pixel saturation of the converted image, and take the target saturation value as a value defined by a user; and for each pixel point in the converted image, respectively perform the following operations: determine a square root value according to a saturation value before correction of the pixel point, determine a corrected saturation value according to a square of a sum of the difference value and the square root value, and correct the saturation value of the pixel point 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 before correction of the pixel point, take a square root of the first product as the square root value, and determine the first saturation adjustment parameter according to a skewness trend of the histogram of the pixel saturation of the converted image.

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

[0175] determine the corrected saturation value according to a second product of a square of a sum of the difference value and the square root value and a second saturation adjustment parameter, and determine the second saturation adjustment parameter according to a 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 point in the converted image, respectively perform the following operations: determine a third product of a luminance adjustment parameter and a luminance value before correction of the pixel point, take a sum of the third product and a set constant as a corrected luminance value, and correct the luminance value of the pixel point to the corrected luminance value.

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

[0179] Based on the R, G, and B color components of the pixels in the original image, determine the H, S, and I color components of the pixels in the converted image, and then determine the converted image based on the H, S, and I color components of the pixels in the converted image.

[0180] In one possible implementation, the correction unit 1702 is specifically used for:

[0181] according to Determine the I color component of each pixel in the transformed image;

[0182] according to Determine the S-color components of the pixels in the transformed image;

[0183] according to Determine the H color component of each pixel in the transformed image.

[0184] In one possible implementation, the correction unit 1702 is specifically used for:

[0185] Based on the R, G, and B color components of the pixels in the original image, determine the H, S, and V color components of the pixels in the converted image, and then determine the converted image based on the H, S, and V color components of the pixels in the converted image.

[0186] In one possible implementation, the correction unit 1702 is specifically used for:

[0187] Determine the V color components of the pixels in the transformed image based on V = max(R,G,B) / 255;

[0188] according to Determine the S color component of each pixel in the transformed image;

[0189] according to Determine the H color component of each pixel in the transformed image.

[0190] This application also provides a computer storage medium storing computer-executable instructions for implementing the image processing method described in any embodiment of this application.

[0191] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0192] The computer program instructions can 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 which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart

[0193] The computer program instructions can 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 which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart

[0194] The computer program instructions can 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 which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks Figure 1 means for functionally implementing the steps listed in the flowchart

[0195] Obviously, numerous modifications and variations of the present application are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims and their equivalents, the application can be practiced otherwise than as specifically described.

Claims

1. A medical endoscope device, characterized in that, The application relates to a camera system, comprising: a display, a camera and a camera host; the camera is configured to collect an original image; the camera host is configured to convert the original image in an RGB color space into a converted image in an HSI color space or an HSV color space, to determine a histogram distribution mean value of pixel saturation of the converted image, to correct saturation values of respective pixel points of the converted image according to the histogram distribution mean value of pixel saturation of the converted image, to correct luminance values of respective pixel points of the converted image according to a set luminance adjustment parameter, and to convert the corrected converted image into the RGB color space to obtain a target image; the display is configured to display the target image; wherein the camera host is specifically configured to: determine a difference value between the average value of pixel saturation of the converted image and a target saturation value, and take the difference value as the histogram distribution mean value of pixel saturation of the converted image, wherein the target saturation value is a value defined by a user; for each pixel point in the converted image, the following operations are performed: determine a square root value according to the saturation value of the pixel point before correction; determine a corrected saturation value according to the square of the sum of the difference value and the square root value; correct the saturation value of the pixel point to the corrected saturation value.

2. The medical endoscope apparatus according to claim 1, characterized by the camera host is specifically configured to: determine a first product of a first saturation adjustment parameter and the logarithm value of the saturation value of the pixel point before correction; take the square root of the first product as the square root value; the first saturation adjustment parameter is determined according to the skewness trend of the histogram of pixel saturation of the converted image.

3. The medical endoscope apparatus according to claim 1, characterized by the camera host is specifically configured to: determine the corrected saturation value according to the second product of the second saturation adjustment parameter and the square of the sum of the difference value and the square root value; the second saturation adjustment parameter is determined according to the sharpness of the histogram of pixel saturation of the converted image.

4. The medical endoscope apparatus according to claim 1, wherein the camera host is specifically configured to: for each pixel point in the converted image, the following operations are performed: determine a third product of the luminance adjustment parameter and the luminance value of the pixel point before correction; the luminance adjustment parameter is set according to the luminance of the converted image; take the sum of the third product and a set constant as a corrected luminance value; correct the luminance value of the pixel point to the corrected luminance value.

5. The medical endoscope apparatus according to claim 1, wherein the camera host is specifically configured to: determine H, S and I color components of pixel points of a converted image according to R, G and B color components of pixel points of the original image; determine the converted image according to the H, S and I color components of the pixel points of the converted image.

6. The medical endoscope apparatus according to claim 5, wherein the camera host is specifically configured to: According to , determining an I color component of the pixel point of the conversion image; According to , determining an S color component of the pixel point of the conversion image; According to , a H color component of the pixel point of the conversion image is determined.

7. The medical endoscope apparatus according to claim 1, wherein the camera host is specifically configured to: determine H, S and V color components of pixel points of a converted image according to R, G and B color components of pixel points of the original image; determine the converted image according to the H, S and V color components of the pixel points of the converted image.

8. The medical endoscope apparatus according to claim 7, wherein the camera host is specifically configured to: According to , determining a V color component of the pixel point of the conversion image; According to , determining the S color component of the pixel point of the conversion image; According to , determine the H color component of the pixel points of the converted image.

9. An image processing method characterized by, Applied to a medical endoscope device, the method comprises: Converting an original image in an RGB color space to an HSI color space or an HSV color space to obtain a converted image; Determining a histogram distribution mean of pixel saturation of the converted image, and determining a difference between a pixel saturation average value of the converted image and a target saturation value, the target saturation value being a value defined by a user, and taking the difference as the histogram distribution mean of the pixel saturation of the converted image; For each pixel point in the converted image, the following operations are performed respectively: determining a square root value according to a saturation value before correction of the pixel point; determining a corrected saturation value according to a square of a sum of the difference and the square root value; and correcting the saturation value of the pixel point to the corrected saturation value; Correcting a luminance value of each pixel point of the converted image according to a set luminance adjustment parameter; Converting the corrected converted image to the RGB color space to obtain a target image.

Citation Information

Patent Citations

  • Color enhancement for graphic images

    CN101621704A

  • Medical endoscope image enhancement method based on mathematical morphology

    CN111445419A

  • Image brightness adaptive correction method and system

    CN115358945A