Image processing method, equipment and device for endoscope image
By performing channel separation and edge pixel contrast enhancement processing on the endoscopic image, combined with reference image fusion, the problem of unclear blood vessel display in the prior art is solved, and a clearer image display effect is achieved.
Patent Information
- Application Number
- CN202310805856.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-01-03
AI Technical Summary
Existing endoscopic image enhancement methods can easily lead to noise enhancement and image overexposure, making it difficult to clearly display blood vessels, especially in large visceral areas, the color of blood vessels is difficult to distinguish from the background.
By performing channel separation based on the first color gamut on the endoscopic image, the edge area of the blood vessel is obtained, binarization and noise reduction processing are performed, the edge pixel points are determined for contrast enhancement, and the processed data is fused with the reference image. Generate the target image.
It improves the display effect of blood vessels, avoids noise enhancement, obtains a clearer image display, and enhances the visibility of blood vessels in the image.
Smart Images

Figure CN119251123A_ABST
Abstract
Description
Background Art
[0002] Endoscopes are usually used inside the patient's body, where the background color is mainly red blood vessels and white and yellow fat. The overall color is monotonous, especially for large visceral areas, where the color of the blood vessels is almost the same as the background and difficult to distinguish. Based on this, it is necessary to enhance the endoscopic images collected by the endoscope to better distinguish the blood vessels in the endoscopic images.
[0003] At present, when performing image enhancement on endoscopic images, the image enhancement algorithm used is to enhance the contrast of the entire image pixels. This image enhancement algorithm is a non-directional enhancement method, which can easily cause noise to be enhanced and also cause image overexposure. Summary of the invention
[0004] The purpose of the present application is to provide an image processing method, device and apparatus for endoscopic images, so as to provide a method for enhancing the display effect of blood vessels in images and a solution for clearly displaying blood vessels in images.
[0005] In a first aspect, the present application provides an image processing method for an endoscopic image, the method comprising:
[0006] For an endoscopic image containing a blood vessel acquired by an endoscopic device, channel separation is performed based on a first color gamut to obtain a candidate image of a first target channel in the first color gamut;
[0007] Binarizing the candidate image according to the gradient information of the pixel points in the candidate image to obtain the blood vessel edge region in the candidate image, and performing noise reduction on the blood vessel edge region to obtain first image data corresponding to the candidate image;
[0008] According to the first image data, edge pixels are determined from the candidate image, and contrast enhancement processing is performed on the edge pixels to obtain second image data corresponding to the candidate image;
[0009] The second image data is fused with the pixel values of each pixel point in at least one reference image corresponding to the endoscopic image to generate and display a target endoscopic image after the fusion process; wherein, the at least one reference image is obtained by separating the endoscopic image based on a second color domain.
[0010] In a second aspect, the present application provides an endoscope device, characterized in that it includes a camera, a camera host, and a display screen;
[0011] The camera is used to collect endoscopic images containing blood vessels;
[0012] The camera host is used to perform channel separation based on a first color gamut on an endoscopic image containing blood vessels acquired by an endoscopic device, and obtain a candidate image of a first target channel in the first color gamut; binarize the candidate image based on gradient information of pixel points in the candidate image to obtain a blood vessel edge region in the candidate image, and perform noise reduction on the blood vessel edge region to obtain first image data corresponding to the candidate image; determine edge pixel points from the candidate image based on the first image data, and perform contrast enhancement on the edge pixel points to obtain second image data corresponding to the candidate image; fuse the second image data with pixel values of each pixel point in at least one reference image corresponding to the endoscopic image to generate a target endoscopic image after the fusion process; wherein the at least one reference image is obtained by separating the endoscopic image based on the second color gamut;
[0013] The display is used to display the target endoscopic image after fusion processing.
[0014] In a possible embodiment, the camera host is specifically used for:
[0015] For any pixel in the candidate image, determine the gradient information of the pixel according to the brightness information of the neighboring pixels of the pixel;
[0016] The area where the pixel points whose gradient information in the candidate image is greater than a preset gradient threshold are located is taken as the edge area in the candidate image.
[0017] In a possible embodiment, the camera host is specifically used for:
[0018] Identifying noise points in the blood vessel edge region by performing mean filtering on the blood vessel edge region in the candidate image after binarization processing;
[0019] Noise reduction processing is performed on the noise points in the blood vessel edge area.
[0020] In a possible embodiment, the camera host is specifically used for:
[0021] According to the first image data, determining pixels in the candidate image whose gradient information is greater than a preset gradient threshold as edge pixels;
[0022] Based on the segmented histogram and the brightness values corresponding to the edge pixels in the first image data, contrast enhancement processing is performed on the edge pixels.
[0023] In a possible embodiment, the endoscopic image collected by the endoscopic device is an image corresponding to the first color gamut; and the reference image corresponding to the endoscopic image is determined according to the following method:
[0024] converting the endoscopic image into a candidate endoscopic image in a second color domain;
[0025] Channel separation is performed on the candidate endoscopic image based on the second color gamut, and reference images of each channel in the second color gamut corresponding to the endoscopic image are obtained.
[0026] In a possible embodiment, the first color gamut is an RGB color gamut, and the second color gamut is an HSV color gamut;
[0027] The camera host is specifically used for:
[0028] Performing weighted processing on the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image; fusing the second image data and the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image after the weighted processing according to a preset first fusion coefficient, to obtain enhanced third image data corresponding to the V channel;
[0029] determining a second fusion coefficient according to the third image data and the pixel value of each pixel point in the reference image of the V channel corresponding to the endoscopic image, and processing the pixel value of each pixel point in the reference image of the S channel corresponding to the endoscopic image according to the second fusion coefficient to obtain fourth image data corresponding to the S channel;
[0030] The third image data, the fourth image data, and a candidate image of a second target channel in a first color domain corresponding to the endoscopic image are fused to generate and display a target endoscopic image after the fusion process.
[0031] In a possible embodiment, the camera host is specifically used for:
[0032] For any pixel point in the reference image of the V channel, determine a weight coefficient corresponding to the pixel point according to data corresponding to the pixel point in the first image data;
[0033] According to the weight coefficient corresponding to each pixel point in the reference image of the V channel, the pixel value of each pixel point is weighted.
[0034] In a possible embodiment, the weight coefficient corresponding to the pixel point is determined according to the following formula:
[0035] D=(1-G denoise )+m*G denoise ;
[0036] Wherein, D is the weight coefficient corresponding to the pixel point, G denoise is the data corresponding to the pixel point in the first image data, and m is a preset value.
[0037] In a possible embodiment, the pixel value of each pixel point in the reference image of the S channel corresponding to the endoscopic image is processed according to the following formula:
[0038] S new =1-(1-S)*λ;
[0039] Where λ = V new / V, S is the pixel value of a pixel in the reference image of the S channel corresponding to the endoscopic image, S new is the processed pixel value, λ is the second fusion coefficient, V new is the data corresponding to the one pixel in the third image data, and V is the pixel value of the one pixel in the reference image of the V channel.
[0040] In a third aspect, the present application provides an image processing device for endoscopic images, comprising:
[0041] An acquisition module, configured to perform channel separation based on a first color gamut on an endoscopic image containing a blood vessel acquired by an endoscopic device, and acquire a candidate image of a first target channel in the first color gamut;
[0042] a denoising module, configured to perform binarization processing on the candidate image according to gradient information of pixel points in the candidate image, obtain a blood vessel edge region in the candidate image, and perform denoising processing on the blood vessel edge region to obtain first image data corresponding to the candidate image;
[0043] an enhancement module, configured to determine edge pixels from the candidate image according to the first image data, and perform contrast enhancement processing on the edge pixels to obtain second image data corresponding to the candidate image;
[0044] A fusion module is used to fuse the second image data with the pixel values of each pixel point in at least one reference image corresponding to the endoscopic image, and generate and display the target endoscopic image after the fusion processing; wherein, the at least one reference image is obtained by separating the endoscopic image based on the second color domain.
[0045] In a possible embodiment, the noise reduction module is specifically used for:
[0046] For any pixel in the candidate image, determine the gradient information of the pixel according to the brightness information of the neighboring pixels of the pixel;
[0047] The area where the pixel points whose gradient information in the candidate image is greater than a preset gradient threshold are located is taken as the edge area in the candidate image.
[0048] In a possible embodiment, the noise reduction module is specifically used for:
[0049] Identifying noise points in the blood vessel edge region by performing mean filtering on the blood vessel edge region in the candidate image after binarization processing;
[0050] Noise reduction processing is performed on the noise points in the blood vessel edge area.
[0051] In a possible embodiment, the enhancement module is specifically used to:
[0052] According to the first image data, determining pixels in the candidate image whose gradient information is greater than a preset gradient threshold as edge pixels;
[0053] Based on the segmented histogram and the brightness values corresponding to the edge pixels in the first image data, contrast enhancement processing is performed on the edge pixels.
[0054] In a possible embodiment, the endoscopic image collected by the endoscopic device is an image corresponding to the first color gamut;
[0055] Determine the reference image corresponding to the endoscopic image in the following manner:
[0056] converting the endoscopic image into a candidate endoscopic image in a second color domain;
[0057] Channel separation is performed on the candidate endoscopic image based on the second color gamut, and reference images of each channel in the second color gamut corresponding to the endoscopic image are obtained.
[0058] In a possible embodiment, the first color gamut is an RGB color gamut, and the second color gamut is an HSV color gamut; and the fusion module is specifically configured to:
[0059] Performing weighted processing on the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image; fusing the second image data and the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image after the weighted processing according to a preset first fusion coefficient, to obtain enhanced third image data corresponding to the V channel;
[0060] determining a second fusion coefficient according to the third image data and the pixel value of each pixel point in the reference image of the V channel corresponding to the endoscopic image, and processing the pixel value of each pixel point in the reference image of the S channel corresponding to the endoscopic image according to the second fusion coefficient to obtain fourth image data corresponding to the S channel;
[0061] The third image data, the fourth image data, and a candidate image of a second target channel in a first color domain corresponding to the endoscopic image are fused to generate and display a target endoscopic image after the fusion process.
[0062] In a possible embodiment, the acquisition module is specifically used to:
[0063] For any pixel point in the reference image of the V channel, determine a weight coefficient corresponding to the pixel point according to data corresponding to the pixel point in the first image data;
[0064] According to the weight coefficient corresponding to each pixel point in the reference image of the V channel, the pixel value of each pixel point is weighted.
[0065] In a possible embodiment, the weight coefficient corresponding to the pixel point is determined according to the following formula:
[0066] D=(1-G denoise )+m*G denoise ;
[0067] Wherein, D is the weight coefficient corresponding to the pixel point, G denoise is the data corresponding to the pixel point in the first image data, and m is a preset value.
[0068] In a possible embodiment, the acquisition module is specifically used to:
[0069] S new =1-(1-S)*λ;
[0070] Where λ = V new / V, S is the pixel value of a pixel in the reference image of the S channel corresponding to the endoscopic image, S new is the processed pixel value, λ is the second fusion coefficient, V new is the data corresponding to the one pixel in the third image data, and V is the pixel value of the one pixel in the reference image of the V channel.
[0071] In a fourth aspect, the present application provides a computer-readable storage medium. When instructions in the computer-readable storage medium are executed by an electronic device, the electronic device is enabled to perform the image processing method of endoscopic images as described in the first aspect above.
[0072] In a fifth aspect, the present application provides a computer program product, including a computer program:
[0073] When the computer program is executed by a processor, the image processing method of endoscopic images as described in the first aspect above is implemented.
[0074] Since the embodiment of the present application performs channel separation based on the first color gamut on an endoscopic image containing blood vessels acquired by an endoscopic device, and obtains a candidate image of a first target channel in the first color gamut, in order to improve the display effect of blood vessels in endoscopic images, the present application performs channel separation on the endoscopic image based on the first color gamut, so that the candidate image of the first target channel in the first color gamut is processed in a directionally manner; binarizes the candidate image according to the gradient information of the pixel points in the candidate image to obtain the blood vessel edge area in the candidate image, and performs noise reduction on the blood vessel edge area to obtain first image data corresponding to the candidate image; determines edge pixel points from the candidate image according to the first image data, and performs contrast enhancement on the edge pixel points to obtain second image data corresponding to the candidate image, By performing contrast enhancement processing only on edge pixels, in addition to enhancing the display effect of blood vessels, noise can also be avoided to obtain a better image display effect; the pixel values of each pixel in the second image data and at least one reference image corresponding to the endoscopic image are fused to generate and display a target endoscopic image after the fusion processing; wherein at least one reference image is obtained by separating the endoscopic image based on the second color domain; by fusing the second image data after noise reduction and contrast enhancement processing with at least one reference image corresponding to the endoscopic image, the brightness information in the second image data and the darkness information in the reference image can be fused, so as to achieve the effect of segmentally retaining the brightness information and darkness information in the image, and make the display effect of the blood vessels in the image clearer. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. Obviously, the drawings introduced 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 creative work.
[0076] Figure 1 This is a schematic diagram of the structure of a medical endoscope device according to an embodiment of the present application;
[0077] Figure 2 This is an optional application scenario of the embodiment of the present application;
[0078] Figure 3 This is a flow chart of an image processing method for endoscopic images according to an embodiment of the present application;
[0079] Figure 4 An endoscopic image is an embodiment of the present application;
[0080] Figure 5 This is a schematic diagram of performing channel separation on a first color gamut according to an embodiment of the present application;
[0081] Figure 6 This is a flow chart of obtaining an edge region in a candidate image according to an embodiment of the present application;
[0082] Figure 7 This is a schematic diagram of the positions of a pixel and adjacent pixels in an embodiment of the present application;
[0083] Figure 8 This is a flow chart of performing contrast enhancement processing on edge pixels according to an embodiment of the present application;
[0084] Fig. 9 This is a flow chart of determining a reference image corresponding to an endoscopic image according to an embodiment of the present application;
[0085] Fig.10 This is a schematic diagram of performing channel separation on a second color gamut according to an embodiment of the present application;
[0086] Fig.11 This is a flow chart of determining a target endoscope according to an embodiment of the present application;
[0087] Fig.12 A schematic diagram of a target image according to an embodiment of the present application;
[0088] Fig.13 This is an overall flow chart of determining a target image according to an embodiment of the present application;
[0089] Fig.14 An image processing device for endoscopic images according to an embodiment of the present application;
[0090] Fig.15 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0091] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Among them, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0092] Furthermore, in the description of the embodiments of the present application, unless otherwise specified, “and” means or. For example, A / B can mean A or B. The “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “plurality” means two or more than two.
[0093] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as suggesting or implying relative importance or implicitly indicating the number of technical features indicated. Thus, features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more.
[0094] In order to facilitate understanding of the image processing method, device and apparatus for endoscopic images provided in the embodiments of the present application, some terms in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0095] (1) HSV, which represents a color model: In the HSV model, H (hue) represents hue, S (saturation) represents saturation, and B (value) represents brightness. The medium corresponding to the HSV model is the human eye. Hue (H, hue): On the standard color wheel of 0 to 360 degrees, hue is measured by position. In common use, hue is identified by the name of the color, such as red, green, or orange. Black and white have no hue. Saturation (S, saturation): Indicates the purity of the color. When it is 0, it is gray. White, black, and other gray colors have no saturation. At maximum saturation, each hue has the purest color light. The value range is 0 to 100%. Brightness (V, value): It is the brightness of the color. When it is 0, it is black. The maximum brightness is the most vivid state of the color. The value range is 0 to 100%.
[0096] (2) The RBG color model is a color standard in the industry. It obtains a variety of colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. RGB represents the colors of the three channels of red, green, and blue. This standard covers almost all colors that can be perceived by human vision and is one of the most widely used color systems.
[0097] In order to make the purpose, technical solution and beneficial effects of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0098] 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.
[0099] An image processing method for endoscopic images according to an embodiment of the present application can be applied to Figure 1 The endoscope device shown includes: a camera, a camera host, and a display.
[0100] A camera, used to collect endoscopic images; wherein the camera can transmit the collected endoscopic images to a camera host via a video line;
[0101] A camera host, for performing channel separation based on a first color domain on an endoscopic image containing blood vessels acquired by an endoscopic device, and obtaining a candidate image of a first target channel in the first color domain; performing binarization processing on the candidate image according to gradient information of pixel points in the candidate image, obtaining a blood vessel edge region in the candidate image, and performing noise reduction processing on the blood vessel edge region to obtain first image data corresponding to the candidate image; determining edge pixel points from the candidate image according to the first image data, and performing contrast enhancement processing on the edge pixel points to obtain second image data corresponding to the candidate image; and fusing the second image data with pixel values of each pixel point in at least one reference image corresponding to the endoscopic image to generate a target endoscopic image after fusion processing;
[0102] A display is used to display the target endoscope image.
[0103] In addition, another optional application scenario of the embodiment of the present application is as follows: Figure 2 As shown, it includes an endoscope device 20 and a server 21;
[0104] Among them, an image processing method for endoscopic images in an embodiment of the present application can be applied to an endoscopic device 20 and a server 21, and wired and / or wireless transmission can be performed between the endoscopic device 20 and the server 21.
[0105] The endoscope device 20 is used to obtain an endoscope image, send the endoscope image to the server 21, and display the received target image;
[0106] The server 21 is used to perform channel separation based on a first color gamut on an endoscopic image containing blood vessels acquired by an endoscopic device, and obtain a candidate image of a first target channel in the first color gamut; binarize the candidate image based on gradient information of pixel points in the candidate image to obtain a blood vessel edge region in the candidate image, and perform noise reduction on the blood vessel edge region to obtain first image data corresponding to the candidate image; determine edge pixel points from the candidate image based on the first image data, and perform contrast enhancement on the edge pixel points to obtain second image data corresponding to the candidate image; fuse the second image data with the pixel values of each pixel point in at least one reference image corresponding to the endoscopic image to generate a target endoscopic image after the fusion processing; and send the target endoscopic image to the endoscopic device 20.
[0107] In the embodiment of the present application, the server 21 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, cloud functions, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.
[0108] Of course, the method provided in the embodiment of the present application is not limited to Figure 1 or Figure 2 The application scenario shown can also be used in other possible application scenarios, which are not limited in the embodiments of the present application.
[0109] like Figure 3 As shown, a flowchart of an image processing method for endoscopic images according to an embodiment of the present application is shown, and the specific steps are as follows:
[0110] Step S301: performing channel separation based on a first color gamut on an endoscopic image containing a blood vessel acquired by an endoscopic device to obtain a candidate image of a first target channel in the first color gamut;
[0111] In the embodiment of the present application, the endoscopic image collected by the endoscopic device is an image corresponding to the first color gamut.
[0112] For example, an endoscopic image containing blood vessels such as Figure 4 shown.
[0113] It should be noted that the first color gamut in the embodiment of the present application can be any one of the RGB color gamut, the HSV color gamut, the YUV color gamut and the Gray color gamut, and the present application does not impose any limitation on this.
[0114] In implementation, if the first color gamut is the RGB color gamut, the target channel is the G channel.
[0115] In an embodiment of the present application, for an endoscopic image collected by an endoscopic device, RGB channels of the endoscopic image are separated based on the RGB color gamut to obtain a candidate image of the G channel in the RGB channel.
[0116] like Figure 5 As shown, a schematic diagram of channel separation for a first color gamut is provided in an embodiment of the present application. By performing channel separation on an endoscopic image based on the RGB color gamut, images of the R channel, G channel, and B channel are obtained respectively, wherein the G channel is used as the first target channel.
[0117] It should be noted that, according to experiments, the contrast between hypoxic blood and hyperxic blood is most obvious in the G channel, and it is easier to distinguish the location of blood vessels. Therefore, in order to obtain an image that can clearly display blood vessels, the embodiment of the present application obtains a candidate image for the G channel in the endoscopic image.
[0118] Step S302: binarize the candidate image according to the gradient information of the pixel points in the candidate image to obtain the blood vessel edge region in the candidate image, and perform noise reduction on the blood vessel edge region to obtain first image data corresponding to the candidate image;
[0119] like Figure 6 As shown, a flowchart of an embodiment of the present application for obtaining an edge region in a candidate image, the specific steps are as follows:
[0120] Step S601: for any pixel in the candidate image, determine the gradient information of the pixel according to the brightness information of its neighboring pixels;
[0121] In the embodiment of the present application, the gradient information of any pixel point in the candidate image is determined by formula 1.
[0122] Optionally, in the embodiment of the present application, the gradient information may include a gradient value, and the brightness information may include a brightness value.
[0123]
[0124] Among them, GD ij represents the gradient value of the pixel at coordinate (i, j) in the candidate image; p i,j represents the brightness value of the pixel at coordinate (i, j) in the candidate image; p i-1,j 、p i+1,j 、p i,j-1 and p i,j+1 Represents pixel p i,j The brightness value of the neighboring pixels.
[0125] For example, the position diagram of pixel (i, j) and its neighboring pixels is as follows: Figure 7 shown.
[0126] It should be noted that the brightness value in the embodiment of the present application may be the pixel value of a pixel point.
[0127] Optionally, the embodiment of the present application may also determine the gradient information of the pixel point through Sobel algorithm filtering and Laplace filtering.
[0128] Step S602: The region where the pixels in the candidate image whose gradient information is greater than a preset gradient threshold are located is taken as the blood vessel edge region in the candidate image.
[0129] In the embodiment of the present application, the pixels in the candidate image are binarized using Formula 2.
[0130]
[0131] Wherein, T represents the preset gradient threshold;
[0132] G_gd ij =0,if GD ij ≤T means that when the gradient value of the pixel at the coordinate (i, j) is judged to be not greater than the preset gradient threshold, the pixel value of the pixel at the coordinate (i, j) is assigned to 0, where G_gd ij Represents the pixel value after the pixel point at coordinates (i, j) is assigned;
[0133] G_gd ij =1,if GD ij >T means that when the gradient value of the pixel at the coordinate (i, j) is greater than the preset gradient threshold, the pixel value of the pixel at the coordinate (i, j) is assigned to 1, where G_gd ijRepresents the pixel value after the pixel at coordinates (i, j) is assigned.
[0134] By processing the pixels in the candidate image through formula 2, the pixels whose gradient information is greater than the preset gradient threshold can be screened out, and the area where the pixels whose gradient information is greater than the preset gradient threshold are located is used as the blood vessel edge area in the candidate image.
[0135] The embodiment of the present application is based on determining the blood vessel edge region in the candidate image and performing noise reduction processing on the blood vessel edge region to obtain first image data corresponding to the candidate image.
[0136] Optionally, the embodiment of the present application performs a mean filtering process on the brightness information of each pixel point in the blood vessel edge region, performs a noise reduction process on the blood vessel edge region, and obtains the first image data after the noise reduction process.
[0137] In practice, the present application can perform noise reduction processing on the edge area of the blood vessel according to step A1-step A2:
[0138] Step A1, identifying noise points in the blood vessel edge region by performing mean filtering on the blood vessel edge region in the candidate image after binarization processing;
[0139] For example, the present application calculates the pixel points of the edge area of the blood vessels in the candidate image. The noise points in the blood vessel edge area are identified based on the results.
[0140] Among them, f i,j Represents the mean filter parameter; G_gd ij Indicates the pixel value of the pixel in the blood vessel edge area.
[0141] The embodiment of the present application performs mean filtering on the pixel points in the sliding window according to the mean filter parameters.
[0142] It should be noted that G_gd ij is the pixel value after assignment obtained in formula 2.
[0143] For example, in the embodiment of the present application, the mean filter parameter f can be
[0144] For example, taking the pixel point at the pixel position (1,1) as an example, according to the mean filter parameter f 1,1 (For example, 0.5 at (1,1) in the f matrix form), the pixel points in the sliding window centered at the pixel point position (1,1) are subjected to mean filtering, where the size of the sliding window can be 3*3. Based on the cumulative sum of the calculation results of each pixel point in the sliding window, it is identified whether it is a noise point in the edge area of the blood vessel.
[0145] In implementation, if The pixel point is then identified as a noise point in the blood vessel edge area.
[0146] Step A2: performing noise reduction processing on noise points in the edge area of the blood vessel.
[0147] In the embodiment of the present application, the noise points in the edge area of the blood vessel are subjected to noise reduction processing by using Formula 3.
[0148]
[0149] Where, f represents the mean filter parameter;
[0150] Indicates that the pixel is a noise point, and the pixel value of the pixel is assigned to 0;
[0151] Indicates that the pixel is not a noise point, and the pixel value of the pixel is assigned 1.
[0152] Based on step A1 and step A2, the vascular edge region in the candidate image is subjected to noise reduction processing to obtain first image data corresponding to the candidate image after noise reduction processing.
[0153] Step S303: determining edge pixels from the candidate image according to the first image data, and performing contrast enhancement processing on the edge pixels to obtain second image data corresponding to the candidate image;
[0154] like Figure 8 As shown, a flowchart of contrast enhancement processing of edge pixels in an embodiment of the present application is shown, and the specific steps are as follows:
[0155] Step S801: According to the first image data, determine the pixel points in the candidate image whose gradient information is greater than a preset gradient threshold as edge pixels;
[0156] In the embodiment of the present application, edge pixels in the candidate image are determined according to Formula 4;
[0157] G denoise_new =G*G denoise ——Formula 4
[0158] Among them, G represents the pixel point in the candidate image, G denoise represents the pixel value obtained after the pixel point in the first image data is subjected to noise reduction processing, G denoise_new Represents the pixel points after operation in the candidate image;
[0159] It should be noted that G denoise is determined according to formula 3, then the obtained G denoise_newPixels with non-zero values are edge pixels.
[0160] In the embodiments of the present application, since the gradient of the pixel is judged in Formula II, the edge pixels determined in the obtained first image data are pixels with a gradient greater than the preset gradient threshold. These pixels are basically at the image edge. By increasing the contrast of such pixels in step S802, the purpose of enhancing blood vessels can be achieved, and at the same time, noise is avoided.
[0161] Specific operations for contrast enhancement processing are as follows:
[0162] Step S802: Based on the piecewise histogram and the brightness values corresponding to the edge pixels in the first image data, perform contrast enhancement processing on the edge pixels;
[0163] In the embodiments of the present application, contrast enhancement processing is performed on the edge pixels in the candidate image through Formula V:
[0164]
[0165] Among them, G new represents the brightness value of the pixel in the second image data after enhancement processing; T1 and T2 represent pixel brightness thresholds, which are determined by the actual endoscope application environment; N is the total number of pixels with brightness values in the range of [T1, T2]; cum() represents the accumulation function;
[0166] G denoise_new is determined according to Formula IV;
[0167] G denoise_new , if G denoise_new < T1 and G denoise_new , if G denoise_new > T2 means
[0168] For the edge pixels in the candidate image with brightness values less than T1 or the edge pixels in the candidate image with brightness values greater than T2, the brightness values of the edge pixels remain unchanged;
[0169] if T1 ≤ G denoise_new ≤ T2 means the candidate
[0170] For the edge pixels in the candidate image with brightness values not less than T1 and less than T2, the pixel values of the edge pixels with brightness values in the range of [T1, G denoise_new are accumulated through cum(G denoise_new ), that is, the sum of the pixel values of all edge pixels in the range of [T1, G denoise_new is determined, and through Multiply the sum of the determined pixels and add the brightness value of the pixel to G new Assign a value.
[0171] It should be noted that the present application can adjust the segmentation method in the segmented histogram. When the usage scenarios are rich, the segmentation threshold can be adjusted, and the adjustment method can be controlled by the acquired blood vessel pixel brightness range.
[0172] Step S304, fusing the second image data with the pixel values of each pixel point in at least one reference image corresponding to the endoscopic image, and generating and displaying a target endoscopic image after the fusion processing;
[0173] Wherein, at least one reference image is obtained by separating the endoscopic image based on the second color gamut.
[0174] like Fig. 9 As shown, a flowchart of determining a reference image corresponding to an endoscopic image in an embodiment of the present application, the specific steps are as follows:
[0175] Step S901, converting the endoscopic image into a candidate endoscopic image in a second color gamut;
[0176] Wherein, when the second color gamut is the HSV color gamut, it includes an H channel, an S channel, and a V channel;
[0177] Optionally, the second color gamut in the embodiment of the present application may be any one of the YUV color gamut, the Gray color gamut and the RGB color gamut in addition to the HSV color gamut, and the present application does not impose any limitation on this.
[0178] Among them, the second color gamut and the first color gamut in the embodiment of the present application may be the same as or different from each other.
[0179] The embodiment of the present application obtains the candidate endoscopic image of the second color domain through Formula 6:
[0180]
[0181] Among them, H represents the value corresponding to the H channel in the candidate endoscopic image; S represents the value corresponding to the S channel in the candidate endoscopic image; V represents the value corresponding to the V channel in the candidate endoscopic image; max represents the maximum value of the values corresponding to r, g, and b of the pixel point; min represents the minimum value of the values corresponding to r, g, and b of the pixel point; r represents the pixel value corresponding to the pixel point in the r channel; g represents the pixel value corresponding to the pixel point in the g channel; b represents the pixel value corresponding to the pixel point in the b channel.
[0182] The embodiment of the present application performs color gamut conversion on each pixel in the endoscopic image based on Formula 6 to obtain a candidate endoscopic image of the second color gamut.
[0183] Step S902 performs channel separation on the candidate endoscopic image based on the second color gamut, and obtains reference images of each channel in the second color gamut corresponding to the endoscopic image.
[0184] Exemplarily, the present application can use OpenCV to perform channel separation on the candidate endoscopic image based on the HSV color gamut to obtain reference images of the V channel, S channel, and H channel, respectively.
[0185] like Fig.10 As shown, a schematic diagram of channel separation of the second color gamut is provided in an embodiment of the present application. By performing channel separation on the candidate endoscopic image based on the HSV color gamut, reference images of the V channel, S channel and H channel are obtained respectively.
[0186] like Fig.11 As shown, a flowchart of determining a target endoscopic image in an embodiment of the present application, the specific steps are as follows:
[0187] Step S1101, weighting the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image; fusing the second image data and the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image after the weighting process according to a preset first fusion coefficient, to obtain enhanced third image data corresponding to the V channel;
[0188] Optionally, the embodiment of the present application performs weighted processing on the pixel value of each pixel point according to the weight coefficient corresponding to each pixel point in the reference image of the V channel.
[0189] In the implementation, in the embodiment of the present application, the pixel value of each pixel point in the reference image of the V channel corresponding to the endoscopic image is weighted by formula 7:
[0190] V′=D′*V——Formula 7
[0191] Wherein, V′ represents the pixel value of each pixel point in the reference image of the V channel corresponding to the weighted endoscopic image; V represents the pixel value of each pixel point in the reference image of the V channel corresponding to the endoscopic image, which is obtained by Formula 6;
[0192] Optionally, in the embodiment of the present application, for any pixel point in the reference image of the V channel, a weight coefficient corresponding to the pixel point is determined according to data corresponding to the pixel point in the first image data;
[0193] Determine the weight coefficient corresponding to the pixel point according to the following formula eight:
[0194] D=(1-G denoise )+m*G denoise ——Formula 8
[0195] Wherein, D is the weight coefficient G corresponding to the pixel point denoise is the data corresponding to the pixel point in the first image data, and m is a preset value.
[0196] It should be noted that m can also be the fusion ratio coefficient ω.
[0197] Based on the pixel values of each pixel point in the reference image of the V channel corresponding to the weighted endoscopic image determined by the above formula seven, the second image data and the pixel values of each pixel point in the reference image of the V channel corresponding to the weighted endoscopic image are fused according to the preset first fusion coefficient to obtain the enhanced third image data corresponding to the V channel.
[0198] In the implementation, in the embodiment of the present application, the fusion processing is performed by formula nine:
[0199] V new =(1-ω)*G new +V′——Formula 9
[0200] Among them, V new represents the third image data corresponding to the enhanced V channel; G new represents the second image data; V′ represents the pixel value of each pixel point in the reference image of the V channel corresponding to the weighted endoscopic image; ω represents the fusion ratio coefficient.
[0201] It should be noted that the fusion ratio coefficient in the embodiment of the present application can be changed according to the actual scenario, and can also be adaptively acquired according to the intensity of the change.
[0202] In an embodiment of the present application, the enhanced area obtained in the second image data is fused with the reference image of the V channel after weighted processing through a certain weight, which not only retains the characteristics of the endoscopic image but also provides an enhancement effect on the image.
[0203] Based on the above process, the embodiment of the present application obtains the third image data corresponding to the enhanced V channel.
[0204] Step S1102, determine the second fusion coefficient according to the pixel value of each pixel point in the reference image of the V channel corresponding to the third image data and the endoscopic image, and process the pixel value of each pixel point in the reference image of the S channel corresponding to the endoscopic image according to the second fusion coefficient to obtain the fourth image data corresponding to the S channel.
[0205] In implementation, the embodiment of the present application processes the pixel value of each pixel point in the reference image of the S channel corresponding to the endoscopic image according to Formula 10:
[0206] S new=1-(1-S)*λ——Formula 10
[0207] Among them, S new represents the processed pixel value; S represents the pixel value of a pixel point in the reference image of the S channel corresponding to the endoscopic image; λ represents the second fusion coefficient;
[0208] in, V new represents data corresponding to a pixel in the third image data; V represents the pixel value of a pixel in the reference image of the V channel.
[0209] The embodiment of the present application determines an image obtained by fusing the second image data with the reference image of the S channel, and fuses the enhanced area obtained in the second image data with the reference image of the S channel to ensure consistency in saturation changes.
[0210] Based on the above process, the embodiment of the present application obtains an image after the second image data is fused with the reference image of the S channel.
[0211] Step S1103: Fuse the third image data, the fourth image data, and the candidate image of the second target channel in the first color domain corresponding to the endoscopic image to generate and display a target endoscopic image after the fusion process.
[0212] The second target channel may be an H channel.
[0213] Optionally, the embodiment of the present application fuses the third image data, the fourth image data, and the candidate image of the second target channel in the first color domain corresponding to the endoscopic image through OpenCV.
[0214] In the embodiment of the present application, a target image is generated after the endoscopic image is processed based on the above process.
[0215] Among them, the target image can be an image corresponding to the HSV color gamut, and the embodiment of the present application can convert the target image into an image corresponding to the RGB color gamut.
[0216] Optionally, the embodiment of the present application converts the target image into the RGB color gamut by using Formula 10:
[0217] (R, G, B) = ((R′+m)×255, (G′+m)×255, (B′+m)×255)
[0218] ——Formula 10
[0219] Where (R, G, B) represents the target image in the RGB color gamut; m = V new -C, C = V new ×S new ; Vnew represents the third image data; S new represents fourth image data;
[0220] R', G' and B' are determined according to the following formula 11:
[0221]
[0222] in, C=V new ×S new ; H represents the pixel value of the pixel point in the candidate image of the second target channel; mod represents the modulo operation.
[0223] The target image obtained in the embodiment of the present application is as follows: Fig.12 As shown, the blood vessels displayed in the target image have a more obvious display effect.
[0224] Optional, such as Fig.13 As shown, an overall flow chart of determining a target image in an embodiment of the present application, the specific steps are as follows:
[0225] Step S1301: Obtain an image to be processed.
[0226] The images to be processed include endoscopic images.
[0227] Step S1302: Separate the RGB channels of the image to be processed.
[0228] Get the R channel, G channel, and B channel respectively.
[0229] Step S1303: Calculate a gradient map for the G channel.
[0230] Step S1304: determine the gradient and determine the edge area based on the pixel points whose gradient is greater than a preset gradient threshold.
[0231] Therein, the blood vessel edge region in the candidate image is obtained.
[0232] Optionally, in the embodiment of the present application, a new image data containing only the edge area can be obtained, and the new image data can be expressed as G_gd.
[0233] Step S1305: Perform median filtering on the edge area.
[0234] In the embodiment of the present application, noise points in the new image data are removed by performing median filtering on the new image data.
[0235] Step S1306: Obtain the denoised edge region.
[0236] Herein, the first image data after noise reduction processing is obtained.
[0237] The obtained first image data may be expressed as G_denoise.
[0238] Step S1307: determine edge pixels according to the position of the edge area.
[0239] Among them, edge pixels in the candidate image are obtained.
[0240] Optionally, the edge pixel points obtained in the embodiment of the present application may be in an image data, and the present application may also refer to the image data as new image data of interest.
[0241] Among them, the new interest graph data can be expressed as G_denoise_new.
[0242] Step S1308, enhancing edge pixels by segmented histogram to obtain an enhanced image;
[0243] Optionally, the embodiment of the present application uses segmented histogram equalization to enhance the new graph of interest data.
[0244] Among them, the obtained image can be expressed as G_new.
[0245] Step S1309: perform HSV channel separation on the image to be processed.
[0246] During implementation, an H channel, an S channel and a V channel are obtained.
[0247] Step S1310: weighted fusion is performed on the S channel, V channel and enhanced image data respectively.
[0248] Optionally, the embodiment of the present application obtains an image obtained by fusing the S channel and the enhanced image, and an image obtained by fusing the V channel and the enhanced image.
[0249] The image obtained by fusing the S channel and the enhanced image can be expressed as S_new; and the image obtained by fusing the V channel and the enhanced image can be expressed as V_new.
[0250] Step S1311, fuse the image data after the H channel, the S channel and the enhanced image fusion processing, and the image data after the V channel and the enhanced image fusion processing.
[0251] Among them, the fused image can be expressed as HSV_new.
[0252] Step S1312: Perform color gamut conversion on the fused image data to obtain an image in the RGB color gamut.
[0253] Among them, a target endoscopic image is obtained.
[0254] For the convenience of description, the above parts are divided into modules according to their functions and described separately. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software or hardware.
[0255] Those skilled in the art will appreciate that various aspects of the present application may be implemented as a system, method or program product. Therefore, various aspects of the present application may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to as "circuit", "module" or "system" herein.
[0256] Regarding the device in the above embodiment, the specific execution mode of each module therein has been described in detail in the embodiment of the method, and will not be elaborated here.
[0257] Based on the same inventive concept, an embodiment of the present application provides an image processing device for endoscopic images. The principle of solving the problem by the device is similar to the method of the above embodiment. Therefore, the implementation of the device can refer to the implementation of the above method, and the repeated parts will not be repeated.
[0258] like Fig.14 As shown, an image processing device 1400 for endoscopic images provided in an embodiment of the present application includes an acquisition module 1401 , a noise reduction module 1402 , an enhancement module 1403 and a fusion module 1404 .
[0259] An acquisition module 1401 is used to perform channel separation based on a first color gamut on an endoscopic image containing a blood vessel acquired by an endoscopic device, and acquire a candidate image of a first target channel in the first color gamut;
[0260] A noise reduction module 1402 is used to perform binarization processing on the candidate image according to gradient information of pixel points in the candidate image to obtain a blood vessel edge region in the candidate image, and perform noise reduction processing on the blood vessel edge region to obtain first image data corresponding to the candidate image;
[0261] An enhancement module 1403 is used to determine edge pixels from the candidate image according to the first image data, and perform contrast enhancement processing on the edge pixels to obtain second image data corresponding to the candidate image;
[0262] The fusion module 1404 is used to fuse the second image data with the pixel values of each pixel point in at least one reference image corresponding to the endoscopic image, and generate and display the target endoscopic image after the fusion processing; wherein, the at least one reference image is obtained by separating the endoscopic image based on the second color domain.
[0263] In a possible embodiment, the noise reduction module 1402 is specifically used for:
[0264] For any pixel in the candidate image, determine the gradient information of the pixel according to the brightness information of the neighboring pixels of the pixel;
[0265] The area where the pixel points whose gradient information in the candidate image is greater than a preset gradient threshold are located is taken as the edge area in the candidate image.
[0266] In a possible embodiment, the noise reduction module 1402 is specifically used for:
[0267] Identifying noise points in the blood vessel edge region by performing mean filtering on the blood vessel edge region in the candidate image after binarization processing;
[0268] Noise reduction processing is performed on the noise points in the blood vessel edge area.
[0269] In a possible embodiment, the enhancement module 1403 is specifically used to:
[0270] According to the first image data, determining pixels in the candidate image whose gradient information is greater than a preset gradient threshold as edge pixels;
[0271] Based on the segmented histogram and the brightness values corresponding to the edge pixels in the first image data, contrast enhancement processing is performed on the edge pixels.
[0272] In a possible embodiment, the endoscopic image collected by the endoscopic device is an image corresponding to the first color gamut;
[0273] Determine the reference image corresponding to the endoscopic image in the following manner:
[0274] converting the endoscopic image into a candidate endoscopic image in a second color domain;
[0275] Channel separation is performed on the candidate endoscopic image based on the second color gamut, and reference images of each channel in the second color gamut corresponding to the endoscopic image are obtained.
[0276] In a possible embodiment, the first color gamut is an RGB color gamut, and the second color gamut is an HSV color gamut; the fusion module 1404 is specifically configured to:
[0277] Performing weighted processing on the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image; fusing the second image data and the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image after the weighted processing according to a preset first fusion coefficient, to obtain enhanced third image data corresponding to the V channel;
[0278] determining a second fusion coefficient according to the third image data and the pixel value of each pixel point in the reference image of the V channel corresponding to the endoscopic image, and processing the pixel value of each pixel point in the reference image of the S channel corresponding to the endoscopic image according to the second fusion coefficient to obtain fourth image data corresponding to the S channel;
[0279] The third image data, the fourth image data, and a candidate image of a second target channel in a first color domain corresponding to the endoscopic image are fused to generate and display a target endoscopic image after the fusion process.
[0280] In a possible embodiment, the acquisition module 1401 is specifically used to:
[0281] For any pixel point in the reference image of the V channel, determine a weight coefficient corresponding to the pixel point according to data corresponding to the pixel point in the first image data;
[0282] According to the weight coefficient corresponding to each pixel point in the reference image of the V channel, the pixel value of each pixel point is weighted.
[0283] In a possible embodiment, the weight coefficient corresponding to the pixel point is determined according to the following formula:
[0284] D=(1-G denoise )+m*G denoise ;
[0285] Wherein, D is the weight coefficient corresponding to the pixel point, G denoise is the data corresponding to the pixel point in the first image data, and m is a preset value.
[0286] In a possible embodiment, the acquisition module 1401 is specifically used to:
[0287] S new =1-(1-S)*λ;
[0288] Where λ = V new / V, S is the pixel value of a pixel in the reference image of the S channel corresponding to the endoscopic image, S newis the processed pixel value, λ is the second fusion coefficient, V new is the data corresponding to the one pixel in the third image data, and V is the pixel value of the one pixel in the reference image of the V channel.
[0289] Based on the same inventive concept as the above-mentioned method embodiment, an electronic device is also provided in the embodiment of the present application. The principle of solving the problem by the electronic device is similar to the method of the above-mentioned embodiment. Therefore, the implementation of the electronic device can refer to the implementation of the above-mentioned method, and the repeated parts will not be repeated.
[0290] Refer to the following Fig.15 The electronic device 150 according to this embodiment of the present application is described. Fig.15 The electronic device 150 is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0291] like Fig.15 The electronic device 150 is in the form of a general electronic device. The components of the electronic device 150 may include but are not limited to: at least one processing unit 151, at least one storage unit 152, and a bus 153 connecting different system components (including the storage unit 152 and the processing unit 151).
[0292] Bus 153 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a processor, or a local bus using any of a variety of bus architectures.
[0293] The storage unit 152 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1521 and / or a cache memory 1522 , and may further include a read-only memory (ROM) 1523 .
[0294] The storage unit 152 may also include a program / utility 1515 having a set (at least one) of program modules 1524, such program modules 1524 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0295] The electronic device 150 may also communicate with one or more external devices 154 (e.g., keyboards, pointing devices, etc.), may also communicate with one or more devices that enable objects to interact with the electronic device 150, and / or communicate with any device that enables the electronic device 150 to communicate with one or more other electronic devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 155. Furthermore, the electronic device 150 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 156. As shown, the network adapter 156 communicates with other modules for the electronic device 150 via a bus 153. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 150, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0296] Based on the same inventive concept as the above-mentioned method embodiments, various aspects of the image processing method for endoscopic images provided in the present application can also be implemented in the form of a program product, which includes a program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps performed in the image processing method for endoscopic images according to various exemplary embodiments of the present application described above in this specification.
[0297] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0298] 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.
[0299] 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.
[0300] 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.
[0301] 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 in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0302] 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. An image processing method for endoscopic images, characterized in that: include: For an endoscopic image containing a blood vessel acquired by an endoscopic device, channel separation is performed based on a first color gamut to obtain a candidate image of a first target channel in the first color gamut; Binarizing the candidate image according to the gradient information of the pixel points in the candidate image to obtain the blood vessel edge region in the candidate image, and performing noise reduction on the blood vessel edge region to obtain first image data corresponding to the candidate image; According to the first image data, edge pixels are determined from the candidate image, and contrast enhancement processing is performed on the edge pixels to obtain second image data corresponding to the candidate image; The second image data is fused with the pixel values of each pixel point in at least one reference image corresponding to the endoscopic image to generate and display a target endoscopic image after the fusion process; wherein, the at least one reference image is obtained by separating the endoscopic image based on a second color domain.
2. The method according to claim 1, characterized in that The step of performing binarization processing on the candidate image according to the gradient information of the pixel points in the candidate image to obtain the blood vessel edge region in the candidate image includes: For any pixel in the candidate image, determine the gradient information of the pixel according to the brightness information of the neighboring pixels of the pixel; The area where the pixel points whose gradient information in the candidate image is greater than a preset gradient threshold are located is taken as the edge area in the candidate image.
3. The method according to claim 1, characterized in that The performing noise reduction processing on the edge area of the blood vessel comprises: Identifying noise points in the blood vessel edge region by performing mean filtering on the blood vessel edge region in the candidate image after binarization processing; Noise reduction processing is performed on the noise points in the blood vessel edge area.
4. The method according to claim 1, characterized in that: The step of determining edge pixels from the candidate image according to the first image data and performing contrast enhancement processing on the edge pixels includes: According to the first image data, determining pixels in the candidate image whose gradient information is greater than a preset gradient threshold as edge pixels; Based on the segmented histogram and the brightness values corresponding to the edge pixels in the first image data, contrast enhancement processing is performed on the edge pixels.
5. The method according to any one of claims 1 to 4, characterized in that: The endoscopic image collected by the endoscopic device is an image corresponding to the first color gamut; Determine the reference image corresponding to the endoscopic image in the following manner: converting the endoscopic image into a candidate endoscopic image in a second color domain; Channel separation is performed on the candidate endoscopic image based on the second color gamut, and reference images of each channel in the second color gamut corresponding to the endoscopic image are obtained.
6. The method according to claim 5, characterized in that The first color gamut is an RGB color gamut, and the second color gamut is an HSV color gamut; The step of fusing the second image data with the pixel values of each pixel point in at least one reference image corresponding to the endoscopic image to generate and display a target endoscopic image after the fusion process comprises: Performing weighted processing on the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image; fusing the second image data and the pixel values of each pixel point in the reference image of the V channel corresponding to the endoscopic image after the weighted processing according to a preset first fusion coefficient, to obtain enhanced third image data corresponding to the V channel; determining a second fusion coefficient according to the third image data and the pixel value of each pixel point in the reference image of the V channel corresponding to the endoscopic image, and processing the pixel value of each pixel point in the reference image of the S channel corresponding to the endoscopic image according to the second fusion coefficient to obtain fourth image data corresponding to the S channel; The third image data, the fourth image data, and a candidate image of a second target channel in a first color domain corresponding to the endoscopic image are fused to generate and display a target endoscopic image after the fusion process.
7. The method according to claim 6, characterized in that The weighted processing of the pixel value of each pixel point in the reference image of the V channel corresponding to the endoscopic image includes: For any pixel point in the reference image of the V channel, determine a weight coefficient corresponding to the pixel point according to data corresponding to the pixel point in the first image data; According to the weight coefficient corresponding to each pixel point in the reference image of the V channel, the pixel value of each pixel point is weighted.
8. The method according to claim 7, characterized in that The weight coefficient corresponding to the pixel point is determined according to the following formula: D=(1-G denoise )+m*G denoise ; Wherein, D is the weight coefficient corresponding to the pixel point, G denoise is the data corresponding to the pixel point in the first image data, and m is a preset value.
9. The method according to claim 6, characterized in that The pixel value of each pixel point in the reference image of the S channel corresponding to the endoscopic image is processed according to the following formula: S new =1-(1-S)*λ; Where λ = V new / V, S is the pixel value of a pixel in the reference image of the S channel corresponding to the endoscopic image, S new is the processed pixel value, λ is the second fusion coefficient, V new is the data corresponding to the one pixel in the third image data, and V is the pixel value of the one pixel in the reference image of the V channel.
10. An endoscope device, characterized in that: Including camera, camera host, display screen: The camera is used to collect endoscopic images containing blood vessels; The camera host is used to perform channel separation based on a first color gamut on an endoscopic image containing blood vessels acquired by an endoscopic device, and obtain a candidate image of a first target channel in the first color gamut; perform binarization processing on the candidate image according to gradient information of pixel points in the candidate image, obtain a blood vessel edge region in the candidate image, and perform noise reduction processing on the blood vessel edge region to obtain first image data corresponding to the candidate image; determine edge pixel points from the candidate image according to the first image data, and perform contrast enhancement processing on the edge pixel points to obtain second image data corresponding to the candidate image; Fusing the second image data with the pixel values of each pixel point in at least one reference image corresponding to the endoscopic image to generate a target endoscopic image after fusion processing; wherein the at least one reference image is obtained by separating the endoscopic image based on a second color gamut; The display is used to display the target endoscopic image after fusion processing.
Citation Information
Cited By
Endoscope image optimization method and device, storage medium and electronic equipment
CN122115268A