Endoscope image color correction method and device, endoscope equipment and storage medium
Through the color correction method based on YUV color space, the image captured by the imaging component of the endoscope device is corrected using the conversion matrix, which solves the problem of color distortion of the endoscope image, improves the accuracy of image analysis and realizes real-time correction.
Patent Information
- Application Number
- CN202411997351.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-13
AI Technical Summary
Medical endoscopes are prone to color distortion when shooting the internal tissue structure of the human body, which affects the accuracy of image analysis.
The target image captured by the imaging component of the endoscope device is corrected by the conversion matrix using a color correction method based on the YUV color space. This conversion matrix is obtained by converting the RGB color value of the target color block in the standard color card, and is used to correct the U value and V value in the image, thereby achieving correction of the RGB color value.
It improves the color correction accuracy of the endoscopic image, reduces the amount of correction calculation, and realizes real-time correction, making it easier to detect abnormal lesion areas in a timely manner.
Smart Images

Figure CN119996848A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image processing, and in particular to an endoscopic image color correction method, device, endoscopic equipment and storage medium. Background Art
[0002] Medical endoscopes are a commonly used medical device in modern medicine. They penetrate into the human body through natural cavities to observe the internal tissue structure of the human body. They are generally composed of an imaging system and an image processing system. When doctors use endoscopic images for diagnosis, they mainly observe the subtle changes in the shape and color of tissues such as blood vessels and membranes. However, in actual scenarios, when using medical endoscopes to photograph the internal tissue structure of the human body, color distortion occurs, which in turn causes many adverse effects on the analysis of endoscopic images. Summary of the invention
[0003] In view of this, the present invention provides an endoscopic image color correction method, device, endoscopic equipment and storage medium to solve the problem of color distortion when an endoscope is used to photograph the internal tissue structure of the human body.
[0004] In a first aspect, the present invention provides an endoscopic image color correction method, the method comprising:
[0005] Correcting a target image captured by an imaging component of an endoscope device using a conversion matrix;
[0006] Among them, the conversion matrix is a conversion matrix from the first UV value to the second UV value, the first UV value is converted from the target RGB color value, the target RGB color value is the RGB color value of multiple target color block images, the multiple target color block images are multiple color block images in the standard color card image, the standard color card image is obtained by photographing the standard color card by the imaging component of the endoscope device, and the second UV value is the standard UV value of the target color block in the standard color card.
[0007] In some implementations, the target RGB color value is obtained by:
[0008] For each target color block image, a target area is obtained from the target color block image;
[0009] The median of the RGB color values of the target area is calculated, and the median of the RGB color values of the target area is used as the target RGB color value.
[0010] In some implementations, the target RGB color value is obtained by:
[0011] For each target color block image, calculate the mean of the RGB color values of the target color block image;
[0012] The mean of the RGB color values of the target color block image is taken as the target RGB color value.
[0013] In some embodiments, the calculation formula for converting the target RGB color value into the first UV value is:
[0014]
[0015] Among them, R, G, B are the target RGB color values, and U, V in Y, U, V are the first UV values.
[0016] In some embodiments, the conversion matrix is calculated by the following formula:
[0017] A=X·W T ·(W·W T ) -1
[0018]
[0019] Among them, A is the conversion matrix, X is a 3×N dimensional matrix composed of the standard U0, V0, and U0V0 components of the N target color blocks of the standard color card, and W is a 6×N dimensional matrix composed of the U, V, and UV components of the N target color block images of the standard color card image.
[0020] In some embodiments, the target image captured by the imaging component of the endoscope device is corrected using a conversion matrix, including:
[0021] Convert the RGB color value of the target image to the first YUV value;
[0022] The U value and the V value in the YUV value are corrected by using the conversion matrix to obtain a second YUV value;
[0023] Convert the second YUV value to an RGB color value.
[0024] In some embodiments, the standard color card image is obtained by an imaging component of an endoscope device photographing a standard color card placed in a cavity simulating a light environment in a human body cavity.
[0025] In a second aspect, the present invention provides an endoscopic image color correction device, the device comprising:
[0026] An image correction module, used to correct a target image captured by an imaging component of an endoscope device using a conversion matrix;
[0027] Among them, the conversion matrix is a conversion matrix from the first UV value to the second UV value, the first UV value is converted from the target RGB color value, the target RGB color value is the RGB color value of multiple target color block images, the multiple target color block images are multiple color block images in the standard color card image, the standard color card image is obtained by photographing the standard color card by the imaging component of the endoscope device, and the second UV value is the standard UV value of the target color block in the standard color card.
[0028] In a third aspect, the present invention provides an endoscope 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 endoscope image color correction method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0029] 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 color correction method of the first aspect or any corresponding embodiment thereof.
[0030] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the endoscopic image color correction method of the first aspect or any corresponding embodiment thereof.
[0031] The endoscopic image color correction method, device, endoscopic equipment and storage medium provided in the embodiments of the present invention improve the correction accuracy through color correction based on the YUV color space, and the correction calculation amount is small and the speed is fast. Real-time correction of endoscopic images can be achieved, which is convenient for users to promptly find abnormal lesion areas when using endoscopic equipment to examine the inspection object. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] 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.
[0033] Figure 1 is a flow chart of an endoscopic image color correction method according to an embodiment of the present invention;
[0034] Figure 2 is a schematic flow chart of a method for obtaining a conversion matrix according to an embodiment of the present invention;
[0035] Figure 3is a flow chart of another method for color correction of an endoscope image according to an embodiment of the present invention;
[0036] Figure 4 is a structural block diagram of an endoscope image color correction device according to an embodiment of the present invention;
[0037] Figure 5 Schematic diagram of the hardware structure of the endoscope device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0038] 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.
[0039] In the related art, color correction is mainly used to obtain color-accurate endoscopic images. There are two main types of related color correction methods:
[0040] The first type is a color correction method based on spectral reflectance restoration. According to the system imaging model, the spectral reflectance of the object is restored from the collected color value, and then the standard color value is obtained by combining the spectral power distribution of the standard light source. This method is based on a finite-dimensional linear model and has high color correction accuracy, but the amount of calculation is large and it is not suitable for endoscope equipment with high real-time requirements.
[0041] The second category is the color correction method based on mapping relationship, which realizes the conversion of color space by determining the mapping relationship from source color space to target color space. This type of method is often used in color correction processing of image devices such as digital cameras, displays, scanners, printers, etc. The most typical color correction method based on mapping is the matrix method, which uses the conversion matrix to realize the conversion of color space. However, due to the small dimension of the conversion matrix, the correction effect is often not very ideal.
[0042] The embodiment of the present invention provides an endoscopic image color correction method, which improves the correction accuracy through color correction based on the YUV color space, and has a small amount of correction calculation and a fast speed, and can realize real-time correction of the endoscopic image, so that the user can find abnormal lesion areas in time when using the endoscopic equipment to inspect the inspection object.
[0043] According to an embodiment of the present invention, an embodiment of an endoscopic image color correction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in an endoscopic device that can execute 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.
[0044] In this embodiment, a method for color correction of an endoscope image is provided, which can be used in various computer devices, including but not limited to endoscope devices. Figure 1 is a flow chart of a method for color correction of an endoscopic image according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0045] Step S101, using a conversion matrix to correct a target image captured by an imaging component of an endoscope device;
[0046] Among them, the conversion matrix is a conversion matrix from the first UV value to the second UV value, the first UV value is converted from the target RGB color value, the target RGB color value is the RGB color value of multiple target color block images, the multiple target color block images are multiple color block images in the standard color card image, the standard color card image is obtained by photographing the standard color card by the imaging component of the endoscope device, and the second UV value is the standard UV value of the target color block in the standard color card.
[0047] Specifically, in some optional specific implementations, such as Figure 2 As shown, the transformation matrix is obtained by the following method:
[0048] Step S001, obtaining a standard color card image captured by an imaging component of an endoscope device. The captured standard color card may be, for example, a standard 24-color color card.
[0049] In some embodiments, the standard color card image is obtained by an imaging component of an endoscope device photographing a standard color card placed in a cavity simulating a light environment in the human body. The cavity simulating a light environment in the human body is used to accommodate the standard color card, and its light environment is set to be substantially consistent with the ring line environment in the human body cavity.
[0050] In addition, since the light environments of different human body cavities (such as the intestines, stomach, etc.) are different, the light environment in the human body cavity can be adjusted to simulate the light environment in the cavity, that is, to simulate the light environment in different human body cavities and simulate different light in the cavity.
[0051] Furthermore, since the inner walls of different human body cavities (such as the intestines, stomach, etc.) reflect light differently, when the human body cavity light environment simulation cavity simulates different types of human body cavity light environments, not only the light needs to be adjusted, but the inner wall also needs to be replaced. Different inner walls are used to simulate different types of light reflection conditions of human body cavities.
[0052] Step S002, obtain the target RGB color values corresponding to the multiple target color block images in the standard color card image. The standard color card has multiple color blocks, for example, the standard 24-color color card has 24 color blocks. In the image obtained by photographing the standard color card with an endoscope, each color block image corresponds to the color block of the standard color card one by one. The RGB color mode is a color standard in the industry. It obtains a variety of colors by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other. RGB represents the colors of the three channels of red, green, and blue. The image collected by the endoscope equipment is also in the RGB color mode.
[0053] In some implementations, step S002, i.e., obtaining target RGB color values corresponding to a plurality of target color block images in a standard color card image, includes:
[0054] Step S0021, obtaining a target area from each of the plurality of target color block images in the standard color card image.
[0055] For example, a 3×3 pixel rectangular frame can be used to select a 3×3 pixel target area from each of the 24 color block images. The target area can also be 4×4 pixels, 5×5 pixels, and so on.
[0056] The color block images in the standard color card image can be divided according to the pixel value of the pixel point, the shape of the color block image (square) and the relative position of the color block image in the image.
[0057] Step S0022, calculating the median of the RGB color values of the target area, and taking the median of the RGB color values of the target area as the target RGB color value.
[0058] The calculation formula for the median RGB color value is:
[0059] g(x,y)=median{f(xk,yl)}(k,l∈W)
[0060] Among them, f(x,y), g(x,y) are the original image and the processed image respectively, and W is a rectangular box of 3×3 pixels.
[0061] In some other implementations, step S002, i.e., obtaining target RGB color values corresponding to a plurality of target color block images in the standard color card image, includes:
[0062] Step 1: for each target color block image, calculate the mean of the RGB color values of the target color block image;
[0063] The color block images in the image can be divided according to the pixel value of the pixel point, the shape of the color block image (square) and the relative position of the color block image in the image. In order to improve the accuracy of the target RGB color value, the edge of the color block image can be removed and then the average of the RGB color value can be calculated. For example, the average of the RGB color value of the color block image can be calculated after removing the 5 pixel points at the edge.
[0064] Step 2: Take the mean of the RGB color values of the target color block image as the target RGB color value.
[0065] Step S003, convert the target RGB color value into a first UV value. YUV is a color encoding method, "Y" represents brightness (Luminance or Luma), that is, grayscale value, "U" and "V" represent chrominance (Chrominance or Chroma), which is used to describe the color and saturation of the image and is used to specify the color of the pixel.
[0066] Specifically, the calculation formula for converting the target RGB color value to the first UV value is:
[0067]
[0068] Among them, R, G, B are the target RGB color values, and U, V in Y, U, V are the first UV values.
[0069] Alternatively, Y = 0.299×R + 0.587×G + 0.114×B; U = -0.169×R - 0.331×G + 0.5×B; V = 0.5×R - 0.419×G - 0.081×B.
[0070] Step S004, obtaining a second UV value of the target color block in the standard color card. The second UV value is the standard UV value.
[0071] Step S005, calculating a conversion matrix from the first UV value to the second UV value.
[0072] In the embodiment of the present invention, a conversion matrix A from the first UV value to the second UV value is obtained by fitting the UV value using a polynomial regression method. The specific calculation method is as follows:
[0073]
[0074] Among them, U 0i ,V 0i is the UV value of the i-th color block, that is, the second UV value, Ui ,V i The value is the UV value of the i-th color block image, that is, the first UV value.
[0075] The above matrix form is: X = AW, A is the conversion matrix:
[0076]
[0077] X is a 3×N dimensional matrix composed of standard U0, V0, and U0V0 components of the N target color blocks of the standard color card, and W is a 6×N dimensional matrix composed of U, V, and UV components of the N target color block images of the standard color card image.
[0078]
[0079] If the standard color card has 24 colors, then N is 24.
[0080] Deduced from the principle of least squares method:
[0081] A=X·W T ·(W·W T ) -1
[0082] The superscript T represents the matrix transpose, and the superscript -1 represents the matrix inverse.
[0083] In some specific implementations, step S101, please refer to Figure 3 , that is, using the conversion matrix to correct the target image captured by the imaging component of the endoscope device, including:
[0084] Step S1011, converting the RGB color value of the target image into a first YUV value;
[0085] Step S1012, using the conversion matrix to correct the U value and the V value in the YUV value to obtain a second YUV value;
[0086] Step S1013: convert the second YUV value into an RGB color value.
[0087] In the embodiment of the present invention, the above correction process may be performed on each pixel in the target image, thereby completing the color correction of the entire target image.
[0088] In an embodiment of the present invention, when performing color correction of endoscopic images, it is not necessary to execute the above steps S001-S005 each time. When there is no major change in the imaging component of the endoscopic device, the obtained conversion matrix can be used all the time to perform color correction on each image captured by the imaging component of the endoscopic device.
[0089] In some specific implementations, the above step S1012, i.e., using the conversion matrix to correct the U value and the V value in the YUV value to obtain the second YUV value, includes:
[0090] Step S10121, determining the type of the human body cavity corresponding to the target image; the type of the human body cavity corresponding to the target image is the type of the human body cavity where the target image is captured, such as the intestine, stomach, cardia, etc. For example, if the imaging component of the endoscope device captures the target image of the intestine, then the type of the human body cavity corresponding to the target image is the intestine.
[0091] Step S10122, obtaining a target conversion matrix corresponding to the type of human body cavity. The target conversion matrix corresponding to each type of human body cavity can be obtained in advance. Specifically, a standard color card can be placed in a cavity simulating the light environment of the human body cavity, and then the light in the simulation cavity is adjusted to be consistent with the light environment of a type of human body cavity. Then, the imaging component of the endoscope device is used to shoot the standard color card in the simulation cavity to obtain an image, and finally, the conversion matrix corresponding to the type of human body cavity is obtained according to the above steps S001-S005. Repeating this method multiple times can obtain conversion matrices corresponding to multiple different types of human body cavities.
[0092] In other optional specific implementations, when the human body cavity light environment simulation cavity simulates different types of human body cavity light environments, not only the light needs to be adjusted, but the inner wall also needs to be replaced. Different inner walls are used to simulate different types of light reflection conditions of the human body cavity.
[0093] Step S10123: Use the target conversion matrix to correct the U value and the V value in the YUV value to obtain a second YUV value.
[0094] In an embodiment of the present invention, a human body inner cavity light environment simulation cavity is used to simulate the light environment inside the human body inner cavity, thereby correcting the color distortion of the endoscopic image caused by the light environment inside the human body inner cavity, and further improving the accuracy of the endoscopic image color correction.
[0095] In this embodiment, an endoscopic image color correction 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 for 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.
[0096] This embodiment provides an endoscope image color correction device, such as Figure 4 As shown, including:
[0097] The image correction module 401 is used to correct the target image captured by the imaging component of the endoscope device using a conversion matrix; wherein the conversion matrix is a conversion matrix from a first UV value to a second UV value, the first UV value is converted from a target RGB color value, the target RGB color value is an RGB color value of a plurality of target color block images, the plurality of target color block images are a plurality of color block images in a standard color card image, the standard color card image is obtained by capturing a standard color card by the imaging component of the endoscope device, and the second UV value is a standard UV value of the target color block in the standard color card.
[0098] In some embodiments, the endoscopic image color correction device further comprises:
[0099] A target region acquisition module is used to acquire a target region from each target color block image;
[0100] The median calculation module is used to calculate the median of the RGB color value of the target area, and take the median of the RGB color value of the target area as the target RGB color value.
[0101] In some embodiments, the endoscopic image color correction device further comprises:
[0102] A mean value calculation module is used to calculate the mean values of the RGB color values of the color block image respectively;
[0103] The determination module is used to take the average of the RGB color values of the color block image as the target RGB color value.
[0104] In some embodiments, the calculation formula for converting the target RGB color value into the first UV value is:
[0105]
[0106] Among them, R, G, B are the target RGB color values, and U, V in Y, U, V are the first UV values.
[0107] In some embodiments, the conversion matrix is calculated by the following formula:
[0108] A=X·W T ·(W·W T ) -1
[0109]
[0110] Among them, A is the conversion matrix, X is a 3×N dimensional matrix composed of the standard U0, V0, and U0V0 components of the N target color blocks of the standard color card, and W is a 6×N dimensional matrix composed of the U, V, and UV components of the N target color blocks of the standard color card image.
[0111] In some embodiments, the image correction module 401 includes:
[0112] A first conversion unit, used for converting the RGB color value of the target image into a first YUV value;
[0113] A correction unit, used for correcting the U value and the V value in the YUV value by using the conversion matrix to obtain a second YUV value;
[0114] The second conversion unit is used to convert the second YUV value into an RGB color value.
[0115] In some embodiments, the image of the standard color card is obtained by photographing the standard color card placed in a cavity simulating a light environment in the human body cavity by an imaging component of the endoscope device.
[0116] 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.
[0117] The endoscopic image color correction 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.
[0118] The embodiment of the present invention also provides an endoscope device having the above Figure 4 The endoscopic image color correction device is shown.
[0119] See also Figure 5 , Figure 5 is a schematic diagram of the structure of an endoscope device provided by an optional embodiment of the present invention, such as Figure 5 As shown, the endoscope 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 endoscope 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 5 A processor 10 is taken as an example.
[0120] 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.
[0121] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0122] 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 for at least one function; the data storage area may store data created according to the use of the endoscopic 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 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.
[0123] 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.
[0124] The endoscope device also 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 5 The example of connecting through bus is taken in the following.
[0125] 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 endoscope 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 can be a touch screen.
[0126] The endoscope device also includes a communication interface for the endoscope device to communicate with other devices or a communication network.
[0127] 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.
[0128] 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.
[0129] 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. A method for color correction of an endoscopic image, characterized in that: The method comprises: Correcting a target image captured by an imaging component of an endoscope device using a conversion matrix; Among them, the conversion matrix is a conversion matrix from a first UV value to a second UV value, the first UV value is obtained by converting a target RGB color value, the target RGB color value is an RGB color value of a plurality of target color block images, the plurality of target color block images are a plurality of color block images in a standard color card image, the standard color card image is obtained by photographing a standard color card by an imaging component of the endoscope device, and the second UV value is a standard UV value of a target color block in the standard color card.
2. The method for color correction of an endoscope image according to claim 1, characterized in that: The target RGB color value is obtained by the following method: For each of the target color block images, obtaining a target area from the target color block image; The median of the RGB color values of the target area is calculated, and the median of the RGB color values of the target area is used as the target RGB color value.
3. The method for color correction of an endoscope image according to claim 1, characterized in that: The target RGB color value is obtained by the following method: For each of the target color block images, calculating the average of the RGB color values of the target color block image; The average of the RGB color values of the target color block image is used as the target RGB color value.
4. The method for color correction of an endoscope image according to claim 1, characterized in that: The calculation formula for converting the target RGB color value into the first UV value is: Among them, R, G, B are the target RGB color values, and U, V in Y, U, V are the first UV values.
5. The method for color correction of an endoscope image according to claim 1, characterized in that: The conversion matrix is calculated by the following formula: A=X·W T ·(W·W T ) -1 Wherein, A is the conversion matrix, X is a 3×N dimensional matrix composed of standard U0, V0, and U0V0 components of the N target color blocks of the standard color card, and W is a 6×N dimensional matrix composed of U, V, and UV components of the N target color block images of the standard color card image.
6. The method for color correction of an endoscopic image according to any one of claims 1 to 5, characterized in that: The method of correcting the target image captured by the imaging component of the endoscope device by using the conversion matrix includes: Convert the RGB color value of the target image into a first YUV value; Using the conversion matrix to correct the U value and the V value in the YUV value to obtain a second YUV value; Convert the second YUV value to an RGB color value.
7. The method for color correction of an endoscope image according to claim 1, characterized in that: The standard color card image is obtained by the imaging component of the endoscope device photographing the standard color card placed in a cavity simulating the light environment of the human body cavity.
8. An endoscope image color correction device, characterized in that: The device comprises: An image correction module, used to correct a target image captured by an imaging component of an endoscope device using a conversion matrix; Among them, the conversion matrix is a conversion matrix from a first UV value to a second UV value, the first UV value is obtained by converting a target RGB color value, the target RGB color value is an RGB color value of a plurality of target color block images, the plurality of target color block images are a plurality of color block images in a standard color card image, the standard color card image is obtained by photographing a standard color card by an imaging component of the endoscope device, and the second UV value is a standard UV value of a target color block in the standard color card.
9. An endoscope 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 color correction method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the endoscopic image color correction method according to any one of claims 1 to 7.