A method and system for chrominance contrast enhancement
By transforming the pixels of the endoscopic detection device from the first color space to the second color space, calculating the vector length, and enhancing the chromaticity components, the problem of weak chromaticity contrast is solved. This achieves enhanced chromaticity contrast while maintaining constant brightness, thereby improving the accuracy of color judgment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHANGHAI GMT DIGITAL TECH
- Filing Date
- 2023-06-05
- Publication Date
- 2026-05-29
AI Technical Summary
The color contrast of the video obtained by the endoscopic examination equipment is not strong enough, making it difficult for doctors to make accurate judgments based on the colors.
By transforming pixels from the first color space to the second color space, the vector lengths of the luminance and chrominance components are calculated. The amplification factor is then calculated using the vector lengths to enhance the chrominance component and achieve the effect of enhanced chrominance contrast.
While keeping pixel brightness constant, increasing the difference between pixel colors improves chromatic contrast and helps doctors make more accurate color judgments.
Smart Images

Figure CN116883262B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of color science, and in particular to a method for enhancing chromaticity contrast. Background Technology
[0002] The area examined by an endoscope is inside the human body and is normally not exposed to visible light. Therefore, discussing its true color is not very meaningful. The color of the examined area in the video depends not only on its own reflection and refraction properties but also on the color of the light emitted by the endoscope's light source.
[0003] With the continuous development of computer video technology, the application of examination equipment such as gastroscopy and colonoscopy is becoming more and more widespread and their performance is getting better and better. For example, in terms of video resolution, it has reached 720p, 1080p and even 4K. However, the colors in the videos obtained by endoscopy are often not vivid enough, or the color contrast is not strong enough, making it difficult for doctors to make judgments based on colors. Summary of the Invention
[0004] In view of the shortcomings of the prior art described above, the present invention provides a method for enhancing chromaticity contrast by combining two chromaticity components into a vector and calculating the vector length, and simultaneously calculating the amplification factor through the vector length, thereby solving the problem of weak chromaticity contrast.
[0005] To achieve the above and other related objectives, the present invention provides a chromaticity contrast enhancement method comprising: transforming a first pixel from a first color space to a second color space to obtain a luminance component and two chromaticity components; determining whether the luminance component is between the preset maximum and minimum luminance values based on preset maximum and minimum luminance values; when the luminance component is between the preset maximum and minimum luminance values, combining the two chromaticity components of the first pixel into a vector and calculating the length of the vector; calculating the magnification factor of the first pixel based on the length of the vector; enhancing the two chromaticity components of the first pixel using the magnification factor, wherein the enhanced two chromaticity components and the luminance component of the first pixel constitute a second pixel; and transforming the second pixel from the second color space to the first color space to obtain the enhanced first pixel.
[0006] In one embodiment of the present invention, the step of determining whether the brightness component is between the preset maximum brightness value and the preset minimum brightness value further includes: when the brightness component is not between the preset maximum brightness value and the preset minimum brightness value, then other pixels are selected for processing.
[0007] In one embodiment of the present invention, in the step of transforming the first pixel from the first color space to the second color space to obtain one luminance component and two chrominance components, the first color space is the RGB color space, and the second color space includes: YUV color space, HSV color space, and HLS color space.
[0008] In one embodiment of the present invention, the second color space is the YUV color space, the one luminance component is Y, and the two chrominance components are the first chrominance component U and the second chrominance component V.
[0009] In one embodiment of the present invention, the vector expression in the step of combining the two chromaticity components of the first pixel into a vector is as follows:
[0010]
[0011] Among them, among them, Let u represent the first chromaticity component of the first pixel and v represent the second chromaticity component of the first pixel.
[0012] In one embodiment of the present invention, the calculation of the length of the vector is achieved by the following formula:
[0013]
[0014] Where d represents the length of the vector, u represents the first chromaticity component of the first pixel, and v represents the second chromaticity component of the first pixel.
[0015] In one embodiment of the present invention, the calculation of the magnification factor of the first pixel based on the length of the vector is achieved by the following formula:
[0016]
[0017] Where e represents the amplification factor, γ represents the preset enhancement parameter, 0 < γ < 1, and d represents the length of the vector. max d represents the maximum possible value of d, and d0 represents the preset proportional coefficient threshold, where 0 < d0 < 1.
[0018] In one embodiment of the present invention, the two chromaticity components of the first pixel are enhanced using the amplification factor, and the enhanced two chromaticity components and the luminance component of the first pixel constitute the second pixel, which is achieved by the following formula:
[0019] u2=ue
[0020] v2 = ve
[0021] Where u2 represents the first chromaticity component of the second pixel, v2 represents the second chromaticity component of the second pixel, e represents the magnification factor, u represents the first chromaticity component of the first pixel, and v represents the second chromaticity component of the first pixel.
[0022] In one embodiment of the present invention, after the step of converting the second pixel from the second color space to the first color space to obtain the enhanced first pixel, the method further includes: determining whether other pixels in the image or video need to be processed; if processing is required, returning to converting the first pixel from the first color space to the second color space; if processing is not required, ending the process.
[0023] To achieve the above and other related objectives, the present invention also provides a chromaticity contrast enhancement system comprising: a first conversion module for converting a first pixel from a first color space to a second color space to obtain a luminance component and two chromaticity components; a judgment module for determining whether the luminance component is between the preset maximum luminance value and the preset minimum luminance value based on a preset maximum luminance value and a preset minimum luminance value; a first calculation module for combining the two chromaticity components of the first pixel into a vector and calculating the length of the vector when the luminance component is between the preset maximum luminance value and the preset minimum luminance value; a second calculation module for calculating the magnification factor of the first pixel based on the length of the vector; a third calculation module for enhancing the two chromaticity components of the first pixel using the magnification factor, wherein the enhanced two chromaticity components and the luminance component of the first pixel constitute a second pixel; and a second conversion module for converting the second pixel from the second color space to the first color space to obtain the enhanced first pixel.
[0024] The technical effect of this invention lies in providing a chromaticity contrast enhancement method. This method enhances chromaticity contrast by transforming two chromaticity components into a vector and calculating the vector length. The enhanced chromaticity components are then obtained by calculating the amplification factor based on the vector length. This method increases the difference between pixel colors while maintaining pixel brightness, thereby enhancing chromaticity contrast. Attached Figure Description
[0025] Figure 1 This is an application scenario diagram of the color contrast enhancement method proposed in this embodiment;
[0026] Figure 2 This is a flowchart of a color contrast enhancement method proposed in this embodiment;
[0027] Figure 3 This is a flowchart illustrating the specific process for determining whether there are other images that need to be processed, as proposed in this embodiment.
[0028] Figure 4 Here is a flowchart illustrating the specific process of a color contrast enhancement method proposed in this embodiment.
[0029] Figure 5 This is a functional block diagram of the color contrast enhancement system proposed in this embodiment;
[0030] Figure 6 This is a structural block diagram of the electronic device proposed in this embodiment. Detailed Implementation
[0031] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention.
[0032] It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Therefore, the illustrations only show the components related to the present invention and are not drawn according to the actual number, shape and size of the components in the actual implementation. In the actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0033] In the following description, numerous details are explored to provide a more thorough explanation of embodiments of the invention. However, it will be apparent to those skilled in the art that embodiments of the invention may be practiced without these specific details. In other embodiments, well-known structures and devices are shown in block diagram form rather than in detail to avoid obscuring embodiments of the invention.
[0034] Figure 1The embodiment of the present invention provides an application scenario diagram of the chromatic contrast enhancement method. After acquiring video or images from an endoscope, the pixels in the image or video are transformed from a first color space to a second color space. The second color space includes one luminance component and two chromaticity components. When the luminance component is between a preset maximum luminance value and a preset minimum luminance value, the two chromaticity components form a vector. The vector length is calculated, and the amplification factor is calculated using the vector length to obtain the enhanced two chromaticity components. After the enhanced two chromaticity components and one luminance component constitute a second pixel, the second pixel is transformed from the first color space to the second color space to obtain the enhanced first pixel. At this time, the chromatic contrast of the first pixel is enhanced, thereby increasing the difference between pixel colors while maintaining the pixel brightness. In other application scenarios, the chromatic contrast enhancement for various endoscopic videos and images can be set according to the actual situation, and the embodiments of the present invention do not limit this.
[0035] The color contrast enhancement method is applied to one or more electronic devices. The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions. Its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0036] The electronic device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smartphone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc.
[0037] The electronic device may also include network devices and / or user devices. The network devices include, but are not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of hosts or network servers.
[0038] The networks in which the electronic devices are located include, but are not limited to, the Internet, wide area networks, metropolitan area networks, local area networks, and virtual private networks (VPNs).
[0039] Figure 2 This is a flowchart illustrating a chromaticity contrast method provided by an embodiment of the present invention. It should be noted that the present invention enhances the chromaticity contrast of colors presented in the video when an endoscope is detecting a region, and is applicable to various endoscopic videos and images. This method can be applied to... Figure 1 The implementation environment shown is intended to illustrate a method that can also be applied to other instance implementation environments and executed by devices in those environments. This embodiment does not limit the implementation environment to which the method is applicable.
[0040] like Figure 2 As shown, a chromaticity contrast method in this embodiment includes at least:
[0041] Step S21: Transform the first pixel from the first color space to the second color space to obtain one luminance component and two chrominance components. It should be noted that the transformation of the first pixel from the first color space to the second color space is achieved by the following formula:
[0042] y = 0.299r + 0.587g + 0.114b
[0043]
[0044]
[0045] Where y represents the luminance component of the first pixel, u represents the first chrominance component of the first pixel, and v represents the second chrominance component of the first pixel.
[0046] Specifically, the first color space includes the RGB color space, which consists of the three primary colors (red, green, and blue) that constitute various colors, also known as additive colors. It is primarily used for image acquisition and display. The second color space includes the YUV, HSV, and HLS color spaces. Taking the YUV color space as an example, it includes one luminance component (Y) and two chrominance components. In the HSV color space, V represents the luminance component, and in the HLS color space, L represents the luminance component.
[0047] Step S6: Determine whether the brightness component is between the preset maximum brightness value and the preset minimum brightness value based on the preset maximum brightness value and the preset minimum brightness value.
[0048] Step S23: When the luminance component is between the preset maximum luminance value and the preset minimum luminance value, combine the two chrominance components of the first pixel into a vector to calculate the length of the vector. It should be noted that when the luminance component is not between the preset maximum luminance value and the preset minimum luminance value, other pixels are selected for processing.
[0049] Specifically, the combination of the two chromaticity components of the first pixel into a vector is achieved by the following formula:
[0050]
[0051] in, Let u represent the first chromaticity component of the first pixel and v represent the second chromaticity component of the first pixel.
[0052] Furthermore, the length of the vector is calculated using the following formula:
[0053]
[0054] Where d represents the length of the vector, u represents the first chromaticity component of the first pixel, and v represents the second chromaticity component of the first pixel.
[0055] Step S24: Calculate the magnification factor of the first pixel based on the length of the vector. It should be noted that the calculation of the magnification factor of the first pixel is achieved using the following formula:
[0056]
[0057] Where e represents the amplification factor, γ represents the preset enhancement parameter (0 γ < 1), and d represents the length of the vector. max d represents the maximum possible value of d, and d0 represents the preset proportional coefficient threshold, where 0 < d0 < 1.
[0058] Specifically, amplification and enhancement are performed when the length of the vector is less than d0 times the maximum length dmax.
[0059] Step S25: Enhance the two chromaticity components of the first pixel using the amplification factor. The enhanced two chromaticity components and the luminance component of the first pixel constitute the second pixel. It should be noted that the second pixel is formed by the following formula:
[0060] u2=ue
[0061] v2 = ve
[0062] Where u2 represents the first chromaticity component of the second pixel, v2 represents the second chromaticity component of the second pixel, e represents the magnification factor, u represents the first chromaticity component of the first pixel, and v represents the second chromaticity component of the first pixel.
[0063] Specifically, the second pixel consists of one luminance component and two chrominance components, the two chrominance components being the first chrominance component u2 of the second pixel and the second chrominance component v2 of the second pixel. Further, the two chrominance components of the second pixel at this point are enhanced chrominance components, resulting in an enhanced second pixel.
[0064] Step S26: Convert the second pixel from the second color space to the first color space to obtain the enhanced first pixel. It should be noted that the conversion of the second pixel from the second color space to the first color space is achieved by the following formula:
[0065] r = 1.164383 * (y - 16) )+ 1.596027*(v-128)
[0066] g=1.164383*(y-16)-0.391762*(u-128)-0.812968*(v-128)
[0067] b = 1.16438 * (y - 16) )+ 2.017232*(u-128)
[0068] Where y represents the luminance component of the first pixel, u represents the first chrominance component of the second pixel, and v represents the second chrominance component of the second pixel.
[0069] Specifically, the second pixel is an enhanced pixel. The enhanced second pixel is converted from the second color space to the first color space to obtain the enhanced first pixel.
[0070] Furthermore, the distance between colors closer to the origin increases, meaning the difference between the two colors becomes greater, thus enhancing the effect of color contrast.
[0071] Specifically, after the enhanced first pixel, it also includes, for example, Figure 3 As shown, it specifically includes:
[0072] Step S31: Determine whether other pixels in the image or video need to be processed.
[0073] Step S32: If processing is required, return to transforming the first pixel from the first color space to the second color space; otherwise, end the process.
[0074] like Figure 4 The flowchart shown below illustrates the color contrast enhancement method provided in this embodiment. The technical solution of this invention will be described below with reference to a specific embodiment:
[0075] First, set the preset maximum brightness value y. max Preset minimum brightness value y min After setting the threshold for initial color brightness (i.e., the preset proportional coefficient threshold range of 0 < d0 < 1), the pixel colors in the image or video are converted from the RGB color space to the YUV color space. Then, it is determined whether the pixel brightness is between the preset maximum and minimum brightness values. If it is, the two chromaticity components of the pixel are combined into a vector, and the length of the vector is calculated. Based on the calculated vector length, the two enhanced chromaticity components are calculated, and the two enhanced chromaticity components replace the two unenhanced chromaticity components to obtain the enhanced second pixel. The enhanced second pixel is then converted from the YUV color space to the RGB color space, resulting in the enhanced first pixel. Finally, it is determined whether there are any pixels in the image or video that need processing. If so, the process returns to the step of converting the pixels to be processed from the RGB color space to the YUV color space; otherwise, the enhancement process ends.
[0076] In summary, the chromaticity contrast enhancement method provided by this invention transforms two chromaticity components into a vector and calculates the vector length. Then, it calculates the amplification factor based on the vector length to obtain the enhanced two chromaticity components. This method can increase the difference between pixel colors while keeping the pixel brightness constant, thereby achieving the effect of enhancing chromaticity contrast.
[0077] It should be noted that, in order to ensure data security, the data involved can be deployed on a blockchain to prevent the data from being maliciously tampered with.
[0078] It should be noted that the steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they contain the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0079] It should be noted that the aforementioned functional modules can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these modules can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some modules can be implemented by processing element calls to software, while others are implemented in hardware. Additionally, these modules can be fully or partially integrated together, or implemented independently. The processing element mentioned here can be an integrated circuit with signal processing capabilities. In the implementation process, some or all of the steps of the above method, or the aforementioned functional modules, can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.
[0080] like Figure 5 As shown, the present invention also provides a chromaticity contrast enhancement system comprising: a first conversion module 51, a judgment module 52, a first calculation module 53, a second calculation module 54, a third calculation module 55, and a second conversion module 56. The first conversion module 51 is used to transform a first pixel from a first color space to a second color space to obtain one luminance component and two chromaticity components. The judgment module 52 is used to determine whether the luminance component is between the preset maximum and minimum luminance values based on preset maximum and minimum luminance values. The first calculation module 53 is used to combine the two chromaticity components of the first pixel into a vector to calculate the length of the vector when the luminance component is between the preset maximum and minimum luminance values. The second calculation module 54 is used to calculate the magnification factor of the first pixel based on the length of the vector. The third calculation module 55 is used to enhance the two chromaticity components of the first pixel using the magnification factor, and the enhanced two chromaticity components and the luminance component of the first pixel constitute a second pixel. The second conversion module 56 is used to convert the second pixel from the second color space to the first color space to obtain the enhanced first pixel.
[0081] It should be noted that the embodiments provided above are as follows: Figure 5 The chromaticity contrast system shown is based on the same concept as the chromaticity contrast method provided in the above embodiments. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the chromaticity contrast system provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.
[0082] Embodiments of the present invention also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the color contrast method provided in the above embodiments.
[0083] Figure 6 A schematic diagram of a computer system suitable for implementing embodiments of the present invention is shown. It should be noted that... Figure 6 The computer system 600 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0084] like Figure 6As shown, the computer system 600 includes a Central Processing Unit (CPU) 601, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 602 or programs loaded from storage portion 606 into Random Access Memory (RAM) 603, such as performing the methods described in the above embodiments. The RAM 603 also stores various programs and data required for system operation. The CPU 601, ROM 602, and RAM 603 are interconnected via a bus 604. An Input / Output (I / O) interface 605 is also connected to the bus 604.
[0085] The following components are connected to I / O interface 605: an input section 606 including a keyboard, mouse, etc.; an output section 607 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 606 including a hard disk, etc.; and a communication section 608 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 608 performs communication processing via a network such as the Internet. A drive 610 is also connected to I / O interface 605 as needed. A removable medium 611, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 610 as needed so that computer programs read from it can be installed into storage section 606 as needed.
[0086] In particular, according to embodiments of the present invention, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present invention include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing computer programs for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 608, and / or installed from removable medium 611. When the computer program is executed by central processing unit (CPU) 601, it performs various functions defined in the system of the present invention.
[0087] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.
[0088] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0089] The units described in the embodiments of the present invention can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.
[0090] Another aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer's processor, causes the computer to perform the chroma contrast method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not incorporated into the electronic device.
[0091] Another aspect of the present invention provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the color contrast method provided in the various embodiments described above.
[0092] The above embodiments are merely illustrative of the principles and effects of the present invention and are not intended to limit the invention. Any person skilled in the art can modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by those skilled in the art without departing from the spirit and technical concept disclosed in the present invention should still be covered by the claims of the present invention.
Claims
1. A method for enhancing color contrast, characterized in that, include: Transform the first pixel from the first color space to the second color space to obtain one luminance component and two chrominance components; Determine whether the brightness component is between the preset maximum brightness value and the preset minimum brightness value; When the luminance component is between the preset maximum luminance value and the preset minimum luminance value, the two chrominance components of the first pixel are combined into a vector and the length of the vector is calculated. The magnification factor of the first pixel is calculated based on the length of the vector; wherein the formula for calculating the magnification factor of the first pixel is as follows: Indicates the magnification factor. Indicates the preset enhancement parameters. , Represents the length of the vector. express The maximum possible value, This indicates a preset proportional coefficient threshold; 0 < <1; The two chromaticity components of the first pixel are enhanced using the magnification factor, while the value of the luminance component remains unchanged. The enhanced two chromaticity components and the luminance component of the first pixel together form the second pixel. The second pixel is converted from the second color space to the first color space to obtain the enhanced first pixel.
2. The color contrast enhancement method according to claim 1, characterized in that, The step of determining whether the brightness component is between the preset maximum brightness value and the preset minimum brightness value further includes: If the brightness component is not between the preset maximum brightness value and the preset minimum brightness value, then other pixels are selected for processing.
3. The color contrast enhancement method according to claim 1, characterized in that, In the step of transforming the first pixel from the first color space to the second color space to obtain one luminance component and two chrominance components, the first color space is the RGB color space, and the second color space includes the YUV color space, HSV color space, and HLS color space.
4. The color contrast enhancement method according to claim 3, characterized in that, The second color space is the YUV color space, and the one luminance component is... The two chromaticity components are the first chromaticity component. Second chromaticity component .
5. The color contrast enhancement method according to claim 1, characterized in that, The vector expression in the step of combining the two chromaticity components of the first pixel into a vector is as follows: in, Represents a vector. This represents the first chromaticity component of the first pixel. This represents the second chromaticity component of the first pixel.
6. The color contrast enhancement method according to claim 1, characterized in that, The length of the vector is calculated using the following formula: in, Represents the length of the vector. This represents the first chromaticity component of the first pixel. This represents the second chromaticity component of the first pixel.
7. The color contrast enhancement method according to claim 1, characterized in that, The amplification factor is used to enhance the two chromaticity components of the first pixel, and the enhanced two chromaticity components and the luminance component of the first pixel constitute the second pixel, which is achieved by the following formula: in, This represents the first chromaticity component of the second pixel. This represents the second chromaticity component of the second pixel. Indicates the magnification factor. This represents the first chromaticity component of the first pixel. This represents the second chromaticity component of the first pixel.
8. The color contrast enhancement method according to claim 1, characterized in that, The step of converting the second pixel from the second color space to the first color space to obtain the enhanced first pixel further includes: Determine whether other pixels in an image or video need to be processed; If processing is required, return to transforming the first pixel from the first color space to the second color space; otherwise, end the process.
9. A color contrast enhancement system, characterized in that, include: The first conversion module transforms the first pixel from the first color space to the second color space, resulting in one luminance component and two chrominance components. The judgment module determines whether the brightness component is between the preset maximum brightness value and the preset minimum brightness value. The first calculation module combines the two chromaticity components of the first pixel into a vector and calculates the length of the vector when the luminance component is between the preset maximum luminance value and the preset minimum luminance value. The second calculation module calculates the magnification factor of the first pixel based on the length of the vector; wherein the calculation formula for the magnification factor of the first pixel is as follows: Indicates the magnification factor. Indicates the preset enhancement parameters. , Represents the length of the vector. express The maximum possible value, This indicates a preset proportional coefficient threshold; 0 < <1; The third calculation module uses the amplification factor to enhance the two chromaticity components of the first pixel while keeping the value of the luminance component unchanged. The enhanced two chromaticity components and the luminance component of the first pixel constitute the second pixel. The second conversion module converts the second pixel from the second color space to the first color space to obtain the enhanced first pixel.