WO2021217647A1 - Procédé et appareil de traitement de couleurs d'une image - Google Patents

Procédé et appareil de traitement de couleurs d'une image Download PDF

Info

Publication number
WO2021217647A1
WO2021217647A1 PCT/CN2020/088476 CN2020088476W WO2021217647A1 WO 2021217647 A1 WO2021217647 A1 WO 2021217647A1 CN 2020088476 W CN2020088476 W CN 2020088476W WO 2021217647 A1 WO2021217647 A1 WO 2021217647A1
Authority
WO
WIPO (PCT)
Prior art keywords
value
color
look
pixel
coefficient
Prior art date
Application number
PCT/CN2020/088476
Other languages
English (en)
Chinese (zh)
Inventor
李蒙
陈海
王海军
张秀峰
郑成林
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202080096708.5A priority Critical patent/CN115088253A/zh
Priority to PCT/CN2020/088476 priority patent/WO2021217647A1/fr
Publication of WO2021217647A1 publication Critical patent/WO2021217647A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/02Digital function generators
    • G06F1/03Digital function generators working, at least partly, by table look-up
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/556Logarithmic or exponential functions

Definitions

  • This application relates to the field of image processing technology, and in particular to an image color processing method and device.
  • the optical digital imaging process converts the light radiation of the real scene into electrical signals through the image sensor, and saves them in the form of digital images.
  • the purpose of image display is to reproduce the real scene described by a digital image through the display device. In this way, the user obtains the same visual perception as he directly observes the real scene.
  • the present application provides an image color processing method and device, which are used to adjust the image color and improve the image quality.
  • an image color processing method is provided.
  • the execution subject of the method may be a terminal device.
  • the method specifically includes: determining the color values of multiple color components of pixels of an image to be processed; determining the brightness values of the pixels, respectively The ratio with the color values of the multiple color components; determine the first color adjustment coefficient of the pixel according to the ratio and a first look-up table; perform color processing on the pixel according to the first color adjustment coefficient To get the target image.
  • the first color adjustment coefficient is determined to perform color processing on the image to be processed, which can reduce the color deviation phenomenon of the color processed image and improve the color processing The quality of the image.
  • each step can be implemented by the hardware circuit of the terminal device.
  • the method of determining the first color adjustment coefficient through the first look-up table can realize the processing of the integer data, so that the execution process of the image color processing flow can be implemented to
  • the hardware circuit improves the practical application possibilities of the image color processing method.
  • the first look-up table includes a mapping relationship between a color adjustment coefficient and a preset ratio.
  • the determination of the first color adjustment coefficient of the pixel according to the ratio and the first look-up table may include the following situations: when the preset ratio includes the ratio: according to The mapping relationship determines the first color adjustment coefficient corresponding to the ratio; when the preset ratio does not include the ratio: determine the first preset ratio and the second preset ratio in the first look-up table According to the mapping relationship, respectively determine the first coefficient and the second coefficient corresponding to the first preset ratio and the second preset ratio; perform an interpolation operation on the first coefficient and the second coefficient, To obtain the first color adjustment coefficient corresponding to the ratio.
  • determining the first color adjustment system through the interpolation method can reduce the number of entry values in the first look-up table, so that the space occupied by the first look-up table is reduced, and the complexity of the hardware circuit is reduced.
  • the interpolation operation includes any of the following types of operations: linear interpolation, near interpolation, bilinear quadratic interpolation, cubic interpolation, or Lanczos interpolation.
  • the mapping relationship between the first entry value of the first look-up table and the first look-up table value satisfies the first power function.
  • the first table item value may correspond to a color adjustment coefficient
  • the first look-up table value may correspond to a preset ratio.
  • the exponent b of the first power function is a function coefficient.
  • the coefficient b of the first power function can be determined by means of a look-up table using the statistical information of the image or image sequence.
  • the statistical information of the image or image sequence can include the maximum, minimum, average, standard deviation, and histogram distribution of the image or image sequence. information.
  • the first look-up table value is a fixed-point value; the determination of the first table entry value of the first look-up table can be achieved in the following manner: according to the bit width of the color value The maximum value of the value range of, the fixed-point value is inversely quantized to obtain a floating-point value; the floating-point value is determined based on the function value of the first power function; and the quantization coefficient is preset to The function value is quantized to obtain the first entry value of the first look-up table.
  • Determining the value of the first entry of the first lookup table by the above method can make the value of the lookup table of the first lookup table and the value of the first entry be fixed-point values, and the mapping relationship conforms to the first power function, so that the value of the first lookup table Both the input data and output data can be fixed-point values, which implements the possibility of hardware circuits.
  • the above-mentioned method can be implemented by software, so that the actual usability of the image color processing flow is improved through the separation of software and hardware. And this part of the method is realized by software, and the software process can be updated at any time according to the effect of image color processing, so that the adaptability is high and the effect is good.
  • the first look-up table value is determined based on the step size between the index value of the first look-up table and the index value of the first look-up table.
  • the step size can be an integer equal to or greater than one.
  • the method further includes: determining the first look-up table corresponding to the first value range in which the ratio is located; wherein the value range determined by the bit width of the color value includes The first value range and the second value range corresponding to the second lookup table.
  • mapping relationship between the second table entry value of the second look-up table and the second look-up table value satisfies the first power function.
  • the method for generating the second lookup table is similar to that of the first lookup table, and can be cross-referenced.
  • the minimum value of the first value range is greater than the maximum value of the second value range
  • the first lookup value of the first lookup table is based on the index value of the first lookup table, the step size between the index values of the first lookup table, and the maximum value of the second value range Sure.
  • the first lookup value of the first lookup table is based on the index of the first lookup table The step size between the value and the index value of the first look-up table is determined.
  • the step size between the index values of the first look-up table and the step size between the index values of the second look-up table may be different.
  • the color processing of the pixel according to the first color adjustment coefficient can be achieved by: determining the second color adjustment coefficient of the pixel; adjusting the first color The coefficient is multiplied by the second color adjustment coefficient; and color processing is performed on the pixel according to the product of the multiplication.
  • the image to be processed is an image that has undergone dynamic range adjustment processing; the determining the second color adjustment coefficient of the pixel includes the following steps: determining that the pixel is after the dynamic range adjustment processing And the ratio of the electrical signal before the dynamic range adjustment processing; and the second color adjustment coefficient is determined according to the ratio of the electrical signal.
  • the color deviation phenomenon caused by the dynamic range adjustment processing of the image to be processed can be reduced, and the quality of the image subjected to color processing can be improved.
  • the second color adjustment coefficient corresponding to the electrical signal ratio is determined by looking up a table.
  • the second color adjustment coefficient is determined according to the electrical signal ratio and a third look-up table; the third look-up table includes a mapping relationship between the color adjustment coefficient and a preset ratio, and the mapping relationship conforms to the second power function.
  • the multiple color components include R, G, and B components in the RGB space, and the target image is obtained according to the following formula:
  • R, G, and B respectively represent the color value of the R component, the color value of the G component and the color value of the B component of the pixel, and R', G', and B'respectively represent the R of the corresponding pixel in the target image.
  • the color value of the component, the color value of the G component, and the color value of the B component, Y represents the brightness value of the pixel
  • AlphyR0 represents the first color adjustment coefficient corresponding to the R component of the pixel
  • AlphyG0 represents the G component of the pixel
  • AlphyB0 represents the first color adjustment coefficient corresponding to the B component of the pixel
  • Alphy1 represents the second color adjustment coefficient
  • A1 is the quantization coefficient of Alphy1
  • A2 is the quantization coefficient of AlphyR0 Coefficient
  • A3 is the quantized coefficient of AlphyG0
  • A4 is the quantized coefficient of AlphyB0.
  • the multiple color components include U and V components in YUV space, and the target image is obtained according to the following formula:
  • U and V respectively represent the color value of the U component and the color value of the V component of the pixel
  • U′, V′ respectively represent the color value of the U component and the color value of the V component of the corresponding pixel in the target image
  • AlphyU0 represents the first color adjustment coefficient corresponding to the U component of the pixel
  • AlphyV0 represents the first color adjustment coefficient corresponding to the V component of the pixel
  • Alphy1 represents the second color adjustment coefficient
  • A1 is the quantization coefficient of Alphy1
  • A2 is the quantized coefficient of AlphyU0
  • A3 is the quantized coefficient of AlphyV0.
  • an image color processing device in a second aspect, can be a terminal device, a device in a terminal device (such as a chip, or a chip system, or a circuit), or a device that can be matched with the terminal device.
  • the device may include modules that perform one-to-one correspondence of the methods/operations/steps/actions described in the first aspect.
  • the modules may be hardware circuits, software, or hardware circuits combined with software.
  • the device may include a determination module and a processing module. Illustratively:
  • the determining module is used to determine the color values of the multiple color components of the pixels of the image to be processed; determine the ratio of the brightness value of the pixel to the color values of the multiple color components respectively; according to the ratio and the first look-up table , Determining the first color adjustment coefficient of the pixel; a processing module, configured to perform color processing on the pixel according to the first color adjustment coefficient to obtain a target image.
  • the first look-up table includes a mapping relationship between a color adjustment coefficient and a preset ratio.
  • the determining module when determining the first color adjustment coefficient of the pixel according to the ratio and the first look-up table, is specifically configured to: when the preset ratio includes the ratio: According to the mapping relationship, determine the first color adjustment coefficient corresponding to the ratio; when the preset ratio does not include the ratio: determine the first preset ratio and the second preset in the first look-up table Ratio; according to the mapping relationship, respectively determine the first coefficient and the second coefficient corresponding to the first preset ratio and the second preset ratio; perform interpolation operations on the first coefficient and the second coefficient , To obtain the first color adjustment coefficient corresponding to the ratio.
  • the interpolation operation includes any of the following types of operations: linear interpolation, near interpolation, bilinear quadratic interpolation, cubic interpolation, or Lanczos interpolation.
  • the mapping relationship between the first entry value of the first look-up table and the first look-up table value satisfies the first power function.
  • the first table item value may correspond to a color adjustment coefficient
  • the first look-up table value may correspond to a preset ratio.
  • the exponent b of the first power function is a function coefficient.
  • the coefficient b of the first power function can be determined by means of a look-up table using the statistical information of the image or image sequence.
  • the statistical information of the image or image sequence can include the maximum, minimum, average, standard deviation, and histogram distribution of the image or image sequence. information.
  • the first look-up table value is a fixed-point value
  • the determining module is specifically configured to: dequantize the fixed-point value according to the maximum value of the value range determined by the bit width of the color value to Obtain a floating-point value; determine that the floating-point value is based on the function value of the first power function; quantize the function value according to a preset quantization coefficient to obtain the first entry of the first look-up table Numerical value.
  • the first look-up table value is determined based on the step size between the index value of the first look-up table and the index value of the first look-up table.
  • the determining module is further configured to: determine the first look-up table corresponding to the first value range in which the ratio is located; wherein the value determined by the bit width of the color value The range includes the first value range and the second value range corresponding to the second lookup table.
  • mapping relationship between the second table entry value of the second look-up table and the second look-up table value satisfies the first power function.
  • the minimum value of the first value range is greater than the maximum value of the second value range
  • the first lookup value of the first lookup table is based on the index value of the first lookup table, the step size between the index values of the first lookup table, and the maximum value of the second value range Sure.
  • the step size between the index values of the first look-up table and the step size between the index values of the second look-up table are different.
  • the processing module when performing color processing on the pixel according to the first color adjustment coefficient, is specifically configured to: determine the second color adjustment coefficient of the pixel; The color adjustment coefficient is multiplied by the second color adjustment coefficient; and color processing is performed on the pixel according to the product of the multiplication.
  • the image to be processed is an image processed by dynamic range adjustment
  • the determining module is specifically configured to: determine the ratio of the electrical signal of the pixel after the dynamic range adjustment process and before the dynamic range adjustment process; The ratio of the electrical signal determines the second color adjustment coefficient.
  • the second color adjustment coefficient corresponding to the electrical signal ratio is determined by looking up a table.
  • the multiple color components include R, G, and B components in the RGB space, and the target image is obtained according to the following formula:
  • R, G, and B respectively represent the color value of the R component, the color value of the G component and the color value of the B component of the pixel, and R', G', and B'respectively represent the R of the corresponding pixel in the target image.
  • the color value of the component, the color value of the G component, and the color value of the B component, Y represents the brightness value of the pixel
  • AlphyR0 represents the first color adjustment coefficient corresponding to the R component of the pixel
  • AlphyG0 represents the G component of the pixel
  • AlphyB0 represents the first color adjustment coefficient corresponding to the B component of the pixel
  • Alphy1 represents the second color adjustment coefficient
  • A1 is the quantization coefficient of Alphy1
  • A2 is the quantization coefficient of AlphyR0 Coefficient
  • A3 is the quantized coefficient of AlphyG0
  • A4 is the quantized coefficient of AlphyB0.
  • the multiple color components include U and V components in YUV space, and the target image is obtained according to the following formula:
  • U and V respectively represent the color value of the U component and the color value of the V component of the pixel
  • U′, V′ respectively represent the color value of the U component and the color value of the V component of the corresponding pixel in the target image
  • AlphyU0 represents the first color adjustment coefficient corresponding to the U component of the pixel
  • AlphyV0 represents the first color adjustment coefficient corresponding to the V component of the pixel
  • Alphy1 represents the second color adjustment coefficient
  • A1 is the quantization coefficient of Alphy1
  • A2 is the quantized coefficient of AlphyU0
  • A3 is the quantized coefficient of AlphyV0.
  • an embodiment of the present application provides an image color processing device, the device includes a processor, and the processor is used to call a set of programs, instructions, or data to execute the first aspect or any possible design of the first aspect.
  • the described method may also include a memory for storing programs, instructions or data called by the processor.
  • the memory is coupled with the processor, and when the processor executes the instructions or data stored in the memory, it can implement the method described in the first aspect or any possible design.
  • an embodiment of the present application provides a chip system, which includes a processor and may also include a memory, for implementing the method described in the first aspect or any one of the possible designs of the first aspect.
  • the chip system can be composed of chips, or it can include chips and other discrete devices.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium stores computer-readable instructions.
  • the method described in one aspect or any one of the possible designs of the first aspect is executed.
  • the embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the method described in the first aspect or any possible design of the first aspect .
  • Figure 1 is a schematic structural diagram of a terminal device in an embodiment of the application
  • FIG. 2 is a schematic diagram of image color processing by a terminal device in an embodiment of the application
  • FIG. 3 is a schematic flowchart of an image color processing method in an embodiment of the application.
  • FIG. 4 is a schematic flow chart of a color processing method for an RGB format image in an embodiment of the application
  • FIG. 5 is one of the schematic diagrams of the structure of the image color processing device in an embodiment of the application.
  • FIG. 6 is the second structural diagram of the image color processing device in the embodiment of the application.
  • the embodiments of the present application provide an image color processing method and device, in order to realize the adjustment of the image color and improve the image quality.
  • the method and the device are based on the same or similar technical conception. Since the method and the device have similar principles for solving the problem, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.
  • references described in this specification to "one embodiment” or “some embodiments”, etc. mean that one or more embodiments of the present application include a specific feature, structure, or characteristic described in combination with the embodiment. Therefore, the sentences “in one embodiment”, “in some embodiments”, “in some other embodiments”, “in some other embodiments”, etc. appearing in different places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless it is specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variations all mean “including but not limited to”, unless otherwise specifically emphasized.
  • the image-based color processing method and device provided in the embodiments of the present application can be applied to electronic equipment.
  • the electronic device can be a mobile device such as a mobile terminal (mobile terminal), a mobile station (MS), user equipment (UE), etc., or a fixed device, such as a fixed telephone, a desktop computer, etc., or Video monitor.
  • the electronic device has an image color processing function.
  • the electronic device can also optionally have a wireless connection function to provide users with a handheld device with voice and/or data connectivity, or other processing devices connected to a wireless modem.
  • the electronic device can be a mobile phone (or (Called "cellular" phones), computers with mobile terminals, etc., can also be portable, pocket-sized, handheld, computer-built or vehicle-mounted mobile devices, of course, can also be wearable devices (such as smart watches, smart bracelets) Etc.), tablet computers, personal computers (PC), personal digital assistants (PDAs), point of sales (POS), etc.
  • a terminal device may be used as an example for description.
  • FIG. 1 is a schematic diagram of an optional hardware structure of a terminal device 100 related to an embodiment of this application.
  • the terminal device 100 mainly includes a chip set, where the chip set can be used to process image colors.
  • the chip set includes an image signal processor (ISP), and the ISP processes image colors.
  • the chipset in the terminal device 100 further includes other modules, and the terminal device 100 may also include peripheral devices. The details are as follows.
  • the power management unit PMU
  • voice data codec codec
  • short-distance module and radio frequency RF
  • arithmetic processor random-access memory
  • PMU voice data codec
  • RF radio frequency
  • Memory RAM
  • input/output input/output
  • display interface sensor hub
  • Sensor hub baseband communication module and other components make up a chip or chipset.
  • Components such as USB interface, memory, display screen, battery/mains power, earphone/speaker, antenna, sensor, etc. can be understood as peripheral devices.
  • the arithmetic processor, RAM, I/O, display interface, ISP, Sensor hub, baseband and other components in the chipset can form a system-on-a-chip (SOC), which is the main part of the chipset.
  • SOC system-on-a-chip
  • the components in the SOC can all be integrated into a complete chip, or part of the components in the SOC can be integrated, and the other parts are not integrated.
  • the baseband communication module in the SOC can not be integrated with other parts and become an independent part.
  • the components in the SOC can be connected to each other through a bus or other connecting lines.
  • the PMU, voice codec, RF, etc. outside the SOC usually include analog circuit parts, so they are often outside the SOC and are not integrated with each other.
  • the PMU is used for external mains or batteries to supply power to the SOC, and the mains can be used to charge the battery.
  • the voice codec is used as the sound codec unit to connect with earphones or speakers to realize the conversion between natural analog voice signals and digital voice signals that can be processed by the SOC.
  • the short-range module can include wireless fidelity (WiFi) and Bluetooth, and can also optionally include infrared, near field communication (NFC), radio (FM), or global positioning system (GPS) ) Module etc.
  • the RF is connected with the baseband communication module in the SOC to realize the conversion between the air interface RF signal and the baseband signal, that is, mixing. For mobile phones, receiving is down-conversion, and sending is up-conversion.
  • Baseband is used for baseband communication, including one or more of a variety of communication modes, used for processing wireless communication protocols, including physical layer (layer 1), medium access control (MAC) ( The processing of each protocol layer such as layer 2), radio resource control (RRC) (layer 3), etc., can support various cellular communication standards, such as long term evolution (LTE) communication, or 5G new air interface ( new radio, NR) communication, etc.
  • the Sensor hub is an interface between the SOC and external sensors, and is used to collect and process data from at least one external sensor.
  • the external sensors can be, for example, accelerometers, gyroscopes, control sensors, image sensors, and so on.
  • the arithmetic processor can be a general-purpose processor, such as a central processing unit (CPU), or one or more integrated circuits, such as one or more application specific integrated circuits (ASICs), or , One or more digital signal processors (digital signal processors, DSP), or microprocessors, or, one or more field programmable gate arrays (FPGA), etc.
  • the arithmetic processor can include one or more cores, and can selectively schedule other units.
  • RAM can store some intermediate data during calculation or processing, such as intermediate calculation data of CPU and baseband.
  • ISP is used to process the data collected by the image sensor.
  • I/O is used for the SOC to interact with various external interfaces, such as the universal serial bus (USB) interface for data transmission.
  • USB universal serial bus
  • the memory can be a chip or a group of chips.
  • the display screen can be a touch screen, which is connected to the bus through a display interface.
  • the display interface can be used for data processing before image display, such as aliasing of multiple layers to be displayed, buffering of display data, or control and adjustment of screen brightness.
  • the image signal processor involved in the embodiment of the present application may be one or a group of chips, that is, it may be integrated or independent.
  • the image signal processor included in the terminal device 100 may be an integrated ISP chip integrated in the arithmetic processor.
  • Figure 2 shows a schematic diagram of image color processing by a terminal device.
  • the terminal device can perform image processing on the input image to be processed.
  • the image processing process can include image color processing, and can also include other processing processes such as dynamic range adjustment processing.
  • the terminal device outputs The processed target image.
  • the ISP in the terminal device can process the image color to obtain the processed target image.
  • the format of the image may be a red, green, and blue (RGB) format, may also be a bright color separation (YUV) format, or may be a Bayer format.
  • RGB red, green, and blue
  • YUV bright color separation
  • the image may include one or more pixels, and each pixel includes one or more dimensional image color components.
  • the color in the embodiment of the present invention may include hue and saturation. Among them, components can also be referred to as channels, signals, color components, and so on.
  • the color component can also be referred to as the channel of the color space, the channel of the color space, the color component of the color space, and so on.
  • the color value represents the digital expression value of the image color component of the image pixel.
  • the color value of the color component may include the U component and the V component of the YUV space.
  • the color value can include the R component, G component, and B component of the RGB space.
  • the color value of the color component can also be understood as the corresponding color component value, color channel value, color component value, and so on.
  • the lookup table can be any form of lookup table that can be understood by those skilled in the art.
  • a one-dimensional (1D) lookup table is used in the embodiment of the present application.
  • the lookup table includes a series of input data and output data, and the input data and the output data have a one-to-one correspondence.
  • the output data in the lookup table can be embodied in the form of table item values, and the input data can be expressed as the lookup table value.
  • the look-up table value may not be displayed in the look-up table, and the look-up table value is expressed in the form of table item index or table item subscript. That is, the lookup table includes one or more table item values, and each table item value corresponds to a lookup table value. By inputting the lookup table value, the table item value corresponding to the lookup table value can be obtained.
  • lookup table can be embodied in a table form, or can be embodied in other forms that can represent the corresponding relationship between the input data and the output data.
  • a first lookup table, a second lookup table, or a third lookup table is used to represent multiple lookup tables, and the concept of each lookup table can refer to the description in point 4) of this article.
  • the image color processing method provided by the embodiment of the present application is as follows. This method can be executed by the terminal device shown in FIG. 1 or by other devices with image color processing functions.
  • S301 Determine color values of multiple color components of pixels of the image to be processed.
  • S302 Determine the ratio of the brightness value of the pixel of the image to be processed to the color value of the multiple color components.
  • the method for determining the brightness value of the pixel is not limited in the embodiment of the present application.
  • the brightness value may be the brightness value of the Y component of the YUV space.
  • the brightness value of the Y component can be calculated based on the color values of the R component, G component, and B component.
  • a 11 , a 12 , and a 13 are fixed coefficients.
  • YUV space For the YUV space, it includes two color components, and the ratio of the luminance value Y of the pixel to the color values of the two color components can be expressed as Y/U and Y/V respectively.
  • RGB space For the RGB space, it includes 3 color components, and the ratio of the luminance value Y of the pixel to the color values of the 3 color components can be expressed as Y/R, Y/G, and Y/B, respectively.
  • S303 Determine the first color adjustment coefficient of the pixels of the image to be processed according to the ratio obtained in S302 and the first look-up table.
  • the first look-up table includes or indicates the mapping relationship between the color adjustment coefficient and the preset ratio.
  • the preset ratio can be used as input data, and the color adjustment coefficient can be used as output data.
  • S304 Perform color processing on pixels of the image to be processed according to the first color adjustment coefficient to obtain a target image.
  • the image to be processed may include multiple pixels, and each pixel can be processed according to the process shown in FIG. 3 to obtain the target image.
  • the first color adjustment coefficient is determined according to the ratio of the brightness value of the pixel of the image to be processed to the color value of the color component to perform color processing on the image to be processed, which can reduce the color deviation phenomenon of the image to be processed. Improved the quality of the image for color processing.
  • each step of the embodiment in FIG. 3 can be implemented by the hardware circuit of the terminal device.
  • the method of determining the first color adjustment coefficient through the first look-up table can realize the processing of the integer data, so that the image color processing flow can be changed.
  • the implementation of the process is implemented in the hardware circuit to improve the practical application possibilities of the image color processing method.
  • the input data of the first look-up table can be floating-point values, integer values or fixed-point values. Take the input data of the first look-up table as a fixed-point value as an example.
  • the value range of the input data of the lookup table may be determined according to the bit width of the color value, and the value range of the input data of the lookup table may be less than or equal to the value range determined by the bit width of the color value.
  • the color value is an integer value
  • the color value is N bits, and N is a positive integer.
  • the color value is 8 bits, 10 bits, 12 bits, 14 bits, or 16 bits.
  • the value range of the color value is (0 ⁇ 2 N -1) or (1 ⁇ 2 N ).
  • the value of the color value of an RGB image is 10 bits
  • the value range of the color value is (0-2 10 -1).
  • the look-up table value of the look-up table is used as the input data, and the output data is the table item value of the look-up table.
  • the mapping relationship between the table entry value of the lookup table and the lookup table value satisfies the first power function. That is, the table look-up value is input into the first power function for operation to obtain the corresponding table item value.
  • the look-up table value is a fixed-point value
  • the look-up table can be generated in the following way.
  • the look-up table value (that is, the fixed-point value) is inversely quantized to obtain the floating-point value.
  • the maximum value of the value range determined by the bit width of the color value is 2 N -1
  • the look-up table value is M
  • the floating point value M1 is obtained by M/(2 N -1).
  • Determine the function value of the floating point value based on the first power function for example, substituting the floating point value M1 into the first power function for calculation to obtain M2.
  • M2 is a floating-point value.
  • the function value is quantized to obtain the entry value of the look-up table.
  • the data obtained after M2 quantization is a fixed-point value.
  • the table item value corresponding to each look-up table value can be obtained, thereby generating the look-up table.
  • the look-up table value of the look-up table is the input data of the look-up table, which is used to obtain the corresponding table item value according to the look-up table value.
  • the index value of the lookup table is the sequence number of the table item value, which is generally generated according to the order of natural numbers from small to large or from large to small.
  • the look-up table value can be determined according to the index value and the step length between the index value.
  • the value range of the first look-up table value of the first look-up table described in the embodiment of FIG. 3 is determined by the bit width of the color value.
  • the value of the color value is N bits
  • the value range of the color value is (0-2 N -1)
  • the maximum value is 2 N -1.
  • the first look-up table value can be set to a value from 0 to 2 N -1.
  • the sequence number of the first entry value in the first lookup table can be referred to as the index value of the first lookup table. For example, if the first lookup table includes L entry values, then the sequence number of the first lookup table entry value is 0 ⁇ L-1 or (1 ⁇ L), L is a positive integer.
  • the index value of the first look-up table is 0 ⁇ L-1 or (1 ⁇ L).
  • the step length between every two index values in the lookup table can be 1 or an integer greater than 1.
  • the first look-up table value is determined based on the index value of the first look-up table and the step size between the index value. When the first look-up table value is 2 N , the first look-up table value corresponds to the index value one-to-one, and the step size is 1.
  • the color value is 12 bits, the color value ranges from 0 to 4095, and the maximum value is 4095.
  • the index value can be from 0 to 4095, or from 1 to 4096. Assuming that the index value can be 0 ⁇ 1023, the step size is 4, and the table lookup value M is (0,4,8,12,16,20,...,4092) in turn.
  • the value range determined by the bit width of the color value includes a first value range and at least one second value range. That is, the value range determined by the bit width of the color value may include multiple subsets. Each subset is a value range, and the union of multiple subsets is the value range determined by the bit width of the color value, or the union of multiple subsets can also be smaller than the value determined by the bit width of the color value Scope. Generally, two subsets are taken as an example, that is, the value range determined by the bit width of the color value includes a first value range and a second value range. The value range of the table look-up value of the first look-up table described in the embodiment of FIG. 3 is the first value range.
  • the value of the color value is N bits
  • the value range of the color value is (0-2 N -1)
  • the maximum value is 2 N -1.
  • the second value range is (0 ⁇ N1)
  • the first value range is (N1+1 ⁇ 2 N -1)
  • the minimum value of the first value range is greater than the maximum value of the second value range.
  • the value range of the table lookup value of the first lookup table is (N1+1 ⁇ 2 N -1), and the first lookup table value can be set to a value in (N1+1 ⁇ 2 N -1).
  • the sequence number of the first entry value in the first lookup table can be referred to as the index value of the first lookup table.
  • the sequence number of the first lookup table entry value is 0 ⁇ L-1 or (1 ⁇ L)
  • L is a positive integer
  • the index value of the first look-up table is 0 ⁇ L-1 or (1 ⁇ L).
  • the step size between every two index values in the first look-up table may be 1 or an integer greater than 1.
  • the first look-up table value is determined based on the index value of the first look-up table and the step size between the index value.
  • the first look-up table value can have a one-to-one correspondence with the index value, that is, the step size is 1.
  • the step size can also be greater than 1.
  • a second lookup table can be generated according to the second value range, and the value range of the table lookup value of the second lookup table corresponds to the second value range.
  • the value range of the table lookup value of the second lookup table is (0 ⁇ N1), and the second lookup table value can be set to a value in (0 ⁇ N1).
  • the sequence number of the second entry value in the second lookup table can be called the index value of the second lookup table. For example, if the second lookup table includes L1 entry values, the sequence number of the second lookup table entry value is 0 ⁇ L1-1 or (1 ⁇ L1), L1 is a positive integer.
  • the index value of the second lookup table is 0 ⁇ L1-1 or (1 ⁇ L1).
  • the step size between every two index values in the second lookup table may be 1 or an integer greater than 1.
  • the second look-up table value is determined based on the index value of the second look-up table and the step size between the index value.
  • the second look-up table value can have a one-to-one correspondence with the index value, that is, the step size is 1.
  • the step size can also be greater than 1.
  • the step size between the index values of the first look-up table and the step size between the index values of the second look-up table may be the same or different.
  • the color value is 12 bits
  • the color value ranges from 0 to 4095
  • the maximum value is 4095.
  • the second value range is (0 ⁇ 255)
  • the first value range is (256 ⁇ 4095).
  • the number of entries in the second look-up table is 64
  • the value of the entries in the second look-up table is (0,4,8,12,16,20 , Jerusalem,252).
  • the index value of the second lookup table may be 0-63, or 1-64.
  • the index value of the first look-up table may be 0-127, or 1-128.
  • look-up table generation process can be applied to the first look-up table, and can also be applied to the second look-up table.
  • the first look-up table corresponds to the first value range.
  • the first lookup table corresponding to the first value range in which the ratio is located may also be determined. For example, a threshold can be set, and the value range of the ratio can be determined according to the comparison result of the ratio and the threshold, and the lookup table corresponding to the value range can be further determined.
  • the ratio is less than the threshold, the second value range of the ratio is determined, the second lookup table corresponding to the second value range is determined, and the color adjustment coefficient corresponding to the ratio is determined based on the ratio and the second lookup table.
  • the first value range of the ratio is determined, and the first lookup table corresponding to the first value range is determined, and the first color adjustment corresponding to the ratio is determined according to the ratio and the first lookup table. coefficient.
  • the color value is 12 bits
  • the maximum value is 4095.
  • the second value range is (0 ⁇ 255)
  • the first value range is (256 ⁇ 4095).
  • the threshold can be set to 256.
  • the color adjustment coefficient can also be determined according to the following comparison method.
  • the ratio is less than or equal to the threshold, the second value range of the ratio is determined, the second lookup table corresponding to the second value range is determined, and the color adjustment coefficient corresponding to the ratio is determined based on the ratio and the second lookup table.
  • the ratio is greater than the threshold, the first value range of the ratio is determined, the first lookup table corresponding to the first value range is determined, and the first color adjustment coefficient corresponding to the ratio is determined according to the ratio and the first lookup table.
  • the color value is 12 bits, the color value ranges from 0 to 4095, and the maximum value is 4095.
  • the second value range is (0 ⁇ 255), and the first value range is (256 ⁇ 4095).
  • the threshold can be set to 255.
  • the following describes a possible implementation manner of determining the first color adjustment coefficient of the pixel according to the ratio and the first look-up table in S303.
  • the first lookup table includes the mapping relationship between the color adjustment coefficient and the preset ratio. It can be understood that the preset ratio is the lookup value of the first lookup table, and the color adjustment coefficient is the entry in the first lookup table corresponding to the lookup value. data.
  • the first color adjustment coefficient of the pixel is determined according to the ratio and the first look-up table.
  • the preset ratio of the first look-up table may include the ratio, and the first color adjustment coefficient corresponding to the ratio can be determined according to the mapping relationship between the color adjustment coefficient and the preset ratio.
  • the ratio may not be included in the preset ratio of the first look-up table.
  • the first color adjustment coefficient corresponding to the ratio may be determined by interpolation.
  • interpolation method is a method of estimating unknown data from known discrete data in numerical analysis in the field of mathematics.
  • the interpolation method used to determine the first color adjustment coefficient corresponding to the ratio may be an interpolation method, an extrapolation method, a linear interpolation method, or a nonlinear interpolation method, or It is any of the near interpolation method, bilinear quadratic interpolation method, cubic interpolation method or Lanczos interpolation method, and the specific interpolation method can be selected according to the actual situation.
  • the first preset ratio and the second preset ratio may be determined in the first look-up table, and the correspondence between the first preset ratio and the second preset ratio may be determined according to the mapping relationship between the color adjustment coefficient and the preset ratio.
  • the first coefficient and the second coefficient of, the first coefficient and the second coefficient are interpolated to obtain the first color adjustment coefficient corresponding to the ratio.
  • the first preset ratio and the second preset ratio may be two ratios that are adjacent to the ratio.
  • the ratio is located between the first preset ratio and the second preset ratio, and is between the first preset ratio and the second preset ratio.
  • the ratio is adjacent to both the first preset ratio and the second preset ratio.
  • the first preset ratio and the second preset ratio are both smaller than the ratio, and among the preset ratios, the ratio, the first preset ratio, and the second preset ratio are three Adjacent; or, the first preset ratio and the second preset ratio are both greater than the ratio, and in the preset ratio, the ratio, the first preset ratio, and the second preset ratio are adjacent to each other.
  • the step length of the first lookup table (LUT1) is 2 step , the number of entries in the first lookup table is NUM, and max is the input value of the lookup table interpolation.
  • the following is an example of how to perform linear interpolation on the first look-up table (LUT) to obtain the color adjustment coefficient corresponding to the ratio.
  • the final interpolation data3:data3 (data1*(step-dec)+data2*dec)/step.
  • data3 is the color adjustment coefficient corresponding to the ratio.
  • the first lookup table corresponds to the first value range.
  • LUT first look-up table
  • Radio1 Radio-thres.
  • data3 (data1*(step-dec)+data2*dec)/step.
  • data3 is the color adjustment coefficient corresponding to the ratio.
  • the process of generating the first lookup table is a software process, which can be implemented by software.
  • the software process can be packaged as firmware/software (firmware).
  • firmware/software firmware
  • Each step in the embodiment of FIG. 3 is a hardware flow, which can be implemented by a hardware circuit.
  • the hardware circuit of the terminal device can process each frame of the image to be processed according to the steps of the embodiment in FIG. 3 to obtain each frame to be processed.
  • the target image corresponding to the image.
  • the firmware/software of the terminal device may generate the first look-up table.
  • the terminal device's separation of software and hardware for the color processing process of the image may not be limited to the implementation manners exemplified in this paragraph.
  • the first power function is explained below.
  • the exponent b of the first power function is the function coefficient.
  • the coefficient b of the first power function can be determined by means of a look-up table using the statistical information of the image or image sequence.
  • the statistical information of the image or image sequence can include the maximum, minimum, average, standard deviation, and histogram distribution of the image or image sequence. information.
  • the average brightness value of the image to be processed may refer to the average value of the brightness of the image to be processed or a sequence of images to be processed.
  • the corresponding relationship may be as shown in Table 1 or Table 2.
  • the range of the average brightness value in Table 1 or Table 2 is [0,1].
  • the average brightness value when the average brightness value of the image to be processed is obtained, the average brightness value may be the average value of the Y component of the image to be processed, or the average value of other components of the image to be processed.
  • the exponent of the first power function when the average brightness value is less than 0.1, the exponent of the first power function can be 1.2; when the average brightness value is greater than 0.6, the exponent of the first power function can be 0.2.
  • the average brightness value is between the two table values, the exponential value of the first power function can be obtained by interpolation.
  • the embodiment of the present application does not limit the interpolation method. For example, linear interpolation, quadratic linear interpolation, etc. can be adopted. For example, when the average brightness value is between 0.55 and 0.6, the following linear interpolation method can be adopted to obtain the exponent value of the first power function:
  • the above-mentioned output represents the exponential value of the first power function
  • the above-mentioned input represents the average brightness value of the image to be processed or the sequence of images to be processed.
  • the power function in the embodiment of the present application can also be replaced with a linear function.
  • each ratio corresponds to a first look-up table.
  • the multiple first look-up tables corresponding to the multiple ratios may be different, that is, the mapping relationship between the color adjustment coefficients and the preset ratios included or indicated by the multiple first look-up tables may be different.
  • the mapping relationship between the value of the table entry of the first look-up table and the value of the look-up table satisfies the first power function. Then the exponent values of the multiple first power functions corresponding to multiple ratios may be different, and of course there may also be the same situation.
  • Y represents the brightness value of the image to be processed
  • R, G, and B respectively represent the color value of the R component, the color value of the G component and the color value of the B component of the image to be processed
  • R', G', and B' respectively represent The color value of the R component, the color value of the G component, and the color value of the B component of the target image
  • a 1 represents the first color adjustment coefficient corresponding to the R component
  • a 2 represents the first color adjustment coefficient corresponding to the G component
  • a 3 represents The first color adjustment coefficient corresponding to the B component.
  • a 1 , a 2 or a 3 can be floating-point values or fixed-point values.
  • u, v respectively represent the color value of the U component and the color value of the V component of the image to be processed
  • u', v' respectively represent the color value of the U component and the color value of the V component of the target image
  • a 4 represents the U component
  • a 5 represents the first color adjustment coefficient corresponding to the V component.
  • the first color adjustment coefficient may be preset.
  • the first color adjustment coefficient may be obtained through calibration of experimental data.
  • the mapping relationship between the first color adjustment coefficient and the color value of the color component of the pixel may be calculated based on experimental data, and the first color adjustment coefficient may be determined based on the mapping relationship.
  • the first color adjustment coefficient corresponding to the pixels of the image to be processed is determined to perform color processing on the image to be processed, which can improve the quality of the image for color processing.
  • the above-mentioned second color adjustment coefficient may be a color adjustment coefficient of a given image to be processed, or may be determined according to other methods.
  • the image to be processed may be an image that has undergone a dynamic range adjustment process
  • the dynamic range adjustment process means compressing or stretching the electrical signal value (for example, Y component, R component, G component, B component) of the image.
  • the dynamic range adjustment processing of the image may cause the color deviation phenomenon of the image.
  • the second color adjustment coefficient may be determined according to the ratio of the electrical signal.
  • the electrical signal ratio may be the electrical signal ratio of the electrical signal value of each pixel after the dynamic range adjustment process and the electrical signal value before the dynamic range adjustment process.
  • the process of converting an image between high dynamic range (HDR) and standard dynamic range (standard dynamic range, SDR) involves adjusting the dynamic range of the image.
  • the electrical signal value can be the Y component in the YUV space, or the R component, G component, and B component in the RGB space.
  • the dynamic range adjustment processing of the electrical signal value of the image to be processed can be as shown in the following formula (3):
  • the electrical signal value before the dynamic range adjustment processing is Y 1
  • the electrical signal value after the dynamic range adjustment processing is Y 2
  • c is the ratio of the electrical signals before and after the dynamic range adjustment processing.
  • the color value of the image to be processed is subjected to dynamic range adjustment processing, as shown in the following formula (4):
  • the color values before the dynamic range adjustment processing are R 1 , G 1 , B 1
  • the color values after the dynamic range adjustment processing are R 2 , G 2 , B 2
  • f is the ratio of the electrical signals before and after the dynamic range adjustment processing.
  • f can be the ratio of the largest component in RGB.
  • determining the second color adjustment coefficient according to the electrical signal ratio includes multiple methods.
  • the electrical signal ratio can be directly determined as the second color adjustment coefficient.
  • the second color adjustment coefficient corresponding to the electrical signal ratio is determined by looking up a table.
  • the second color adjustment coefficient is determined according to the ratio of the electrical signal and the look-up table (denoted as the third look-up table).
  • the third look-up table includes or indicates the mapping relationship between the color adjustment coefficient and the preset ratio, and the mapping relationship between the color adjustment coefficient and the preset ratio conforms to the second power function.
  • the second color adjustment coefficient may also be determined according to the ratio of the electrical signal and the second power function, and the second color adjustment coefficient may be a value obtained by substituting the ratio of the electrical signal into the second power function.
  • the process of determining the second color adjustment coefficient according to the ratio of the electrical signal and the third look-up table may be implemented by a hardware circuit, and the process of generating the third look-up table may be implemented by firmware/software.
  • the value of d can be determined by a fixed value selected by those skilled in the art based on experimental data and experience, or by using image or image sequence statistical information through a look-up table.
  • the image or image sequence statistical information can include the maximum value of the image or image sequence. , Minimum, average, standard deviation, and histogram distribution information.
  • the average brightness value of the image to be processed may refer to the average value of the brightness of the image to be processed or a sequence of images to be processed.
  • the corresponding relationship may be as shown in Table 3 or Table 4.
  • the average brightness value in Table 3 or Table 4 is expressed in a normalized manner, and its range is [0,1]. Among them, 1 represents the maximum value of the brightness value, and 0 represents the minimum value of the brightness value.
  • the target image in S304 can be obtained in the following manner.
  • the target image is obtained according to the following formula (5):
  • R, G, B respectively represent the color value of the R component of the pixel, the color value of the G component and the color value of the B component
  • R', G', B' respectively represent the color value of the R component of the corresponding pixel in the target image
  • Y represents the brightness value of the pixel
  • AlphyR0 represents the first color adjustment coefficient corresponding to the R component of the pixel
  • AlphyG0 represents the first color adjustment coefficient corresponding to the G component of the pixel
  • AlphyB0 represents The first color adjustment coefficient corresponding to the B component of the pixel
  • Alphy1 represents the second color adjustment coefficient
  • A1 is the quantization coefficient of Alphy1
  • A2 is the quantization coefficient of AlphyR0
  • A3 is the quantization coefficient of AlphyG0
  • A4 is the quantization coefficient of AlphyB0.
  • the target image is obtained according to the following formula (6):
  • U and V respectively represent the color value of the U component and the color value of the V component of the pixel
  • U′, V′ respectively represent the color value of the U component and the color value of the V component of the corresponding pixel in the target image
  • AlphyU0 represents the color value of the pixel
  • AlphyV0 represents the first color adjustment coefficient corresponding to the V component of the pixel
  • Alphy1 represents the second color adjustment coefficient
  • A1 is the quantization coefficient of Alphy1
  • A2 is the quantization coefficient of AlphyU0
  • A3 is the quantization coefficient of AlphyV0 Quantization coefficient.
  • FIG. 4 taking an image in RGB format as an example, an optional embodiment of a specific scene is introduced.
  • the processing process of any pixel of the image to be processed is described.
  • Each pixel of the multiple pixels included in the image to be processed can be operated with reference to the method shown in FIG. Target image.
  • the electrical signal ratio a may be the electrical signal ratio between the electrical signal value of each pixel of the image to be processed after the dynamic range adjustment processing and the electrical signal value before the dynamic range adjustment processing.
  • S402 Calculate the brightness value Y of the pixels of the image to be processed according to the color values R, G, and B.
  • the value range determined by the bit width of the color value includes multiple value ranges, and each value range corresponds to a look-up table, then before substituting the electrical signal ratio a into the look-up table 1, it is also necessary to determine the electrical For the value range of signal ratio a, select the lookup table corresponding to the value range of a. This optional step is indicated by a dashed frame in FIG. 4.
  • the coefficient d can be determined by means of a look-up table using the statistical information of the image or image sequence.
  • the coefficient d can be determined according to Table 2.
  • d can be a fixed value selected based on experience, such as 0.2.
  • S404 Calculate the ratios of the brightness value Y to the color values R, G, and B of the three color components: Y/R, Y/G, and Y/B.
  • the index b can be determined by means of a look-up table using statistical information of the image or image sequence.
  • the index b can be determined according to Table 1.
  • the value range determined by the bit width of the color value includes multiple value ranges, and a lookup table is generated for each value range, before substituting Y/R into the lookup table 2, it is also necessary to determine Y/ For the value range of R, select the lookup table corresponding to the value range of Y/R.
  • Y/G and Y/B before substituting Y/G and Y/B into look-up table 3 and look-up table 4, you need to determine the value range of Y/G and Y/B respectively, and choose the value range where Y/G and Y/B are located.
  • the lookup table corresponding to the value range Of course, the number of look-up tables corresponding to Y/R, Y/G, and Y/B may be inconsistent.
  • Y/R corresponds to multiple look-up tables
  • Y/G and Y/B respectively correspond to one look-up table. Only when there are multiple lookup tables, it is necessary to compare with the threshold before substituting into the difference table.
  • the thresholds for Y/R, Y/G, or Y/B comparison may be the same or different. This optional step is not illustrated in FIG. 4.
  • the three color channels of the pixel are color-processed and the corresponding color values R', G', B'. Specifically, it can be implemented through the following S406 to S409.
  • S406 Multiply Alphy1 with AlphyR0, AlphyG0, and AlphyB0 respectively to obtain three products BetaR, BetaG, and BetaB.
  • S407 Multiply BetaR, BetaG, and BetaB by (R-Y), (G-Y), and (B-Y), respectively, to obtain (R-Y)', (G-Y)', and (B-Y)'.
  • S408 use A1 and A2 to divide or shift (RY)', use A1 and A3 to divide or shift (GY)', and use A1 and A4 to divide or shift (BY)' to obtain ( RY)”, (GY)” and (BY)”.
  • the shift operation refers to shifting the exponent to the left.
  • A is 2 R1
  • Z is 2 R2
  • A is used to shift a value Z, that is, shift A to the left by R1 bits
  • the result of the operation is 2 R2-R1 .
  • the result of the shift operation is the same as that of the division operation.
  • the terminal device may include a hardware structure and/or a software module, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a certain function among the above-mentioned functions is executed by a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraint conditions of the technical solution.
  • an embodiment of the present application further provides an image color processing apparatus 500, which may be a mobile terminal or any device with an image processing function.
  • the image color processing device 500 may include modules that perform one-to-one correspondence of the methods/operations/steps/actions in the foregoing method embodiments.
  • the modules may be hardware circuits, software, or hardware circuits. Combined with software implementation.
  • the image color processing device 500 may include a determining module 501 and a processing module 502.
  • the hardware circuit is called hardware (hardware) or c pipe (cpipe).
  • the determining module 501 is used to determine the color values of the multiple color components of the pixels of the image to be processed; determine the ratio of the brightness value of the pixel to the color values of the multiple color components, respectively; according to the ratio and the first look-up table , Determining the first color adjustment coefficient of the pixel.
  • the processing module 502 is configured to perform color processing on the pixels according to the first color adjustment coefficient to obtain a target image.
  • the determining module 501 and the processing module 502 may be hardware circuits.
  • the determining module 501 when determining the first color adjustment coefficient of the pixel according to the ratio and the first look-up table, is specifically configured to: when the preset ratio includes the ratio: The mapping relationship, determine the first color adjustment coefficient corresponding to the ratio; when the preset ratio does not include the ratio: determine the first preset ratio and the second preset ratio in the first look-up table; According to the mapping relationship, the first coefficient and the second coefficient corresponding to the first preset ratio and the second preset ratio are respectively determined; an interpolation operation is performed on the first coefficient and the second coefficient to The first color adjustment coefficient corresponding to the ratio is obtained.
  • the determination module 501 may be a hardware circuit.
  • the first look-up table value is a fixed-point value
  • the determining module 501 when determining the first entry value of the first look-up table, is specifically configured to: according to the value determined by the bit width of the color value The maximum value of the range, dequantize the fixed-point value to obtain a floating-point value; determine that the floating-point value is based on the function value of the first power function; perform the function value on the preset quantization coefficient Quantify to obtain the value of the first entry of the first look-up table.
  • the determining module 501 may be software.
  • the determining module 501 is further configured to determine the first look-up table corresponding to the first value range where the ratio is located; wherein the value range determined by the bit width of the color value includes The first value range and the second value range corresponding to the second lookup table.
  • the determination module 501 may be a hardware circuit.
  • the determining module 501 and the processing module 502 may also be used to perform other corresponding steps or operations in the foregoing method embodiments, which will not be repeated here.
  • the division of modules in the embodiments of this application is illustrative, and it is only a logical function division. In actual implementation, there may be other division methods.
  • the functional modules in the various embodiments of this application can be integrated into one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules.
  • an embodiment of the present application also provides an image color processing apparatus 600.
  • the image color processing device 600 includes a processor 601.
  • the processor 601 is used to call a group of programs, so that the foregoing method embodiments are executed.
  • the image color processing device 600 further includes a memory 602, and the memory 602 is configured to store program instructions and/or data executed by the processor 601.
  • the memory 602 and the processor 601 are coupled.
  • the coupling in the embodiments of the present application is an indirect coupling or communication connection between devices, units or modules, and may be in electrical, mechanical or other forms, and is used for information exchange between devices, units or modules.
  • the processor 601 may operate in cooperation with the memory 602.
  • the processor 601 may execute program instructions stored in the memory 602.
  • the memory 602 may be included in the processor 601.
  • the image color processing device 600 may be a chip system.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the chip system is an application specific integrated circuit (ASIC) chip
  • the hardware part of the image color processing device 600 is a c-model (cmode) emulated by an ASIC core, and the above-mentioned cmode can achieve bit consistency with the ASIC chip.
  • ASIC application specific integrated circuit
  • the processor 601 is configured to input the image to be processed into the first neural network for calculation to obtain a first image, the first image being a first component image of the image to be processed that has been processed by the first neural network;
  • the image and the image to be processed are vector concatenated (concatenate) to obtain a first image matrix to be processed;
  • the second component image of the processed image processed by the second neural network based on the second image, the processed image is obtained.
  • the processor 601 may also be used to execute other corresponding steps or operations in the foregoing method embodiments, which will not be repeated here.
  • the processor 601 may be a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and may implement or execute the The disclosed methods, steps and logic block diagrams.
  • the general-purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in combination with the embodiments of the present application may be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor.
  • the memory 602 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., and may also be a volatile memory, such as random access memory (random access memory). -access memory, RAM).
  • the memory is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.
  • the memory in the embodiments of the present application may also be a circuit or any other device capable of realizing a storage function for storing program instructions and/or data.
  • the embodiment of the present application also provides a chip including a processor, which is used to support the image color processing device to implement the functions involved in the foregoing method embodiments.
  • the chip is connected to a memory or the chip includes a memory, and the memory is used to store the necessary program instructions and data of the communication device.
  • the embodiment of the present application provides a computer-readable storage medium that stores a computer program, and the computer program includes instructions for executing the foregoing method embodiments.
  • the embodiments of the present application provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the foregoing method embodiments.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Optimization (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)
  • Color Image Communication Systems (AREA)

Abstract

La présente invention concerne un procédé et un appareil de traitement de couleurs d'une image. Le procédé comprend : la détermination de valeurs chromatiques d'une pluralité de composantes de couleur d'un pixel d'une image à soumettre à un traitement (S301) ; la détermination respective des rapports d'une valeur de luminosité du pixel sur les valeurs chromatiques de la pluralité de composantes de couleur (S302) ; la détermination d'un premier coefficient de réglage de couleur du pixel selon les rapports et une première table de conversion (S303) ; et la réalisation d'un traitement de couleurs sur le pixel selon le premier coefficient de réglage de couleur de façon à obtenir une image cible (S304). Par conséquent, le phénomène d'écart de couleur d'une image soumise à un traitement de couleurs peut être réduit et la qualité de l'image soumise au traitement de couleurs est améliorée. Chaque étape peut être mise en œuvre au moyen d'un circuit matériel d'un dispositif de terminal, par exemple, le traitement de données entières peut être mis en œuvre au moyen de la détermination du premier coefficient de réglage de couleur au moyen de la première table de conversion de sorte que le processus d'exécution d'une procédure de traitement de couleurs d'une image peut être mis en œuvre dans le circuit matériel, et les possibilités d'application pratique du procédé de traitement de couleurs d'une image peuvent être augmentées.
PCT/CN2020/088476 2020-04-30 2020-04-30 Procédé et appareil de traitement de couleurs d'une image WO2021217647A1 (fr)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080096708.5A CN115088253A (zh) 2020-04-30 2020-04-30 一种图像色彩处理方法及装置
PCT/CN2020/088476 WO2021217647A1 (fr) 2020-04-30 2020-04-30 Procédé et appareil de traitement de couleurs d'une image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/088476 WO2021217647A1 (fr) 2020-04-30 2020-04-30 Procédé et appareil de traitement de couleurs d'une image

Publications (1)

Publication Number Publication Date
WO2021217647A1 true WO2021217647A1 (fr) 2021-11-04

Family

ID=78373136

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/088476 WO2021217647A1 (fr) 2020-04-30 2020-04-30 Procédé et appareil de traitement de couleurs d'une image

Country Status (2)

Country Link
CN (1) CN115088253A (fr)
WO (1) WO2021217647A1 (fr)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102110078A (zh) * 2009-12-23 2011-06-29 富士通株式会社 用于获取幂函数Xp的近似运算结果的方法和系统
US9207910B2 (en) * 2009-01-30 2015-12-08 Intel Corporation Digital signal processor having instruction set with an xK function using reduced look-up table
WO2018035691A1 (fr) * 2016-08-22 2018-03-01 华为技术有限公司 Procédé et appareil de traitement d'image
CN108090879A (zh) * 2017-12-12 2018-05-29 上海顺久电子科技有限公司 一种对输入的高动态范围图像进行处理的方法和显示设备
CN110473502A (zh) * 2018-05-09 2019-11-19 华为技术有限公司 屏幕亮度的控制方法、装置及终端设备

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9207910B2 (en) * 2009-01-30 2015-12-08 Intel Corporation Digital signal processor having instruction set with an xK function using reduced look-up table
CN102110078A (zh) * 2009-12-23 2011-06-29 富士通株式会社 用于获取幂函数Xp的近似运算结果的方法和系统
WO2018035691A1 (fr) * 2016-08-22 2018-03-01 华为技术有限公司 Procédé et appareil de traitement d'image
CN108090879A (zh) * 2017-12-12 2018-05-29 上海顺久电子科技有限公司 一种对输入的高动态范围图像进行处理的方法和显示设备
CN110473502A (zh) * 2018-05-09 2019-11-19 华为技术有限公司 屏幕亮度的控制方法、装置及终端设备

Also Published As

Publication number Publication date
CN115088253A (zh) 2022-09-20

Similar Documents

Publication Publication Date Title
US10574936B2 (en) System and method of luminance processing in high dynamic range and standard dynamic range conversion
US10269129B2 (en) Color adjustment method and device
CN107038715B (zh) 一种图像处理方法及装置
US7081899B2 (en) Image processing support system, image processing device and image display device
US8416254B2 (en) Apparatus and method for providing enhanced visibility in mobile terminal
CN109274985B (zh) 视频转码方法、装置、计算机设备和存储介质
WO2022100048A1 (fr) Procédé et appareil de traitement d'image, dispositif électronique et support de stockage lisible par ordinateur
US20150363912A1 (en) Rgbw demosaic method by combining rgb chrominance with w luminance
CN107564493B (zh) 一种色域压缩方法、装置及显示设备
CN107784993B (zh) 一种色域压缩方法、装置及显示设备
US20210006686A1 (en) Color Gamut Mapping Method and Apparatus
EP3873091A1 (fr) Procédé et appareil d'appariement de gamme de couleurs, terminal d'affichage et support de stockage lisible
WO2018035696A1 (fr) Procédé et dispositif de traitement d'image
WO2020216085A1 (fr) Procédé et appareil de calcul d'interpolation tétraédrique, procédé et appareil de conversion de gamme des couleurs, et support
JP6427831B2 (ja) 色圧縮のためのクラスタ化およびエンコード
EP2635032A2 (fr) Espace de couleur à portée étendue
WO2021217647A1 (fr) Procédé et appareil de traitement de couleurs d'une image
WO2021226769A1 (fr) Procédé et appareil de traitement d'images
WO2020000255A1 (fr) Procédé de réglage de couleur de données rvb
CN104640186A (zh) 移动终端降低功耗的方法及装置
US20210297558A1 (en) Cubiform method
WO2022040889A1 (fr) Procédé et appareil d'affichage et dispositif électronique
US20130136344A1 (en) Creating a duotone color effect using an icc profile
WO2021197213A1 (fr) Procédé et appareil de modulation de couleur pour dispositif d'affichage, dispositif électronique et support de stockage
TW201412134A (zh) 影像處理方法與影像顯示裝置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20933213

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20933213

Country of ref document: EP

Kind code of ref document: A1