Color adjusting method and device, electronic equipment and storage medium
By determining the color style information of the target sample image in the target color model and generating an adjustment curve, the problem that the color adjustment method in the existing technology cannot achieve a natural look and feel is solved, and a high degree of freedom of color style customization and a natural look and feel color adjustment effect are achieved.
Patent Information
- Application Number
- CN202111626912.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-28
- Publication Date
- 2025-10-10
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Existing electronic device color adjustment schemes perform fixed additions and subtractions on a single color measurement indicator within a certain color space, resulting in different colors using the same color adjustment method unable to achieve an overall natural look and feel, and unable to meet the user's color adjustment needs.
By determining the color adjustment style information of the target sample image in the target color model, an adjustment curve is generated, and the image to be output and displayed by the electronic device is adjusted according to the color adjustment style information, including determining the distribution status information of RGB pixels in the target color model and generating the adjustment curve, and using a three-dimensional display lookup table to adjust the RGB output value.
It achieves high-freedom color adjustment that is not constrained by the color model space, can meet the user's customized color style needs, and the image after color adjustment achieves an overall natural look and feel.
Smart Images

Figure CN116433781B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a color adjustment method, device, electronic device, and storage medium. Background Art
[0002] The color adjustment schemes of existing electronic devices, such as smartphones, are implemented by adding or subtracting fixed values for a single color measurement indicator within a certain color space. For example, in the HSV model (Hue Saturation Value Model, also known as the Hexcone Model), the saturation of all colors is implemented by adding or subtracting fixed values.
[0003] However, using the same color adjustment method for different colors will result in the displayed image failing to achieve an overall natural look and feel and failing to meet the user's color adjustment needs. Summary of the Invention
[0004] To overcome the problems existing in the related art, the present disclosure provides a color adjustment method, device, electronic device and storage medium.
[0005] According to a first aspect of an embodiment of the present disclosure, a color adjustment method is provided, comprising:
[0006] Determine the target sample map;
[0007] Determining color style information of the target sample image in a target color model;
[0008] The image to be output and displayed by the electronic device is adjusted in color according to the color adjustment style information.
[0009] Optionally, the target sample image is an RGB image, and determining the color adjustment style information of the target sample image in a target color model includes:
[0010] Determining distribution information of RGB pixels of the target sample image in the target color model;
[0011] According to the distribution state information, an adjustment curve of the target sample image in each dimension of the target color model is determined, and the color adjustment style information includes the adjustment curve of the target sample image in the target color model.
[0012] Optionally, determining the distribution status information of RGB pixels of the target sample image in the target color model includes:
[0013] For each dimension of the target color model, the distribution number of RGB pixels of the target sample image under different values of the dimension is determined.
[0014] Optionally, determining, according to the distribution state information, an adjustment curve of the target sample image in each dimension of the target color model includes:
[0015] For any dimension of the target color model, using the RGB pixel value of the target sample image in the dimension in the target color model as the first RGB input value;
[0016] Determine the number of RGB pixels of the target image within a preset value range of the dimension;
[0017] Generate an adjustment curve under this dimension based on the first RGB input value, the number of RGB pixels, and the number of all RGB pixels of the target sample image, where the adjustment curve is used to represent a mapping relationship between the first RGB input value and a first RGB output value corresponding to the first RGB input value.
[0018] Optionally, the color-adjusting the image to be output and displayed by the electronic device according to the color-adjusting style information includes:
[0019] searching a three-dimensional display lookup table of the electronic device according to a second RGB input value of the RGB image to be output and displayed by the electronic device, to obtain a second RGB output value corresponding to the second RGB input value;
[0020] The second RGB output value is adjusted according to each adjustment curve of the target sample image in the target color model to obtain an adjusted second RGB output value.
[0021] Optionally, the target color model is a uniform color space color model, which is composed of a subset of visible light in a preset three-dimensional color space. The uniform color space color model is any one of a hexagonal pyramid model, a brightness AB model, a brightness-bandwidth-chromaticity model, and a hue-saturation-brightness model.
[0022] Optionally, determining a target sample image in the electronic device includes:
[0023] In response to a target operation performed by a user on any image, the image is used as the target sample image, where the target sample image includes a single image or multiple images.
[0024] According to a second aspect of an embodiment of the present disclosure, a color adjustment device is provided, the device comprising:
[0025] an acquisition module configured to determine a target sample image;
[0026] An execution module configured to determine color adjustment style information of the target sample image in a color model;
[0027] The control module is configured to adjust the color of the image to be output and displayed by the electronic device according to the color adjustment style information.
[0028] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0029] processor;
[0030] a memory for storing processor-executable instructions;
[0031] Wherein, the processor is configured to:
[0032] Determine the target sample map;
[0033] Determining color style information of the target sample image in a target color model;
[0034] The image to be output and displayed by the electronic device is adjusted in color according to the color adjustment style information.
[0035] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the color adjustment method provided in the first aspect of the present disclosure are implemented.
[0036] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: in the present disclosure, a target sample image in an electronic device is first determined, and then the color adjustment style information of the target sample image in a target color model is determined. The image to be output and displayed by the electronic device is adjusted according to the color adjustment style information. This is not constrained by the color model space, and the color adjustment has a high degree of freedom, and can achieve the effect of customized color style to meet the user's color adjustment needs.
[0037] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0039] Figure 1 is a flow chart showing a color adjustment method according to an exemplary embodiment;
[0040] Figure 2 is the distribution number of target sample images at different values of the brightness dimension in the brightness AB model according to an exemplary embodiment;
[0041] Figure 3 is an adjustment curve of a target sample image in a brightness dimension in a brightness AB model according to an exemplary embodiment;
[0042] Figure 4 is a schematic diagram showing input and output of a three-dimensional display lookup table of an electronic device according to an exemplary embodiment;
[0043] Figure 5 is a block diagram of a color adjustment device according to an exemplary embodiment;
[0044] Figure 6 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0045] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
[0046] It should be noted that in the present disclosure, the terms "S101", "S102" and the like in the specification, claims and drawings are used to distinguish steps, and do not necessarily mean that the method steps are to be performed in a specific order or sequential sequence.
[0047] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.
[0048] As mentioned in the background technology, the color adjustment scheme of existing smart devices is achieved by adding or subtracting fixed values for a single color measurement indicator in a certain color space. However, using the same color adjustment method for different colors may not achieve a natural look and feel on the overall display, and cannot meet users' demand for multiple color styles.
[0049] In view of this, the present disclosure provides a color adjustment method, device, electronic device and storage medium, which are not constrained by the color model space, have a high degree of freedom in color adjustment, can realize color style customization, and meet the user's color adjustment needs.
[0050] Figure 1 FIG. 1 is a flow chart showing a color adjustment method according to an exemplary embodiment. Figure 1 As shown, taking the color adjustment method used in electronic devices such as smart phones and tablet computers as an example, the method includes the following steps.
[0051] In step S101 , a target sample image is determined.
[0052] In step S102, the color adjustment style information of the target sample image in the target color model is determined.
[0053] In step S103, the image to be output and displayed by the electronic device is adjusted in color according to the color adjustment style information.
[0054] Specifically, in step S101, the image currently captured by the electronic device can be used as the target sample image, the image stored in the electronic device can be used as the target sample image, and the image input into the electronic device according to the user's color adjustment requirements can also be used as the target sample image; the target sample image can be a photo, a hand-drawn color picture, a scanned image, etc., and the present disclosure does not make specific limitations on this.
[0055] Specifically, in step S102, the target color model can be determined from multiple color models based on the user's color adjustment requirements. The color models disclosed herein are all existing color models. The color adjustment style information is the color adjustment curves for each dimension of the target sample image within the target color model, which can be determined based on the distribution of the RGB pixels of the target sample image within the target color model.
[0056] For example, the image currently captured by the electronic device is used as the target sample image, the color adjustment curves of each dimension of the target sample image in the target color model are determined, and the image to be output and displayed by the electronic device is adjusted according to the color adjustment curves of each dimension of the target sample image in the target color model.
[0057] The present disclosure can adjust the color of an image to be output and displayed by an electronic device based on the color adjustment style information of a target sample image in the electronic device. It has the characteristics of high color adjustment freedom, no constraints on the color model space, automatic and rich color adjustment directions, and the ability to achieve color style customization. The image after color adjustment can achieve an overall natural look and feel, meeting the user's color adjustment needs.
[0058] In order to enable those skilled in the art to better understand the power factor correction module verification method provided by the present disclosure, the above steps are described in detail with examples below.
[0059] In one embodiment, the target sample image is an RGB image. In step S102, determining the color style information of the target sample image in the target color model includes:
[0060] Determine the distribution status information of the RGB pixels of the target sample image in the target color model;
[0061] According to the distribution state information, an adjustment curve of the target sample image in each dimension of the target color model is determined, and the color adjustment style information includes the adjustment curve of the target sample image in the target color model.
[0062] Specifically, the distribution status information is the distribution number of RGB pixels of the target sample image under different values in each dimension in the target color model. The adjustment curve of the target sample image in each dimension in the target color model can be determined based on the distribution number of RGB pixels of the target sample image in each dimension in the target color model.
[0063] For example, for any dimension in the target color model, the distribution number of RGB pixels of the target sample image under different values of this dimension in the target color model is determined, and an adjustment curve corresponding to the dimension is generated based on the distribution number, thereby obtaining the adjustment curve of the target sample image corresponding to all dimensions in the target color model, that is, obtaining the color adjustment style information of the target sample image in the target color model.
[0064] The present disclosure determines the adjustment curve of the target sample image in each dimension of the target color model through the distribution status information of the RGB pixels of the target sample image in the target color model, that is, obtains the color adjustment style information of the target sample image in the target color model, so as to facilitate the subsequent color adjustment of the image to be output and displayed by the electronic device according to the color adjustment style information of the target sample image in the target color model, so that the image to be output and displayed by the electronic device after color adjustment is displayed in the color adjustment style of the target sample image, thereby realizing color style customization.
[0065] In one embodiment, determining the distribution status information of the RGB pixels of the target sample image in the target color model includes:
[0066] For each dimension of the target color model, the distribution number of RGB pixels of the target sample image under different values of the dimension is determined.
[0067] For an example, see Figure 2 In the case where the target color model is a brightness AB model (LAB model), the LAB model includes the L (brightness) dimension, the A (magenta to green) dimension, and the B (yellow to blue) dimension. The number of RGB pixels of the target sample image at different brightness values on the L dimension can be used to determine the distribution number of RGB pixels of the target sample image at different brightness values on the L dimension. Similarly, the distribution number of RGB pixels of the target sample image at different brightness values on the A dimension can be determined, and the distribution number of RGB pixels of the target sample image at different brightness values on the B dimension can be determined. Thus, the distribution status information of the RGB pixels of the target sample image in the LAB model can be obtained. Similarly, the distribution status information of the RGB pixels of the target sample image in different color models can be determined by the above method.
[0068] Because the target color model includes multiple dimensions, for each dimension of the target color model, the present disclosure can determine the adjustment curve of the target sample image in each dimension of the target color model by determining the distribution number of RGB pixels of the target sample image under different values on the dimension, that is, determine the color adjustment style information of the target sample image in the target color model, so as to facilitate the subsequent color adjustment of the image to be output and displayed by the electronic device according to the color adjustment style, avoiding the use of the same color adjustment method for different colors, resulting in the displayed image failing to achieve an overall natural look and feel.
[0069] In one embodiment, determining, based on the distribution state information, an adjustment curve of the target sample image in each dimension of the target color model includes:
[0070] For any dimension of the target color model, use the RGB pixel value of the target sample image in the dimension in the target color model as the first RGB input value;
[0071] Determine the number of RGB pixels of the target image within a preset value range of the dimension;
[0072] Based on the first RGB input value, the number of RGB pixels, and the number of all RGB pixels of the target sample image, an adjustment curve under the dimension is generated, where the adjustment curve is used to characterize the mapping relationship between the first RGB input value and the first RGB output value corresponding to the first RGB input value.
[0073] The preset value range can be preset according to the dimensional characteristics of the target color model. For example, when the target color model is a LAB model, the LAB model includes an L dimension, an A dimension, and a B dimension. The preset value range of the L dimension is [0, 100], the preset value range of the A dimension is [-128, 127], and the preset value range of the B dimension is [-128, 127]. For example, when the target color model is a hexagonal pyramid model (also known as the Hue Saturation Value Model, hue-saturation-value model, HSV model), the HSV model includes an H (hue) dimension, an S (saturation) dimension, and a V (value) dimension. The preset value range of the H dimension is [0°, 360°], the preset value range of the S dimension is [0%, 100%], and the preset value range of the V dimension is [0%, 100%]. Similarly, when the target color model is other types of color models, the preset value range can be determined according to the dimensional characteristics of the target color model.
[0074] Furthermore, there is a reference curve in each dimension of the target color model, which represents the mapping relationship between the input value and the output value in that dimension. However, when the RGB pixel values of different images are input into the target color model, the mapping relationship between the input value and the output value of the target color model corresponding to the image will change due to the different color adjustments of the images, which is different from the reference curve of the target color model. Therefore, after inputting the RGB pixel values of different images into the target color model, a unique adjustment curve corresponding to the image in different dimensions of the target color model will be obtained, and all the adjustment curves in the target color model are the color adjustment style of the image.
[0075] For an example, see Figure 3 In the case where the target color model is the LAB model, for the L dimension, A dimension, and B dimension of the LAB model, taking the L dimension as an example, the RGB pixel value of the target sample image in the L dimension of the LAB model is used as the first RGB input value; the number ML of the RGB pixel points of the target image within the preset value range [0, 100] of the L dimension is determined; according to the first RGB input value L a , the number of RGB pixels and the number of all RGB pixels of the target sample image N, generate the adjustment curve in L dimension: L b =100(L a / 100) 100ML / N , the adjustment curve L b It is used to characterize the mapping relationship between the first RGB input value and the first RGB output value corresponding to the first RGB input value in the L dimension; similarly, the adjustment curve in the A dimension is obtained: A b =100(A a / 100) 100MA / N , the adjustment curve in B dimension: B b =100(B a / 100) 100MB / N , get the mapping relationship between the first RGB input value of the target sample image in the LAB model and the first RGB output value corresponding to the first RGB input value: L b , A b , B b .
[0076] The present disclosure determines the adjustment curves of the target sample image in each dimension of the target color model based on the distribution status information of the RGB pixels of the target sample image in the target color model, thereby adjusting the color of the image to be output and displayed by the electronic device according to each adjustment curve, avoiding the use of the same color adjustment method for different colors, resulting in the displayed image failing to achieve an overall natural appearance.
[0077] In one embodiment, in step S103, coloring the image to be output and displayed by the electronic device according to the coloring style information includes:
[0078] searching a three-dimensional display lookup table of the electronic device according to a second RGB input value of the RGB image to be displayed by the electronic device to obtain a second RGB output value corresponding to the second RGB input value;
[0079] The second RGB output value is adjusted according to each adjustment curve of the target sample image in the target color model to obtain an adjusted second RGB output value.
[0080] The 3D Look-Up Table (3D LUT) of electronic devices is primarily used for precise color correction. It can handle all display calibration issues, from simple gamma (display parameter) values, color range, and tracking errors, to correcting advanced nonlinear properties such as color crosstalk, hue, saturation, and brightness. When displaying an image, the electronic device searches the 3D LUT based on the RGB pixel values in the RGB image to be displayed, obtains the output value corresponding to the RGB pixel value in the RGB image to be displayed, and displays this output value, thus achieving color correction for the RGB image to be displayed.
[0081] For example, see Figure 4 , according to the second RGB input value of the RGB image to be output and displayed by the electronic device Search the 3D display lookup table of the electronic device to obtain the second RGB output value corresponding to the second RGB input value When the target color model is the LAB model, the adjustment curves L in the LAB model are adjusted according to the target sample image. b , A b , B b Adjust the second RGB output value The adjusted second RGB output value is obtained.
[0082] The present disclosure adjusts the output values of the RGB pixel values in the RGB image to be displayed according to each adjustment curve in the target color model of the target sample image, and then displays it. The RGB image to be displayed can be displayed in the color adjustment style of the target sample image, thereby realizing customization of the color style.
[0083] In one embodiment, the target color model is a uniform color space color model, which is composed of a subset of visible light in a preset three-dimensional color space. The uniform color space color model is any one of a hexagonal pyramid model, a brightness AB model, a brightness-bandwidth-chromaticity model, and a hue-saturation-brightness model.
[0084] The hexagonal cone model is referred to as an H (Hexcone Model) model, also referred to as an Hue Saturation Value Model, a Hue-Saturation-Value model, an HSV model; the luminance AB model is referred to as a LAB model (Luminance A B Model); the luminance-bandwidth-chrominance model is referred to as a YUV model (Luminance Bandwidth Chrominance Model); and the chrominance-saturation-luminance model is referred to as an HSI model (Hue Saturation Intensity Model). The HSV model, the LAB model, the YUV model, and the HSI model involved in the present disclosure are all existing color models, and specific structures and related principles of the models will not be described herein.
[0085] The present disclosure obtains the adjustment curve of the target sample in three dimensions through the uniform color space color model, and adjusts the color of the image to be output and displayed by the electronic device according to the adjustment curve corresponding to the dimension under different dimensions, so that the color adjustment style of the image caused by the fixed addition or subtraction of a single color measurement index can be avoided, and the color adjustment style of the image can meet the needs of the user.
[0086] In an embodiment, in step S101, the target sample is determined, including:
[0087] In response to a target operation of the user on an arbitrary image, the image is taken as the target sample, and the target sample includes a single image or multiple images.
[0088] Specifically, the target operation can be a click, a swipe, a voice instruction, or the like of the user, and the target operation can also be a shooting operation or a scanning operation of the user through the electronic device, and the present disclosure does not make a specific limitation in this regard.
[0089] For example, in response to a click operation of the user on a single image, the single image is taken as the target sample; or in response to a click operation of the user on multiple images within a preset time length, the multiple images are taken as the target sample, where the preset time length can be preset according to the time length required by the target operation of the user; or the user obtains the target sample through shooting by using the electronic device. The present disclosure does not make a specific limitation in this regard.
[0090] The present disclosure determines the color adjustment style information of a single image or multiple images in the uniform color space color model, and adjusts the color of the image to be output and displayed by the electronic device according to the color adjustment style information, so that the color adjustment style of the image can meet the needs of the user.
[0091] Based on the same inventive concept, the present disclosure further provides a color adjustment device, Figure 5FIG. 1 is a block diagram of a color adjustment device according to an exemplary embodiment. Figure 5 The device 300 includes an acquisition module 310, an execution module 320 and a control module 330.
[0092] The acquisition module 310 is configured to determine a target sample image.
[0093] The execution module 320 is configured to determine the color adjustment style information of the target sample image in the color model.
[0094] The control module 330 is configured to adjust the color of the image to be output and displayed by the electronic device according to the color adjustment style information.
[0095] The present disclosure can adjust the color of the image to be output and displayed by the electronic device based on the color style information of the target sample image. It has the characteristics of high color adjustment freedom, no constraints on the color model space, automatic and rich color adjustment directions, and the ability to achieve color style customization. The image after color adjustment can achieve an overall natural look and feel, meeting the user's color adjustment needs.
[0096] Furthermore, the execution module 320 is configured to determine the distribution state information of the RGB pixels of the target sample image in the target color model;
[0097] According to the distribution state information, an adjustment curve of the target sample image in each dimension of the target color model is determined, and the color adjustment style information includes the adjustment curve of the target sample image in the target color model.
[0098] Furthermore, the execution module 320 is configured to determine, for each dimension of the target color model, the distribution quantity of the RGB pixels of the target sample image under different values of the dimension.
[0099] Furthermore, the execution module 320 is configured to use, for any dimension of the target color model, the RGB pixel value of the target sample image in the dimension in the target color model as the first RGB input value;
[0100] Determine the number of RGB pixels of the target image within a preset value range of the dimension;
[0101] Based on the first RGB input value, the number of RGB pixels, and the number of all RGB pixels of the target sample image, an adjustment curve under the dimension is generated, where the adjustment curve is used to characterize the mapping relationship between the first RGB input value and the first RGB output value corresponding to the first RGB input value.
[0102] Further, the control module 330 is configured to look up the three-dimensional display lookup table of the electronic device according to a second RGB input value of an RGB image to be output and displayed by the electronic device, to obtain a second RGB output value corresponding to the second RGB input value.
[0103] Adjust the second RGB output value according to the target color model and the target swatch, to obtain an adjusted second RGB output value.
[0104] Further, the target color model is a uniform color space color model, the uniform color space color model is composed of a visible light subset in a preset three-dimensional color space, and the uniform color space color model is any one of a hexagonal pyramid model, a luminance AB model, a luminance-bandwidth-chroma model, and a chroma-saturation-luminance model.
[0105] Further, the acquisition module 310 is configured to, in response to a target operation performed by a user on an arbitrary image, take the image as the target swatch, the target swatch including a single image or multiple images.
[0106] In addition, it is worth noting that, for the convenience and brevity of description, the embodiments described in the specification are all preferred embodiments, and the parts involved are not necessarily essential to the present application. For example, the acquisition module and the execution module can be independent devices or the same device in specific implementation, and the present disclosure does not limit this.
[0107] Regarding the device in the above embodiments, the specific manner in which each module performs an operation has been described in detail in the embodiments of the method, and will not be described in detail here.
[0108] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, the program instructions being executed by a processor to implement the steps of the color adjustment method provided by the present disclosure.
[0109] Based on the same inventive concept, the present disclosure also provides an electronic device, comprising:
[0110] a processor;
[0111] a memory for storing processor-executable instructions;
[0112] wherein the processor is configured to:
[0113] determine a target swatch;
[0114] determine color adjustment style information of the target swatch in a target color model;
[0115] adjust the color of an image to be output and displayed by the electronic device according to the color adjustment style information.
[0116] Figure 6 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0117] Reference Figure 6 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0118] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operation, and recording. The processing component 802 may include one or more processors 820 to execute instructions to perform all or part of the steps of the color grading method described above. Furthermore, the processing component 802 may include one or more modules to facilitate interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
[0119] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, target sample images, target color models, color tone style information, images to be output and displayed by the electronic device, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0120] The power component 806 provides power to the various components of the electronic device 800. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0121] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor can not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have a focal length and optical zoom capability.
[0122] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), which is configured to receive external audio signals when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0123] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as a keyboard, click wheel, buttons, etc. These buttons may include but are not limited to: a home button, volume buttons, a start button, and a lock button.
[0124] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of components, such as the display and keypad of the electronic device 800. The sensor assembly 814 can also detect changes in the position of the electronic device 800 or a component of the electronic device 800, the presence or absence of user contact with the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and temperature changes of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0125] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0126] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above-mentioned color adjustment method.
[0127] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions. The instructions can be executed by the processor 820 of the electronic device 800 to perform the above-described color adjustment method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0128] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and has a code portion for executing the above color adjustment method when executed by the programmable device.
[0129] Other embodiments of the present disclosure will readily occur to those skilled in the art after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the present disclosure being indicated by the following claims.
[0130] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes can be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A color adjustment method, characterized in that: include: Determining a target sample image in an electronic device, wherein the target sample image is an RGB image; Determining color style information of the target sample image in the target color model; wherein determining the color style information of the target sample image in the target color model includes: For each dimension of the target color model, determining the distribution number of RGB pixels of the target sample image under different values of the dimension; For any dimension of the target color model, using the RGB pixel value of the target sample image in the dimension in the target color model as the first RGB input value; Determine the number of RGB pixels of the target sample image within a preset value range of the dimension; generating, based on the first RGB input value, the number of RGB pixels, and the number of all RGB pixels of the target sample image, an adjustment curve in the dimension, the adjustment curve being used to represent a mapping relationship between the first RGB input value and a first RGB output value corresponding to the first RGB input value, the color adjustment style information including the adjustment curve of the target sample image in the target color model; The image to be output and displayed by the electronic device is adjusted in color according to the color adjustment style information.
2. The method according to claim 1, characterized in that The coloring of the image to be output and displayed by the electronic device according to the coloring style information includes: searching a three-dimensional display lookup table of the electronic device according to a second RGB input value of the RGB image to be output and displayed by the electronic device, to obtain a second RGB output value corresponding to the second RGB input value; The second RGB output value is adjusted according to each adjustment curve of the target sample image in the target color model to obtain an adjusted second RGB output value.
3. The method according to claim 1, characterized in that The target color model is a uniform color space color model, which is composed of a subset of visible light in a preset three-dimensional color space. The uniform color space color model is any one of a hexagonal pyramid model, a brightness AB model, a brightness-bandwidth-chromaticity model, and a hue-saturation-brightness model.
4. The method according to claim 1, wherein The determining of the target sample image in the electronic device includes: In response to a target operation performed by a user on any image, the image is used as the target sample image, where the target sample image includes a single image or multiple images.
5. A color adjustment device, characterized in that: The device comprises: an acquisition module configured to determine a target sample image in an electronic device, wherein the target sample image is an RGB image; An execution module is configured to determine the color adjustment style information of the target sample image in the color model; wherein determining the color adjustment style information of the target sample image in the target color model includes: For each dimension of the target color model, determining the distribution number of RGB pixels of the target sample image under different values of the dimension; For any dimension of the target color model, using the RGB pixel value of the target sample image in the dimension in the target color model as the first RGB input value; Determine the number of RGB pixels of the target sample image within a preset value range of the dimension; generating, based on the first RGB input value, the number of RGB pixels, and the number of all RGB pixels of the target sample image, an adjustment curve in the dimension, the adjustment curve being used to represent a mapping relationship between the first RGB input value and a first RGB output value corresponding to the first RGB input value, the color adjustment style information including the adjustment curve of the target sample image in the target color model; The control module is configured to adjust the color of the image to be output and displayed by the electronic device according to the color adjustment style information.
6. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Determining a target sample image in an electronic device, wherein the target sample image is an RGB image; Determining color style information of the target sample image in the target color model; wherein determining the color style information of the target sample image in the target color model includes: For each dimension of the target color model, determining the distribution number of RGB pixels of the target sample image under different values of the dimension; For any dimension of the target color model, using the RGB pixel value of the target sample image in the dimension in the target color model as the first RGB input value; Determine the number of RGB pixels of the target sample image within a preset value range of the dimension; generating, based on the first RGB input value, the number of RGB pixels, and the number of all RGB pixels of the target sample image, an adjustment curve in the dimension, the adjustment curve being used to represent a mapping relationship between the first RGB input value and a first RGB output value corresponding to the first RGB input value, the color adjustment style information including the adjustment curve of the target sample image in the target color model; The image to be output and displayed by the electronic device is adjusted in color according to the color adjustment style information.
7. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Image processing method and apparatus
CN105791790A