Endoscopic image processing method and device

By calculating the brightness information and gradient values ​​of the endoscopic image, the area of ​​interest is determined and the brightness is enhanced, which solves the problem of blurred endoscopic images and improves image clarity and detail presentation.

CN118628362BActive Publication Date: 2024-10-18PEKING UNIVERSITY FIRST HOSPITAL (PEKING UNIVERSITY FIRST CLINICAL MEDICAL COLLEGE)
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411104806.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-10-18
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

Images collected by endoscopic equipment are blurred due to interference from body fluids or gases and uneven lighting, resulting in loss of inspection details.

Method used

By obtaining the brightness information of the endoscopic image, constructing the neighborhood window and direction, and calculating the gradient value and brightness uniformity value of each pixel, the area of ​​interest is determined and brightness enhancement is performed.

Benefits of technology

It improves the clarity of endoscopic images, ensures accurate presentation of details, and avoids the problem of excessive or insufficient regional enhancement caused by overall brightness enhancement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628362B_ABST
    Figure CN118628362B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of medical image processing technology, and discloses an endoscopic image processing method and device, the method comprising: obtaining the brightness information of the endoscopic image to obtain a corresponding brightness image; constructing a neighborhood window and a neighborhood direction for the pixel points in the brightness image; for each pixel point in the brightness image, obtaining the gradient value of the pixel point in the neighborhood direction with the largest brightness change within the neighborhood window of the pixel point, and obtaining the brightness uniformity value of the neighborhood window of the pixel point; determining a region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point; and performing brightness enhancement processing on the region of interest. The present invention first identifies the region of interest in the endoscopic image, and then performs targeted brightness enhancement on the region of interest, thereby improving the clarity of the region of interest and ensuring the presentation of image details.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of medical image processing, and in particular to an endoscopic image processing method and device. Background Art

[0002] Endoscopic equipment is a medical device that enters the body through natural orifices or surgical incisions to directly observe changes in relevant parts. According to the purpose and structure, endoscopy equipment can be divided into many types, including but not limited to gastroscopes, colonoscopes, gastroenteroscopes, cystoscopes, pneumonoscopes, endometroscopes, arthroscopes, thoracoscopes, etc. Each endoscope has its specific purpose and scope of application. Endoscopic equipment is mainly composed of a host (including an image processor, a high-definition display, a cold light source, etc.), a mirror body (such as a capsule endoscope, a gastroscope, a colonoscope, etc.), and peripheral equipment (such as a CO2 gas supply device, an endoscope water supply pump, etc.). The optical system of the endoscope is mainly composed of a light source, an optical fiber bundle, etc. The light source usually uses a cold light source or an LED light source, and transmits light to the image sensor through an optical fiber bundle. The image sensor of the endoscope converts the observed image into an electrical signal, and transmits the image to the display screen through image processing for the doctor to diagnose and treat. In addition, there is a more special endoscopy device, namely a capsule endoscopy device, also known as a smart capsule. The subject orally takes the smart capsule, and then the smart capsule moves in the digestive tract with the help of digestive tract peristalsis. The smart capsule has a built-in high-definition camera and signal transmission device, which can capture images inside the digestive tract and transmit the image data to an external receiver in real time. Doctors use an external image recorder and imaging workstation to view the captured images to understand the digestive tract condition of the subject.

[0003] When using endoscopic equipment (including capsule endoscopy equipment) for examination, the endoscopic image obtained may be blurred due to interference from body fluids or gases in the subject's digestive tract and factors such as uneven lighting, resulting in loss of examination details. Summary of the invention

[0004] In view of this, the present invention provides an endoscopic image processing method and device to solve the problem of blurred endoscopic images acquired by an endoscopic image device.

[0005] In a first aspect, the present invention provides an endoscopic image processing method, the method comprising:

[0006] Acquiring brightness information of the endoscopic image to obtain a corresponding brightness image;

[0007] Constructing a neighborhood window and a neighborhood direction for the pixel points in the brightness image;

[0008] For each pixel in the brightness image, obtain a gradient value of the pixel in the neighborhood window of the pixel in a neighborhood direction where the brightness change is the largest, and obtain a brightness uniformity value of the neighborhood window of the pixel;

[0009] Determining a region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point;

[0010] A brightness enhancement process is performed on the region of interest.

[0011] In an optional implementation, obtaining the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction where the brightness change is the largest includes:

[0012] Obtain a first gradient value in each neighborhood direction of the neighborhood window of the pixel point, where the first gradient value is the sum of the differences in brightness values ​​of two adjacent pixel points in the pixel point in a neighborhood direction;

[0013] The largest first gradient value is used as the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction with the largest brightness change.

[0014] In an optional implementation, obtaining the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction where the brightness change is the largest includes:

[0015] Obtain a first gradient value in each neighborhood direction of the neighborhood window of the pixel point, where the first gradient value in the neighborhood direction is the sum of the differences in brightness values ​​of two adjacent pixel points in the pixel point in the neighborhood direction;

[0016] Obtain second gradient values ​​of all pixel points in each neighborhood direction in the neighborhood window of the pixel point;

[0017] For each neighborhood direction in the neighborhood window of the pixel point, adjusting the first gradient value by using the second gradient value to obtain an adjusted first gradient value;

[0018] The largest first gradient value after adjustment is used as the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point.

[0019] In an optional implementation, the obtaining the brightness uniformity value of the neighborhood window of the pixel point includes:

[0020] Obtaining standard deviations of brightness values ​​of multiple pairs of first segmented areas and second segmented areas; the first segmented areas and the second segmented areas are obtained by dividing the neighborhood window of the pixel point by a straight line passing through the pixel point; and multiple groups of the first segmented areas and the second segmented areas are obtained by dividing the neighborhood window of the pixel point using dividing lines at different angles;

[0021] According to the deviation value between the standard deviations of the brightness values ​​of the target first segmented area and the target second segmented area, the standard deviation of the brightness value of the neighborhood window of the pixel point is corrected to obtain the brightness uniformity value; the target first segmented area and the target second segmented area are a pair of the first segmented area and the second segmented area whose standard deviations of the brightness values ​​are closest.

[0022] In an optional implementation, determining a region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point includes:

[0023] Obtaining a first parameter according to the gradient value;

[0024] Normalizing the brightness uniformity value;

[0025] The difference between the brightness uniformity value obtained by normalization and 1 is used as a second parameter;

[0026] Obtaining a comprehensive parameter according to the first parameter and the second parameter;

[0027] The region of interest is determined from the brightness image according to the comprehensive parameter.

[0028] In an optional implementation manner, obtaining a comprehensive parameter according to the first parameter and the second parameter includes:

[0029] The first parameter and the second parameter are weightedly summed using the brightness value of the pixel to obtain the comprehensive parameter.

[0030] In an optional implementation, determining a region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point includes:

[0031] Obtaining a preset initial seed point in the brightness image;

[0032] For each of the initial seed points, a distance and a comprehensive parameter of a pixel point to be grown outside a current growth region of the initial seed point are obtained, and according to the distance and the comprehensive parameter, whether to add the pixel point to be grown into the current growth region of the initial seed point is determined; the comprehensive parameter includes the gradient value and the brightness uniformity value, or the comprehensive parameter is determined according to the gradient value and the brightness uniformity value; the pixel point to be grown is a pixel point in the brightness image other than the initial seed point;

[0033] The region of interest is determined according to the final current growth region.

[0034] In an optional implementation, the obtaining of the distance and comprehensive parameters of the pixel point to be grown outside the current growth area of ​​the initial seed point, and determining whether to add the pixel point to be grown into the current growth area of ​​the initial seed point according to the distance and the comprehensive parameters, includes:

[0035] Acquire a target pixel point to be grown outside the current growth region, wherein the target pixel point to be grown is the pixel point to be grown within a neighborhood window of an edge pixel point of the current growth region;

[0036] According to the distance of the target pixel point to be grown and the comprehensive parameter, it is determined whether to add the target pixel point to be grown into the current growth area of ​​the initial seed point.

[0037] In an optional implementation, determining whether to add the pixel point to be grown into the current growth area of ​​the initial seed point according to the distance and the comprehensive parameter includes:

[0038] Acquire a first difference between the comprehensive parameter of the pixel point to be grown outside the current growth area and the comprehensive parameter of the initial seed point;

[0039] Acquire a second difference between the brightness value of the pixel point to be grown outside the current growing area and the brightness value of the initial seed point;

[0040] Determine a third parameter according to the first difference, the second difference and the distance; the distance is the distance between the pixel point to be grown outside the current growth area and the initial seed point;

[0041] According to the magnitude relationship between the third parameter and a preset threshold, it is determined whether to add the pixel point to be grown into the current growth area of ​​the initial seed point.

[0042] In a second aspect, the present invention provides an endoscopic image processing device, the device comprising:

[0043] A brightness image acquisition module, used to acquire brightness information of the endoscopic image and obtain a corresponding brightness image;

[0044] A construction module, used to construct a neighborhood window and a neighborhood direction for pixel points in the brightness image;

[0045] A parameter acquisition module, used to obtain, for each pixel in the brightness image, a gradient value of the pixel in the neighborhood window of the pixel in a neighborhood direction where the brightness change is the largest, and obtain a brightness uniformity value of the neighborhood window of the pixel;

[0046] An area of ​​interest determination module, configured to determine an area of ​​interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point;

[0047] The enhancement processing module is used to perform brightness enhancement processing on the region of interest.

[0048] In a third aspect, the present invention provides an endoscopic image processing device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the endoscopic image processing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0049] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the endoscopic image processing method of the first aspect or any corresponding embodiment thereof.

[0050] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the endoscopic image processing method of the first aspect or any corresponding embodiment thereof.

[0051] The endoscopic image processing method and device provided in the embodiment of the present invention identifies the region of interest from the endoscopic image through the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point, and the brightness uniformity value of the neighborhood window of the pixel point, and then performs brightness enhancement on the region of interest. The region of interest identification method provided in the embodiment of the present invention is not only highly accurate, but also has a small amount of calculation, that is, less computing resources are required, and compared with the brightness enhancement of the entire endoscopic image, the embodiment of the present invention can perform balanced brightness enhancement for different regions of interest, avoiding the problem of excessive enhancement of some regions of interest and insufficient enhancement of some regions of interest, thereby improving the clarity of the endoscopic image and ensuring that the details of the endoscopic image can be accurately presented. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0053] Figure 1 is a schematic flow chart of an endoscopic image processing method according to an embodiment of the present invention;

[0054] Figure 2 is a structural block diagram of an endoscopic image processing device according to an embodiment of the present invention;

[0055] Figure 3 It is a schematic diagram of the hardware structure of the endoscopic image processing device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0057] In order to solve the problem of blurred endoscopic images acquired by endoscopic equipment, related technologies use histogram equalization to enhance endoscopic images. However, since histogram equalization is based on the enhancement of the entire image, when there are different disease problems in the endoscopic image, the overall enhancement causes different disease areas to be over-enhanced or under-enhanced.

[0058] According to an embodiment of the present invention, an embodiment of an endoscopic image processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of executable computer instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0059] In this embodiment, an endoscopic image processing method is provided, which can be used for an endoscopic image processing device. The endoscopic image processing device can be other computer devices independent of the endoscopic device, or can be the endoscopic device itself, that is, the endoscopic device has an image processing function. The endoscopic device can be a capsule endoscopic device. For a capsule endoscopic device that does not have an image processing function, a computer device (such as an imaging workstation, etc.) independent of the capsule endoscopic device implements the image processing function. Figure 1is a flow chart of an endoscopic image processing method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0060] Step S101, acquiring brightness information of an endoscopic image to obtain a corresponding brightness image.

[0061] Endoscopic images are images of the body collected by endoscopy equipment, such as images of the inside of the gastrointestinal tract (i.e., images of the digestive tract). There are many types of endoscopy equipment, such as gastroscopy equipment, colonoscopy equipment, and capsule endoscopy equipment. Endoscopic equipment is not limited here. Taking capsule endoscopy equipment as an example, after a patient (or examinee) swallows the capsule endoscopy equipment under the guidance of a doctor, the capsule endoscopy equipment moves along the digestive direction with the movement of the gastrointestinal muscles and captures images of the inside of the gastrointestinal tract. The images of the inside of the gastrointestinal tract are endoscopic images.

[0062] The image collected by the endoscope device is generally an RGB image. In the embodiment of the present invention, the image can be converted to the LAB color space, and then the converted brightness channel is extracted to obtain the brightness image of the endoscope image. Converting the endoscope image to the LAB color space helps to better separate the brightness information and more clearly highlight the brightness details in the endoscope image.

[0063] Step S102: construct a neighborhood window and a neighborhood direction for the pixel points in the brightness image.

[0064] Specifically, for any pixel in an image, the pixel range set in a specific way (such as vertical and horizontal symmetry) with it as the center is called the neighborhood window of the pixel. The neighborhood direction refers to the direction or position relationship of the pixels in its neighborhood window relative to the center pixel.

[0065] For example, in the embodiment of the present invention, for the first pixels, can be The pixel point is the center, and the construction size is The window area is the The neighborhood window of pixels, the neighborhood window radius preset in this embodiment is The neighborhood direction may be eight neighborhood directions, specifically, up, down, left, right, and four diagonal directions.

[0066] Step S103, for each pixel in the brightness image, obtain the gradient value of the pixel in the neighborhood window of the pixel in the neighborhood direction with the largest brightness change, and obtain the brightness uniformity value of the neighborhood window of the pixel.

[0067] Among them, the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point can reflect the gradient difference between the region of interest and the normal region, which helps to identify potential regions of interest. Using the brightness uniformity of the neighborhood window to identify the region of interest can reduce the impact of illumination and improve the accuracy of region of interest identification.

[0068] In some optional specific implementations, in step S103, obtaining the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction with the largest brightness change includes:

[0069] Step S1031, obtaining a first gradient value in each neighborhood direction in the neighborhood window of the pixel point, wherein the first gradient value is the sum of the differences (absolute values) of the brightness values ​​of two adjacent pixel points in the pixel point in a neighborhood direction.

[0070] Specifically, no. The pixel The calculation formula for the first gradient value in the neighborhood direction is:

[0071]

[0072] in, For the The pixel The first gradient value in the neighborhood direction, For the The pixel point in the neighborhood window The neighboring direction Pixels and The difference in brightness of pixels (absolute value), For the The pixel point in the neighborhood window The number of pixels in the neighborhood direction.

[0073] Step S1032: Taking the largest first gradient value as the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction with the largest brightness change.

[0074] Specifically, the calculation formula for the gradient value of the pixel point in the neighborhood direction with the largest brightness change within the neighborhood window of the pixel point is:

[0075]

[0076] in, For the The gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction with the largest brightness change, For the The number of neighborhood directions of pixels in the neighborhood window, For the The pixel point in the neighborhood window The neighboring direction Pixels and The difference in brightness of pixels (absolute value), For the The pixel point in the neighborhood window The number of pixels in the neighborhood direction.

[0077] In some other optional specific implementations, in step S103, obtaining the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction with the largest brightness change includes:

[0078] Step S103a, obtaining a first gradient value in each neighborhood direction in the neighborhood window of the pixel point, wherein the first gradient value in the neighborhood direction is the sum of the difference (absolute value) of the brightness values ​​of two adjacent pixel points in the pixel point in a neighborhood direction; the calculation method of the first gradient value can be found above.

[0079] Step S103b, obtaining the second gradient value of all pixels in each neighborhood direction in the neighborhood window of the pixel point; specifically, the second gradient value is the difference (absolute value) of the brightness values ​​of two adjacent pixels in the neighborhood direction.

[0080] Step S103c: For each neighborhood direction in the neighborhood window of the pixel point, use the second gradient value to adjust the first gradient value to obtain the adjusted first gradient value.

[0081] Step S103d: Using the largest adjusted first gradient value as the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point.

[0082] In an embodiment of the present invention, the first gradient value in a neighborhood direction in the neighborhood window of the pixel point indicates the degree (probability) of the existence of the region of interest for the pixel point in the neighborhood direction in the neighborhood window. Since the overall brightness values ​​of the normal area are similar, the difference in brightness values ​​of adjacent pixels is small, the overall brightness values ​​of the region of interest are different, and the difference in brightness values ​​of adjacent pixels is large. Therefore, the larger the value of the first gradient value, the greater the degree of the existence of the region of interest for the pixel point in the neighborhood direction in the neighborhood window.

[0083] Since the gradient difference between the region of interest and the normal region is large, the maximum first gradient value is used as a measurement standard. The larger the maximum first gradient value, the more likely it is that there is a pixel point in the current direction that is at the boundary between the ulcer region and the normal region. If only the maximum first gradient value is used as the basis for analysis, there is contingency. By comparing the second gradient value of each pixel point in the neighborhood window with the maximum first gradient value, the smaller the difference, the more likely it is that there are pixels in the remaining pixels that belong to the region of interest, and the central pixel point of the neighborhood window is more consistent with the characteristic performance of the region of interest.

[0084] In some specific implementations, step S103c, i.e., adjusting the first gradient value by using the second gradient value for each neighborhood direction in the neighborhood window of the pixel point, specifically includes:

[0085] Step 1: for each neighborhood direction in the neighborhood window of the pixel point, obtain the maximum second gradient value among the second gradient values ​​of all the pixels; specifically, it is expressed by the formula:

[0086]

[0087] in, For the The pixel point in the neighborhood window The neighboring direction The second gradient value of the pixel point, , For the The pixel point in the neighborhood window The maximum second gradient value in the neighborhood direction.

[0088] Step 2: Obtain an average value of the difference between the maximum second gradient value and other second gradient values, where the other second gradient values ​​are second gradient values ​​of other pixel points other than the pixel point in the neighborhood direction; specifically, a calculation formula for the average value may be:

[0089]

[0090] in, For the The pixel point in the neighborhood window The average value of the difference between the maximum second gradient value and other second gradient values ​​in the neighborhood direction, For the The pixel point in the neighborhood window In the neighborhood direction, except for the The number of pixels outside the pixels.

[0091] Step 3: Determine an adjustment factor based on the average value.

[0092] Specifically, determining the adjustment factor according to the average value includes:

[0093] Step 1: normalize the average value; normalization is used to normalize the average value to Specifically, the calculation formula for normalizing the average value can be: ,in, is the normalized average value, which represents the The pixel point in the neighborhood window The gradient evaluation of the pixel point in the neighborhood direction. Specifically, when normalizing the average value, it can be The average values ​​of all neighborhood directions of the pixel points in the neighborhood window are normalized, and the specific normalization method is not limited.

[0094] Step 2: Add 1 to the normalized average value, multiply it by the maximum second gradient value, and adjust the product to The value within the interval; specifically, it can be expressed by the following formula:

[0095]

[0096] in, is the adjusted product, is an exponential function with a natural constant as the base. Used to indicate a negative correlation and adjust the input value to In other specific implementations, other functions or models may be used to implement the above.

[0097] Step 3: Use the adjusted product as the adjustment factor.

[0098] Step 4: Use the adjustment factor to adjust the first gradient value.

[0099] In the embodiment of the present invention, the formula for expressing the maximum first gradient value after adjustment may be:

[0100]

[0101] in, For the The maximum first gradient value among the adjusted first gradient values ​​in each neighborhood direction in the neighborhood window of pixels, For the The pixel in the neighborhood window The adjusted first gradient value in the neighborhood direction, is the maximum value function.

[0102] In the embodiment of the present invention, Indicates The maximum adjusted first gradient value of the pixel in each neighborhood direction in the neighborhood window, yes Adjustment factor, due to the large difference in gradients between the region of interest and the normal region, the maximum first gradient value is used as a criterion. The larger the maximum first gradient value, the more likely it is that there are pixels in the current direction that are at the boundary between the region of interest and the normal region. However, if only the maximum first gradient value is used as the basis for judgment, there is a chance. By comparing the gradient values ​​of the remaining pixels with the maximum gradient value, the smaller the difference, the more likely it is that there are pixels in the region of interest among the remaining pixels. The larger the value of The smaller the value, the more consistent the characteristic performance of the region of interest.

[0103] In an embodiment of the present invention, since the above-mentioned gradient value is the gradient value of the pixel point in the neighborhood direction with the largest brightness change within the neighborhood window of the pixel point, this cannot represent the overall brightness change of the neighborhood window of the pixel point. Therefore, the brightness uniformity of the neighborhood window of the pixel point is added as a basis for judging whether the pixel point belongs to the area of ​​interest.

[0104] In some optional specific implementations, the standard deviation of the neighborhood window of the pixel point can be directly used as the brightness uniformity value.

[0105] In this embodiment, the brightness in the region of interest (e.g., the lesion region) varies significantly, with some regions being darker and other regions being brighter, i.e., the brightness is uneven. The brightness in the normal region is usually relatively uniform, and the overall brightness is high, i.e., the brightness variation in the normal region is relatively small. Therefore, the possibility that the neighborhood window of each pixel point in the brightness image is a normal region can be determined by the brightness uniformity of the neighborhood window of each pixel point.

[0106] In some specific implementations, in step S103, obtaining the brightness uniformity value of the neighborhood window of the pixel point includes:

[0107] Step S103-1, obtaining the standard deviations of the brightness values ​​of multiple pairs of first segmented areas and second segmented areas; the first segmented areas and the second segmented areas are obtained by dividing the neighborhood window of the pixel point by a straight line passing through the pixel point; and multiple groups of the first segmented areas and the second segmented areas are obtained by dividing the neighborhood window of the pixel point using dividing lines at different angles;

[0108] Step S103-2, according to the deviation value between the standard deviations of the brightness values ​​of the target first segmented area and the target second segmented area, correct the standard deviation of the brightness value of the neighborhood window of the pixel point to obtain the brightness uniformity value; the target first segmented area and the target second segmented area are a pair of the first segmented area and the second segmented area whose standard deviations of brightness values ​​are closest.

[0109] In an embodiment of the present invention, the endoscopic device may be affected by light during shooting. When the neighborhood window of a pixel point is at the critical point of light change, half of the area in the neighborhood window of the pixel point may have high brightness and the other half may have low brightness. Therefore, it is necessary to consider the impact of light on the brightness of the neighborhood window of the pixel point.

[0110] Specifically, with the pixel point as the center, starting from the 0 angle and dividing by the preset angle (For example, it can be 1° or 2°) as the step size for traversal. At each traversed angle, a straight line is drawn through the pixel point to divide the neighborhood window of the pixel point into two areas. The two divided areas are respectively recorded as the first divided area and the second divided area of ​​the pixel point, and the straight line is recorded as the dividing line of the pixel point at the dividing angle. The neighborhood window of the pixel point is divided once to obtain the neighborhood window of the pixel point. There are a pair of first segmentation areas and a second segmentation area corresponding to each segmentation line.

[0111] Considering the influence of illumination, the neighborhood window of the pixel point is divided into two areas. By traversing the two areas divided by each segmentation line, the standard deviation of the brightness values ​​of the two areas is compared. The closer the two areas are, the more consistent the brightness of the two areas is. The greater the influence of illumination on the neighborhood window of the pixel point is, the standard deviation of the brightness value of the neighborhood window of the pixel point needs to be calculated. Specifically, the difference between the ratio of the standard deviation of the brightness values ​​of the two regions and 1 can be calculated, and then The function selects the minimum value of the difference to determine the degree to which the neighborhood window of the pixel point is affected by the illumination. Furthermore, the minimum value of the difference can be used as the standard deviation of the brightness value of the neighborhood window of the pixel point. The adjustment factor.

[0112] No. The brightness uniformity value of the neighborhood window of pixels The calculation formula can be:

[0113]

[0114] It can also be expressed as:

[0115] in, For the The standard deviation of the brightness values ​​of the neighborhood window of pixels, For the The number of dividing lines in the neighborhood window of pixels; Indicates The pixel u The standard deviation of the brightness value of the first segmented area segmented by the segmentation line; Indicates The pixel u The standard deviation of the brightness values ​​of the second segmented area segmented by the segmentation line; is the difference between the ratio of the standard deviation of the brightness values ​​of the first target segmented area and the second target segmented area and 1.

[0116] No. The standard deviation of the brightness value of the neighborhood window of pixels Can indicate the The brightness consistency of the neighborhood window of pixels. The smaller the value, the higher the brightness consistency. Can indicate the The possibility that the neighborhood window of pixels is a normal area.

[0117] Step S104, determining a region of interest from the brightness image according to the gradient value and brightness uniformity value of the pixel points;

[0118] There can be one or more regions of interest.

[0119] In some specific implementations, step S104, i.e., determining a region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point, includes:

[0120] Step S1041, obtaining a first parameter according to the gradient value; the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point can be directly used as the first parameter, or it can be further calculated to obtain the first parameter.

[0121] Step S1042, normalizing the brightness uniformity value; the normalization here may be normalizing the brightness uniformity values ​​of the neighborhood windows of all pixels in the brightness image.

[0122] Step S1043: taking the difference between the brightness uniformity value obtained by normalization and 1 as the second parameter.

[0123] Step S1044, obtaining a comprehensive parameter according to the first parameter and the second parameter.

[0124] Step S1045: determining the region of interest from the brightness image according to the comprehensive parameters.

[0125] Specifically, when the endoscopic image is an image of the gastrointestinal tract acquired by an endoscopic device, the first parameter may be called the lesion characteristic expression degree, the second parameter may be called the ulcer influence degree, and the comprehensive parameter may be called the comprehensive lesion characteristic parameter. The comprehensive parameter may be obtained by directly adding the first parameter and the second parameter.

[0126] The calculation formula of the second parameter can be:

[0127]

[0128] in, For the The second parameter of pixels, For the The brightness uniformity value of the neighborhood window of pixels, is a linear normalization function used to normalize the data values ​​to Within the range.

[0129] The second parameter can indicate the possibility that the pixel belongs to the region of interest.

[0130] In some specific implementations, step S1044, i.e., obtaining a comprehensive parameter according to the first parameter and the second parameter, includes:

[0131] The first parameter and the second parameter are weightedly summed using the brightness value of the pixel to obtain the comprehensive parameter.

[0132] Specifically, the calculation formula of the comprehensive parameter can be:

[0133]

[0134] in, For the Comprehensive parameters of pixels; Indicates The brightness value of each pixel; Indicates The first parameter of pixels; Indicates The second parameter of pixels; is a linear normalization function that normalizes the data value to Specifically, the brightness values ​​of all pixels in the brightness image can be normalized.

[0135] The larger the brightness value of the neighborhood window of the pixel point, the more it means that the neighborhood window is affected by stronger illumination, so the brightness is higher, and the spreading characteristics of the region of interest (such as the lesion area) can be better observed. If the brightness value of the neighborhood window of the pixel point is larger, it means that the region of interest (such as the lesion area) has not spread to the neighborhood, and the confidence in determining the characteristics of the region of interest (such as the lesion area) is lower; on the contrary, if the brightness value of the neighborhood window of the pixel point is smaller, it means that the region of interest (such as the lesion area) has spread to the neighborhood, and the confidence in determining the characteristics of the region of interest (such as the lesion area) is higher. The smaller the brightness value of the neighborhood window of the pixel point, the more it means that the neighborhood window is affected by weaker illumination, which is not conducive to observing local detail information. The higher the confidence in determining the characteristics of the region of interest (such as the lesion area) through overall analysis. Therefore, the brightness value of each pixel in the brightness image is used as a weight, and the first parameter and the second parameter of each pixel are weighted to obtain the comprehensive parameter of each pixel in the brightness image, which can improve the accuracy of region of interest recognition.

[0136] In other optional specific implementations, the brightness uniformity value of the neighborhood window of the pixel point can be directly used as the second parameter. When calculating the comprehensive parameter, the second parameter can be negative and then summed or weighted summed.

[0137] In some specific implementations, step S104, i.e., determining the region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point, includes:

[0138] Step S104a, obtaining a preset initial seed point in the brightness image;

[0139] Step S104b, for each of the initial seed points, obtaining a distance and a comprehensive parameter of a pixel point to be grown outside the current growth region of the initial seed point, and determining whether to add the pixel point to be grown into the current growth region of the initial seed point according to the distance and the comprehensive parameter; the comprehensive parameter includes the gradient value and the brightness uniformity value, or the comprehensive parameter is determined according to the gradient value and the brightness uniformity value; the pixel point to be grown is a pixel point in the brightness image other than the initial seed point;

[0140] In some specific implementations, step S104b, i.e., obtaining the distance and comprehensive parameters of the pixel point to be grown outside the current growth area of ​​the initial seed point, and determining whether to add the pixel point to be grown into the current growth area of ​​the initial seed point according to the distance and the comprehensive parameters, includes:

[0141] Step S104b1, obtaining a target pixel point to be grown outside the current growth region, wherein the target pixel point to be grown is the pixel point to be grown within a neighborhood window of an edge pixel point of the current growth region;

[0142] Step S104b2, determining whether to add the target pixel point to be grown into the current growth area of ​​the initial seed point according to the distance of the target pixel point to be grown and the comprehensive parameter.

[0143] In an embodiment of the present invention, when growing an initial seed point, it is not necessary to determine whether each pixel point to be grown outside the current growth area needs to be added to the current growth area. Instead, it is only determined whether the pixel point to be grown within the neighborhood window of the edge pixel points of the current growth area needs to be added to the current growth area. This not only reduces the amount of calculation, but also improves the accuracy of growth.

[0144] In some specific implementations, step S104b, i.e., determining whether to add the pixel point to be grown into the current growth area of ​​the initial seed point according to the distance and the comprehensive parameter, includes:

[0145] Step S104b-1, obtaining a first difference between the comprehensive parameter of the pixel point to be grown outside the current growth area and the comprehensive parameter of the initial seed point;

[0146] Step S104b-2, obtaining a second difference between the brightness value of the pixel point to be grown outside the current growing area and the brightness value of the initial seed point;

[0147] Step S104b-3, determining a third parameter according to the first difference, the second difference and the distance; the distance is the distance between the pixel point to be grown outside the current growth area and the initial seed point;

[0148] Step S104b-4: determining whether to add the pixel point to be grown into the current growth area of ​​the initial seed point according to the magnitude relationship between the third parameter and a preset threshold.

[0149] In other optional specific implementations, when the pixel to be grown is a pixel to be grown within a neighborhood window of an edge pixel of a current growth area, the first difference is the difference between the comprehensive parameter of the pixel to be grown and the comprehensive parameter of the edge pixel, the second difference is the difference between the brightness value of the pixel to be grown and the brightness value of the edge pixel, and the distance is the distance between the pixel to be grown and the edge pixel.

[0150] The specific calculation method of the third parameter may be: using the distance to perform a weighted summation on the first difference and the second difference to obtain the third parameter.

[0151] In the embodiment of the present invention, the third parameter indicates the growth requirement of the pixel to be grown. Then, according to the growth requirement, the pixel to be grown is iteratively grown to obtain all the regions of interest in the brightness image.

[0152] The following is Taking an initial seed point as an example, the specific process of iteratively growing the pixels to be grown to obtain the region of interest in the brightness image is explained.

[0153] When the iteration grows to When the current growth area of ​​the initial seed point is The specific calculation formula for the growth requirement of a pixel to be grown is:

[0154]

[0155] in, Indicates The initial seed point is outside the current growth area. The growth requirement of the pixel to be grown; Indicates The initial seed point is outside the current growth area. The Euclidean distance between the pixels to be grown; Indicates The initial seed point is outside the current growth area. The difference (absolute value) of the comprehensive parameters between the pixels to be grown; Indicates The initial seed point is outside the current growth area. The difference (absolute value) in brightness between the pixels to be grown; is a linear normalization function that normalizes the data value to Within the range.

[0156] As The feature weight of The initial seed point is located outside the current growth area. The smaller the Euclidean distance between the pixels to be grown, the less affected by the lighting factor, and the more accurate the regional growth based on the change of brightness value difference; because the pixels to be grown are compared and analyzed with the initial seed points during actual growth, when the distance between the pixels to be grown and the initial seed points is farther, the accuracy of regional growth caused by the influence of lighting will be reduced when only analyzing by brightness value difference, so it is necessary to combine comprehensive parameters for analysis; therefore, The initial seed point is located outside the current growth area. The larger the Euclidean distance between the pixels to be grown, the Give greater weight to The initial seed point is outside the current growth area. The smaller the Euclidean distance between the pixels to be grown, the Give more weight.

[0157] When The initial seed point is outside the current growth area. The growth requirement of the pixel to be grown satisfy ( is a preset threshold, such as 0.72), the The initial seed point is located outside the current growth area. The smaller the Euclidean distance between the pixels to be grown, the less affected by the light factor. The pixel to be grown and the The spatial positions of the first initial seed points are closer; The initial seed point is located outside the current growth area. The smaller the difference in the comprehensive parameters between the pixels to be grown, the smaller the difference in the comprehensive parameters between the pixels to be grown. The pixel to be grown is closer to the situation in the current growth area. The pixels to be grown are merged into the The new current growth area is obtained in the current growth area of ​​the initial seed point, and the neighborhood window of any edge pixel point in the new current growth area is calculated. The growth requirement of each pixel to be grown is judged.

[0158] When The initial seed point is outside the current growth area. The growth requirement of the pixel to be grown satisfy , explain The initial seed point is located outside the current growth area. The larger the Euclidean distance between the pixels to be grown, the greater the influence of the light factor. The pixel to be grown and the The spatial position of the first initial seed point is far away; The initial seed point is located outside the current growth area. The larger the difference in the comprehensive parameters between the pixels to be grown, the larger the difference in the comprehensive parameters between the pixels to be grown. The pixel to be grown is quite different from the current growth area. The pixel to be grown is recorded as The non-essential growth pixels of the initial seed point are calculated, except for the first The first pixel outside the pixel to be grown The growth demand degree of the pixel to be grown is determined, and the judgment is made, and so on, until there is no pixel to be grown that meets the growth demand degree in the neighborhood window of each edge pixel in the current growth area, the pixel at this time is The current growth area of ​​the initial seed point is recorded as The growth area of ​​the initial seed point.

[0159] The growth region of each initial seed point is obtained by iteratively growing the pixel points to be grown according to each initial seed point. The growth region of each initial seed point corresponds to a region of interest, so the growth region of each initial seed point is recorded as a region of interest.

[0160] Step S104c: determining the region of interest according to the final current growth region.

[0161] The number of preset initial seed points can be 50 or 100, etc., which is not limited here. Specifically, the initial seed point can be generated by a seed point growth algorithm. The method for determining the comprehensive parameter according to the gradient value and the brightness uniformity value can be referred to the above embodiment, which will not be repeated here. The distance of the pixel to be grown is the distance between the pixel to be grown and the current growth area, or the distance to a pixel in the current growth area, or the distance between the nearest pixel in the current growth area. The distance can be a Euclidean distance. The pixel to be grown is added to the current growth area of ​​the initial seed point, that is, the pixel to be grown is grown to the current growth area.

[0162] Step S105: Perform brightness enhancement processing on the region of interest.

[0163] Specifically, histogram equalization can be used to perform linear brightness enhancement on all regions of interest in the brightness image. After the brightness enhancement process is performed on the regions of interest in the brightness image, the obtained brightness image is used as a brightness channel to perform RGB color space conversion to obtain a brightness enhanced image. The color channel data used in the RGB color space conversion is the color channel data obtained when the endoscopic image is converted to the LAB color space.

[0164] The brightness of the lesion area in the endoscopic image is uneven and has a low brightness value, and there is a significant gradient change. However, the brightness of other areas in the endoscopic image is uniform and the brightness value is relatively stable. For example, when there is a gastric ulcer in the gastrointestinal tract, a local defect or ulcer will form on the surface of the gastric mucosa, and there may be inflammatory congestion and edema around the ulcer, so the brightness of the ulcer area is uneven and the brightness value is low; the area where the ulcer occurs usually presents an irregular sunken area, and there may be exudate, necrotic tissue or bleeding, so there is also a significant gradient change in the ulcer area. For the normal area of ​​the gastrointestinal tract when there is no gastric ulcer, the brightness is uniform and the brightness value is relatively stable. The more regular tissue structure and boundaries make the gradient change of brightness not as significant as that of the ulcer area.

[0165] The endoscopic image processing method provided in this embodiment identifies the region of interest from the endoscopic image through the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point and the brightness uniformity value of the neighborhood window of the pixel point, and then performs brightness enhancement on the region of interest. The region of interest identification method provided in the embodiment of the present invention is not only highly accurate and has a small amount of calculation, that is, less computing resources are required, but also compared with the brightness enhancement of the entire endoscopic image, the embodiment of the present invention can perform balanced brightness enhancement for different regions of interest, avoiding the problem of excessive enhancement of some regions of interest and insufficient enhancement of some regions of interest, thereby improving the clarity of the endoscopic image and ensuring that the details of the endoscopic image can be accurately presented.

[0166] In this embodiment, an endoscopic image processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0167] This embodiment provides an endoscopic image processing device, such as Figure 2 As shown, including:

[0168] A brightness image acquisition module 301 is used to acquire brightness information of the endoscopic image and obtain a corresponding brightness image;

[0169] A construction module 302 is used to construct a neighborhood window and a neighborhood direction for the pixel points in the brightness image;

[0170] A parameter acquisition module 303 is used to acquire, for each pixel in the brightness image, a gradient value of the pixel in the neighborhood window of the pixel in a neighborhood direction where the brightness change is the largest, and acquire a brightness uniformity value of the neighborhood window of the pixel;

[0171] An area of ​​interest determination module 304, configured to determine an area of ​​interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point;

[0172] The enhancement processing module 305 is used to perform brightness enhancement processing on the region of interest.

[0173] In some optional implementations, the parameter acquisition module 303 includes:

[0174] A first gradient value acquisition unit, used to acquire a first gradient value in each neighborhood direction in the neighborhood window of the pixel point, wherein the first gradient value is the sum of the differences in brightness values ​​of two adjacent pixel points in the pixel point in a neighborhood direction;

[0175] The gradient value determining unit is used to use the largest first gradient value as the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point.

[0176] In some optional implementations, the parameter acquisition module 303 includes:

[0177] A first gradient value acquisition unit is used to acquire a first gradient value in each neighborhood direction of the neighborhood window of the pixel point, where the first gradient value in the neighborhood direction is the sum of the differences in brightness values ​​of two adjacent pixel points in the pixel point in the neighborhood direction;

[0178] A second gradient value acquisition unit, used to acquire second gradient values ​​of all pixel points in each neighborhood direction of the neighborhood window of the pixel point;

[0179] A first gradient value adjustment unit, configured to adjust the first gradient value by using the second gradient value for each neighborhood direction in the neighborhood window of the pixel point to obtain an adjusted first gradient value;

[0180] The gradient value determining unit is used to use the adjusted maximum first gradient value as the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point.

[0181] In some optional implementations, the parameter acquisition module 303 includes:

[0182] A standard deviation acquisition unit, used to acquire standard deviations of brightness values ​​of multiple pairs of first segmented areas and second segmented areas; the first segmented areas and the second segmented areas are obtained by dividing the neighborhood window of the pixel point by a straight line passing through the pixel point; and multiple groups of the first segmented areas and the second segmented areas are obtained by dividing the neighborhood window of the pixel point using dividing lines at different angles;

[0183] A standard deviation correction unit is used to correct the standard deviation of the brightness value of the neighborhood window of the pixel point according to the deviation value between the standard deviations of the brightness values ​​of the target first segmentation area and the target second segmentation area to obtain the brightness uniformity value; the target first segmentation area and the target second segmentation area are a pair of the first segmentation area and the second segmentation area whose standard deviations of brightness values ​​are closest.

[0184] In some optional implementations, the region of interest determination module 304 includes:

[0185] A first parameter acquisition unit, used to obtain a first parameter according to the gradient value;

[0186] A normalization processing unit, used for performing normalization processing on the brightness uniformity value;

[0187] A second parameter acquisition unit, configured to use a difference between the brightness uniformity value obtained by normalization and 1 as a second parameter;

[0188] A comprehensive parameter acquisition unit, configured to obtain a comprehensive parameter according to the first parameter and the second parameter;

[0189] The first region of interest determining unit is configured to determine the region of interest from the brightness image according to the comprehensive parameter.

[0190] In some optional implementations, the comprehensive parameter acquisition unit is specifically configured to use the brightness value of the pixel point to perform a weighted sum of the first parameter and the second parameter to obtain the comprehensive parameter.

[0191] In some optional implementations, the region of interest determination module 304 includes:

[0192] An initial seed point acquisition unit, used to acquire an initial seed point preset in the brightness image;

[0193] a growth unit, configured to obtain, for each of the initial seed points, a distance and a comprehensive parameter of a pixel point to be grown outside a current growth region of the initial seed point, and determine, based on the distance and the comprehensive parameter, whether to add the pixel point to be grown into the current growth region of the initial seed point; the comprehensive parameter includes the gradient value and the brightness uniformity value, or the comprehensive parameter is determined based on the gradient value and the brightness uniformity value; the pixel point to be grown is a pixel point in the brightness image other than the initial seed point;

[0194] The second region of interest determining unit is configured to determine the region of interest according to the final current growth region.

[0195] In some optional embodiments, the growing unit comprises:

[0196] A target pixel point to be grown acquisition subunit is used to acquire a target pixel point to be grown outside the current growth area, wherein the target pixel point to be grown is a pixel point to be grown within a neighborhood window of an edge pixel point of the current growth area;

[0197] The adding subunit is used to determine whether to add the target pixel point to be grown into the current growth area of ​​the initial seed point according to the distance of the target pixel point to be grown and the comprehensive parameter.

[0198] In some optional embodiments, the growing unit comprises:

[0199] A first difference acquisition subunit, used to acquire a first difference between the comprehensive parameter of the pixel point to be grown outside the current growth area and the comprehensive parameter of the initial seed point;

[0200] A second difference acquisition subunit is used to acquire a second difference between the brightness value of the pixel point to be grown outside the current growth area and the brightness value of the initial seed point;

[0201] a third parameter determination subunit, configured to determine a third parameter according to the first difference, the second difference, and the distance; the distance being the distance between the pixel point to be grown outside the current growth area and the initial seed point;

[0202] The judgment subunit is used to determine whether to add the pixel point to be grown into the current growth area of ​​the initial seed point according to the size relationship between the third parameter and the preset threshold.

[0203] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0204] The endoscopic image processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0205] The embodiment of the present invention also provides an endoscopic image processing device having the above Figure 2 The endoscopic image processing device shown.

[0206] See also Figure 3 , Figure 3 is a schematic diagram of the structure of an endoscopic image processing device provided by an optional embodiment of the present invention, such as Figure 3 As shown, the endoscopic image processing device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the endoscopic image processing device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Figure 3 A processor 10 is taken as an example.

[0207] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0208] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0209] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the endoscopic image processing device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the endoscopic image processing device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0210] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0211] The endoscopic image processing device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0212] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the endoscopic image processing device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device may be a touch screen.

[0213] The endoscopic image processing device also includes a communication interface for the endoscopic image processing device to communicate with other devices or a communication network.

[0214] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0215] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0216] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An endoscopic image processing method, characterized in that: The method comprises: Acquiring brightness information of the endoscopic image to obtain a corresponding brightness image; Constructing a neighborhood window and a neighborhood direction for the pixel points in the brightness image; For each pixel in the brightness image, obtain a gradient value of the pixel in the neighborhood window of the pixel in a neighborhood direction where the brightness change is the largest, and obtain a brightness uniformity value of the neighborhood window of the pixel; Determining a region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point; Performing brightness enhancement processing on the region of interest; Wherein, determining the region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point includes: Obtaining a first parameter according to the gradient value; Normalizing the brightness uniformity value; The difference between the brightness uniformity value obtained by normalization and 1 is used as a second parameter; Obtaining a comprehensive parameter according to the first parameter and the second parameter; determining the region of interest from the brightness image according to the comprehensive parameter; The obtaining of the comprehensive parameter according to the first parameter and the second parameter comprises: Using the brightness value of the pixel point, performing a weighted summation on the first parameter and the second parameter to obtain the comprehensive parameter; or, The determining a region of interest from the brightness image according to the gradient value and the brightness uniformity value of the pixel point comprises: Obtaining a preset initial seed point in the brightness image; For each of the initial seed points, a distance and a comprehensive parameter of a pixel point to be grown outside a current growth region of the initial seed point are obtained, and according to the distance and the comprehensive parameter, whether to add the pixel point to be grown into the current growth region of the initial seed point is determined; the comprehensive parameter includes the gradient value and the brightness uniformity value, or the comprehensive parameter is determined according to the gradient value and the brightness uniformity value; the pixel point to be grown is a pixel point in the brightness image other than the initial seed point; Determine the region of interest according to the final current growth region; The step of determining whether to add the pixel point to be grown into the current growth area of ​​the initial seed point according to the distance and the comprehensive parameter includes: Acquire a first difference between the comprehensive parameter of the pixel point to be grown outside the current growth area and the comprehensive parameter of the initial seed point; Acquire a second difference between the brightness value of the pixel point to be grown outside the current growing area and the brightness value of the initial seed point; Determine a third parameter according to the first difference, the second difference and the distance; the distance is the distance between the pixel point to be grown outside the current growth area and the initial seed point; According to the magnitude relationship between the third parameter and a preset threshold, it is determined whether to add the pixel point to be grown into the current growth area of ​​the initial seed point.

2. The method according to claim 1, characterized in that The step of obtaining the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction where the brightness change is the largest includes: Obtain a first gradient value in each neighborhood direction of the neighborhood window of the pixel point, where the first gradient value is the sum of the differences in brightness values ​​of two adjacent pixel points in the pixel point in a neighborhood direction; The largest first gradient value is used as the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction with the largest brightness change.

3. The method according to claim 1, characterized in that: The step of obtaining the gradient value of the pixel point in the neighborhood window of the pixel point in the neighborhood direction where the brightness change is the largest includes: Obtain a first gradient value in each neighborhood direction of the neighborhood window of the pixel point, where the first gradient value in the neighborhood direction is the sum of the differences in brightness values ​​of two adjacent pixel points in the pixel point in the neighborhood direction; Obtain second gradient values ​​of all pixel points in each neighborhood direction in the neighborhood window of the pixel point; For each neighborhood direction in the neighborhood window of the pixel point, adjusting the first gradient value by using the second gradient value to obtain an adjusted first gradient value; The largest first gradient value after adjustment is used as the gradient value of the pixel point in the neighborhood direction with the largest brightness change in the neighborhood window of the pixel point.

4. The method according to claim 1, characterized in that: The obtaining of the brightness uniformity value of the neighborhood window of the pixel point includes: Obtaining standard deviations of brightness values ​​of multiple pairs of first segmented areas and second segmented areas; the first segmented areas and the second segmented areas are obtained by dividing the neighborhood window of the pixel point by a straight line passing through the pixel point; and multiple groups of the first segmented areas and the second segmented areas are obtained by dividing the neighborhood window of the pixel point using dividing lines at different angles; According to the deviation value between the standard deviations of the brightness values ​​of the target first segmented area and the target second segmented area, the standard deviation of the brightness value of the neighborhood window of the pixel point is corrected to obtain the brightness uniformity value; the target first segmented area and the target second segmented area are a pair of the first segmented area and the second segmented area whose standard deviations of the brightness values ​​are closest.

5. The method according to claim 1, characterized in that The step of obtaining a distance and a comprehensive parameter of a pixel point to be grown outside a current growth region of the initial seed point, and determining whether to add the pixel point to be grown into the current growth region of the initial seed point according to the distance and the comprehensive parameter, comprises: Acquire a target pixel point to be grown outside the current growth region, wherein the target pixel point to be grown is the pixel point to be grown within a neighborhood window of an edge pixel point of the current growth region; According to the distance of the target pixel point to be grown and the comprehensive parameter, it is determined whether to add the target pixel point to be grown into the current growth area of ​​the initial seed point.

6. An endoscopic image processing device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the endoscopic image processing method according to any one of claims 1 to 5 by executing the computer instructions.

Citation Information

Patent Citations

  • Finger vein image quality evaluation method based on multi-information fusion

    CN110415225A

  • Image noise reduction method, image noise reduction device, storage medium and electronic equipment

    CN115423720A

  • Image enhancement-based broken silicon wafer cleaning effect visual detection method

    CN117274113A

  • Enhancement processing method for gastrointestinal microscopic examination image

    CN117934474A

  • Method for an Image Adjustment

    US20090041372A1