WO2023124722A1 - Image processing method and apparatus, electronic device, and computer-readable storage medium - Google Patents

Image processing method and apparatus, electronic device, and computer-readable storage medium Download PDF

Info

Publication number
WO2023124722A1
WO2023124722A1 PCT/CN2022/135508 CN2022135508W WO2023124722A1 WO 2023124722 A1 WO2023124722 A1 WO 2023124722A1 CN 2022135508 W CN2022135508 W CN 2022135508W WO 2023124722 A1 WO2023124722 A1 WO 2023124722A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
color
enhancement
enhanced
processed
Prior art date
Application number
PCT/CN2022/135508
Other languages
French (fr)
Chinese (zh)
Inventor
陈一诗
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023124722A1 publication Critical patent/WO2023124722A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N1/00Scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission; Details thereof
    • H04N1/46Colour picture communication systems
    • H04N1/56Processing of colour picture signals
    • H04N1/60Colour correction or control

Definitions

  • the present application relates to the field of display technology, in particular to an image processing method, device, electronic equipment and computer-readable storage medium.
  • display devices can present more and more rich colors. Users have different preferences for colors, for example, some people prefer bright colors, while others prefer more natural colors.
  • the image processing method in the current display device is single, and cannot be flexibly adapted to users with different preferences, resulting in poor viewing experience for users.
  • an image processing method, device, electronic equipment, computer-readable storage medium, and computer program product are provided.
  • An image processing method comprising:
  • An image processing device comprising:
  • a preference acquisition module configured to acquire enhanced preference information of the user
  • An area division module configured to acquire an image to be processed, and divide the image to be processed into a plurality of areas to be enhanced according to the tone distribution of the image to be processed;
  • An enhancement processing module configured to perform corresponding color enhancement processing on each of the regions to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
  • a display device comprising:
  • a processor connected to the display screen, configured to acquire user enhancement preference information; acquire an image to be processed, and divide the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed;
  • the enhancement preference information performs corresponding color enhancement processing on each of the regions to be enhanced, so as to adjust the color attribute of the image to be processed; and sends the image with the adjusted color attribute to the display screen for display.
  • An electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method are realized.
  • Fig. 1 is one of flow charts of the image processing method of an embodiment
  • Fig. 2 is a subflow chart of step 102 of an embodiment
  • Fig. 3 is the second flowchart of the image processing method of an embodiment
  • Fig. 4 is the third flowchart of the image processing method of an embodiment
  • FIG. 5 is a fourth flowchart of an image processing method of an embodiment
  • Fig. 6 is a frame diagram of the internal structure of a display device according to an embodiment
  • FIG. 7 is an internal structural diagram of an electronic device according to an embodiment.
  • the image processing method provided in the embodiment of the present application may be applied to a display device.
  • the display device can be but not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. .
  • Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, and the like.
  • the display device includes at least a display screen for displaying images and a processor for processing image data.
  • the processor may include a GPU (Graphics Processing Unit, graphics processing unit), and the GPU is used to perform mathematical and geometric calculations and graphics rendering, so as to realize required image processing functions.
  • GPU Graphics Processing Unit, graphics processing unit
  • FIG. 1 is one of the flowcharts of an image processing method in an embodiment.
  • the image processing method includes steps 102 to 106 .
  • Step 102 acquiring enhanced preference information of the user.
  • the user's enhancement preference information refers to the user's preference information for color enhancement.
  • the user's physiological phenomena and/or psychological feelings may lead to different preferences for different color enhancement methods.
  • Physiological phenomenon refers to the phenomenon that the color observed by human eyes is not exactly the same for the same objective color under the same observation environment.
  • physiological phenomena that can cause differences in observed colors include, for example, race, age, color vision impairment, and the like.
  • Psychological feeling refers to the user's subjective feeling of different colors. For example, some people like bright colors and some people like natural colors. Moreover, people who like bright colors may not like bright colors for all colors, but prefer natural skin tones and bright blue sky and trees.
  • the user's enhanced preference information can be obtained according to historical data.
  • the user's historical image editing operations in the system image processing software or third-party image processing software can be obtained, and the user's enhancement preference information can be obtained according to the user's color adjustment during the editing operation.
  • the user's adjustment of the color may specifically be the adjustment of each color attribute. If the user frequently chooses to increase the brightness of the red channel when making adjustments, it means that the user prefers brighter colors for the red channel.
  • some questions or pictures related to color enhancement preference may also be provided to the user, and enhancement preference information may be obtained according to the selection result provided by the user.
  • Step 104 acquire the image to be processed, and divide the image to be processed into multiple regions to be enhanced according to the tone distribution of the image to be processed.
  • the same user has different perceptions of the brightness of different colors. Therefore, if color enhancement processing is performed on different colors in the same manner, a better color enhancement effect cannot be presented. For example, take the case that users prefer natural skin tones and vivid landscapes. If the color enhancement processing parameters for the skin color are used to perform the same color enhancement processing on the entire image, the color brightness of the landscape area will be insufficient, that is, the color of the landscape area will not be bright enough. If the color enhancement processing parameters for the landscape are used to perform the same color enhancement processing on the entire image, the color brightness of the skin color area will be too high, that is, the color of the skin color area will be distorted.
  • hue refers to the attribute of the color, which describes the pure color appearance, or can be understood as the position of the spectral color. Therefore, different colors can be understood as colors with different hues.
  • Step 106 Perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information, so as to adjust the color attribute of the image to be processed.
  • the processor may be pre-configured with a mapping relationship between different hues and color enhancement processing parameters, so as to perform corresponding color enhancement processing for different areas to be enhanced during the image processing process. That is, for the region to be enhanced with the first hue, the corresponding first parameter is selected for color enhancement processing; for the region to be enhanced with the second hue, the corresponding second parameter is selected for color enhancement processing, and so on. Also, by combining enhancement preference information, more accurate color enhancement processing can be achieved.
  • the first hue may be configured with multiple different color enhancement processing parameters, and different parameters correspond to different enhancement preference information respectively.
  • FIG. 2 is a subflow chart of step 102 in one embodiment.
  • the step of acquiring user's enhanced preference information includes step to step.
  • Step 202 generating a candidate image set.
  • the candidate image set includes multiple images generated by using multiple different color enhancement processes on the same image.
  • the candidate image set is used for displaying on a user interface (User Interface, UI), and the user can realize interaction by clicking a trigger area on the interface.
  • the candidate image set may be generated in response to a preset operation acting on the user interface.
  • the preset operation may be, for example, the user clicking a color personalization button, or the user performing a gesture corresponding to the color personalization. Examples are not limited.
  • Each candidate image set may include two, three, or four images, and specifically, an appropriate number of images may be selected according to the analysis accuracy and speed requirements of the enhanced preference information.
  • multiple images in the same candidate image set can be used to test the user's specific preference for some color attributes.
  • the saturation of the blue channel of the same image can be adjusted to generate three images in the same candidate image set, for example, the saturation of the blue channel can be set to 100%, 95% and 90% respectively , and keep the parameters of other color channels unchanged.
  • the initial image used to generate the candidate image set may be a color patch image, that is, the initial image includes color patches of colors related to the color attribute to be tested.
  • the initial image can also be a photo that satisfies preset conditions.
  • the relevant image is used as the initial image.
  • multiple images in the same candidate image set may be displayed on the user interface at the same time, or may be displayed sequentially on the user interface, which is not limited in this embodiment.
  • the user may be prompted to make a selection according to personal preference, so as to obtain the user's preference selection result in a timely manner.
  • the user may be notified of the image selection rules and prompted to make a selection through text prompts.
  • the text prompts may be, for example, "Please select your favorite image", "Please Select the image you don't like the most” and "Please sort the images according to your preference", etc., to realize a user-friendly interface.
  • the multiple candidate image sets can be generated simultaneously to simplify the generation rules of the candidate image sets; multiple candidate image sets can also be generated sequentially.
  • multiple images in the subsequent candidate image set can be adaptively generated according to the preference selection results of the previous candidate image sets, so as to improve the analysis of enhanced preference information accuracy.
  • Step 204 obtain the user's preference selection results for multiple images in each candidate image set, and obtain enhanced preference information according to the preference selection results.
  • the enhanced preference information when acquired based on the user's preference selection result of the candidate image set, it may correspond to the image selection rule previously notified to the user. For example, if the selection rule is to select a favorite image, the color attribute corresponding to the selected image can be enhanced; if the selection rule is to select an unfavorable image, the color attribute corresponding to the selected image can be weakened.
  • this embodiment may include the following steps when generating the candidate image set. First, the first candidate image set is generated, and then according to the user's preference selection results for multiple images in the nth candidate image set, various color enhancement processing parameters of the n+1th candidate image set are determined and corresponding multiple color enhancement processing parameters are generated. images, n is a positive integer.
  • multiple candidate image sets are used to be displayed on the user interface sequentially, that is, the nth candidate image set is displayed on the user interface first, and the user provides preference selection for multiple images in the nth candidate image set After the results are obtained, multiple graphics in the n+1th candidate image set are determined, and the n+1th candidate image set is displayed on the user interface until all the candidate image sets are displayed.
  • the blue color of each image may be The saturation of the color channels is adjusted to the user's preference, and the red channel of each image is further adjusted to have different saturations, so as to obtain the user's enhancement preference information more quickly and accurately.
  • the multiple candidate image sets may only be displayed sequentially, and the multiple candidate image sets are not related to each other when they are generated.
  • FIG. 3 is a second flowchart of an image processing method in an embodiment.
  • the image processing method includes step 302 to step 310 .
  • the specific implementation manners of step 306 to step 310 can refer to the above-mentioned embodiment, which will not be repeated here.
  • Step 202 in the above-mentioned embodiment can include step 302 to step 304 of this embodiment.
  • Step 302 generating a first candidate image set according to the first initial image with a blue-green tone.
  • the appropriate first initial image may be determined according to the ratio of the number of pixels displayed in the blue and green hue range to the total number of pixels in the display screen. Specifically, the above ratio may be 90%, that is, 90% of the pixels in the display screen are used to display blue-green hues.
  • the first initial image may be, for example, an image of blue sky and trees, and by performing a variety of different color enhancement processes on the image of blue sky and trees, the required first candidate image set can be generated, thereby obtaining the user's preference for blue-green tones. preference.
  • Step 304 generating a second set of candidate images according to the second initial image of the red, green and blue tone and the second parameters.
  • the appropriate second initial image can be determined according to the ratio of the number of pixels displayed in the red, green, and blue tonal range to the total number of pixels in the display screen. Specifically, if the number of pixels displayed as a red tone in the image accounts for 25% to 35% of the total number of pixels on the display screen, the number of pixels displayed as a green tone also accounts for 25% to 35% of the total number of pixels on the display screen, and If the number of pixels displayed as blue tone accounts for 25% to 35% of the total number of pixels in the display screen, it can be considered that the image can be used as the second initial image.
  • the second initial image may be, for example, an image containing red, green, blue and other colored fruits, and by performing a variety of different color enhancement processes on images containing red, green, blue and other colored fruits, the first initial image may be generated. Two candidate image sets, the second candidate image set is used to obtain the user's preference for red, green and blue tones.
  • Step 306 obtaining the user's preference selection results for multiple images in each candidate image set, and obtaining enhanced preference information according to the preference selection results.
  • Step 308 acquire the image to be processed, and divide the image to be processed into multiple regions to be enhanced according to the tone distribution of the image to be processed.
  • Step 310 Perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
  • the second parameter of the color enhancement process may be determined according to the user's preference selection result of multiple images in the first candidate image set, and the second parameter of the color enhancement process may be determined according to the determined second parameter and the first red, green and blue tone.
  • the second candidate image set is generated from the two initial images, thereby improving the pertinence of the second candidate image set and the accuracy of the selection result.
  • multiple images in the candidate image set are respectively configured with corresponding multiple image enhancement coefficients in one-to-one correspondence.
  • the image enhancement coefficient corresponds to the color enhancement processing parameter one by one. That is, if the user selects an image generated based on a certain color enhancement processing parameter, it can be understood that the user selects the image enhancement coefficient corresponding to the parameter as the preference selection result.
  • a certain target enhancement coefficient ratio is determined based on the user's preference selection result, then a color enhancement processing parameter corresponding to the target enhancement coefficient ratio may also be determined, and the image to be processed is processed.
  • FIG. 4 is a third flowchart of an image processing method in an embodiment. Referring to FIG.
  • the image processing method includes steps 402 to 412 .
  • steps 402 to 404, and steps 410 to 412 can refer to the foregoing embodiments, which will not be repeated here, that is, the steps in the foregoing embodiments to obtain enhanced preference information according to the preference selection results specifically include this embodiment Step 406 to step 408 of the example.
  • Step 402 generating a candidate image set.
  • Step 404 obtaining the user's preference selection results for multiple images in each candidate image set.
  • Step 406 acquiring candidate enhancement coefficients corresponding to each candidate image set respectively.
  • the candidate enhancement coefficient is an image enhancement coefficient corresponding to an image selected by the user from the candidate image set.
  • the number of candidate image sets is two, and each candidate image set includes three images as an example.
  • the image enhancement coefficients of the three images in the first candidate image set are 0.2, 0.5 and 0.8 respectively, and the image enhancement coefficients of the three images in the second candidate image set are 0.2, 0.7 and 0.9 respectively. If the user selects an image with an image enhancement factor of 0.5 in the first candidate image set, the first candidate enhancement factor is 0.5; if the user selects an image with an image enhancement factor of 0.7 in the second candidate image set, then the second candidate image set The selected enhancement factor is 0.7.
  • a target enhancement coefficient ratio is obtained as enhancement preference information according to multiple candidate enhancement coefficients.
  • an average value of the two enhancement coefficients of 0.6 may be used as the target enhancement coefficient ratio for subsequent color enhancement processing.
  • the average manner of obtaining the target enhancement coefficient ratio may be, but not limited to, an arithmetic average, a weighted average, and the like. Among them, by avoiding the value of the image enhancement coefficient, the situation of obtaining the same target enhancement coefficient ratio after selecting different images can be avoided, so as to improve the reliability of the acquired target enhancement coefficient ratio, thereby improving the reliability of the image processing method sex.
  • Step 410 acquire the image to be processed, and divide the image to be processed into multiple regions to be enhanced according to the tone distribution of the image to be processed.
  • Step 412 Perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
  • the connection between the user's personalized selection and the color enhancement processing parameters can be established. Therefore, by relatively simple calculation of the preference selection results of multiple candidate image sets, the required target enhancement coefficient can be obtained, and accurate color enhancement processing can be realized through the obtained target enhancement coefficient.
  • the step of obtaining the enhanced preference information of the user may further include the following steps. If a coefficient adjustment signal acting on a designated trigger area of the interface is received, the target enhancement coefficient ratio is updated according to the coefficient adjustment signal.
  • the designated trigger area may be, for example, a slider area on the user interface. There are multiple scales in the slider area, and the user can select any scale on the slider by dragging. Wherein, each scale on the slider corresponds to each target enhancement coefficient ratio.
  • the slider may be provided with 256 scales, and the 256 scales correspond to 256 target enhancement coefficient ratios one-to-one, and the 256 target enhancement coefficient ratios correspond to 256 color enhancement processing parameters respectively. Therefore, by selecting a scale, a corresponding color enhancement processing parameter can be selected, thereby realizing the selection of the color enhancement effect.
  • a preliminary target enhancement coefficient ratio may be firstly determined based on the candidate image set. For example, if the number of candidate image sets is two, and each candidate image set includes 3 images, it may be determined that the preliminary target enhancement coefficient ratio is one of 9 values. Moreover, the target enhancement coefficient ratio preliminarily determined through the above steps is 9 out of the 256 target enhancement coefficient ratios corresponding to the 256 scales, thereby preliminarily determining the value range of the target enhancement coefficient ratio. Based on the preliminarily determined value range, the user can further fine-tune the adjustment through the slider, thus realizing the fine-tuning of the color enhancement effect. In this embodiment, through the combination of the above two methods for determining the target enhancement coefficient ratio, the required color enhancement processing parameters can be determined quickly and accurately.
  • the step of performing corresponding color enhancement processing on each area to be enhanced according to the enhancement preference information may include the following steps.
  • a color correction matrix corresponding to the target enhancement coefficient ratio is acquired, and color enhancement processing is performed according to the color correction matrix corresponding to each area to be enhanced.
  • the color enhancement processing parameter is a color correction matrix.
  • each color correction matrix corresponds to at least one region to be enhanced.
  • the color correction matrix (ColorCorrection Matrix, CCM) can correct the image with lower saturation to the image with higher saturation. That is, the above correction can be understood as a process of mapping an image with lower saturation to an image with higher saturation through a preset mapping relationship. Also, the same color can be adjusted to different degrees based on different color correction matrices.
  • the color correction matrix can be generated by means of, for example, a three-dimensional look-up table (3D Look UpTable, 3D-Lut).
  • the source color space with low saturation can be divided into multiple grids, and the target color space with high saturation can also be divided into multiple grids, and a one-to-one mapping relationship between the grids can be established. That is, a certain grid in the source color space corresponds to a certain grid in the target color space.
  • the image to be processed can be understood as an image with low saturation. Therefore, the corresponding target enhancement coefficient ratio can be obtained through the user's enhancement preference information, and one or more corresponding color correction matrices can be determined according to the preset rules and the target enhancement coefficient ratio, so that personalization can be performed through an appropriate color correction matrix color enhancement processing.
  • the same person may have different requirements for different hues. Therefore, under some target enhancement coefficient ratios, different color correction matrices may be used for different regions to be enhanced; and under other target enhancement coefficient ratios, the same color correction matrix may be used for all regions to be enhanced. Therefore, in this embodiment, based on the above manner of selecting the color correction matrix, different color enhancement processes can be performed on different regions, thereby improving the overall effect of the color enhancement process.
  • the perception of the three primary colors by human eyes can be integrated into the color calibration matrix to achieve more accurate color calibration.
  • the 24-color standard color card can be photographed at a certain color temperature to obtain the 24-color RGB information of the camera, and then the colorimeter is used to measure and obtain 24 groups of CIE1931XYZ tristimulus values of the 24-color standard color card.
  • the XYZ tristimulus value can be understood as being obtained jointly according to the RGB information and the human eye matching function.
  • mapping relationship between RGB information and XYZ tristimulus values that can reflect human perception can be established, and this mapping relationship can be used as one of the factors for establishing a color calibration matrix, so as to achieve a more accurate color enhancement effect.
  • the image to be processed before dividing the image to be processed into a plurality of areas to be enhanced according to the tone distribution of the image to be processed, it also includes obtaining the skin color area in the image to be processed, and adjusting the color attributes of the skin color area to enhance the color of the skin color area.
  • Apply color protection wherein, the skin color area refers to the area where human body skin color exists in the image. It is understandable that during the process of color enhancement processing, the color attributes of each region will be adjusted, but excessive color enhancement may lead to distortion of skin color and affect the user's viewing experience. Therefore, in this embodiment, by screening and protecting the skin color area, the problem of skin color distortion can be effectively avoided, thereby improving the display quality.
  • the skin color region may be determined according to the current color space and the corresponding threshold condition in the space.
  • the skin color area can be determined by the following threshold conditions R>95, G>40, B>20, where R>G, R>B, Max(R,G,B )-Min(R,G,B)>15 and Abs(R-G)>15.
  • the skin color area 7 ⁇ H ⁇ 20, 28 ⁇ S ⁇ 256 and 50 ⁇ V ⁇ 256 can be determined by the following threshold conditions. It can be understood that the above example is only used for illustration and not for limiting the scope of protection of this embodiment.
  • the color space may also be a color space such as YCrCb and a corresponding threshold condition is set.
  • FIG. 5 is a fourth flowchart of an image processing method in an embodiment.
  • the image processing method includes steps 502 to 520 .
  • steps 502 to 508, and steps 518 to 520 reference may be made to the above-mentioned embodiments, and details are not repeated here, that is, before the steps in the above-mentioned embodiments divide the image to be processed into a plurality of regions to be enhanced, , further including steps 510 to 516 of this embodiment.
  • Step 502 generating a candidate image set.
  • Step 504 obtaining the user's preference selection results for multiple images in each candidate image set.
  • Step 506 acquiring candidate enhancement coefficients corresponding to each candidate image set respectively.
  • step 508 a target enhancement coefficient ratio is obtained as enhancement preference information according to multiple candidate enhancement coefficients.
  • Step 510 acquire the image to be processed, and convert the image to be processed from the RGB color space to the target color space.
  • the target color space is an HSI color space or an HSV color space.
  • H Hue
  • H Hue
  • S aturation
  • S saturation
  • V Value
  • the conversion relationship formula between RGB color space and HSV color space is as follows, where max is the maximum value among R, G, and B, and min is the minimum value among R, G, and B.
  • Step 512 acquiring the skin color area in the image to be processed.
  • the image to be processed is currently in the HSV color space, that is, the skin color region is determined based on the aforementioned threshold condition in the HSV color space.
  • the HSV color space is less susceptible to the influence of light.
  • Step 514 adjusting the saturation and/or lightness of the skin color area.
  • Step 516 converting the image after adjusting the color attributes of the skin color area from the target color space to the RGB color space.
  • Step 518 Divide the image converted back into the RGB color space into multiple regions to be enhanced according to the hue.
  • Step 520 Perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
  • the skin color area is defined in the HSV color space, and the skin color area is protected, which can enhance the color saturation while preventing the skin color area from being over-emphasized, thereby maintaining the naturalness of the skin color.
  • the above-mentioned color space conversion operation can be realized through an analog circuit, that is, a corresponding analog circuit is constructed based on the conversion logic of the color space, so that the conversion of the color space is realized through the analog circuit.
  • the processor only supports operations on digital signals. Therefore, if a processor is used to realize the conversion operation of the above color space, it is necessary to convert the analog signal into a digital signal for operation. However, taking 256 gray levels as an example, two analog signals that are similar but actually different may be converted into digital signals at the same gray level after digital-to-analog conversion, resulting in partial data loss.
  • the conversion operation of the color space is realized by the analog circuit, which can effectively avoid the loss of some data, thereby improving the accuracy of the data processing process.
  • the operation process of the analog circuit does not require clock control, so the calculation speed is relatively fast.
  • the step of dividing the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed includes: dividing the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed and at least one transition zone.
  • the image processing method further includes: smoothing the color attributes of the transition regions according to the color attributes of the plurality of regions to be enhanced after the color enhancement processing.
  • the color correction matrix can usually only cover part of the key tonal regions (ie, regions to be enhanced). In order to balance the relationship between operation speed and accuracy, usually the color correction matrix only covers 24 tonal regions. Therefore, there are usually some areas in the image to be processed that do not have corresponding color correction matrices.
  • the enhancement may be performed by means of smoothing, so as to realize the color enhancement of the entire image to be processed.
  • the manner of the smoothing processing may adopt any manner with a smoothing effect such as interpolation, which is not limited in this embodiment.
  • the smoothing of the skin color area and the smoothing of the transition area are realized by one smoothing process to reduce the number of times of smoothing, thereby improving the speed of the image processing method.
  • the image processing method further includes a step of platform verification.
  • the step of platform verification can be set before skin color protection, or can be executed synchronously with skin color protection. In this embodiment, by setting the platform verification step, the reliability and accuracy of the image processing algorithm can be verified before the display device leaves the factory, thereby improving user experience.
  • the image processing method further includes the following steps. Perform color enhancement processing on the image to be processed according to the current preset color effect of the display screen to generate a first enhanced image, and fuse the first enhanced image and the second enhanced image according to the target enhancement coefficient ratio to generate a third enhanced image.
  • the preset color effect refers to a basic color effect set by default when the display device leaves the factory. That is, the preset color effect can be understood as a color effect that has nothing to do with the user's enhanced preference information, for example, it can include a night effect, a dusk effect, and the like.
  • the second enhanced image is an image generated by performing corresponding color enhancement processing on each area to be enhanced according to the enhancement preference information.
  • the basic effect can be called 3DLut_CC
  • the color enhancement effect based on the enhancement preference information can be called 3DLut_ENIR
  • Delta0 3DLutENIR0-3DlutCC
  • Delta1 3DLutENIR1-3DLutENIR0
  • 3DLutENIR0 refers to the final effect of the weakest color enhancement
  • 3DLutENIR1 refers to the final effect of the strongest color enhancement. Therefore, the fusion of different enhancement effects can be realized based on the above formula, that is, the fusion of the first enhanced image and the second enhanced image based on the target enhancement coefficient ratio is realized.
  • the image processing method further includes the following steps.
  • the target enhancement coefficient ratio is equal to the coefficient threshold
  • the target color gamut supported by the display screen is obtained, and if the target color gamut is larger than the color gamut of the image after color enhancement processing, the color gamut of the image after color enhancement processing is extended.
  • the target color gamut natively supported by the display is 110% NTSC
  • the color gamut range of 3DLut_CC is 90% NTSC
  • the color gamut can be extended to 100% NTSC when the color enhancement effect is the strongest , to adjust in conjunction with the hardware of the display to achieve better color rendering.
  • the display screen can also have an IR-drop adjustment function.
  • a display screen with an active matrix organic light emitting diode Active Matrix Organic Light Emitting Diode, AMOLED
  • AMOLED Active Matrix Organic Light Emitting Diode
  • the display driver chip can be used to control the IR-drop of the display screen to be turned on or off, so as to control the display effect.
  • x is a fixed value approximately equal to 1.4, and the specific value of the fixed value is determined by the circuit design of the display screen. Therefore, based on the above relational formula, it can be seen that when the IR-drop compensation function of the display screen is turned off, the contrast ratio of the display screen is the highest.
  • the IR-drop compensation function of the display When the IR-drop compensation function of the display is turned on, that is, when there is no IR-drop on the display, the contrast of the display is the lowest, and the image after color enhancement processing lacks a sense of hierarchy. Based on the above, it can be found that if only two states of the IR-drop compensation function are enabled and disabled, the display effect will be extreme and the display flexibility will be insufficient.
  • the stepless adjustment function of the IR-drop can be used to realize the flexible adjustment of the contrast to improve the display quality.
  • an instruction can be issued to enable the stepless adjustment function of IR-drop.
  • the initialization state is that the IR-drop compensation function is off, that is, the contrast of the display screen is the largest, and after completing the steps of performing corresponding color enhancement processing on each area to be enhanced according to the enhancement preference information , adjust the degree of IR-drop according to the enhanced image, thereby changing the contrast of the display screen.
  • the IR-drop adjustment in the image processing method may include the following steps. The average image level of the image after the color enhancement processing is obtained, and the brightness of each color channel is adjusted respectively according to the average image level, so as to adjust the contrast of the image after the color enhancement processing.
  • the average picture level (Average Picture Level, APL) refers to the average value of the gray scale of all pixels in the image after the current color enhancement process.
  • APL Average Picture Level
  • the average grayscale of the resulting image For example, the gray levels of all pixels in the image can be accumulated, and the accumulated value can be divided by the total number of pixels in the image to obtain the average gray level of the image.
  • the brightness of each color channel can be adjusted by adjusting the gamma value.
  • the human eye is sensitive to brightness changes and can perceive small brightness differences, but in a high-brightness environment, it is not sensitive to brightness changes, and the human eye can only distinguish when the brightness value changes greatly.
  • the above characteristics can be referred to as gamma (Gamma) characteristics. Therefore, if it is necessary to obtain a uniformly changing brightness experience, then the brightness displayed by the display needs to change non-uniformly to adapt to the Gamma characteristics of the human eye, and the nonlinear relationship parameter between brightness and gray scale is the gamma value.
  • the gamma correction curve corresponding to the gamma correction value can be drawn according to the gamma correction value, and the gamma correction curve is the gamma of the image Correction curve, according to the gamma correction curve, the target brightness corresponding to the pixels of different gray scales in the image can be obtained, and the current brightness of the pixels of different gray scales in the image can be adjusted to the target brightness, so as to realize the adjustment of the brightness of the image.
  • the adjustment can accurately display the brightness of pixels of different gray scales in the current color-enhanced image, so that the change of brightness conforms to human perception, and the color transparency and light-shadow relationship of the image are improved, making the contrast of the image more perfect. Intense and vivid, optimize the display effect of the monitor.
  • the gamma correction value of the image can be obtained according to the average gray scale of the image, and the brightness of the current color-enhanced image can be adjusted according to the gamma correction value of the image. Adjustment, so as to optimize the display effect of the display on the basis of retaining the IR-drop characteristics of the display, so that the contrast of the image after the color enhancement processing is more vivid, and the layering of the image after the color enhancement processing is improved.
  • the image processing method further includes performing corresponding color enhancement processing on the image to be processed according to the current color mode and/or rendering intent of the display screen to generate a fourth enhanced image, and the fourth enhanced image and the second enhanced image The images are fused.
  • the above-mentioned color enhancement processing can be realized by calling the preset color adjustment interface of the platform.
  • the preset color modes of the mobile phone platform include natural color, enhanced effect, saturated color and automatic adjustment.
  • Preset rendering intents include Perceptually Constant, Relative Hue Matching, Absolute Hue Matching, and Saturation.
  • the perceptually constant rendering intent can be used in the scene of photographic pictures, for example, the rendering intent of relative color matching can be used in the scene of rendering logo graphics, and the rendering intent of absolute color matching can be used, for example, of simulating paper media
  • the saturation rendering intent can be commonly used in the scene of business diagrams and illustrations, for example.
  • the above specific methods of performing color enhancement processing and fusing two enhanced images based on the color mode and rendering intent are preset by the platform, and are not limited in this embodiment. It is understandable that the platform can adjust the color of the image to be processed based on the preset method. However, due to the platform's protection strategy for Gamma2.2 and the color gamut protection strategy, the platform can only make certain fine-tuning. Therefore, in this embodiment, a more flexible and accurate color enhancement effect can be realized through the second enhanced image generated in the foregoing embodiments.
  • Fig. 6 is a frame diagram of the internal structure of a display device in an embodiment.
  • the display device may include a software part and a hardware part
  • the hardware part includes a display screen for display
  • the software part includes an application layer (APP), a Layer (Framework) and core layer (kernel).
  • the framework layer can also be specifically divided into the Java part and the Native part.
  • the Java part is used to connect with the application program, but the Java language itself cannot access and operate the bottom layer of the operating system. Therefore, the Native part can be set to interact with the bottom layer.
  • the Java part can call the Native part through the Java native interface (Java NativeInterface, JNI).
  • the application layer obtains the preference selection result carrying the user's enhanced preference information through interaction with the user, and obtains the target enhancement coefficient ratio that can represent the user's enhanced preference information through analysis, and obtains the The target enhancement factor ratio is passed to the database and is called the Strength value.
  • the Strength value is passed to the database and is called the Strength value.
  • other information such as SystemUI and Setting may also be stored in the database.
  • the framework layer can determine the change of the database information of the application layer through the framework monitoring, and obtain the corresponding SettingProvider key value and Strength intensity value when the database information changes.
  • the SettingProvider key value is the flag bit of the button, which is used to identify which button of the mobile phone is pressed to trigger the subsequent logic of the software. After the above data is obtained, the data is transmitted in two ways.
  • the Android HIDL interface On the one hand, it reaches the core layer path through the Android HIDL interface to issue the largest IR-drop instruction to the display driver chip of the screen, and on the other hand, it reaches the basic effect path to realize the user's personality.
  • Color enhancement the 3DLut_ENH module is used to perform multiple steps, specifically including the aforementioned acquisition of the skin color area in the image to be processed, and adjusting the color attributes of the skin color area to protect the color of the skin color area.
  • the The image is divided into multiple areas to be enhanced, and corresponding color enhancement processing is performed on each area to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
  • the 3DLut_IRC module is used to compensate the image after color enhancement processing according to the average image level, so as to improve the transparency of the image by adjusting the degree of IR-drop.
  • the 3DLut_ENIR module is used to fuse and solidify the effects of the 3DLut_ENH module and the 3DLut_IRC module.
  • the 3DLut_CC module is used to fuse the first enhanced image and the second enhanced image according to the target enhancement coefficient ratio to generate a third enhanced image, wherein the first enhanced image refers to coloring the image to be processed according to the current preset color effect of the display screen
  • the image generated by enhancement processing the second enhanced image refers to an image generated by color enhancement processing based on the user's enhancement preference information.
  • the other way of data is transmitted through the RenderIntent interface, and reaches SurfaceFlinger and mobile_color_mode to perform color fine-tuning according to the color mode and rendering intent. After the two channels of image data are processed, they are fused and transmitted to the Phone_color hardware at the core layer.
  • the Phone_color hardware at the core layer gets the data and writes it into the hardware color engine register of the display to realize the display at the hardware layer.
  • steps in the flow charts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be executed at different times, The execution order of these steps or stages is not necessarily performed sequentially, but may be executed in turn or alternately with other steps or at least a part of steps or stages in other steps.
  • an embodiment of the present application further provides an image processing device for implementing the above-mentioned image processing method.
  • the solution to the problem provided by the device is similar to the implementation described in the above method, so the specific limitations in one or more embodiments of the image processing device provided below can refer to the above definition of the image processing method, I won't repeat them here.
  • the image processing device includes a preference acquisition module, an area division module and an enhancement processing module.
  • the preference obtaining module is used to obtain the user's enhanced preference information.
  • the area division module is used to obtain the image to be processed, and divide the image to be processed into multiple areas to be enhanced according to the tone distribution of the image to be processed.
  • the enhancement processing module is used to perform corresponding color enhancement processing on each area to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
  • Each module in the above-mentioned image processing device may be fully or partially realized by software, hardware or a combination thereof.
  • the above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, and can also be stored in the memory of the electronic device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
  • the embodiment of the present application also provides a display device, including a connected display screen and a processor.
  • the processor is used to obtain the enhancement preference information of the user; obtain the image to be processed, divide the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed; perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information , to adjust the color attributes of the image to be processed; and send the image after adjusting the color attributes to the display screen for display.
  • an electronic device is provided, and the electronic device may be a display device.
  • FIG. 7 is an internal structure diagram of the electronic device in one embodiment.
  • the electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Wherein, the processor of the electronic device is used to provide calculation and control capabilities.
  • the memory of the electronic device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and computer programs.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the communication interface of the electronic device is used for wired or wireless communication with an external display device, and the wireless method can be realized through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies.
  • the computer program is executed by a processor, an image processing method is realized.
  • the display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen
  • the input device of the electronic device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the housing of the electronic device , and can also be an external keyboard, touchpad, or mouse.
  • FIG. 7 is only a block diagram of a partial structure related to the solution of this application, and does not constitute a limitation on the electronic equipment to which the solution of this application is applied.
  • the specific electronic equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
  • an electronic device including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when executing the computer program.
  • a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
  • a computer program product including a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
  • any reference to storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile and volatile storage.
  • Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive variable memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc.
  • the volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc.
  • RAM Random Access Memory
  • RAM Random Access Memory
  • RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
  • the databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database.
  • the non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto.
  • the processors involved in the various embodiments provided by this application can be general-purpose processors, central processing units, image processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

An image processing method, comprising: obtaining enhancement preference information of a user (102); obtaining an image to be processed, and dividing, according to the hue distribution of said image, said image into a plurality of areas to be enhanced (104); and performing corresponding color enhancement processing on each of said areas according to the enhancement preference information to adjust the color attribute of said image (106).

Description

图像处理方法、装置、电子设备和计算机可读存储介质Image processing method, device, electronic device, and computer-readable storage medium
相关申请的交叉引用Cross References to Related Applications
本申请要求于2021年12月31日提交中国专利局、申请号为2021116768158、发明名称为“图像处理方法、装置、电子设备和计算机可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 2021116768158 and the title of the invention "image processing method, device, electronic device and computer-readable storage medium" submitted to the China Patent Office on December 31, 2021, the entire content of which Incorporated in this application by reference.
技术领域technical field
本申请涉及显示技术领域,特别是涉及一种图像处理方法、装置、电子设备和计算机可读存储介质。The present application relates to the field of display technology, in particular to an image processing method, device, electronic equipment and computer-readable storage medium.
背景技术Background technique
随着显示技术的发展,显示设备能够呈现越来越丰富的色彩。用户对于色彩存在这不同的偏好,比如部分人喜好鲜艳的颜色,部分人喜好更加自然的颜色。但是,目前的显示设备中的图像处理方法单一,无法灵活地适配于不同偏好的用户,导致用户的观看体验不佳。With the development of display technology, display devices can present more and more rich colors. Users have different preferences for colors, for example, some people prefer bright colors, while others prefer more natural colors. However, the image processing method in the current display device is single, and cannot be flexibly adapted to users with different preferences, resulting in poor viewing experience for users.
这里的陈述仅提供与本申请有关的背景信息,而不必然地构成示例性技术。The statements herein merely provide background information related to the present application and do not necessarily constitute exemplary techniques.
发明内容Contents of the invention
根据本申请的各种实施例,提供一种图像处理方法、装置、电子设备、计算机可读存储介质和计算机程序产品。According to various embodiments of the present application, an image processing method, device, electronic equipment, computer-readable storage medium, and computer program product are provided.
一种图像处理方法,所述方法包括:An image processing method, the method comprising:
获取用户的增强偏好信息;Obtain the user's enhanced preference information;
获取待处理图像,根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强区域;Acquiring an image to be processed, dividing the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed;
根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理,以调节所述待处理图像的色彩属性。Perform corresponding color enhancement processing on each of the regions to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
一种图像处理装置,所述装置包括:An image processing device, the device comprising:
偏好获取模块,用于获取用户的增强偏好信息;A preference acquisition module, configured to acquire enhanced preference information of the user;
区域划分模块,用于获取待处理图像,根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强区域;An area division module, configured to acquire an image to be processed, and divide the image to be processed into a plurality of areas to be enhanced according to the tone distribution of the image to be processed;
增强处理模块,用于根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理,以调节所述待处理图像的色彩属性。An enhancement processing module, configured to perform corresponding color enhancement processing on each of the regions to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
一种显示设备,包括:A display device comprising:
显示屏;display screen;
处理器,与所述显示屏连接,用于获取用户的增强偏好信息;获取待处理图像,根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强 区域;根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理,以调节所述待处理图像的色彩属性;将调节所述色彩属性后的图像发送至所述显示屏进行显示。A processor, connected to the display screen, configured to acquire user enhancement preference information; acquire an image to be processed, and divide the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed; The enhancement preference information performs corresponding color enhancement processing on each of the regions to be enhanced, so as to adjust the color attribute of the image to be processed; and sends the image with the adjusted color attribute to the display screen for display.
一种电子设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述的方法的步骤。An electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述的方法的步骤。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method are realized.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其他特征、目的和优点将从说明书、附图以及权利要求书变得明显。The details of one or more embodiments of the application are set forth in the accompanying drawings and the description below. Other features, objects and advantages of the present application will be apparent from the description, drawings and claims.
附图说明Description of drawings
为了更清楚地说明本申请实施例或示例性技术中的技术方案,下面将对实施例或示例性技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。In order to more clearly illustrate the technical solutions in the embodiments or exemplary technologies of the present application, the following will briefly introduce the accompanying drawings that need to be used in the descriptions of the embodiments or exemplary technologies. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present application. Those skilled in the art can also obtain the drawings of other embodiments according to these drawings without creative work.
图1为一实施例的图像处理方法的流程图之一;Fig. 1 is one of flow charts of the image processing method of an embodiment;
图2为一实施例的步骤102的子流程图;Fig. 2 is a subflow chart of step 102 of an embodiment;
图3为一实施例的图像处理方法的流程图之二;Fig. 3 is the second flowchart of the image processing method of an embodiment;
图4为一实施例的图像处理方法的流程图之三;Fig. 4 is the third flowchart of the image processing method of an embodiment;
图5为一实施例的图像处理方法的流程图之四;FIG. 5 is a fourth flowchart of an image processing method of an embodiment;
图6为一实施例显示设备的内部结构框架图;Fig. 6 is a frame diagram of the internal structure of a display device according to an embodiment;
图7为一实施例的电子设备的内部结构图。FIG. 7 is an internal structural diagram of an electronic device according to an embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present application, and are not intended to limit the present application.
本申请实施例提供的图像处理方法,可以应用于显示设备中。其中,显示设备可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、物联网设备和便携式可穿戴设备,物联网设备可为智能音箱、智能电视、智能空调、智能车载设备等。便携式可穿戴设备可为智能手表、智能手环、头戴设备等。显示设备至少包括用于显示图像的显示屏和用于处理图像数据的处理器。具体地,处理器可以包括GPU(Graphics Processing Unit,图形处理器),GPU用于执行数学和几何计算以及图形渲染,以实现所需的图像处理功能。The image processing method provided in the embodiment of the present application may be applied to a display device. Among them, the display device can be but not limited to various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices, and the Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, etc. . Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, and the like. The display device includes at least a display screen for displaying images and a processor for processing image data. Specifically, the processor may include a GPU (Graphics Processing Unit, graphics processing unit), and the GPU is used to perform mathematical and geometric calculations and graphics rendering, so as to realize required image processing functions.
图1为一实施例的图像处理方法的流程图之一,参考图1,在本实施例中,图像处理方法包括步骤102至步骤106。FIG. 1 is one of the flowcharts of an image processing method in an embodiment. Referring to FIG. 1 , in this embodiment, the image processing method includes steps 102 to 106 .
步骤102,获取用户的增强偏好信息。 Step 102, acquiring enhanced preference information of the user.
其中,用户的增强偏好信息是指用户对色彩增强的偏好信息,具体地,用户的生理现象和/或心理感受都可能导致对不同的色彩增强方式具有不同的 偏好。生理现象是指对于同一个客观量的色彩,在相同的观察环境下,人眼观察到的色彩不完全相同的现象。示例性地,能够导致观察到的色彩存在差异的生理现象例如包括种族、年龄、色觉障碍等。心理感受是指用户主观上对不同色彩的感受。例如,部分人喜好鲜艳的颜色,部分人喜好自然的颜色。并且,喜好鲜艳颜色的人可能并不是对所有颜色都喜好鲜艳,而是喜好自然的肤色和鲜艳的蓝天树木等。The user's enhancement preference information refers to the user's preference information for color enhancement. Specifically, the user's physiological phenomena and/or psychological feelings may lead to different preferences for different color enhancement methods. Physiological phenomenon refers to the phenomenon that the color observed by human eyes is not exactly the same for the same objective color under the same observation environment. Exemplarily, physiological phenomena that can cause differences in observed colors include, for example, race, age, color vision impairment, and the like. Psychological feeling refers to the user's subjective feeling of different colors. For example, some people like bright colors and some people like natural colors. Moreover, people who like bright colors may not like bright colors for all colors, but prefer natural skin tones and bright blue sky and trees.
示例性地,可以根据历史数据获取用户的增强偏好信息。例如,可以获取用户在系统图片处理软件或第三方图片处理软件中历史的图像编辑操作,并根据用户在编辑操作过程中对色彩的调节情况,获取用户的增强偏好信息。用户对色彩的调节情况具体可以为对各色彩属性的调节情况。若用户在进行调节时,较高频率地选择增大红色通道的明度,则说明用户偏好红色通道采用较为鲜艳的颜色。另一示例性地,也可以为用户提供一些色彩增强偏好相关的问题或图片,根据用户提供的选择结果获取增强偏好信息。可以理解的是,上述获取用户的增强偏好信息的方式仅用于示例性说明,而不用于限定本实施例的保护范围,其他能够获取用户的增强偏好信息的方式,也可以应用于本实施例中。因此,通过一定的方式确定用户的增强偏好信息,就可以针对用户的偏好,提供个性化的、精准的色彩增强效果。Exemplarily, the user's enhanced preference information can be obtained according to historical data. For example, the user's historical image editing operations in the system image processing software or third-party image processing software can be obtained, and the user's enhancement preference information can be obtained according to the user's color adjustment during the editing operation. The user's adjustment of the color may specifically be the adjustment of each color attribute. If the user frequently chooses to increase the brightness of the red channel when making adjustments, it means that the user prefers brighter colors for the red channel. In another example, some questions or pictures related to color enhancement preference may also be provided to the user, and enhancement preference information may be obtained according to the selection result provided by the user. It can be understood that the above method of obtaining enhanced preference information of users is only for illustrative purposes, and is not intended to limit the scope of protection of this embodiment, and other methods capable of obtaining enhanced preference information of users can also be applied to this embodiment middle. Therefore, by determining the enhancement preference information of the user in a certain way, a personalized and accurate color enhancement effect can be provided according to the preference of the user.
步骤104,获取待处理图像,根据待处理图像的色调分布将待处理图像划分为多个待增强区域。 Step 104, acquire the image to be processed, and divide the image to be processed into multiple regions to be enhanced according to the tone distribution of the image to be processed.
具体地,如前述说明,同一用户对不同颜色的明亮程度的感受也不完全相同。因此,若采用相同的方式对不同的颜色进行色彩增强处理,则也无法呈现较佳的色彩增强效果。例如,以用户喜好自然的肤色和鲜艳的风景为例。若采用对肤色的色彩增强处理参数对整幅图像进行相同的色彩增强处理,就会导致风景区域的颜色明亮程度不足,即风景区域的颜色不够鲜艳。若采用对风景的色彩增强处理参数对整幅图像进行相同的色彩增强处理,就会导致肤色区域的颜色明亮程度过高,即肤色区域的颜色发生失真。其中,色调(Hue)指的是颜色的属性,描述的是单纯的颜色外观,或者可以理解为所处的光谱颜色的位置。因此,不同颜色可以理解为具有不同的色调的颜色,通过基于色调将待处理图像划分为多个待增强区域,就可以有效避免采用相同的处理参数对不同色调的颜色进行处理时,不同颜色的增强效果单一的问题,从而进一步改善色彩增强的效果。Specifically, as described above, the same user has different perceptions of the brightness of different colors. Therefore, if color enhancement processing is performed on different colors in the same manner, a better color enhancement effect cannot be presented. For example, take the case that users prefer natural skin tones and vivid landscapes. If the color enhancement processing parameters for the skin color are used to perform the same color enhancement processing on the entire image, the color brightness of the landscape area will be insufficient, that is, the color of the landscape area will not be bright enough. If the color enhancement processing parameters for the landscape are used to perform the same color enhancement processing on the entire image, the color brightness of the skin color area will be too high, that is, the color of the skin color area will be distorted. Among them, hue (Hue) refers to the attribute of the color, which describes the pure color appearance, or can be understood as the position of the spectral color. Therefore, different colors can be understood as colors with different hues. By dividing the image to be processed into multiple areas to be enhanced based on the hue, it is possible to effectively avoid that the same processing parameters are used to process colors with different hues. Enhance the effect of a single problem, so as to further improve the effect of color enhancement.
步骤106,根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理,以调节待处理图像的色彩属性。Step 106: Perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information, so as to adjust the color attribute of the image to be processed.
具体地,处理器中可以被预先配置好不同色调与色彩增强处理参数之间的映射关系,以在图像处理过程中,分别针对不同的待增强区域执行对应的色彩增强处理。即,对于具有第一色调的待增强区域,则选择对应的第一参数进行色彩增强处理;对于具有第二色调的待增强区域,则选择对应的第二参数进行色彩增强处理,以此类推。而且,通过结合增强偏好信息,可以实现更加准确的色彩增强处理。示例性地,第一色调可以被配置有多种不同的色彩增强处 理参数,而且不同的参数分别与不同的增强偏好信息一一对应。Specifically, the processor may be pre-configured with a mapping relationship between different hues and color enhancement processing parameters, so as to perform corresponding color enhancement processing for different areas to be enhanced during the image processing process. That is, for the region to be enhanced with the first hue, the corresponding first parameter is selected for color enhancement processing; for the region to be enhanced with the second hue, the corresponding second parameter is selected for color enhancement processing, and so on. Also, by combining enhancement preference information, more accurate color enhancement processing can be achieved. Exemplarily, the first hue may be configured with multiple different color enhancement processing parameters, and different parameters correspond to different enhancement preference information respectively.
在本实施例中,通过基于待处理图像的色调分布将待处理图像划分为多个待增强区域,可以针对不同的色调分别执行对应的色彩增强处理,从而在实现色彩增强的过程中,有效避免色彩失真的问题。而且,结合获取到的用户的增强偏好信息,就可以针对用户的偏好,提供个性化的、精准的色彩增强效果。因此,在本申请实施例中,能够根据待处理图像中的色调分布情况和用户的增强偏好信息进行准确的色彩增强处理,从而实现一种个性化程度高且色彩还原度高的图像处理方法。In this embodiment, by dividing the image to be processed into multiple areas to be enhanced based on the tone distribution of the image to be processed, corresponding color enhancement processing can be performed for different tones, thereby effectively avoiding the Problems with color distortion. Moreover, in combination with the obtained enhancement preference information of the user, a personalized and accurate color enhancement effect can be provided according to the preference of the user. Therefore, in the embodiment of the present application, accurate color enhancement processing can be performed according to the tone distribution in the image to be processed and the user's enhancement preference information, thereby realizing an image processing method with a high degree of personalization and high color reproduction.
图2为一实施例的步骤102的子流程图,参考图2,在其中一个实施例中,步骤获取用户的增强偏好信息包括步骤至步骤。FIG. 2 is a subflow chart of step 102 in one embodiment. Referring to FIG. 2 , in one embodiment, the step of acquiring user's enhanced preference information includes step to step.
步骤202,生成备选图像集。 Step 202, generating a candidate image set.
其中,备选图像集包括对同一图像采用多种不同的色彩增强处理生成的多张图像。备选图像集用于显示在用户界面(User Interface,UI)上,且用户可以通过点击界面上的触发区域实现交互。可选地,可以响应于作用在用户界面上的预设操作生成备选图像集,上述预设操作例如可以是用户点击色彩个性化按钮,也可以是用户执行色彩个性化对应的手势等,本实施例不做限定。Wherein, the candidate image set includes multiple images generated by using multiple different color enhancement processes on the same image. The candidate image set is used for displaying on a user interface (User Interface, UI), and the user can realize interaction by clicking a trigger area on the interface. Optionally, the candidate image set may be generated in response to a preset operation acting on the user interface. The preset operation may be, for example, the user clicking a color personalization button, or the user performing a gesture corresponding to the color personalization. Examples are not limited.
每个备选图像集中可以包括两张、三种、四张等数量的图像,具体可以根据增强偏好信息的分析准确度和速度要求选择恰当数量的图像。其中,同一备选图像集中的多张图像可以用于测试用户对于一些色彩属性的具体偏好。示例性地,可以对同一图像的蓝色通道的饱和度进行调节,以生成同一备选图像集中的三张图像,例如,可以分别设置蓝色通道的饱和度为100%、95%和90%,并保持其他颜色通道的参数不变。其中,用于生成备选图像集的初始图像可以是色块图像,即,初始图像包括待测试色彩属性的相关颜色的色块。初始图像也可以是满足预设条件的照片,例如,若需要测试蓝色调相关的色彩属性,则可以采用天空或海洋相关图像作为初始图像;若需要测试绿色调相关的色彩属性,则可以采用植物相关的图像作为初始图像。可选地,同一备选图像集中的多张图像可以同时显示在用户界面上,也可以依次显示在用户界面上,本实施例不做限定。Each candidate image set may include two, three, or four images, and specifically, an appropriate number of images may be selected according to the analysis accuracy and speed requirements of the enhanced preference information. Among them, multiple images in the same candidate image set can be used to test the user's specific preference for some color attributes. Exemplarily, the saturation of the blue channel of the same image can be adjusted to generate three images in the same candidate image set, for example, the saturation of the blue channel can be set to 100%, 95% and 90% respectively , and keep the parameters of other color channels unchanged. Wherein, the initial image used to generate the candidate image set may be a color patch image, that is, the initial image includes color patches of colors related to the color attribute to be tested. The initial image can also be a photo that satisfies preset conditions. For example, if you need to test the color attributes related to the blue tone, you can use an image related to the sky or the ocean as the initial image; if you need to test the color attributes related to the green tone, you can use plants The relevant image is used as the initial image. Optionally, multiple images in the same candidate image set may be displayed on the user interface at the same time, or may be displayed sequentially on the user interface, which is not limited in this embodiment.
而且,在显示备选图像集时,可以同时提示用户根据个人偏好进行选择,以及时获取用户的偏好选择结果。示例性地,在显示备选图像集中的多张照片时,可以通过文字提示的方式告知用户图像选择规则并提示用户进行选择,文字提示例如可以是“请选择您最喜好的图像”、“请选择您最不喜好的图像”以及“请按照您的喜好程度对图像进行排序”等,以实现人性化的用户界面。Moreover, when the candidate image set is displayed, the user may be prompted to make a selection according to personal preference, so as to obtain the user's preference selection result in a timely manner. For example, when displaying multiple photos in the candidate image set, the user may be notified of the image selection rules and prompted to make a selection through text prompts. The text prompts may be, for example, "Please select your favorite image", "Please Select the image you don't like the most" and "Please sort the images according to your preference", etc., to realize a user-friendly interface.
可选地,在需要生成多个备选图像集时,可以同时生成多个备选图像集,以简化备选图像集的生成规则;也可以依次生成多个备选图像集。其中,若依次生成多个备选图像集,则可以根据在先的备选图像集的偏好选择结果,适应性地生成在后的备选图像集中的多张图像,以提高增强偏好信息的分析准确性。Optionally, when multiple candidate image sets need to be generated, the multiple candidate image sets can be generated simultaneously to simplify the generation rules of the candidate image sets; multiple candidate image sets can also be generated sequentially. Among them, if multiple candidate image sets are sequentially generated, multiple images in the subsequent candidate image set can be adaptively generated according to the preference selection results of the previous candidate image sets, so as to improve the analysis of enhanced preference information accuracy.
步骤204,获取用户对各备选图像集中多张图像的偏好选择结果,根据偏 好选择结果获取增强偏好信息。 Step 204, obtain the user's preference selection results for multiple images in each candidate image set, and obtain enhanced preference information according to the preference selection results.
具体地,基于用户对备选图像集的偏好选择结果获取增强偏好信息时,可以与先前告知用户的图像选择规则相对应。例如,若选择规则是选择喜好的图像,则可以增强被选中图像对应的色彩属性;若选择规则是选择不喜好的图像,则可以减弱被选中图像对应的色彩属性。Specifically, when the enhanced preference information is acquired based on the user's preference selection result of the candidate image set, it may correspond to the image selection rule previously notified to the user. For example, if the selection rule is to select a favorite image, the color attribute corresponding to the selected image can be enhanced; if the selection rule is to select an unfavorable image, the color attribute corresponding to the selected image can be weakened.
可以理解的是,普通用户对于色彩属性并没有具体的研究,若不采用本实施例的具象化呈现方式,而仅仅是提供用于调节属性参数的滑条等控件,用户无法理解这些调节后会产生怎样的效果,也不了解是否会产生副作用,从而无法用户无法实现对色彩增强效果的准确调节。因此,在本实施例中,通过提供备选图像集,可以使用户对于不同的色彩增强处理具有更加直观的感受,从而使用户实现更加准确的选择,进而可以获取更加准确的增强偏好信息,而且可以有效提升用户的使用便捷性。It is understandable that ordinary users have no specific research on color attributes. If the concrete presentation method of this embodiment is not adopted, but only controls such as sliders for adjusting attribute parameters are provided, users cannot understand what will happen after these adjustments. What kind of effect will be produced, and whether there will be side effects is unknown, so that the user cannot realize accurate adjustment of the color enhancement effect. Therefore, in this embodiment, by providing alternative image sets, the user can have a more intuitive feeling for different color enhancement processes, so that the user can achieve a more accurate choice, and then can obtain more accurate enhancement preference information, and It can effectively improve the user's convenience of use.
在其中一个实施例中,备选图像集的数量为多个,其中,第n+1备选图像集中的多个图像对应的色彩增强处理参数由第n备选图像集的偏好选择结果确定。具体地,本实施例在生成备选图像集时可以包括如下步骤。首先,生成第一备选图像集,之后再根据用户对第n备选图像集中多张图像的偏好选择结果,确定第n+1备选图像集的多种色彩增强处理参数并生成对应的多张图像,n为正整数。其中,多个备选图像集用于依次显示在用户界面上,即,先将第n备选图像集显示在用户界面上,并在用户提供对第n备选图像集中多张图像的偏好选择结果后,再确定第n+1备选图像集中的多张图形,并将第n+1备选图像集显示在用户界面上,直至显示完全部的备选图像集。示例性地,若用户对第一备选图像集中多张图像的偏好选择结果为喜好蓝色饱和度较高的图像,则在生成第二备选图像集时,可以将其中每一图像的蓝色通道的饱和度均调节至用户喜好的程度,并进一步调节每一图像的红色通道具有不同的饱和度,从而更加快速、准确地获取用户的增强偏好信息。可以理解的是,在一些实施例中,也可以仅仅是依次显示多个备选图像集,而在生成多个备选图像集时互不关联。In one embodiment, there are multiple candidate image sets, wherein the color enhancement processing parameters corresponding to multiple images in the n+1th candidate image set are determined by the preference selection result of the nth candidate image set. Specifically, this embodiment may include the following steps when generating the candidate image set. First, the first candidate image set is generated, and then according to the user's preference selection results for multiple images in the nth candidate image set, various color enhancement processing parameters of the n+1th candidate image set are determined and corresponding multiple color enhancement processing parameters are generated. images, n is a positive integer. Wherein, multiple candidate image sets are used to be displayed on the user interface sequentially, that is, the nth candidate image set is displayed on the user interface first, and the user provides preference selection for multiple images in the nth candidate image set After the results are obtained, multiple graphics in the n+1th candidate image set are determined, and the n+1th candidate image set is displayed on the user interface until all the candidate image sets are displayed. For example, if the user's preference selection result for multiple images in the first candidate image set is that he prefers images with higher blue saturation, then when generating the second candidate image set, the blue color of each image may be The saturation of the color channels is adjusted to the user's preference, and the red channel of each image is further adjusted to have different saturations, so as to obtain the user's enhancement preference information more quickly and accurately. It can be understood that, in some embodiments, the multiple candidate image sets may only be displayed sequentially, and the multiple candidate image sets are not related to each other when they are generated.
在其中一个实施例中,备选图像集的数量为两个。具体地,图3为一实施例的图像处理方法的流程图之二,参考图3,在本实施例中,图像处理方法包括步骤302至步骤310。其中,步骤306至步骤310的具体实施方式可以参考前述实施例,此处不再进行赘述,前述实施例中的步骤202可以包括本实施例的步骤302至步骤304。In one embodiment, the number of candidate image sets is two. Specifically, FIG. 3 is a second flowchart of an image processing method in an embodiment. Referring to FIG. 3 , in this embodiment, the image processing method includes step 302 to step 310 . Wherein, the specific implementation manners of step 306 to step 310 can refer to the above-mentioned embodiment, which will not be repeated here. Step 202 in the above-mentioned embodiment can include step 302 to step 304 of this embodiment.
步骤302,根据蓝绿基调的第一初始图像生成第一备选图像集。 Step 302, generating a first candidate image set according to the first initial image with a blue-green tone.
其中,可以根据显示为蓝色和绿色的色调范围内的像素数量占显示屏中全部像素数量的占比确定恰当的第一初始图像。具体地,上述占比可以为90%,即,显示屏中的90%的像素用于显示蓝绿色调。示例性地,第一初始图像例如可以为蓝天树木的图像,通过对蓝天树木的图像进行多种不同色彩增强处理,就可以生成需要的第一备选图像集,从而获取用户对蓝绿色调的偏好。Wherein, the appropriate first initial image may be determined according to the ratio of the number of pixels displayed in the blue and green hue range to the total number of pixels in the display screen. Specifically, the above ratio may be 90%, that is, 90% of the pixels in the display screen are used to display blue-green hues. Exemplarily, the first initial image may be, for example, an image of blue sky and trees, and by performing a variety of different color enhancement processes on the image of blue sky and trees, the required first candidate image set can be generated, thereby obtaining the user's preference for blue-green tones. preference.
步骤304,根据红绿蓝基调的第二初始图像和第二参数生成第二备选图像 集。 Step 304, generating a second set of candidate images according to the second initial image of the red, green and blue tone and the second parameters.
其中,可以根据显示为红、绿、蓝三色色调范围内的像素数量占显示屏中全部像素数量的占比确定恰当的第二初始图像。具体地,若图像中显示为红色调的像素数量占显示屏中全部像素数量的25%至35%,显示为绿色调的像素数量也占显示屏中全部像素数量的25%至35%,且显示为蓝色调的像素数量占显示屏中全部像素数量的25%至35%,则可以认为该图像可以作为第二初始图像。示例性地,第二初始图像例如可以为包含红色、绿色、蓝色等颜色水果的图像,通过对包含红色、绿色、蓝色等颜色水果的图像进行多种不同色彩增强处理,就可以生成第二备选图像集,第二备选图像集用于获取用户对红绿蓝色调的偏好。Wherein, the appropriate second initial image can be determined according to the ratio of the number of pixels displayed in the red, green, and blue tonal range to the total number of pixels in the display screen. Specifically, if the number of pixels displayed as a red tone in the image accounts for 25% to 35% of the total number of pixels on the display screen, the number of pixels displayed as a green tone also accounts for 25% to 35% of the total number of pixels on the display screen, and If the number of pixels displayed as blue tone accounts for 25% to 35% of the total number of pixels in the display screen, it can be considered that the image can be used as the second initial image. Exemplarily, the second initial image may be, for example, an image containing red, green, blue and other colored fruits, and by performing a variety of different color enhancement processes on images containing red, green, blue and other colored fruits, the first initial image may be generated. Two candidate image sets, the second candidate image set is used to obtain the user's preference for red, green and blue tones.
步骤306,获取用户对各备选图像集中多张图像的偏好选择结果,根据偏好选择结果获取增强偏好信息。 Step 306, obtaining the user's preference selection results for multiple images in each candidate image set, and obtaining enhanced preference information according to the preference selection results.
步骤308,获取待处理图像,根据待处理图像的色调分布将待处理图像划分为多个待增强区域。 Step 308, acquire the image to be processed, and divide the image to be processed into multiple regions to be enhanced according to the tone distribution of the image to be processed.
步骤310,根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理,以调节待处理图像的色彩属性。Step 310: Perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
进一步地,在其中一个实施例中,可以根据用户对第一备选图像集中多张图像的偏好选择结果确定色彩增强处理的第二参数,并根据确定的第二参数和红绿蓝基调的第二初始图像生成第二备选图像集,从而提高第二备选图像集的针对性以及选择结果的准确性。Further, in one of the embodiments, the second parameter of the color enhancement process may be determined according to the user's preference selection result of multiple images in the first candidate image set, and the second parameter of the color enhancement process may be determined according to the determined second parameter and the first red, green and blue tone. The second candidate image set is generated from the two initial images, thereby improving the pertinence of the second candidate image set and the accuracy of the selection result.
在其中一个实施例中,备选图像集中的多张图像分别一一对应被配置有对应的多个图像增强系数。其中,图像增强系数与色彩增强处理参数一一对应。即,用户选择了基于某一色彩增强处理参数生成的图像,就可以理解为用户选择了该参数对应的图像增强系数作为偏好选择结果。相应地,若基于用户的偏好选择结果确定了某一目标增强系数ratio,则也可以确定目标增强系数ratio对应的色彩增强处理参数,并对待处理图像进行处理。图4为一实施例的图像处理方法的流程图之三,参考图4,在其中一个实施例中,图像处理方法包括步骤402至步骤412。其中,步骤402至步骤404、步骤410至步骤412的具体实施方式可以参考前述实施例,此处不再进行赘述,即,前述实施例中的步骤根据偏好选择结果获取增强偏好信息具体包括本实施例的步骤406至步骤408。In one of the embodiments, multiple images in the candidate image set are respectively configured with corresponding multiple image enhancement coefficients in one-to-one correspondence. Wherein, the image enhancement coefficient corresponds to the color enhancement processing parameter one by one. That is, if the user selects an image generated based on a certain color enhancement processing parameter, it can be understood that the user selects the image enhancement coefficient corresponding to the parameter as the preference selection result. Correspondingly, if a certain target enhancement coefficient ratio is determined based on the user's preference selection result, then a color enhancement processing parameter corresponding to the target enhancement coefficient ratio may also be determined, and the image to be processed is processed. FIG. 4 is a third flowchart of an image processing method in an embodiment. Referring to FIG. 4 , in one embodiment, the image processing method includes steps 402 to 412 . Wherein, the specific implementation manners of steps 402 to 404, and steps 410 to 412 can refer to the foregoing embodiments, which will not be repeated here, that is, the steps in the foregoing embodiments to obtain enhanced preference information according to the preference selection results specifically include this embodiment Step 406 to step 408 of the example.
步骤402,生成备选图像集。 Step 402, generating a candidate image set.
步骤404,获取用户对各备选图像集中多张图像的偏好选择结果。 Step 404, obtaining the user's preference selection results for multiple images in each candidate image set.
步骤406,分别获取各备选图像集对应的备选增强系数。 Step 406, acquiring candidate enhancement coefficients corresponding to each candidate image set respectively.
其中,备选增强系数为用户从备选图像集中选择的一张图像对应的图像增强系数。示例性地,以备选图像集的数量为两个,每个备选图像集分别包括三张图像为例。其中,第一备选图像集中的三张图像的图像增强系数分别为0.2、0.5和0.8,第二备选图像集中的三张图像的图像增强系数分别为0.2、0.7和0.9。若用户选择了第一备选图像集中图像增强系数为0.5的图像,则 第一备选增强系数为0.5,若用户选择了第二备选图像集中图像增强系数为0.7的图像,则第二备选增强系数为0.7。Wherein, the candidate enhancement coefficient is an image enhancement coefficient corresponding to an image selected by the user from the candidate image set. Exemplarily, it is assumed that the number of candidate image sets is two, and each candidate image set includes three images as an example. Wherein, the image enhancement coefficients of the three images in the first candidate image set are 0.2, 0.5 and 0.8 respectively, and the image enhancement coefficients of the three images in the second candidate image set are 0.2, 0.7 and 0.9 respectively. If the user selects an image with an image enhancement factor of 0.5 in the first candidate image set, the first candidate enhancement factor is 0.5; if the user selects an image with an image enhancement factor of 0.7 in the second candidate image set, then the second candidate image set The selected enhancement factor is 0.7.
步骤408,根据多个备选增强系数获取目标增强系数ratio作为增强偏好信息。示例性地,基于前一步骤获取到的两个备选增强系数,则可以将二者的平均值0.6作为目标增强系数ratio,以进行后续的色彩增强处理。可以理解的是,获取目标增强系数ratio的平均方式可以是但不限于算术平均、加权平均等。其中,可以通过规避图像增强系数的取值的方式,避免选择不同的图像后获取到相同的目标增强系数ratio的情况,以提高获取的目标增强系数ratio的可靠性,从而提高图像处理方法的可靠性。In step 408, a target enhancement coefficient ratio is obtained as enhancement preference information according to multiple candidate enhancement coefficients. Exemplarily, based on the two candidate enhancement coefficients obtained in the previous step, an average value of the two enhancement coefficients of 0.6 may be used as the target enhancement coefficient ratio for subsequent color enhancement processing. It can be understood that, the average manner of obtaining the target enhancement coefficient ratio may be, but not limited to, an arithmetic average, a weighted average, and the like. Among them, by avoiding the value of the image enhancement coefficient, the situation of obtaining the same target enhancement coefficient ratio after selecting different images can be avoided, so as to improve the reliability of the acquired target enhancement coefficient ratio, thereby improving the reliability of the image processing method sex.
步骤410,获取待处理图像,根据待处理图像的色调分布将待处理图像划分为多个待增强区域。 Step 410, acquire the image to be processed, and divide the image to be processed into multiple regions to be enhanced according to the tone distribution of the image to be processed.
步骤412,根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理,以调节待处理图像的色彩属性。Step 412: Perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
在本实施例中,通过设置增强系数,可以建立用户的个性化选择与色彩增强处理参数之间的联系。从而对多个备选图像集的偏好选择结果进行较为简单的计算,即可获取需要的目标增强系数,并通过获取到的目标增强系数,实现准确的色彩增强处理。In this embodiment, by setting the enhancement coefficient, the connection between the user's personalized selection and the color enhancement processing parameters can be established. Therefore, by relatively simple calculation of the preference selection results of multiple candidate image sets, the required target enhancement coefficient can be obtained, and accurate color enhancement processing can be realized through the obtained target enhancement coefficient.
在其中一个实施例中,获取用户的增强偏好信息的步骤还可以包括如下步骤。若接收到作用于界面的指定触发区域的系数调节信号,则根据系数调节信号更新目标增强系数ratio。示例性地,指定触发区域例如可以是用户界面上的一个滑条区域。滑条区域设有多个刻度,用户可以通过拖动选择滑条上的任一刻度。其中,滑条上的各刻度分别与各目标增强系数ratio相对应。例如,滑条可以设有256个刻度,256个刻度分别与256个目标增强系数ratio一一对应,而256个目标增强系数ratio分别与256中色彩增强处理参数一一对应。因此,通过选择一个刻度,即可以选择一个对应的色彩增强处理参数,从而实现对色彩增强效果的选择。In one of the embodiments, the step of obtaining the enhanced preference information of the user may further include the following steps. If a coefficient adjustment signal acting on a designated trigger area of the interface is received, the target enhancement coefficient ratio is updated according to the coefficient adjustment signal. Exemplarily, the designated trigger area may be, for example, a slider area on the user interface. There are multiple scales in the slider area, and the user can select any scale on the slider by dragging. Wherein, each scale on the slider corresponds to each target enhancement coefficient ratio. For example, the slider may be provided with 256 scales, and the 256 scales correspond to 256 target enhancement coefficient ratios one-to-one, and the 256 target enhancement coefficient ratios correspond to 256 color enhancement processing parameters respectively. Therefore, by selecting a scale, a corresponding color enhancement processing parameter can be selected, thereby realizing the selection of the color enhancement effect.
进一步地,可以先基于备选图像集确定一个初步的目标增强系数ratio。例如,若备选图像集的数量为两个,每个备选图像集包括3张图像,则可以确定初步的目标增强系数ratio为9个数值中的一个。而且,通过上述步骤初步确定的目标增强系数ratio为256个刻度对应的256个目标增强系数ratio中的9个,从而初步确定了目标增强系数ratio的取值范围。基于初步确定的取值范围,用户可以通过滑条进一步进行细化调节,从而实现了对色彩增强效果的微调。在本实施例中,通过上述两种目标增强系数ratio的确定方法的结合,可以快速、准确地确定需要的色彩增强处理参数。Further, a preliminary target enhancement coefficient ratio may be firstly determined based on the candidate image set. For example, if the number of candidate image sets is two, and each candidate image set includes 3 images, it may be determined that the preliminary target enhancement coefficient ratio is one of 9 values. Moreover, the target enhancement coefficient ratio preliminarily determined through the above steps is 9 out of the 256 target enhancement coefficient ratios corresponding to the 256 scales, thereby preliminarily determining the value range of the target enhancement coefficient ratio. Based on the preliminarily determined value range, the user can further fine-tune the adjustment through the slider, thus realizing the fine-tuning of the color enhancement effect. In this embodiment, through the combination of the above two methods for determining the target enhancement coefficient ratio, the required color enhancement processing parameters can be determined quickly and accurately.
在其中一个实施例中,根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理的步骤可以包括如下步骤。获取目标增强系数ratio对应的色彩校正矩阵,并分别根据各待增强区域对应的色彩校正矩阵进行色彩增强处理。In one embodiment, the step of performing corresponding color enhancement processing on each area to be enhanced according to the enhancement preference information may include the following steps. A color correction matrix corresponding to the target enhancement coefficient ratio is acquired, and color enhancement processing is performed according to the color correction matrix corresponding to each area to be enhanced.
也即,在本实施例中,色彩增强处理参数为色彩校正矩阵。其中,各色彩 校正矩阵分别与至少一个待增强区域相对应。色彩校正矩阵(ColorCorrection Matrix,CCM)可以将饱和度较低的图像校正为饱和度较高的图像。即,上述校正可以理解为是将饱和度较低的图像通过预设的映射关系映射为饱和度较高的图像的过程。而且,基于不同的色彩校正矩阵,可以对同一颜色进行不同程度的调节。色彩校正矩阵例如可以通过三维查找表(3D Look UpTable,3D-Lut)的方式生成。具体地,可以将饱和度较低的源色彩空间划分为多个栅格,并将饱和度较高的目标色彩空间也划分为多个栅格,并建立栅格之间的一一映射关系。即,源色彩空间的某一栅格对应于目标色彩空间中的某一栅格。在本实施例中,待处理图像即可以理解为饱和度较低的图像。因此,可以通过用户的增强偏好信息获取到对应的目标增强系数ratio,并根据预设规则和目标增强系数ratio确定对应的一个或多个色彩校正矩阵,从而通过恰当的色彩校正矩阵,进行个性化的色彩增强处理。That is, in this embodiment, the color enhancement processing parameter is a color correction matrix. Wherein, each color correction matrix corresponds to at least one region to be enhanced. The color correction matrix (ColorCorrection Matrix, CCM) can correct the image with lower saturation to the image with higher saturation. That is, the above correction can be understood as a process of mapping an image with lower saturation to an image with higher saturation through a preset mapping relationship. Also, the same color can be adjusted to different degrees based on different color correction matrices. The color correction matrix can be generated by means of, for example, a three-dimensional look-up table (3D Look UpTable, 3D-Lut). Specifically, the source color space with low saturation can be divided into multiple grids, and the target color space with high saturation can also be divided into multiple grids, and a one-to-one mapping relationship between the grids can be established. That is, a certain grid in the source color space corresponds to a certain grid in the target color space. In this embodiment, the image to be processed can be understood as an image with low saturation. Therefore, the corresponding target enhancement coefficient ratio can be obtained through the user's enhancement preference information, and one or more corresponding color correction matrices can be determined according to the preset rules and the target enhancement coefficient ratio, so that personalization can be performed through an appropriate color correction matrix color enhancement processing.
具体地,如前述说明中提到的,同一个人可能对不同色调具有不同的要求。因此,在一些目标增强系数ratio下,可以对不同的待增强区域采用不同的色彩校正矩阵;并在另一些目标增强系数ratio下,可以对全部待增强区域采用相同的色彩校正矩阵。因此,在本实施例中,基于以上选择色彩校正矩阵的方式,可以对不同区域进行不同的色彩增强处理,从而提升色彩增强处理的整体效果。Specifically, as mentioned in the foregoing description, the same person may have different requirements for different hues. Therefore, under some target enhancement coefficient ratios, different color correction matrices may be used for different regions to be enhanced; and under other target enhancement coefficient ratios, the same color correction matrix may be used for all regions to be enhanced. Therefore, in this embodiment, based on the above manner of selecting the color correction matrix, different color enhancement processes can be performed on different regions, thereby improving the overall effect of the color enhancement process.
在其中一个实施例中,可以将人眼对三原色的感受融合在色彩校准矩阵中,以实现更加准确的色彩校准。其中,可以先在某一色温下拍摄24色标准色卡,以获取相机的24色的RGB信息,再采用色度计测量获取24色标准色卡的24组CIE1931XYZ三刺激值。其中,XYZ三刺激值可以理解为是根据RGB信息和人眼匹配函数共同获取的。因此,基于上述数据,可以建立RGB信息与XYZ三刺激值之间能够反映人眼感受的映射关系,并将该映射关系作为建立色彩校准矩阵的其中一个因素,从而实现更加准确的色彩增强效果。In one embodiment, the perception of the three primary colors by human eyes can be integrated into the color calibration matrix to achieve more accurate color calibration. Among them, the 24-color standard color card can be photographed at a certain color temperature to obtain the 24-color RGB information of the camera, and then the colorimeter is used to measure and obtain 24 groups of CIE1931XYZ tristimulus values of the 24-color standard color card. Wherein, the XYZ tristimulus value can be understood as being obtained jointly according to the RGB information and the human eye matching function. Therefore, based on the above data, a mapping relationship between RGB information and XYZ tristimulus values that can reflect human perception can be established, and this mapping relationship can be used as one of the factors for establishing a color calibration matrix, so as to achieve a more accurate color enhancement effect.
在其中一个实施例中,根据待处理图像的色调分布将待处理图像划分为多个待增强区域前,还包括获取待处理图像中的肤色区域,并调节肤色区域的色彩属性,以对肤色区域进行色彩保护。其中,肤色区域是指图像中存在人体肤色的区域。可以理解的是,在色彩增强处理的过程中,会对各个区域的色彩属性进行调节,但是过度的色彩增强可能导致肤色的失真,影响用户的观看感受。因此,在本实施例中,通过筛选肤色区域并进行保护,可以有效避免肤色失真的问题,从而提高显示质量。In one of the embodiments, before dividing the image to be processed into a plurality of areas to be enhanced according to the tone distribution of the image to be processed, it also includes obtaining the skin color area in the image to be processed, and adjusting the color attributes of the skin color area to enhance the color of the skin color area. Apply color protection. Wherein, the skin color area refers to the area where human body skin color exists in the image. It is understandable that during the process of color enhancement processing, the color attributes of each region will be adjusted, but excessive color enhancement may lead to distortion of skin color and affect the user's viewing experience. Therefore, in this embodiment, by screening and protecting the skin color area, the problem of skin color distortion can be effectively avoided, thereby improving the display quality.
可选地,可以根据当前的色彩空间和该空间下对应的阈值条件确定肤色区域。例如,若当前的色彩空间为RGB色彩空间,则可以通过以下阈值条件确定肤色区域R>95,G>40,B>20,其中,R>G,R>B,Max(R,G,B)-Min(R,G,B)>15且Abs(R-G)>15。若当前的色彩空间为HSV色彩空间,则可以通过以下阈值条件确定肤色区域7<H<20,28<S<256且50<V<256。可以理解的是,上述示例仅用于举例说明,而不用于限定本实施例的保护范围,在其他实施例中,色彩空间也可以为YCrCb等色彩空间并设置有相应的阈值条件。Optionally, the skin color region may be determined according to the current color space and the corresponding threshold condition in the space. For example, if the current color space is the RGB color space, the skin color area can be determined by the following threshold conditions R>95, G>40, B>20, where R>G, R>B, Max(R,G,B )-Min(R,G,B)>15 and Abs(R-G)>15. If the current color space is the HSV color space, the skin color area 7<H<20, 28<S<256 and 50<V<256 can be determined by the following threshold conditions. It can be understood that the above example is only used for illustration and not for limiting the scope of protection of this embodiment. In other embodiments, the color space may also be a color space such as YCrCb and a corresponding threshold condition is set.
图5为一实施例的图像处理方法的流程图之四,参考图5,在其中一个实施例中,在其中一个实施例中,图像处理方法包括步骤502至步骤520。其中,步骤502至步骤508、步骤518至步骤520的具体实施方式可以参考前述实施例,此处不再进行赘述,即,前述实施例中的步骤将待处理图像划分为多个待增强区域前,还包括本实施例的步骤510至步骤516。FIG. 5 is a fourth flowchart of an image processing method in an embodiment. Referring to FIG. 5 , in one embodiment, in one embodiment, the image processing method includes steps 502 to 520 . Wherein, for the specific implementation manners of steps 502 to 508, and steps 518 to 520, reference may be made to the above-mentioned embodiments, and details are not repeated here, that is, before the steps in the above-mentioned embodiments divide the image to be processed into a plurality of regions to be enhanced, , further including steps 510 to 516 of this embodiment.
步骤502,生成备选图像集。 Step 502, generating a candidate image set.
步骤504,获取用户对各备选图像集中多张图像的偏好选择结果。 Step 504, obtaining the user's preference selection results for multiple images in each candidate image set.
步骤506,分别获取各备选图像集对应的备选增强系数。 Step 506, acquiring candidate enhancement coefficients corresponding to each candidate image set respectively.
步骤508,根据多个备选增强系数获取目标增强系数ratio作为增强偏好信息。In step 508, a target enhancement coefficient ratio is obtained as enhancement preference information according to multiple candidate enhancement coefficients.
步骤510,获取待处理图像,将待处理图像由RGB色彩空间转换至目标色彩空间。 Step 510, acquire the image to be processed, and convert the image to be processed from the RGB color space to the target color space.
其中,目标色彩空间为HSI色彩空间或HSV色彩空间。以HSV色彩空间为例,H(Hue)为色调值,是指颜色全彩的属性,每种颜色对应到不同的色调值,取值范围为0°~359°的角度。S(Saturation)为饱和度值,是指被白色稀释的程度,稀释越多表示饱和度越少,会较靠近中心点位置,取值范围为0至1。V(Value)为颜色明度,颜色越亮其明度越高,反之则较低,取值范围为0至1。其中,RGB色彩空间与HSV色彩空间之间的转换关系公式如下所示,其中max为R、G、B中的最大值,min为R、G、B中的最小值。Wherein, the target color space is an HSI color space or an HSV color space. Taking the HSV color space as an example, H (Hue) is the hue value, which refers to the attribute of the full color of the color. Each color corresponds to a different hue value, and the value ranges from 0° to 359°. S (Saturation) is the saturation value, which refers to the degree of dilution by white. The greater the dilution, the less the saturation, and it will be closer to the center point. The value ranges from 0 to 1. V (Value) is the brightness of the color, the brighter the color, the higher the brightness, and vice versa, the value ranges from 0 to 1. Among them, the conversion relationship formula between RGB color space and HSV color space is as follows, where max is the maximum value among R, G, and B, and min is the minimum value among R, G, and B.
Figure PCTCN2022135508-appb-000001
Figure PCTCN2022135508-appb-000001
Figure PCTCN2022135508-appb-000002
Figure PCTCN2022135508-appb-000002
v=maxv=max
步骤512,获取待处理图像中的肤色区域。 Step 512, acquiring the skin color area in the image to be processed.
可以理解的是,待处理图像当前处于HSV色彩空间,即基于前述的HSV色彩空间中的阈值条件确定肤色区域。而且,基于前述H、S、V三个分量的定义可知,HSV色彩空间中每个分量之间互不关联。因此,相较于RGB色彩空间,HSV色彩空间比较不容易受到光线的影响,通过将RGB色域转换至HSV色域,可以有效降低光线对图像所造成的影响,避免肤色区域误判的情况发生。It can be understood that the image to be processed is currently in the HSV color space, that is, the skin color region is determined based on the aforementioned threshold condition in the HSV color space. Moreover, based on the definitions of the aforementioned three components of H, S, and V, it can be seen that each component in the HSV color space is not related to each other. Therefore, compared with the RGB color space, the HSV color space is less susceptible to the influence of light. By converting the RGB color gamut to the HSV color gamut, the influence of light on the image can be effectively reduced, and the misjudgment of the skin color area can be avoided. .
步骤514,调节肤色区域的饱和度和/或明度。 Step 514, adjusting the saturation and/or lightness of the skin color area.
步骤516,将肤色区域的色彩属性调节后的图像由目标色彩空间转换至RGB色彩空间。 Step 516, converting the image after adjusting the color attributes of the skin color area from the target color space to the RGB color space.
步骤518,根据色调将转换回RGB色彩空间的图像划分为多个待增强区域。Step 518: Divide the image converted back into the RGB color space into multiple regions to be enhanced according to the hue.
步骤520,根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理,以调节待处理图像的色彩属性。Step 520: Perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
在本实施例中,在HSV色彩空间中定义肤色区域,并对肤色区域进行保护,可以在增强色彩饱和度的同时,使肤色区域不会被过度强化,从而维持肤色的自然性。In this embodiment, the skin color area is defined in the HSV color space, and the skin color area is protected, which can enhance the color saturation while preventing the skin color area from being over-emphasized, thereby maintaining the naturalness of the skin color.
在其中一个实施例中,可以通过模拟电路实现上述色彩空间的转换操作,即,基于色彩空间的转换逻辑搭建对应的模拟电路,从而通过模拟电路实现对色彩空间的转换。可以理解的是,处理器仅支持对数字信号进行运算。因此,若采用处理器实现上述色彩空间的转换操作,就需要将模拟信号转换为数字信号进行运算。但是,以256灰阶为例,相近但实际不同的两个模拟信号在经过数模转换后,可能被转换为同一灰阶下的数字信号,从而导致部分数据的损失。而且,在进行色彩空间的转换时,也可能在原来色彩空间中并不相同的两个颜色映射为新的色彩空间中极为相近的两个颜色,从而导致部分颜色的丢失。因此,通过上述多个转换操作,数字信号会产生较大幅度的数据丢失。在本实施例中,通过模拟电路实现色彩空间的转换操作,可以有效避免部分数据的丢失,从而提高数据处理过程的准确性。而且,模拟电路的运算过程不需要时钟控制,因此计算速度也相对较快。In one of the embodiments, the above-mentioned color space conversion operation can be realized through an analog circuit, that is, a corresponding analog circuit is constructed based on the conversion logic of the color space, so that the conversion of the color space is realized through the analog circuit. It can be understood that the processor only supports operations on digital signals. Therefore, if a processor is used to realize the conversion operation of the above color space, it is necessary to convert the analog signal into a digital signal for operation. However, taking 256 gray levels as an example, two analog signals that are similar but actually different may be converted into digital signals at the same gray level after digital-to-analog conversion, resulting in partial data loss. Moreover, when performing color space conversion, two different colors in the original color space may be mapped to two very similar colors in the new color space, resulting in the loss of some colors. Therefore, through the above-mentioned multiple conversion operations, the digital signal will have relatively large data loss. In this embodiment, the conversion operation of the color space is realized by the analog circuit, which can effectively avoid the loss of some data, thereby improving the accuracy of the data processing process. Moreover, the operation process of the analog circuit does not require clock control, so the calculation speed is relatively fast.
在其中一个实施例中,根据待处理图像的色调分布将待处理图像划分为多个待增强区域的步骤包括:根据待处理图像的色调分布将待处理图像划分为多个待增强区域和至少一个过渡区域。相应地,图像处理方法还包括:根据色彩增强处理后的多个待增强区域的色彩属性对过渡区域的色彩属性进行平滑处理。In one embodiment, the step of dividing the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed includes: dividing the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed and at least one transition zone. Correspondingly, the image processing method further includes: smoothing the color attributes of the transition regions according to the color attributes of the plurality of regions to be enhanced after the color enhancement processing.
可以理解的是,若色彩校正矩阵覆盖的色调区域过多,可能会导致色彩校正矩阵过大,运算量大大增加,影响色彩增强的速度,但是,若减小色彩校正矩阵,就会导致部分颜色的增强效果不佳。因此,色彩校正矩阵通常只能覆盖部分关键的色调区域(即待增强区域)。为了平衡运算速度和准确性的关系,通常色彩校正矩阵仅覆盖24个色调区域。因此,待处理图像中通常会存在部分区域不具有对应的色彩校正矩阵。在本实施例中,对于上述过渡区域,可以基于待增强区域进行色彩增强后的结果,通过平滑处理的方式进行增强,从而实现整幅待处理图像的色彩增强。其中,平滑处理的方式可以采用插值等任一具有平滑效果的方式,本实施例不做限定。It is understandable that if the color correction matrix covers too many tonal areas, it may cause the color correction matrix to be too large, and the amount of calculation will increase greatly, which will affect the speed of color enhancement. However, if the color correction matrix is reduced, some colors will The enhancement effect is not good. Therefore, the color correction matrix can usually only cover part of the key tonal regions (ie, regions to be enhanced). In order to balance the relationship between operation speed and accuracy, usually the color correction matrix only covers 24 tonal regions. Therefore, there are usually some areas in the image to be processed that do not have corresponding color correction matrices. In this embodiment, for the above-mentioned transition area, based on the color enhancement result of the area to be enhanced, the enhancement may be performed by means of smoothing, so as to realize the color enhancement of the entire image to be processed. Wherein, the manner of the smoothing processing may adopt any manner with a smoothing effect such as interpolation, which is not limited in this embodiment.
进一步地,当采用HSV色彩空间进行肤色保护时,可以在HSV色彩空间中,仅对肤色区域的S分量和V分量进行调节,并保持肤色区域的H分量不变,以确保肤色色调的准确性。在完成肤色保护并转换回RGB色彩空间后,将肤色区域的平滑处理与过渡区域的平滑处理通过一次平滑处理实现,以减少 平滑处理的次数,从而提高图像处理方法的速度。Further, when using the HSV color space for skin color protection, in the HSV color space, only the S component and V component of the skin color area can be adjusted, and the H component of the skin color area can be kept unchanged to ensure the accuracy of the skin tone . After the skin color protection is completed and converted back to the RGB color space, the smoothing of the skin color area and the smoothing of the transition area are realized by one smoothing process to reduce the number of times of smoothing, thereby improving the speed of the image processing method.
在其中一个实施例中,图像处理方法还包括平台校验的步骤。具体地,在平台进行色彩校准矩阵的参数调教时,可以通过色彩分析仪检测处理后的图像的颜色信息,以确定色彩增强处理生成的图像是否满足要求。例如,可以检测过渡区域与待增强区域之间的边界是否获得了足够的平滑处理。可选地,平台校验的步骤可以设于肤色保护前,或者可以与肤色保护同步执行。在本实施例中,通过设置平台校验的步骤,可以在显示设备出厂前,检验图像处理算法的可靠性和准确性,从而提高用户的使用体验。In one of the embodiments, the image processing method further includes a step of platform verification. Specifically, when the platform adjusts the parameters of the color calibration matrix, the color information of the processed image can be detected by a color analyzer to determine whether the image generated by the color enhancement process meets the requirements. For example, it can be detected whether the boundary between the transition area and the area to be enhanced is sufficiently smoothed. Optionally, the step of platform verification can be set before skin color protection, or can be executed synchronously with skin color protection. In this embodiment, by setting the platform verification step, the reliability and accuracy of the image processing algorithm can be verified before the display device leaves the factory, thereby improving user experience.
在其中一个实施例中,图像处理方法还包括如下步骤。根据显示屏当前的预设色彩效果对待处理图像进行色彩增强处理以生成第一增强图像,并根据目标增强系数ratio对第一增强图像和第二增强图像进行融合以生成第三增强图像。In one of the embodiments, the image processing method further includes the following steps. Perform color enhancement processing on the image to be processed according to the current preset color effect of the display screen to generate a first enhanced image, and fuse the first enhanced image and the second enhanced image according to the target enhancement coefficient ratio to generate a third enhanced image.
其中,预设色彩效果是指显示设备出厂时默认设有的色彩基础效果。即,预设色彩效果可以理解为与用户的增强偏好信息无关的色彩效果,例如可以包括黑夜效果、黄昏效果等。第二增强图像为根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理生成的图像。具体地,可以将基础效果称为3DLut_CC,并将根据增强偏好信息进行的色彩增强效果成为3DLut_ENIR,则通过本实施例的步骤将二者融合收总增强效果3DLut_OUT=3DLut_CC+Delta0+Ratio*Delta1。其中,Delta0=3DLutENIR0-3DlutCC,Delta1=3DLutENIR1-3DLutENIR0,3DLutENIR0是指色彩增强最弱处的最终效果,3DLutENIR1是指色彩增强最强处的最终效果。因此,基于上述公式即可实现不同增强效果的融合,即,实现了第一增强图像和第二增强图像基于目标增强系数ratio的融合。Wherein, the preset color effect refers to a basic color effect set by default when the display device leaves the factory. That is, the preset color effect can be understood as a color effect that has nothing to do with the user's enhanced preference information, for example, it can include a night effect, a dusk effect, and the like. The second enhanced image is an image generated by performing corresponding color enhancement processing on each area to be enhanced according to the enhancement preference information. Specifically, the basic effect can be called 3DLut_CC, and the color enhancement effect based on the enhancement preference information can be called 3DLut_ENIR, and the two are combined to obtain the total enhancement effect 3DLut_OUT=3DLut_CC+Delta0+Ratio*Delta1 through the steps of this embodiment. Among them, Delta0=3DLutENIR0-3DlutCC, Delta1=3DLutENIR1-3DLutENIR0, 3DLutENIR0 refers to the final effect of the weakest color enhancement, and 3DLutENIR1 refers to the final effect of the strongest color enhancement. Therefore, the fusion of different enhancement effects can be realized based on the above formula, that is, the fusion of the first enhanced image and the second enhanced image based on the target enhancement coefficient ratio is realized.
在其中一个实施例中,图像处理方法还包括如下步骤。当目标增强系数ratio等于系数阈值时,获取显示屏支持的目标色域,若目标色域大于色彩增强处理后的图像的色域,则对色彩增强处理后的图像进行色域扩展。示例性地,若显示屏的原生支持的目标色域是110%NTSC,而3DLut_CC的色域范围是90%NTSC,则可以在色彩增强效果最强的情况下,将色域扩展到100%NTSC,以结合显示屏的硬件进行调整,从而实现更好的显色效果。In one of the embodiments, the image processing method further includes the following steps. When the target enhancement coefficient ratio is equal to the coefficient threshold, the target color gamut supported by the display screen is obtained, and if the target color gamut is larger than the color gamut of the image after color enhancement processing, the color gamut of the image after color enhancement processing is extended. For example, if the target color gamut natively supported by the display is 110% NTSC, and the color gamut range of 3DLut_CC is 90% NTSC, then the color gamut can be extended to 100% NTSC when the color enhancement effect is the strongest , to adjust in conjunction with the hardware of the display to achieve better color rendering.
在其中一个实施例中,显示屏还可以具有IR-drop调节功能。具体地,在有源矩阵有机发光二极体(Active Matrix Organic Light Emitting Diode,AMOLED)结构的显示屏中,当电流沿着电路走线传输时,电路走线的阻抗会引起电压的下降,这一电压下降的现象可以称为IR-drop(压降)。因此,可以通过显示驱动芯片控制显示屏的IR-drop的开启或关闭,以对显示效果进行控制。具体地,当显示屏的IR-drop补偿功能关闭,即显示屏存在IR-drop时,R、G、B三个颜色的像素亮度满足以下关系:R+G+B=xW。其中,x为约等于1.4的一固定值,该固定值的具体取值由显示屏的电路设计决定。因此,基于上述关系式可知,当显示屏的IR-drop补偿功能关闭时,显示屏的对比度最高。当显示屏的IR-drop补偿功能开启,即显示屏不存在IR-drop时,显示屏的对 比度最低,色彩增强处理后的图像缺乏层次感。基于以上可以发现,若只设置IR-drop补偿功能开启和关闭两种状态,就会导致显示效果极端化,显示的灵活性不足。In one of the embodiments, the display screen can also have an IR-drop adjustment function. Specifically, in a display screen with an active matrix organic light emitting diode (Active Matrix Organic Light Emitting Diode, AMOLED) structure, when the current is transmitted along the circuit trace, the impedance of the circuit trace will cause a voltage drop, which A voltage drop phenomenon can be called IR-drop (voltage drop). Therefore, the display driver chip can be used to control the IR-drop of the display screen to be turned on or off, so as to control the display effect. Specifically, when the IR-drop compensation function of the display screen is turned off, that is, when there is an IR-drop on the display screen, the pixel brightness of the three colors R, G, and B satisfies the following relationship: R+G+B=xW. Wherein, x is a fixed value approximately equal to 1.4, and the specific value of the fixed value is determined by the circuit design of the display screen. Therefore, based on the above relational formula, it can be seen that when the IR-drop compensation function of the display screen is turned off, the contrast ratio of the display screen is the highest. When the IR-drop compensation function of the display is turned on, that is, when there is no IR-drop on the display, the contrast of the display is the lowest, and the image after color enhancement processing lacks a sense of hierarchy. Based on the above, it can be found that if only two states of the IR-drop compensation function are enabled and disabled, the display effect will be extreme and the display flexibility will be insufficient.
因此,在本实施例中,可以通过IR-drop的无级调节功能,实现对对比度的灵活调节,以提升显示质量。可选地,可以在进行肤色保护前,先下发指令开启IR-drop的无级调节功能。其中,在调节功能刚刚开启时,初始化的状态为IR-drop补偿功能关闭,即显示屏的对比度最大,并可以在完成根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理的步骤后,根据增强后的图像对IR-drop的程度进行调节,从而改变显示屏的对比度。具体地,图像处理方法中的IR-drop调节可以包括如下步骤。获取色彩增强处理后的图像的平均图像电平,根据平均图像电平分别调整各色彩通道的明度,以调节色彩增强处理后的图像的对比度。Therefore, in this embodiment, the stepless adjustment function of the IR-drop can be used to realize the flexible adjustment of the contrast to improve the display quality. Optionally, before skin color protection, an instruction can be issued to enable the stepless adjustment function of IR-drop. Among them, when the adjustment function is just turned on, the initialization state is that the IR-drop compensation function is off, that is, the contrast of the display screen is the largest, and after completing the steps of performing corresponding color enhancement processing on each area to be enhanced according to the enhancement preference information , adjust the degree of IR-drop according to the enhanced image, thereby changing the contrast of the display screen. Specifically, the IR-drop adjustment in the image processing method may include the following steps. The average image level of the image after the color enhancement processing is obtained, and the brightness of each color channel is adjusted respectively according to the average image level, so as to adjust the contrast of the image after the color enhancement processing.
其中,平均图像电平(Average Picture Level,APL)是指当前色彩增强处理后的图像中所有像素点的灰阶的平均值。获取平均图像电平时,可以先获取当前色彩增强处理后的图像中每个像素点的灰阶和像素点总数量,并根据每个像素点的灰阶和像素点总数量,计算当前色彩增强处理后的图像的平均灰阶。例如,可以将图像中所有像素点的灰阶进行累加,所得累加值除以图像的像素点总数量,即可得到图像的平均灰阶。Among them, the average picture level (Average Picture Level, APL) refers to the average value of the gray scale of all pixels in the image after the current color enhancement process. When obtaining the average image level, you can first obtain the gray scale and total number of pixels of each pixel in the image after the current color enhancement process, and calculate the current color enhancement process based on the gray scale and total number of pixels of each pixel. The average grayscale of the resulting image. For example, the gray levels of all pixels in the image can be accumulated, and the accumulated value can be divided by the total number of pixels in the image to obtain the average gray level of the image.
其中,可以通过调整伽马值的方式调整各色彩通道的明度。具体地,人眼在低亮度环境中,对亮度变化敏感,能够感知较小的亮度差异,而在高亮度环境中,对亮度变化不敏感,亮度值变化较大时,人眼才能分辨,而上述特性可以称之为伽马(Gamma)特性。因此,如果需要获得均匀变化的亮度感受,那么显示器显示的亮度就需要非均匀变化,以适应人眼的Gamma特性,而这种亮度与灰阶的非线性关系参数为伽马值。因此,获取到当前色彩增强处理后的图像的伽马校正值之后,可以根据该伽马校正值描绘出该伽马校正值对应的伽马校正曲线,该伽马校正曲线即为图像的伽马校正曲线,根据该伽马校正曲线,可以得到图像中不同灰阶的像素点各自对应的目标亮度,将图像中不同灰阶的像素点各自的当前亮度调整为目标亮度,从而实现对图像的亮度的调整,准确地显示当前色彩增强处理后的图像中不同灰阶的像素点的亮度,使得亮度的变化符合人眼感知,拉升图像的颜色通透感及光影关系,使得图像的对比度更为强烈及生动,优化显示器的显示效果。Wherein, the brightness of each color channel can be adjusted by adjusting the gamma value. Specifically, in a low-brightness environment, the human eye is sensitive to brightness changes and can perceive small brightness differences, but in a high-brightness environment, it is not sensitive to brightness changes, and the human eye can only distinguish when the brightness value changes greatly. The above characteristics can be referred to as gamma (Gamma) characteristics. Therefore, if it is necessary to obtain a uniformly changing brightness experience, then the brightness displayed by the display needs to change non-uniformly to adapt to the Gamma characteristics of the human eye, and the nonlinear relationship parameter between brightness and gray scale is the gamma value. Therefore, after obtaining the gamma correction value of the image after the current color enhancement processing, the gamma correction curve corresponding to the gamma correction value can be drawn according to the gamma correction value, and the gamma correction curve is the gamma of the image Correction curve, according to the gamma correction curve, the target brightness corresponding to the pixels of different gray scales in the image can be obtained, and the current brightness of the pixels of different gray scales in the image can be adjusted to the target brightness, so as to realize the adjustment of the brightness of the image. The adjustment can accurately display the brightness of pixels of different gray scales in the current color-enhanced image, so that the change of brightness conforms to human perception, and the color transparency and light-shadow relationship of the image are improved, making the contrast of the image more perfect. Intense and vivid, optimize the display effect of the monitor.
在本实施例中,通过获取显示器图像的平均灰阶,可以根据图像的平均灰阶获取图像的伽马校正值,根据图像的伽马校正值可以实现对当前色彩增强处理后的图像的亮度的调整,从而在保留显示器的IR-drop特性的基础上,优化显示器的显示效果,使得色彩增强处理后的图像的对比度较为生动,提高色彩增强处理后的图像的层次感。In this embodiment, by obtaining the average gray scale of the display image, the gamma correction value of the image can be obtained according to the average gray scale of the image, and the brightness of the current color-enhanced image can be adjusted according to the gamma correction value of the image. Adjustment, so as to optimize the display effect of the display on the basis of retaining the IR-drop characteristics of the display, so that the contrast of the image after the color enhancement processing is more vivid, and the layering of the image after the color enhancement processing is improved.
在其中一个实施例中,图像处理方法还包括根据显示屏当前的色彩模式和/或渲染意图对待处理图像进行对应的色彩增强处理以生成第四增强图像,并对第四增强图像和第二增强图像进行融合。In one of the embodiments, the image processing method further includes performing corresponding color enhancement processing on the image to be processed according to the current color mode and/or rendering intent of the display screen to generate a fourth enhanced image, and the fourth enhanced image and the second enhanced image The images are fused.
其中,可以通过调用平台预设的色彩调节接口实现上述色彩增强处理。具体地,手机平台预设的色彩模式包括自然色、效果增强、饱和色和自动调节。预设的渲染意图包括感知恒定、相对色度匹配、绝对色度匹配和饱和度。其中,感知恒定的渲染意图例如可以用于摄影图片的场景中,相对色度匹配的渲染意图例如可以用于渲染Logo图形的场景中,绝对色度匹配的渲染意图例如可以用于模拟纸张介质的场景中,饱和度的渲染意图例如可以常用于商务图表和插图的场景中。可以理解的是,上述基于色彩模式和渲染意图进行色彩增强处理以及将两张增强图像进行融合的具体方法是平台预设的,本实施例不做限定。可以理解的是,平台能够基于预设的方法对待处理图像的色彩进行一定调整,但是,由于平台对Gamma2.2的保护策略和色域保护策略,平台仅能够进行一定的微调。因此,在本实施例中,通过前述各实施例中生成的第二增强图像,可以实现更加灵活准确的色彩增强效果。Wherein, the above-mentioned color enhancement processing can be realized by calling the preset color adjustment interface of the platform. Specifically, the preset color modes of the mobile phone platform include natural color, enhanced effect, saturated color and automatic adjustment. Preset rendering intents include Perceptually Constant, Relative Hue Matching, Absolute Hue Matching, and Saturation. Among them, the perceptually constant rendering intent can be used in the scene of photographic pictures, for example, the rendering intent of relative color matching can be used in the scene of rendering Logo graphics, and the rendering intent of absolute color matching can be used, for example, of simulating paper media In the scene, the saturation rendering intent can be commonly used in the scene of business diagrams and illustrations, for example. It can be understood that, the above specific methods of performing color enhancement processing and fusing two enhanced images based on the color mode and rendering intent are preset by the platform, and are not limited in this embodiment. It is understandable that the platform can adjust the color of the image to be processed based on the preset method. However, due to the platform's protection strategy for Gamma2.2 and the color gamut protection strategy, the platform can only make certain fine-tuning. Therefore, in this embodiment, a more flexible and accurate color enhancement effect can be realized through the second enhanced image generated in the foregoing embodiments.
图6为一实施例显示设备的内部结构框架图,参考图6,显示设备可以包括软件部分和硬件部分,硬件部分即包括用于显示的显示屏,软件部分包括应用程序层(APP)、框架层(Framework)和核心层(kernel)。框架层还可以具体分为Java部分和Native部分。Java部分用于与应用程序连接,但Java语言本身不能对操作系统底层进行访问和操作,因此,可以通过设置Native部分和底层进行交互。其中,Java部分可以通过Java本机接口(Java NativeInterface,JNI)实现调用对Native部分。Fig. 6 is a frame diagram of the internal structure of a display device in an embodiment. With reference to Fig. 6, the display device may include a software part and a hardware part, the hardware part includes a display screen for display, and the software part includes an application layer (APP), a Layer (Framework) and core layer (kernel). The framework layer can also be specifically divided into the Java part and the Native part. The Java part is used to connect with the application program, but the Java language itself cannot access and operate the bottom layer of the operating system. Therefore, the Native part can be set to interact with the bottom layer. Among them, the Java part can call the Native part through the Java native interface (Java NativeInterface, JNI).
其中,在本实施例中,应用程序层通过与用户的交互,获取携带用户的增强偏好信息的偏好选择结果,并通过解析获取能够表征用户的增强偏好信息的目标增强系数ratio,并将获取到的目标增强系数ratio传递到数据库并称为Strength强度值。此外,数据库中也可以存储有其他SystemUI和Setting等信息。Among them, in this embodiment, the application layer obtains the preference selection result carrying the user's enhanced preference information through interaction with the user, and obtains the target enhancement coefficient ratio that can represent the user's enhanced preference information through analysis, and obtains the The target enhancement factor ratio is passed to the database and is called the Strength value. In addition, other information such as SystemUI and Setting may also be stored in the database.
框架层通过框架监听可以确定应用程序层的数据库信息的变化情况,并在数据库信息发生变化时,获取对应的SettingProvider键值和Strength强度值。其中,SettingProvider键值是按钮的标记位,用来标识手机哪个按钮被按下从而触发软件后续逻辑。获取到上述数据后,数据分两路进行传输。The framework layer can determine the change of the database information of the application layer through the framework monitoring, and obtain the corresponding SettingProvider key value and Strength intensity value when the database information changes. Among them, the SettingProvider key value is the flag bit of the button, which is used to identify which button of the mobile phone is pressed to trigger the subsequent logic of the software. After the above data is obtained, the data is transmitted in two ways.
其中,一路数据通过Android HIDL接口传输,经Android HIDL接口一方面到达核心层路径,以向屏幕的显示驱动芯片下发IR-drop最大的指令,另一方面到达基础效果路径,以实现用户的个性化色彩增强。其中,3DLut_ENH模块用于执行多个步骤,具体包括前述的获取待处理图像中的肤色区域,并调节肤色区域的色彩属性,以对肤色区域进行色彩保护,根据待处理图像的色调分布将待处理图像划分为多个待增强区域,根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理,以调节待处理图像的色彩属性。3DLut_IRC模块用于根据平均图像电平对色彩增强处理后的图像进行补偿,以通过调节IR-drop程度的方式提高图像的通透感。3DLut_ENIR模块用于对3DLut_ENH模块和3DLut_IRC模块的效果进行融合固化。3DLut_CC模块用于根据目标增强系数ratio对第一增强图像和第二增强图像进行融合以生成第三增强图像, 其中,第一增强图像是指根据显示屏当前的预设色彩效果对待处理图像进行色彩增强处理生成的图像,第二增强图像是指基于用户的增强偏好信息进行色彩增强处理生成的图像。另一路数据通过RenderIntent接口传输,并到达SurfaceFlinger和mobile_color_mode,以根据色彩模式和渲染意图进行色彩微调。两路图像数据处理后融合传输至位于核心层的Phone_color硬件。Among them, one channel of data is transmitted through the Android HIDL interface. On the one hand, it reaches the core layer path through the Android HIDL interface to issue the largest IR-drop instruction to the display driver chip of the screen, and on the other hand, it reaches the basic effect path to realize the user's personality. Color enhancement. Among them, the 3DLut_ENH module is used to perform multiple steps, specifically including the aforementioned acquisition of the skin color area in the image to be processed, and adjusting the color attributes of the skin color area to protect the color of the skin color area. According to the tone distribution of the image to be processed, the The image is divided into multiple areas to be enhanced, and corresponding color enhancement processing is performed on each area to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed. The 3DLut_IRC module is used to compensate the image after color enhancement processing according to the average image level, so as to improve the transparency of the image by adjusting the degree of IR-drop. The 3DLut_ENIR module is used to fuse and solidify the effects of the 3DLut_ENH module and the 3DLut_IRC module. The 3DLut_CC module is used to fuse the first enhanced image and the second enhanced image according to the target enhancement coefficient ratio to generate a third enhanced image, wherein the first enhanced image refers to coloring the image to be processed according to the current preset color effect of the display screen The image generated by enhancement processing, the second enhanced image refers to an image generated by color enhancement processing based on the user's enhancement preference information. The other way of data is transmitted through the RenderIntent interface, and reaches SurfaceFlinger and mobile_color_mode to perform color fine-tuning according to the color mode and rendering intent. After the two channels of image data are processed, they are fused and transmitted to the Phone_color hardware at the core layer.
核心层的Phone_color硬件获取数据后写入显示屏的硬件色彩引擎寄存器,从而实现硬件层的显示。The Phone_color hardware at the core layer gets the data and writes it into the hardware color engine register of the display to realize the display at the hardware layer.
应该理解的是,虽然如上的各实施例所涉及的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,如上的各实施例所涉及的流程图中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flow charts involved in the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed sequentially in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least some of the steps in the flow charts involved in the above embodiments may include multiple steps or stages, and these steps or stages are not necessarily executed at the same time, but may be executed at different times, The execution order of these steps or stages is not necessarily performed sequentially, but may be executed in turn or alternately with other steps or at least a part of steps or stages in other steps.
基于同样的发明构思,本申请实施例还提供了一种用于实现上述所涉及的图像处理方法的图像处理装置。该装置所提供的解决问题的实现方案与上述方法中所记载的实现方案相似,故下面所提供的一个或多个图像处理装置实施例中的具体限定可以参见上文中对于图像处理方法的限定,在此不再赘述。其中,图像处理装置包括偏好获取模块、区域划分模块和增强处理模块。Based on the same inventive concept, an embodiment of the present application further provides an image processing device for implementing the above-mentioned image processing method. The solution to the problem provided by the device is similar to the implementation described in the above method, so the specific limitations in one or more embodiments of the image processing device provided below can refer to the above definition of the image processing method, I won't repeat them here. Wherein, the image processing device includes a preference acquisition module, an area division module and an enhancement processing module.
偏好获取模块用于获取用户的增强偏好信息。区域划分模块用于获取待处理图像,根据待处理图像的色调分布将待处理图像划分为多个待增强区域。增强处理模块用于根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理,以调节待处理图像的色彩属性。The preference obtaining module is used to obtain the user's enhanced preference information. The area division module is used to obtain the image to be processed, and divide the image to be processed into multiple areas to be enhanced according to the tone distribution of the image to be processed. The enhancement processing module is used to perform corresponding color enhancement processing on each area to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
上述图像处理装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于电子设备中的处理器中,也可以以软件形式存储于电子设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。Each module in the above-mentioned image processing device may be fully or partially realized by software, hardware or a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the electronic device in the form of hardware, and can also be stored in the memory of the electronic device in the form of software, so that the processor can invoke and execute the corresponding operations of the above-mentioned modules.
本申请实施例还提供了一种显示设备,包括相连接的显示屏和处理器。处理器用于获取用户的增强偏好信息;获取待处理图像,根据待处理图像的色调分布将待处理图像划分为多个待增强区域;根据增强偏好信息分别对各待增强区域进行对应的色彩增强处理,以调节待处理图像的色彩属性;将调节色彩属性后的图像发送至显示屏进行显示。The embodiment of the present application also provides a display device, including a connected display screen and a processor. The processor is used to obtain the enhancement preference information of the user; obtain the image to be processed, divide the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed; perform corresponding color enhancement processing on each region to be enhanced according to the enhancement preference information , to adjust the color attributes of the image to be processed; and send the image after adjusting the color attributes to the display screen for display.
在其中一个实施例中,提供了一种电子设备,该电子设备可以是显示设备,图7为一实施例的电子设备的内部结构图。该电子设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该电子设备的处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该电子设备 的通信接口用于与外部的显示设备进行有线或无线方式的通信,无线方式可通过WIFI、移动蜂窝网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种图像处理方法。该电子设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该电子设备的输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, an electronic device is provided, and the electronic device may be a display device. FIG. 7 is an internal structure diagram of the electronic device in one embodiment. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Wherein, the processor of the electronic device is used to provide calculation and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The communication interface of the electronic device is used for wired or wireless communication with an external display device, and the wireless method can be realized through WIFI, mobile cellular network, NFC (Near Field Communication) or other technologies. When the computer program is executed by a processor, an image processing method is realized. The display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the housing of the electronic device , and can also be an external keyboard, touchpad, or mouse.
本领域技术人员可以理解,图7中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 7 is only a block diagram of a partial structure related to the solution of this application, and does not constitute a limitation on the electronic equipment to which the solution of this application is applied. The specific electronic equipment can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
在其中一个实施例中,提供了一种电子设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, an electronic device is provided, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when executing the computer program.
在其中一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
在其中一个实施例中,提供了一种计算机程序产品,包括计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存、光存储器、高密度嵌入式非易失性存储器、阻变存储器(ReRAM)、磁变存储器(Magnetoresistive Random Access Memory,MRAM)、铁电存储器(Ferroelectric Random Access Memory,FRAM)、相变存储器(Phase Change Memory,PCM)、石墨烯存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器等。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。本申请所提供的各实施例中所涉及的数据库可包括关系型数据库和非关系型数据库中至少一种。非关系型数据库可包括基于区块链的分布式数据库等,不限于此。本申请所提供的各实施例中所涉及的处理器可为通用处理器、中央处理器、图像处理器、数字信号处理器、可编程逻辑器、基于量子计算的数据处理逻辑器等,不限于此。Those of ordinary skill in the art can understand that realizing all or part of the processes in the methods of the above embodiments can be completed by instructing related hardware through computer programs, and the computer programs can be stored in a non-volatile computer-readable storage medium , when the computer program is executed, it may include the procedures of the embodiments of the above-mentioned methods. Wherein, any reference to storage, database or other media used in the various embodiments provided in the present application may include at least one of non-volatile and volatile storage. Non-volatile memory can include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive variable memory (ReRAM), magnetic variable memory (Magnetoresistive Random Access Memory, MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (Phase Change Memory, PCM), graphene memory, etc. The volatile memory may include random access memory (Random Access Memory, RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the various embodiments provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, etc., but is not limited thereto. The processors involved in the various embodiments provided by this application can be general-purpose processors, central processing units, image processors, digital signal processors, programmable logic devices, data processing logic devices based on quantum computing, etc., and are not limited to this.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但 并不能因此而理解为对本申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请的保护范围应以所附权利要求为准。The above examples only express several implementation modes of the present application, and its description is relatively specific and detailed, but it should not be interpreted as limiting the patent scope of the present application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be determined by the appended claims.

Claims (20)

  1. 一种图像处理方法,所述方法包括:An image processing method, the method comprising:
    获取用户的增强偏好信息;Obtain the user's enhanced preference information;
    获取待处理图像,根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强区域;Acquiring an image to be processed, dividing the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed;
    根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理,以调节所述待处理图像的色彩属性。Perform corresponding color enhancement processing on each of the regions to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
  2. 根据权利要求1所述的图像处理方法,所述获取用户的增强偏好信息,包括:The image processing method according to claim 1, said obtaining enhanced preference information of the user comprises:
    生成备选图像集,所述备选图像集包括多张图像,同一所述备选图像集中的多张图像对应的色彩增强处理参数不同;Generate a candidate image set, the candidate image set includes a plurality of images, and the color enhancement processing parameters corresponding to the multiple images in the same candidate image set are different;
    获取用户对各所述备选图像集中多张图像的偏好选择结果,根据所述偏好选择结果获取所述增强偏好信息。Obtaining a user's preference selection result for multiple images in each of the candidate image sets, and obtaining the enhanced preference information according to the preference selection result.
  3. 根据权利要求2所述的图像处理方法,所述备选图像集的数量为多个,其中,第n+1备选图像集中的多个图像对应的色彩增强处理参数由第n备选图像集的偏好选择结果确定,n为正整数。According to the image processing method according to claim 2, the number of the candidate image sets is multiple, wherein the color enhancement processing parameters corresponding to a plurality of images in the n+1th candidate image set are determined by the nth candidate image set The result of preference selection is determined, and n is a positive integer.
  4. 根据权利要求2所述的图像处理方法,所述备选图像集的数量为两个,所述生成备选图像集,包括:According to the image processing method according to claim 2, the number of the candidate image sets is two, and the generation of the candidate image sets includes:
    根据蓝绿基调的第一初始图像和第一参数生成第一备选图像集;generating a first set of candidate images according to the first initial image of blue-green tone and first parameters;
    根据红绿蓝基调的第二初始图像和第二参数生成第二备选图像集。A second set of candidate images is generated according to the second initial image in red, green, and blue tones and the second parameters.
  5. 根据权利要求4所述的图像处理方法,所述根据红绿蓝基调的第二初始图像和第二参数生成第二备选图像集,包括:The image processing method according to claim 4, said generating a second candidate image set according to the second initial image of red, green and blue tone and second parameters, comprising:
    根据用户对第一备选图像集中多张图像的偏好选择结果确定色彩增强处理的所述第二参数;determining the second parameter of the color enhancement process according to a user's preference selection result of a plurality of images in the first candidate image set;
    根据确定的所述第二参数和所述红绿蓝基调的第二初始图像生成所述第二备选图像集。The second candidate image set is generated according to the determined second parameter and the second initial image of the red-green-blue tone.
  6. 根据权利要求2所述的图像处理方法,所述备选图像集中的多张图像分别一一对应被配置有对应的多个图像增强系数,所述根据所述偏好选择结果获取所述增强偏好信息,包括:According to the image processing method according to claim 2, the plurality of images in the candidate image set are respectively configured with a plurality of corresponding image enhancement coefficients in one-to-one correspondence, and the enhancement preference information is acquired according to the preference selection result ,include:
    分别获取各所述备选图像集对应的备选增强系数,所述备选增强系数为用户从所述备选图像集中选择的一张图像对应的所述图像增强系数;Respectively acquire candidate enhancement coefficients corresponding to each of the candidate image sets, where the candidate enhancement coefficients are the image enhancement coefficients corresponding to an image selected by the user from the candidate image sets;
    根据多个所述备选增强系数获取目标增强系数作为所述增强偏好信息。Obtaining a target enhancement coefficient as the enhancement preference information according to the plurality of candidate enhancement coefficients.
  7. 根据权利要求6所述的图像处理方法,所述获取用户的增强偏好信息,还包括:The image processing method according to claim 6, said obtaining enhanced preference information of the user, further comprising:
    若接收到作用于界面的指定触发区域的系数调节信号,则根据所述系数调节信号更新所述目标增强系数。If a coefficient adjustment signal acting on a specified trigger area of the interface is received, the target enhancement coefficient is updated according to the coefficient adjustment signal.
  8. 根据权利要求6所述的图像处理方法,所述根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理,包括:According to the image processing method according to claim 6, performing corresponding color enhancement processing on each of the regions to be enhanced according to the enhancement preference information, comprising:
    获取所述目标增强系数对应的色彩校正矩阵,各所述色彩校正矩阵分别 与至少一个所述待增强区域相对应;Acquire the color correction matrix corresponding to the target enhancement coefficient, each of the color correction matrices corresponds to at least one of the regions to be enhanced;
    分别根据各所述所述待增强区域对应的所述色彩校正矩阵进行色彩增强处理。Perform color enhancement processing according to the color correction matrix corresponding to each of the regions to be enhanced.
  9. 根据权利要求8所述的图像处理方法,所述获取所述目标增强系数对应的色彩校正矩阵,包括:The image processing method according to claim 8, said acquiring the color correction matrix corresponding to the target enhancement coefficient comprises:
    根据目标增强系数,选择对不同的待增强区域采用不同或相同的所述色彩校正矩阵。According to the target enhancement coefficient, different or the same color correction matrix is selected for different areas to be enhanced.
  10. 根据权利要求8所述的图像处理方法,所述根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强区域,包括:According to the image processing method according to claim 8, said dividing the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed comprises:
    根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强区域和至少一个过渡区域;dividing the image to be processed into a plurality of regions to be enhanced and at least one transition region according to the tone distribution of the image to be processed;
    所述图像处理方法,还包括:The image processing method also includes:
    根据色彩增强处理后的多个所述待增强区域的色彩属性对所述过渡区域的色彩属性进行平滑处理。Smoothing the color attributes of the transition region according to the color attributes of the plurality of regions to be enhanced after color enhancement processing.
  11. 根据权利要求6所述的图像处理方法,还包括:The image processing method according to claim 6, further comprising:
    根据显示屏当前的预设色彩效果对所述待处理图像进行色彩增强处理以生成第一增强图像;performing color enhancement processing on the image to be processed according to the current preset color effect of the display screen to generate a first enhanced image;
    根据所述目标增强系数对所述第一增强图像和第二增强图像进行融合以生成第三增强图像,所述第二增强图像为根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理生成的图像。Fusing the first enhanced image and the second enhanced image according to the target enhancement coefficient to generate a third enhanced image, the second enhanced image corresponds to each of the regions to be enhanced according to the enhancement preference information The resulting image is color enhanced.
  12. 根据权利要求6所述的图像处理方法,还包括:The image processing method according to claim 6, further comprising:
    当所述目标增强系数等于系数阈值时,获取显示屏支持的目标色域;When the target enhancement coefficient is equal to the coefficient threshold, obtain the target color gamut supported by the display screen;
    若所述目标色域大于色彩增强处理后的图像的色域,则对色彩增强处理后的图像进行色域扩展。If the target color gamut is larger than the color gamut of the image after color enhancement processing, then perform color gamut expansion on the image after color enhancement processing.
  13. 根据权利要求1所述的图像处理方法,所述根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强区域前,还包括:The image processing method according to claim 1, before dividing the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed, further comprising:
    获取所述待处理图像中的肤色区域;Acquiring the skin color area in the image to be processed;
    调节所述肤色区域的色彩属性,以对所述肤色区域进行色彩保护。Adjusting the color attribute of the skin color area to protect the color of the skin color area.
  14. 根据权利要求13所述的图像处理方法,所述获取所述待处理图像中的肤色区域前,还包括:将所述待处理图像由RGB色彩空间转换至目标色彩空间,所述目标色彩空间为HSI色彩空间或HSV色彩空间;The image processing method according to claim 13, before acquiring the skin color area in the image to be processed, further comprising: converting the image to be processed from RGB color space to a target color space, and the target color space is HSI color space or HSV color space;
    所述调节所述肤色区域的色彩属性后,还包括:将肤色区域的色彩属性调节后的图像由所述目标色彩空间转换至所述RGB色彩空间。After the adjusting the color attribute of the skin color area, the method further includes: converting the image after adjusting the color attribute of the skin color area from the target color space to the RGB color space.
  15. 根据权利要求1所述的图像处理方法,还包括:The image processing method according to claim 1, further comprising:
    获取色彩增强处理后的图像的平均图像电平;Obtaining the average image level of the image after color enhancement processing;
    根据所述平均图像电平分别调整各色彩通道的明度,以调节色彩增强处理后的图像的对比度。The brightness of each color channel is adjusted respectively according to the average image level, so as to adjust the contrast of the image after color enhancement processing.
  16. 根据权利要求1所述的图像处理方法,还包括:The image processing method according to claim 1, further comprising:
    根据显示屏当前的色彩模式和/或渲染意图对所述待处理图像进行对应 的色彩增强处理以生成第四增强图像;Perform corresponding color enhancement processing on the image to be processed according to the current color mode and/or rendering intent of the display screen to generate a fourth enhanced image;
    对所述第四增强图像和第二增强图像进行融合,以生成目标显示图像,所述第二增强图像为根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理生成的图像。Fusing the fourth enhanced image and the second enhanced image to generate a target display image, the second enhanced image is generated by performing corresponding color enhancement processing on each of the regions to be enhanced according to the enhancement preference information image.
  17. 一种图像处理装置,所述装置包括:An image processing device, the device comprising:
    偏好获取模块,用于获取用户的增强偏好信息;A preference acquisition module, configured to acquire enhanced preference information of the user;
    区域划分模块,用于获取待处理图像,根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强区域;An area division module, configured to acquire an image to be processed, and divide the image to be processed into a plurality of areas to be enhanced according to the tone distribution of the image to be processed;
    增强处理模块,用于根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理,以调节所述待处理图像的色彩属性。An enhancement processing module, configured to perform corresponding color enhancement processing on each of the regions to be enhanced according to the enhancement preference information, so as to adjust the color attributes of the image to be processed.
  18. 一种显示设备,包括:A display device comprising:
    显示屏;display screen;
    处理器,与所述显示屏连接,用于获取用户的增强偏好信息;获取待处理图像,根据所述待处理图像的色调分布将所述待处理图像划分为多个待增强区域;根据所述增强偏好信息分别对各所述待增强区域进行对应的色彩增强处理,以调节所述待处理图像的色彩属性;将调节所述色彩属性后的图像发送至所述显示屏进行显示。A processor, connected to the display screen, configured to acquire user enhancement preference information; acquire an image to be processed, and divide the image to be processed into a plurality of regions to be enhanced according to the tone distribution of the image to be processed; The enhancement preference information performs corresponding color enhancement processing on each of the regions to be enhanced, so as to adjust the color attribute of the image to be processed; and sends the image with the adjusted color attribute to the display screen for display.
  19. 一种电子设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现权利要求1至16中任一项所述的方法的步骤。An electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor implements the steps of the method according to any one of claims 1 to 16 when executing the computer program.
  20. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现权利要求1至16中任一项所述的方法的步骤。A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 16 are realized.
PCT/CN2022/135508 2021-12-31 2022-11-30 Image processing method and apparatus, electronic device, and computer-readable storage medium WO2023124722A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111676815.8 2021-12-31
CN202111676815.8A CN114359305A (en) 2021-12-31 2021-12-31 Image processing method, image processing device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
WO2023124722A1 true WO2023124722A1 (en) 2023-07-06

Family

ID=81104381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/135508 WO2023124722A1 (en) 2021-12-31 2022-11-30 Image processing method and apparatus, electronic device, and computer-readable storage medium

Country Status (2)

Country Link
CN (1) CN114359305A (en)
WO (1) WO2023124722A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114359305A (en) * 2021-12-31 2022-04-15 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium
CN114842814B (en) * 2022-05-16 2023-12-08 Oppo广东移动通信有限公司 Color calibration method and device, electronic equipment and storage medium
CN115330803B (en) * 2022-10-17 2023-01-24 菲特(天津)检测技术有限公司 Surface defect data enhancement method and device, electronic equipment and storage medium
CN115423724B (en) * 2022-11-03 2023-03-21 中国石油大学(华东) Underwater image enhancement method, device and medium for reinforcement learning parameter optimization
CN115712363A (en) * 2022-11-21 2023-02-24 北京中科睿医信息科技有限公司 Interface color display method, device, equipment and medium
CN117437164A (en) * 2023-11-08 2024-01-23 武汉大势智慧科技有限公司 Three-dimensional model texture enhancement method and device, electronic equipment and medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002281327A (en) * 2001-03-15 2002-09-27 Minolta Co Ltd Device, method and program for image processing
CN1525763A (en) * 2002-12-12 2004-09-01 三星电子株式会社 Method and apparatus for generating user preference data regarding color characteristic of image and method and apparatus for converting image color preference using the method and apparatus
CN1929622A (en) * 2005-09-07 2007-03-14 逐点半导体(上海)有限公司 Image colour reinforcement processing device and processing method
US20080094672A1 (en) * 2006-10-20 2008-04-24 Mitsubishi Electric Corporation Image processing apparatus and image processing method
CN107424198A (en) * 2017-07-27 2017-12-01 广东欧珀移动通信有限公司 Image processing method, device, mobile terminal and computer-readable recording medium
CN109069100A (en) * 2016-11-09 2018-12-21 深圳市理邦精密仪器股份有限公司 Ultrasonic image-forming system and its method
CN114359305A (en) * 2021-12-31 2022-04-15 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002281327A (en) * 2001-03-15 2002-09-27 Minolta Co Ltd Device, method and program for image processing
CN1525763A (en) * 2002-12-12 2004-09-01 三星电子株式会社 Method and apparatus for generating user preference data regarding color characteristic of image and method and apparatus for converting image color preference using the method and apparatus
CN1929622A (en) * 2005-09-07 2007-03-14 逐点半导体(上海)有限公司 Image colour reinforcement processing device and processing method
US20080094672A1 (en) * 2006-10-20 2008-04-24 Mitsubishi Electric Corporation Image processing apparatus and image processing method
CN109069100A (en) * 2016-11-09 2018-12-21 深圳市理邦精密仪器股份有限公司 Ultrasonic image-forming system and its method
CN107424198A (en) * 2017-07-27 2017-12-01 广东欧珀移动通信有限公司 Image processing method, device, mobile terminal and computer-readable recording medium
CN114359305A (en) * 2021-12-31 2022-04-15 Oppo广东移动通信有限公司 Image processing method, image processing device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN114359305A (en) 2022-04-15

Similar Documents

Publication Publication Date Title
WO2023124722A1 (en) Image processing method and apparatus, electronic device, and computer-readable storage medium
US9984658B2 (en) Displays with improved color accessibility
US20200105221A1 (en) Color Rendering for Images in Extended Dynamic Range Mode
US10354613B2 (en) Scalable chromatic adaptation
US9529409B2 (en) Method for producing a color image and imaging device employing same
US10957239B2 (en) Gray tracking across dynamically changing display characteristics
KR102662177B1 (en) Method and apparatus for color-preserving spectral reshaping
US11663754B2 (en) Interface element color display method and apparatus
JP2000134486A (en) Image processing unit, image processing method and storage medium
CN103080999A (en) Adaptive color correction for display with backlight modulation
KR20120091050A (en) Method for producing a color image and imaging device employing same
US11257443B2 (en) Method for processing image, and display device
WO2014088975A1 (en) Method for producing a color image and imaging device employing same
KR20180105401A (en) Transparent display apparatus and display method thereof
US11024255B2 (en) Method and apparatus for color calibration for reduced motion-induced color breakup
CN114512094B (en) Screen color adjusting method, device, terminal and computer readable storage medium
US11361476B2 (en) Efficient color mapping systems and methods
KR102518203B1 (en) Display method and device, and storage medium
US11715404B2 (en) Color modification based on perception tolerance
US20220301469A1 (en) Factory calibration measurement data
CN111414221A (en) Display method and device
WO2024051110A1 (en) Color data processing method and apparatus, light source system, device, and storage medium
CN104217697B (en) Screen display method, apparatus and system
TW202018693A (en) Method for adjusting uniformity of image color tones and system thereof
WO2021212977A1 (en) Image color filtering method and apparatus, electronic device, and storage medium

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: 22913977

Country of ref document: EP

Kind code of ref document: A1