Image processing device, system and recorder

By obtaining and adjusting the brightness average of the pictures in the capsule endoscopic image processing device, the problem of uneven brightness of the pictures taken by the capsule endoscopic image is solved, and the clarity and contrast of the pictures are improved, making it convenient for doctors to diagnose.

CN114219735BActive Publication Date: 2025-04-04CHONGQING JINSHAN MEDICAL TECH RES INST CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111562764.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-20
Publication Date
2025-04-04
Estimated Expiration
2041-12-20

AI Technical Summary

Technical Problem

Pictures taken by capsule endoscopes often have problems such as overexposed, too dark or uneven brightness, which affects the doctor's diagnosis.

Method used

A picture processing device is designed to obtain the brightness average of the original picture, divide it into a preset number of areas, replace the brightness value of the pixel point in each area as the brightness average of the area, generate a brightness average picture, and adjust it according to the preset brightness range, and finally adjust the RGB channel through the brightness adjustment gain matrix to obtain the final adjusted picture.

Benefits of technology

This makes pictures that are originally too dark, overexposed or uneven brightness clearer after brightness adjustment, maintain a certain contrast, which facilitates doctors' diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114219735B_ABST
    Figure CN114219735B_ABST
Patent Text Reader

Abstract

The present invention discloses an image processing device, system and recorder. After acquiring an original image taken by a capsule endoscope, a processor in the image processing device first acquires the brightness value of each pixel of the original image, then divides the original image into a preset number of regions, replaces the brightness value of the pixel in each region with the average value of the brightness value of the pixel in the region, obtains a brightness mean image, and then adjusts the brightness of the brightness mean image according to the brightness mean of the original image to obtain a brightness adjustment gain matrix. The RGB channels of the original image are multiplied by the brightness adjustment gain matrix to maintain a certain contrast while completing the brightness adjustment of the image, so that the original image that was originally overexposed, too dark or unevenly bright becomes clearer and the brightness is more uniform, which is convenient for doctors to diagnose.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of picture processing, and in particular to a picture processing device and a recorder. Background Art

[0002] At present, with the development of technology, capsule endoscopes can be used to detect patients' gastrointestinal diseases. Relying on the peristalsis of the patient's gastrointestinal tract, the capsule endoscope moves in the patient's gastrointestinal tract and takes pictures. The pictures are sent to the recorder carried by the patient through the wireless transmitter in the capsule endoscope. The doctor then completes the diagnosis of the patient by downloading the pictures in the recorder. Due to the influence of the shooting environment, shooting angle, light metering method, image sensor signal, etc., many overexposed, dark or unevenly bright pictures will appear, which will affect the doctor's diagnosis. Summary of the invention

[0003] The purpose of the present invention is to provide an image processing device, system and recorder, which can adjust the original image taken by a capsule endoscope so that the image that was originally too dark, overexposed or uneven in brightness can be clearer and maintain a certain contrast after brightness adjustment, which is convenient for doctors to diagnose.

[0004] In order to solve the above technical problems, the present invention provides a picture processing device, comprising:

[0005] Memory for storing computer programs;

[0006] The processor is configured to perform the following steps when executing the computer program:

[0007] Get the original images taken by capsule endoscopy;

[0008] Obtaining the brightness value of the pixel at each position of the original image;

[0009] Determine the brightness mean of the original image according to the brightness values ​​of the pixels at each position of the original image;

[0010] Dividing the original image into a preset number of regions;

[0011] Determine the average brightness of the pixels in each of the regions;

[0012] Replacing the brightness value of the pixel points in each of the regions with the average brightness value of the pixel points in each of the regions to obtain the average brightness value image of the original image;

[0013] Adjusting the brightness values ​​of the pixels in the brightness mean image according to the brightness mean of the original image so that the average brightness of the brightness mean image after adjustment is within a preset brightness range;

[0014] Dividing the brightness value of each pixel of the brightness mean image whose brightness value has been adjusted by the brightness value of the corresponding pixel of the original image to obtain a brightness adjustment gain matrix;

[0015] The final adjusted image is obtained by multiplying the RGB channels of the original image by the brightness adjustment gain matrix respectively.

[0016] Preferably, determining the brightness mean of the original image according to the brightness values ​​of the pixels at each position of the original image includes:

[0017] Calculate the average brightness value of the pixel points at each position of the original image to obtain the brightness mean value of the original image;

[0018] Determining the average brightness of each pixel in the area includes:

[0019] The average brightness value of the pixel points in each of the regions is calculated to obtain the average brightness value of the pixel points in each of the regions.

[0020] Preferably, before determining the brightness mean of the original image according to the brightness values ​​of the pixels at each position of the original image, the method further includes:

[0021] Deleting brightness values ​​of the original image that are higher than a third threshold value;

[0022] The brightness values ​​of the original picture that are lower than a fourth threshold are deleted, and the third threshold is greater than the fourth threshold.

[0023] Preferably, before dividing the original image into a preset number of regions, the method further includes:

[0024] Calculate the overexposure percentage and the underexposure percentage of the original image according to the brightness value of the pixel point at each position of the original image;

[0025] If the percentage of overexposed pixels is higher than a first threshold or the percentage of dark pixels is higher than a second threshold, deleting the original image;

[0026] If the percentage of overexposed pixels is not higher than the first threshold and the percentage of dark pixels is not higher than the second threshold, the process proceeds to a step of dividing the original image into a preset number of regions.

[0027] Preferably, after obtaining the brightness mean image of the original image, the method further includes:

[0028] Determine the mean filter radius;

[0029] Determine each mean filter area according to the mean filter radius;

[0030] The brightness value of each pixel in the mean filtering area is replaced by the brightness mean of each pixel in the filtering area.

[0031] Preferably, adjusting the brightness values ​​of pixels in the brightness mean image according to the brightness information of the original image includes:

[0032] Obtaining the brightness mean picture with adjusted brightness values ​​according to the brightness mean of the original picture, the brightness values ​​of each pixel in the brightness mean picture, and a brightness gain relationship;

[0033] The brightness gain relationship is:

[0034] x i When <bp, f i =k1*x;

[0035] x i When ≥bp, f i =(k2*x k3 )-k0;

[0036] Among them, bp is the preset brightness constant coefficient, x i is the brightness value of the i-th pixel in the brightness mean image, f i is the brightness value of the i-th pixel after adjustment, i is an integer not less than 0, k1, k2, k3 and k0 are all brightness adjustment coefficients, where k1, k2, k3 and k0 are:

[0037] k3=log avg0 (0.5), avg0 is the average brightness of the original image;

[0038] k1=1 / ((1 / k3 / bp)^(k3-1)-(1 / k3)*bp+bp);

[0039] k2=(1 / k3)*k1 / bp^(k3-1);

[0040] k0=k2*bp^(k3)-k1*bp.

[0041] In order to solve the above technical problems, the present invention further provides an image processing system, comprising:

[0042] An original image acquisition unit, used for original images taken by capsule endoscope;

[0043] A brightness value acquisition unit, used to acquire the brightness value of a pixel point at each position of the original image;

[0044] An original picture brightness mean value determination unit, used to determine the brightness mean value of the original picture according to the brightness values ​​of the pixels at each position of the original picture;

[0045] An original picture partitioning unit, used for dividing the original picture into a preset number of regions;

[0046] A regional brightness mean value determination unit, used to determine the brightness mean value of the pixels in each of the regions;

[0047] A brightness mean picture acquisition unit, used to replace the brightness value of the pixel points in each of the regions with the brightness mean of the pixel points in each of the regions, so as to obtain the brightness mean picture of the original picture;

[0048] A brightness adjustment unit, configured to adjust the brightness values ​​of pixels in the brightness mean value picture according to the brightness mean value of the original picture, so that the average brightness of the brightness mean value picture after adjustment is within a preset brightness range;

[0049] A brightness adjustment gain matrix acquisition unit, configured to divide the brightness value of each pixel of the brightness mean image whose brightness value has been adjusted by the brightness value of the corresponding pixel of the original image to obtain a brightness adjustment gain matrix;

[0050] The final adjusted image acquisition unit is used to obtain the final adjusted image after multiplying the RGB channels of the original image by the brightness adjustment gain matrix respectively.

[0051] In order to solve the above technical problems, the present invention further provides a recorder, comprising a wireless communication module and the above-mentioned picture processing device connected to the wireless communication module;

[0052] The wireless communication module is used to communicate with the capsule endoscope to obtain the original picture taken by the capsule endoscope.

[0053] The present invention provides an image processing device. After acquiring an original image taken by a capsule endoscope, a processor in the image processing device first acquires the brightness value of a pixel point at each position of the original image, calculates the brightness mean of the original image according to the brightness value of the pixel point at each position of the original image, divides the original image into a preset number of regions, acquires the brightness mean of the pixels in each region, replaces the brightness value of the pixels in each region with the brightness mean of the pixels in each region, and obtains a brightness mean image of the original image, then adjusts the brightness value of the pixels in the brightness mean image according to the brightness mean of the original image, and makes the average brightness of the adjusted brightness mean image within a preset brightness range, divides the brightness value of each pixel point of the adjusted brightness mean image by the brightness value of the corresponding pixel point of the original image, and obtains a brightness adjustment gain matrix, and finally multiplies the RGB channel of the original image by the brightness adjustment gain matrix, and obtains a final adjusted image. The method of dividing the original image into a preset number of areas and replacing the brightness values ​​of all pixels in the area with the brightness mean can make the brightness of the image more uniform. At the same time, according to the brightness adjustment gain matrix obtained from the adjusted brightness mean image, the method of multiplying the RGB channels of the original image by the brightness adjustment gain matrix to obtain the final adjusted image can maintain a certain contrast while adjusting the brightness of the original image, making overexposed or dark images clearer and facilitating doctors' diagnosis.

[0054] The present invention also provides a picture processing system and a recorder, which have the same beneficial effects as the above picture processing device. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the prior art and the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0056] Figure 1 A schematic diagram of the structure of a picture processing device provided by the present invention;

[0057] Figure 2 A structural schematic diagram of a picture processing system provided by the present invention;

[0058] Figure 3 A structural schematic diagram of a recorder provided by the present invention;

[0059] Figure 4 A schematic diagram of a brightness gain relationship curve provided by the present invention;

[0060] Figure 5This is another schematic diagram of a brightness gain relationship curve provided by the present invention. DETAILED DESCRIPTION

[0061] The core of the present invention is to provide an image processing device, system and recorder, which can adjust the original images taken by the capsule endoscope, so that the originally dark, overexposed or unevenly bright images can be clearer and maintain a certain contrast after brightness adjustment, which is convenient for doctors to diagnose.

[0062] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0063] Please refer to Figure 1 , Figure 1 A schematic structural diagram of a picture processing device provided by the present invention includes:

[0064] Memory 2, used for storing computer programs;

[0065] Processor 1 is configured to perform the following steps when executing a computer program:

[0066] Get the original images taken by capsule endoscopy;

[0067] Get the brightness value of the pixel at each position of the original image;

[0068] Determine the brightness mean of the original image according to the brightness values ​​of the pixels at each position of the original image;

[0069] Divide the original image into a preset number of regions;

[0070] Determine the mean brightness of the pixels in each area;

[0071] Replace the brightness value of the pixels in each area with the average brightness value of the pixels in each area to obtain the brightness average image of the original image;

[0072] According to the brightness mean of the original image, the brightness values ​​of the pixels in the brightness mean image are adjusted so that the average brightness of the adjusted brightness mean image is within a preset brightness range;

[0073] Divide the brightness value of each pixel of the brightness mean image whose brightness value has been adjusted by the brightness value of the corresponding pixel of the original image to obtain a brightness adjustment gain matrix;

[0074] The final adjusted image is obtained by multiplying the RGB channels of the original image by the brightness adjustment gain matrix.

[0075] At present, when a capsule endoscope is used to take pictures inside the human stomach and intestines, the pictures taken will be overexposed, too dark or have uneven brightness due to the influence of the shooting environment, shooting angle, light metering method, image sensor signal, etc., which will affect the display effect of the pictures and thus affect the doctor's diagnosis. Therefore, in this embodiment, the brightness of the pictures taken by the capsule endoscope is adjusted so that the originally overexposed, too dark and unevenly bright pictures can be displayed more clearly while maintaining a certain contrast after the brightness adjustment, and the brightness of the pictures can also be made more uniform and the display effect better, thereby facilitating the doctor's diagnosis.

[0076] Specifically, when the processor in the image processing device obtains the original image taken by the capsule endoscope, it will first obtain the brightness value of the pixel points at each position of the original image, and calculate the brightness mean of the original image based on the pixel points at each position. Then, the original image will be divided into a preset number of areas, the brightness mean of each area is determined, and then the brightness values ​​of all the pixels in each area are replaced by the brightness mean of the area to obtain the brightness mean image of the original image. It should be noted that the preset number here needs to be large enough so that the pixel points contained in the area are not too many, so that the obtained brightness mean image can be guaranteed to have more uniform brightness while not losing too many details of the original image. Then, the pixel points in the obtained brightness mean image are averaged according to the brightness mean of the original image. The brightness is adjusted so that the average brightness value of each pixel of the adjusted brightness mean image is within a preset brightness range. For example, when the average brightness of the original image is too high, the overall brightness of the brightness mean image will be lowered; when the average brightness of the original image is too low, the overall brightness of the brightness mean image will be increased. The brightness value of the pixel point in the adjusted brightness mean image is divided by the brightness value of the corresponding pixel point in the original image to obtain a brightness adjustment gain matrix. Because directly adjusting the brightness of the photo will lose a certain contrast of the image, in this embodiment, the RGB channels of the original image are multiplied by the obtained brightness adjustment gain matrix to obtain the final adjusted image. In this way, a certain contrast can be maintained while adjusting the brightness, so that the display effect of the image is better and clearer.

[0077] In summary, the present invention provides an image processing device. After obtaining the original image taken by the capsule endoscope, the processor in the image processing device first obtains the brightness value of the pixel points at each position of the original image, calculates the brightness mean of the original image according to the brightness value of the pixel points at each position of the original image, divides the original image into a preset number of areas, and then obtains the brightness mean of the pixels in each area, replaces the brightness value of the pixels in each area with the brightness mean of the pixels in each area, and obtains the brightness mean image of the original image, and then adjusts the brightness value of the pixels in the brightness mean image according to the brightness mean of the original image, and makes the average brightness of the adjusted brightness mean image within a preset brightness range, divides the brightness value of each pixel point of the adjusted brightness mean image by the brightness value of the corresponding pixel point of the original image, and obtains a brightness adjustment gain matrix, and finally multiplies the RGB channel of the original image by the brightness adjustment gain matrix to obtain a final adjusted image. The method of dividing the original image into a preset number of areas and replacing the brightness values ​​of all pixels in the area with the brightness mean can make the brightness of the image more uniform. At the same time, according to the brightness adjustment gain matrix obtained from the adjusted brightness mean image, multiplying the RGB channels of the original image by the brightness adjustment gain matrix respectively can adjust the brightness of the original image while maintaining a certain contrast, making overexposed or dark images clearer and facilitating doctors' diagnosis.

[0078] Based on the above embodiments:

[0079] As a preferred embodiment, determining the brightness mean of the original image according to the brightness values ​​of the pixels at each position of the original image includes:

[0080] Calculate the average brightness value of the pixel points at each position of the original image to obtain the average brightness value of the original image;

[0081] Determine the average brightness of the pixels in each area, including:

[0082] The average brightness value of the pixels in each area is calculated to obtain the average brightness value of the pixels in each area.

[0083] In this embodiment, the brightness values ​​of the pixels at each position are added and then divided by the total number of pixels in the original image to obtain the average brightness of the original image; the brightness values ​​of all pixels in each area are added and then divided by the total number of pixels in the area to obtain the average brightness of each area. The implementation method is simple and increases the feasibility of the solution.

[0084] As a preferred embodiment, before determining the brightness mean of the original image according to the brightness values ​​of the pixels at each position of the original image, the method further includes:

[0085] Deleting brightness values ​​of the original image that are higher than a third threshold value;

[0086] The brightness values ​​of the original image that are lower than a fourth threshold are deleted, and the third threshold is greater than the fourth threshold.

[0087] In this embodiment, taking into account that when calculating the average brightness value of an image, some images have some pixels that are too dark or too bright, and these pixels will affect the accuracy of the brightness mean value in expressing the overall brightness of the photo, thereby affecting the subsequent brightness adjustment steps. Therefore, in this solution, brightness values ​​higher than the third threshold and brightness values ​​lower than the fourth threshold value are deleted, and the brightness mean of the image is calculated from the remaining brightness values, so that the brightness mean value more accurately expresses the overall brightness of the original image, thereby making the image after brightness adjustment clearer, thereby improving the reliability of the solution.

[0088] As a preferred embodiment, before dividing the original image into a preset number of regions, the method further includes:

[0089] The overexposure percentage and the underexposure percentage of the original image are calculated based on the brightness values ​​of the pixels at each position of the original image;

[0090] If the percentage of overexposed pixels is higher than a first threshold or the percentage of dark pixels is higher than a second threshold, the original image is deleted;

[0091] If the percentage of overexposed pixels is not higher than the first threshold and the percentage of dark pixels is not higher than the second threshold, the process proceeds to a step of dividing the original image into a preset number of regions.

[0092] In the present embodiment, considering that there are a large number of useless pictures in the pictures actually taken by the capsule endoscope, that is, the pictures have lost a large amount of information and cannot be used for the doctor's diagnosis, in the present scheme, the percentage of overexposed pixels and the percentage of too dark pixels of the original picture are calculated according to the brightness values ​​of the pixels at each position of the original picture. When the percentage of overexposed pixels is higher than the first threshold or the percentage of too dark pixels is higher than the second threshold, it proves that there are too many overexposed pixels or too dark pixels in the original picture, and the information contained in the picture can no longer be used for the doctor's diagnosis, and the original picture is deleted. When the percentage of overexposed pixels is not higher than the first threshold and the percentage of too dark pixels is not higher than the second threshold, it proves that the picture can be used for the doctor's diagnosis, and the subsequent brightness adjustment step is entered. In this way, the interference of useless pictures can be eliminated, the doctor's reading efficiency is increased, and the reliability of the scheme is increased.

[0093] As a preferred embodiment, after obtaining the brightness mean image of the original image, the method further includes:

[0094] Determine the mean filter radius;

[0095] Determine each mean filter area according to the mean filter radius;

[0096] The brightness value of each pixel in the mean filtering area is replaced by the brightness mean of the pixel in each filtering area.

[0097] In the present embodiment, considering that after obtaining the brightness mean image of the original image, because the brightness mean image is composed of multiple regions, and the brightness values ​​of the pixels in each region are the same, this may lead to excessive brightness differences at the junction of the regions, causing the image to look unnatural as a whole. Therefore, the present scheme also uses mean filtering for the brightness mean image. Specifically, firstly, a mean filtering radius is preset, and each mean filtering region can be determined according to the mean filtering radius, and the brightness values ​​of the pixels in each mean filtering region are replaced by the brightness mean of the pixels in each filtering region. Through mean filtering, the brightness of the brightness mean image can be made more uniform while making the image more natural as a whole, thereby enhancing the display effect of the image and increasing the reliability of the scheme.

[0098] As a preferred embodiment, adjusting the brightness values ​​of pixels in the brightness mean image according to the brightness information of the original image includes:

[0099] According to the brightness mean value of the original image, the brightness value of each pixel in the brightness mean image and the brightness gain relationship, a brightness mean image with adjusted brightness value is obtained;

[0100] The brightness gain relationship is:

[0101] x i When <bp, f i =k1*x;

[0102] x i When ≥bp, f i =(k2*x k3 )-k0;

[0103] Among them, bp is the preset brightness constant coefficient, x i is the brightness value of the i-th pixel in the brightness mean image, f i is the brightness value of the i-th pixel after adjustment, i is an integer not less than 0, k1, k2, k3 and k0 are all brightness adjustment coefficients, where k1, k2, k3 and k0 are:

[0104] k3=log avg0 (0.5), avg0 is the average brightness of the original image;

[0105] k1=1 / ((1 / k3 / bp)^(k3-1)-(1 / k3)*bp+bp);

[0106] k2=(1 / k3)*k1 / bp^(k3-1);

[0107] k0=k2*bp^(k3)-k1*bp.

[0108] In this embodiment, the brightness value of each pixel in the brightness mean image is adjusted according to the brightness gain relationship. Considering that when the image brightness is too dark, if the same gain relationship is used to calculate the adjusted brightness value, obvious color blocks will appear in the adjusted image, resulting in unnatural display of the image. Therefore, a brightness constant coefficient bp is set in this scheme. When the brightness value of the pixel in the image is less than bp, a linear relationship is used to adjust the brightness value of the darker pixel. In this way, the brightness mean image after the brightness adjustment will not have obvious color blocks, thereby increasing the reliability of the scheme.

[0109] It should be noted that each coefficient in the brightness gain relationship is determined by the average brightness of the original image. Therefore, when the average brightness of the original image is determined, the brightness gain relationship is also determined. For example, please refer to Figure 4 and Figure 5 , Figure 4 A schematic diagram of a brightness gain relationship curve provided by the present invention, Figure 5 Another brightness gain relationship curve diagram provided by the present invention. When the brightness mean of the original image is 0.6 and the preset brightness constant coefficient bp=0.2, the brightness gain relationship curve obtained according to the brightness mean of the original image is as follows: Figure 4 As shown in the figure, the horizontal axis is the brightness value of the pixel in the brightness mean image, and the vertical axis is the brightness value of the pixel after adjustment. It can be seen from the figure that the brightness of the original image is too high at this time, so the overall brightness of the image can be lowered through the brightness gain relationship, and finally the average brightness of the image is within the preset brightness range. When the brightness mean of the original image is 0.4 and the preset brightness constant coefficient bp = 0.2, the brightness gain relationship curve obtained according to the brightness mean of the original image is as follows Figure 5 As shown, the horizontal axis is the brightness value of the pixel in the brightness mean image, and the vertical axis is the brightness value of the pixel after adjustment. It can be seen from the figure that the brightness of the original image is low at this time. Therefore, the overall brightness of the image can be increased through the brightness gain relationship, and finally the average brightness of the image is within the preset brightness range.

[0110] The present invention also provides a picture processing system, please refer to Figure 2 , Figure 2 A schematic diagram of the structure of an image processing system provided by the present invention includes:

[0111] An original picture acquisition unit 21, used for original pictures taken by capsule endoscope;

[0112] A brightness value acquisition unit 22 is used to acquire the brightness value of a pixel point at each position of the original image;

[0113] The original picture brightness mean value determination unit 23 is used to determine the brightness mean value of the original picture according to the brightness values ​​of the pixels at each position of the original picture;

[0114] The original picture partitioning unit 24 is used to divide the original picture into a preset number of regions;

[0115] A regional brightness mean value determination unit 25, used to determine the brightness mean value of the pixels in each region;

[0116] A brightness mean image acquisition unit 26 is used to replace the brightness values ​​of the pixels in each area with the brightness mean of the pixels in each area to obtain a brightness mean image of the original image;

[0117] A brightness adjustment unit 27, configured to adjust the brightness values ​​of pixels in the average brightness image according to the average brightness of the original image, so that the average brightness of the average brightness image after adjustment is within a preset brightness range;

[0118] The brightness adjustment gain matrix acquisition unit 28 is used to divide the brightness value of each pixel of the brightness mean value picture whose brightness value has been adjusted by the brightness value of the corresponding pixel of the original picture to obtain a brightness adjustment gain matrix;

[0119] The final adjusted image acquisition unit 29 is used to obtain the final adjusted image by multiplying the RGB channels of the original image by the brightness adjustment gain matrix respectively.

[0120] For an introduction to an image processing system provided by the present invention, please refer to the above-mentioned device embodiment, and the present invention will not be described in detail here.

[0121] The present invention also provides a recorder, please refer to Figure 3 , Figure 3 A structural diagram of a recorder provided by the present invention, comprising a wireless communication module 31 and the above-mentioned picture processing device connected to the wireless communication module 31;

[0122] The wireless communication module 31 is used to communicate with the capsule endoscope to obtain the original image taken by the capsule endoscope.

[0123] For an introduction to a recorder provided by the present invention, please refer to the above-mentioned device embodiment, and the present invention will not be described in detail here.

[0124] It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0125] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A picture processing device, characterized in that: include: Memory for storing computer programs; The processor is configured to perform the following steps when executing the computer program: Get the original images taken by capsule endoscopy; Obtaining the brightness value of the pixel at each position of the original image; Determine the brightness mean of the original image according to the brightness values ​​of the pixels at each position of the original image; Dividing the original image into a preset number of regions; Determine the average brightness of the pixels in each of the regions; Replacing the brightness value of the pixel points in each of the regions with the average brightness value of the pixel points in each of the regions to obtain the average brightness value image of the original image; Adjusting the brightness values ​​of the pixels in the brightness mean image according to the brightness mean of the original image so that the average brightness of the brightness mean image after adjustment is within a preset brightness range; Dividing the brightness value of each pixel of the brightness mean image whose brightness value has been adjusted by the brightness value of the corresponding pixel of the original image to obtain a brightness adjustment gain matrix; Multiplying the RGB channels of the original image by the brightness adjustment gain matrix respectively to obtain a final adjusted image; The step of adjusting the brightness values ​​of pixels in the brightness mean value picture according to the brightness mean value of the original picture includes: Obtaining the brightness mean picture with adjusted brightness values ​​according to the brightness mean of the original picture, the brightness values ​​of each pixel in the brightness mean picture, and a brightness gain relationship; The brightness gain relationship is: x i When <bp, f i =k1*x i ; x i When ≥bp, f i =(k2*(x i ) k3 )- k0; Among them, bp is the preset brightness constant coefficient, x i is the brightness value of the i-th pixel in the brightness mean image, f i is the brightness value of the i-th pixel after adjustment, i is an integer not less than 0, k1, k2, k3 and k0 are all brightness adjustment coefficients, where k1, k2, k3 and k0 are: k3= , avg0 is the average brightness of the original image; k1=1 / ((1 / k3 / bp)^(k3-1)-(1 / k3)*bp+bp); k2=(1 / k3)*k1 / bp^(k3-1); k0=k2*bp^(k3)-k1*bp.

2. The image processing device according to claim 1, wherein: Determining a brightness mean value of the original image according to brightness values ​​of pixels at various positions of the original image includes: Calculate the average brightness value of the pixel points at each position of the original image to obtain the brightness mean value of the original image; Determining the average brightness of each pixel in the area includes: The average brightness value of the pixel points in each of the regions is calculated to obtain the average brightness value of the pixel points in each of the regions.

3. The image processing device according to claim 1, wherein: Before determining the brightness mean of the original image according to the brightness values ​​of the pixels at each position of the original image, the method further includes: Deleting brightness values ​​of the original image that are higher than a third threshold value; The brightness values ​​of the original picture that are lower than a fourth threshold are deleted, and the third threshold is greater than the fourth threshold.

4. The image processing device according to claim 1, wherein: Before dividing the original image into a preset number of regions, the method further includes: Calculate the percentage of overexposed pixels and the percentage of dark pixels in the original image according to the brightness values ​​of the pixels at each position of the original image; If the percentage of overexposed pixels is higher than a first threshold or the percentage of dark pixels is higher than a second threshold, deleting the original image; If the percentage of overexposed pixels is not higher than the first threshold and the percentage of dark pixels is not higher than the second threshold, the process proceeds to a step of dividing the original image into a preset number of regions.

5. The image processing device according to claim 1, wherein: After obtaining the brightness mean image of the original image, the method further includes: Determine the mean filter radius; Determine each mean filter area according to the mean filter radius; The brightness value of each pixel in the mean filtering area is replaced by the brightness mean of each pixel in the filtering area.

6. A picture processing system, characterized in that: include: An original image acquisition unit, used for original images taken by capsule endoscope; A brightness value acquisition unit, used to acquire the brightness value of a pixel point at each position of the original image; An original picture brightness mean value determination unit, used to determine the brightness mean value of the original picture according to the brightness values ​​of the pixels at each position of the original picture; An original picture partitioning unit, used for dividing the original picture into a preset number of regions; A regional brightness mean value determination unit, used to determine the brightness mean value of the pixels in each of the regions; A brightness mean picture acquisition unit, used to replace the brightness value of the pixel points in each of the regions with the brightness mean of the pixel points in each of the regions, so as to obtain the brightness mean picture of the original picture; A brightness adjustment unit, configured to adjust the brightness values ​​of pixels in the brightness mean value picture according to the brightness mean value of the original picture, so that the average brightness of the brightness mean value picture after adjustment is within a preset brightness range; A brightness adjustment gain matrix acquisition unit, configured to divide the brightness value of each pixel of the brightness mean image whose brightness value has been adjusted by the brightness value of the corresponding pixel of the original image to obtain a brightness adjustment gain matrix; A final adjusted image acquisition unit, used for multiplying the RGB channels of the original image by the brightness adjustment gain matrix to obtain a final adjusted image; The brightness adjustment unit is specifically used to: obtain the brightness mean picture with adjusted brightness value according to the brightness mean of the original picture, the brightness value of each pixel in the brightness mean picture and the brightness gain relationship; The brightness gain relationship is: x i When <bp, f i =k1*x i ; x i When ≥bp, f i =(k2*(x i ) k3 )- k0; Among them, bp is the preset brightness constant coefficient, x i is the brightness value of the i-th pixel in the brightness mean image, f i is the brightness value of the i-th pixel after adjustment, i is an integer not less than 0, k1, k2, k3 and k0 are all brightness adjustment coefficients, where k1, k2, k3 and k0 are: k3= , avg0 is the average brightness of the original image; k1=1 / ((1 / k3 / bp)^(k3-1)-(1 / k3)*bp+bp); k2=(1 / k3)*k1 / bp^(k3-1); k0=k2*bp^(k3)-k1*bp.

7. A recorder, characterized in that: A device comprising a wireless communication module and a picture processing device according to any one of claims 1 to 5 connected to the wireless communication module; The wireless communication module is used to communicate with the capsule endoscope to obtain the original picture taken by the capsule endoscope.

Citation Information

Patent Citations

  • Image tone dynamic adjustment method and apparatus based on partial block

    CN107993189A

  • Image enhancement method and device, readable storage medium and computer device

    CN109191394A