Image processing method, device, electronic device and readable storage medium
By displaying images and target controls, receiving user input and adjusting image color or light and shadow, the cumbersome problem of image processing is solved, and simplified operation and efficient processing are achieved.
Patent Information
- Application Number
- CN202111639868.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-29
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2041-12-29
AI Technical Summary
The image processing process is cumbersome, and users need multiple inputs to adjust multiple parameters of the image, resulting in complex operations.
By displaying the first image and the target control, receiving the first input from the user, and in response to the input, adjusting the first image to a target effect corresponding to the input, the target control is used to adjust the color or light and shadow.
The image processing process is simplified, and users can adjust the color or light and shadow effects of the image with only one input, lowering the operating threshold.
Smart Images

Figure CN114327166B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of image processing technology, and specifically relates to an image processing method, device, electronic device and readable storage medium. Background Art
[0002] As the shooting functions of electronic devices continue to be enriched, more and more people choose to take images through electronic devices. However, due to reasons such as shooting scenes and shooting techniques, the effects of some images taken are poor. Therefore, when users need to use these images, they also need to process the images to obtain images with clear layers and prominent subjects.
[0003] Currently, users can use the image editing function in electronic devices or professional photo editing software to input multiple parameter controls in the image editing interface to trigger the electronic device to adjust multiple parameters of the image, thereby realizing image processing, so as to obtain images that satisfy the user.
[0004] However, according to the above method, since the user does not fully understand the image parameters and the user needs multiple inputs to trigger the electronic device to adjust multiple parameters of the image, the image processing process may be more complicated. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide an image processing method, device, electronic device and readable storage medium, which can solve the problem that the image processing process is relatively complicated.
[0006] In a first aspect, an embodiment of the present application provides an image processing method, the method comprising: displaying a first image and a target control; receiving a first input from a user to the target control; in response to the first input, adjusting the first image to a target effect corresponding to the first input; wherein the target control is used to adjust color or light and shadow.
[0007] In a second aspect, an embodiment of the present application provides an image processing device, which includes a display module, a receiving module and an adjustment module; the display module is used to display a first image and a target control; the receiving module is used to receive a first input from a user to the target control; the adjustment control is used to adjust the first image to a target effect corresponding to the first input in response to the first input received by the receiving module; wherein the target control is used to adjust color or light and shadow.
[0008] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.
[0009] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0010] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0011] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.
[0012] In an embodiment of the present application, a first image and a target control can be displayed; and a first input of a user to the target control can be received; and in response to the first input, the first image can be adjusted to a target effect corresponding to the first input; wherein the target control is used to adjust color or light and shadow. Through this solution, since the electronic device can adjust the displayed image to an effect corresponding to the input through the user's input to the control for adjusting color or light and shadow; that is, when the electronic device processes the image, it can adjust the color or light and shadow effect of the image only through one input of the user, thereby simplifying the image processing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a flowchart of an image processing method provided in an embodiment of the present application;
[0014] Figure 2 is a schematic diagram of an interface for applying the image processing method provided in an embodiment of the present application;
[0015] Figure 3 is a schematic diagram of a method for an electronic device to determine a secondary color of a first image in an image processing method provided in an embodiment of the present application;
[0016] Figure 4 is a schematic diagram of a method for an electronic device to determine at least one adjustment ratio in an image processing method provided in an embodiment of the present application;
[0017] Figure 5 is a schematic diagram of an image processing device provided in an embodiment of the present application;
[0018] Figure 6 is a schematic diagram of an electronic device provided in an embodiment of the present application;
[0019] Figure 7 It is a hardware schematic diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0021] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0022] The image processing method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0023] The popularity of electronic devices has popularized photography. Everyone can take photos and record things around them. The popularity of social media has made people more willing to show their lives through images, videos, etc. However, due to shooting scenes and other reasons, some images in users' electronic devices are relatively ordinary and unsightly, so these images need to be processed. However, most users do not have knowledge of photo editing, and it is difficult to understand complex image parameters. Professional photo editing is extremely complex and still has a high threshold. Users may need to repeatedly adjust multiple image parameters to get an image that is shocking enough, with clear layers and prominent subjects. Although users know what a good image should look like, faced with complex processing processes, users often choose to give up processing the image.
[0024] In order to solve the above problems, an embodiment of the present application provides an image processing method, which can provide users with image processing functions with accurate recognition of primary and auxiliary colors, controllable adjustment effects, and wonderful results based on underlying functions such as color recognition and channel search, thereby lowering the threshold for users to process images and simplifying the image processing process.
[0025] The image processing method provided in the embodiment of the present application can be applied to image processing scenarios.
[0026] Exemplarily, assuming that the electronic device displays image 1 (e.g., the first image in the embodiment of the present application) and a control a for adjusting color or light and shadow (e.g., the target control in the embodiment of the present application), if the electronic device receives user input to control a (e.g., the first input in the embodiment of the present application), the electronic device can adjust image 1 to an effect corresponding to the input (e.g., the target effect in the embodiment of the present application); that is, when the electronic device processes image 1, it only needs one input from the user to adjust the color or light and shadow effect of image 1, thereby simplifying the image processing process.
[0027] The present application provides an image processing method. Figure 1 FIG. 1 is a flow chart showing an image processing method provided by an embodiment of the present application. Figure 1 As shown, the image processing method provided in the embodiment of the present application may include the following steps 101 to 103.
[0028] Step 101: An electronic device displays a first image and a target control.
[0029] Optionally, in an embodiment of the present application, the electronic device may display the first image and the target control in any possible interface such as a shooting preview interface, a shooting interface, or an image browsing interface.
[0030] Optionally, in an embodiment of the present application, the shooting preview interface may be an interface for displaying a shooting preview image in a camera application, and the electronic device may display the shooting preview interface after the user triggers and selects the camera application.
[0031] Optionally, in an embodiment of the present application, the shooting interface may be an interface for displaying captured images in a camera application, and the electronic device may display the shooting interface after the user triggers the camera application to take a picture.
[0032] Optionally, in the embodiment of the present application, the image browsing interface may be an interface for displaying images in an album application, and the electronic device may display the image browsing interface after the user triggers the selection of an image in the album application.
[0033] Optionally, in the embodiment of the present application, the first image may be any image stored in the electronic device, or may be an image acquired in real time by the electronic device in the shooting preview interface.
[0034] Optionally, in an embodiment of the present application, the target control can be set in any area of the above interface and can be a control of any possible shape, which can be determined according to actual usage requirements and is not limited in the embodiment of the present application.
[0035] Step 102: The electronic device receives a first input from a user to a target control.
[0036] Optionally, in the embodiment of the present application, the first input may be any possible form of input such as floating input or touch input, which may be determined based on actual usage requirements and is not limited in the embodiment of the present application.
[0037] For example, taking the first input as a user's touch input to the target control as an example, the first input may be any possible touch input such as a click input, a long press input, or a heavy press input to the target control by the user.
[0038] Step 103: In response to the first input, the electronic device adjusts the first image to a target effect corresponding to the first input.
[0039] Optionally, in an embodiment of the present application, the target control can be used to adjust color or light and shadow.
[0040] Optionally, in an embodiment of the present application, each position of the target control may correspond to different color parameters or light and shadow parameters, and the electronic device may adjust the color parameters or light and shadow parameters of the first image according to the end position of the first input, thereby adjusting the first image to a target effect corresponding to the first input.
[0041] Optionally, in an embodiment of the present application, the color parameters may include saturation, or saturation and brightness, and any of the following: contrast and vignetting, contrast and natural saturation, contrast, natural saturation and color temperature.
[0042] Optionally, in an embodiment of the present application, light and shadow parameters may include exposure parameters, highlight parameters and shadow parameters.
[0043] The specific method for the electronic device to adjust the first image to the target effect corresponding to the first input will be described in detail in the following embodiments, and will not be described here to avoid repetition.
[0044] The image processing method provided in the embodiments of the present application is exemplarily described below with reference to the accompanying drawings.
[0045] For example, Figure 2 As shown, the electronic device displays an image 21 (i.e., a first image) and a color adjustment control 22 (i.e., a target control) in an image browsing interface 20; if the electronic device receives a click input (i.e., a first input) from a user to the color adjustment control 22, the electronic device can adjust the color parameters of the image 21 according to an end position 23 of the input on the color adjustment control 22, thereby adjusting the image 21 to a color effect (i.e., a target effect) corresponding to the input.
[0046] It should be noted that in the embodiment of the present application, the user can trigger the electronic device to adjust the first image to the target effect corresponding to the first input in the shooting preview interface, and then trigger the electronic device to continue to adjust the adjusted first image in the shooting interface or the image browsing interface; that is, the electronic device can adjust the color or light and shadow of the first image both before and after shooting, and the parameters adjusted in the early stage of shooting can continue to be adjusted in the later stage of shooting.
[0047] In the image processing method provided in the embodiment of the present application, since the electronic device can adjust the displayed image to an effect corresponding to the input of the user to the control for adjusting color or light and shadow, that is, when the electronic device processes the image, it only needs to adjust the color or light and shadow effects of the image through one input from the user, thereby simplifying the image processing process.
[0048] Optionally, in an embodiment of the present application, the above-mentioned target control is used to adjust the color. Then, before the electronic device adjusts the first image to a target effect corresponding to the first input, the image processing method provided in the embodiment of the present application may further include the following step 104.
[0049] Step 104: The electronic device obtains the type of the first image.
[0050] Optionally, in the embodiment of the present application, the first image may be an image including a face image (ie, the first type described below), or may be an image not including a face image (ie, the second type described below).
[0051] Optionally, in an embodiment of the present application, the electronic device may obtain the type of the first image by comparing the first image with a trained face model in the electronic device.
[0052] Optionally, in the embodiment of the present application, the electronic device may adjust the first image to a target effect corresponding to the first input according to the type of the first image through one of the following possible implementation methods or another possible implementation method.
[0053] A possible implementation
[0054] Optionally, in the embodiment of the present application, the above step 103 can be specifically implemented by the following step 103a.
[0055] Step 103a: In response to the first input, the electronic device adjusts the first image in a first manner to a first effect corresponding to the first input when the first image is of a first type.
[0056] It can be understood that when the first image is of the first type, the first effect is the above-mentioned target effect.
[0057] Optionally, in the embodiment of the present application, the above step 103a can be specifically implemented through the following steps 103a1 to 103a3.
[0058] Step 103a1: In response to a first input, the electronic device determines a preset channel of the first image when the first image is of a first type.
[0059] Optionally, in the embodiment of the present application, the preset channel may be a color channel corresponding to the face image in the first image.
[0060] Step 103a2: The electronic device adjusts the first color of the preset channel to a first target color value corresponding to the first input.
[0061] Optionally, in the embodiment of the present application, the first color may be the saturation, or the saturation and brightness in the above color parameters.
[0062] Optionally, in an embodiment of the present application, the first target color value may be a saturation corresponding to an end position of the first input in the target control, or a saturation corresponding to a preset channel in saturation and brightness, or a saturation and brightness.
[0063] Optionally, in an embodiment of the present application, the preset channels may include a first channel, a second channel and a third channel, and the above step 103a2 may be specifically implemented by at least one of the following steps A, B and C.
[0064] Step A: The electronic device adjusts the first color of the first channel to a first sub-color value corresponding to the first channel in the first target color value.
[0065] Optionally, in an embodiment of the present application, the first channel may be a red channel, and the electronic device may adjust the saturation, or the saturation and brightness of the red channel to the saturation, or the saturation and brightness corresponding to the red channel in the first target color value.
[0066] Step B: The electronic device adjusts the first color of the second channel to a second sub-color value corresponding to the second channel in the first target color value.
[0067] Optionally, in an embodiment of the present application, the second channel may be an orange channel, and the electronic device may adjust the saturation, or the saturation and brightness of the orange channel to the saturation, or the saturation and brightness corresponding to the orange channel in the first target color value.
[0068] Step C: the electronic device adjusts the first color of the third channel to a third sub-color value corresponding to the third channel in the first target color value.
[0069] Optionally, in an embodiment of the present application, the third channel may be a yellow channel, and the electronic device may adjust the saturation, or the saturation and brightness of the yellow channel to the saturation, or the saturation and brightness corresponding to the yellow channel in the first target color value.
[0070] Optionally, in an embodiment of the present application, the target control may include a first sub-control and a second sub-control connected to each other. For example, assuming that the target control is a bar control in the X-axis direction, and the target control includes a position range of [-100, 100], then the first sub-control may be a sub-control in the target control with a position range of [-100, 0), and the second sub-control may be a sub-control in the target control with a position range of [0, 100].
[0071] Optionally, in an embodiment of the present application, if the end position of the first input is on the first sub-control, the above step 103a2 can be specifically implemented by the above step A, and the first color is saturation, and the electronic device can also adjust the saturation and brightness of other channels except the first channel, the second channel and the third channel to the saturation and brightness corresponding to the first input; if the end position of the first input is on the second sub-control, the above step 103a2 can be specifically implemented by the above steps A, B and C, and the first color is saturation and brightness.
[0072] It should be noted that the color of the channel adjusted by the electronic device actually refers to the color of the color corresponding to the channel adjusted by the electronic device.
[0073] In the embodiment of the present application, since the electronic device can adjust the first color of at least one of the preset channels to a corresponding color value according to the first input, the flexibility of image processing can be improved.
[0074] Step 103a3: The electronic device adjusts the second color of the first image to a second target color value corresponding to the first input.
[0075] Optionally, in the embodiment of the present application, the first effect may be indicated by a first target color value and a second target color value.
[0076] Optionally, in the embodiment of the present application, the second color may be contrast and vignetting, or contrast and natural saturation.
[0077] Optionally, in an embodiment of the present application, the second target color value may be contrast and vignetting corresponding to the end position of the first input in the target control, or contrast and natural saturation.
[0078] It can be understood that since the electronic device adjusts the first color of the first image to the first target color value and adjusts the second color of the first image to the second target color value, the first image after adjusting the color parameters can be displayed with the first effect, that is, the first target color value and the second target color value can indicate the first effect.
[0079] In an embodiment of the present application, since the first image is of the first type (i.e., includes a face image), the electronic device can directly determine the preset channel of the first image, and adjust the first color of the preset channel and the second color of the first image to the color values corresponding to the first input, respectively, thereby ensuring the processing effect of the face image in the first image and enhancing the atmosphere of the first image.
[0080] Another possible implementation
[0081] Optionally, in the embodiment of the present application, the above step 103 can be specifically implemented by the following step 103b.
[0082] Step 103b: In response to the first input, the electronic device adjusts the first image in a second manner to a second effect corresponding to the first input when the first image is of a second type.
[0083] It can be understood that when the first image is of the second type, the second effect is the above-mentioned target effect.
[0084] Optionally, in the embodiment of the present application, the electronic device may adjust the first image to a second effect corresponding to the first input in a second manner through the following method 1 and / or method 2.
[0085] Method 1
[0086] Optionally, in the embodiment of the present application, the above step 103b can be specifically implemented through the following steps 103b1 to 103b4.
[0087] Step 103b1: In response to the first input, the electronic device determines a primary color channel, a secondary color channel, and a miscellaneous color channel of the first image when the first image is of the second type.
[0088] Optionally, in the embodiment of the present application, the above step 103b1 can be specifically implemented by the following steps D, E, F and G.
[0089] Step D: In response to the first input, the electronic device determines the primary color and the secondary color of the first image when the first image is of the second type.
[0090] Optionally, in an embodiment of the present application, the above step D can be specifically implemented through the following steps D1 to D3.
[0091] Step D1: In response to the first input, the electronic device determines the color with the largest sum of saturation and brightness in the first image as the main color when the first image is of the second type.
[0092] Optionally, in an embodiment of the present application, the electronic device can read the saturation and brightness of the colors in the first image, and sort the sum of the saturation and brightness of colors other than black, white and gray colors in the first image (i.e., the saturation is less than 20 and the brightness is greater than 20), thereby determining the color with the largest sum of saturation and brightness as the main color of the first image.
[0093] Step D2: The electronic device determines at least one color region in the first image according to the main color and the color wheel.
[0094] In the embodiment of the present application, the color wheel can be a long strip of color sequence seen in the color spectrum, connecting the beginning and the end together, so that red is connected to purple at the other end, and the color wheel can include 12-24 different colors.
[0095] Optionally, in an embodiment of the present application, the electronic device may evenly divide the color wheel into a plurality of unit color channels, and the number of unit color channels divided by the electronic device may be a system default or may be set according to actual usage requirements of the user.
[0096] Optionally, in an embodiment of the present application, each color region may correspond to a color, and an angle between a position of the color corresponding to each color region in the color wheel and the first position is greater than or equal to a preset angle.
[0097] In the embodiment of the present application, the first position is the position of the above-mentioned main color in the color wheel.
[0098] Optionally, in an embodiment of the present application, the electronic device may determine at least one angle range in the color wheel according to at least one preset angle, set a priority for the at least one angle range, and determine at least one color area in the first image according to the priority.
[0099] Step D3: The electronic device determines the color corresponding to the color area with the largest area in the at least one color area as the auxiliary color.
[0100] Optionally, in the embodiment of the present application, the color region with the largest area may be the color region including the largest number of pixels.
[0101] It should be noted that in the embodiment of the present application, if there is no color area in the first image corresponding to a color whose position in the color wheel and the first position have an angle greater than or equal to a preset angle, the electronic device can determine that there is no secondary color in the first image.
[0102] The image processing method provided in the embodiments of the present application is exemplarily described below with reference to the accompanying drawings.
[0103] For example, Figure 3 As shown, assuming that the first position is position 0 in the color wheel, the electronic device determines an angle range A whose angle with position 0 is equal to 180 degrees (i.e., a preset angle) and has a 15-degree margin, determines an angle range B whose angle with position 0 is greater than or equal to 150 degrees (i.e., a preset angle) and has a 15-degree margin, determines an angle range C whose angle with position 0 is greater than or equal to 60 degrees (i.e., a preset angle) and has a 15-degree margin, and the priority order is angle range A, angle range B, angle range C; then, if the position of color 1' corresponding to color region 1 in the first image in the color wheel is within angle range A, the electronic device can determine color 1' as the auxiliary color of the first image; if there is no color 1' in the first image, The color corresponding to the color area is in angle range A, and the positions of color 2' corresponding to color area 2 and color 3' corresponding to color area 3 in the first image are in angle range B in the color wheel, and the area of color area 2 is larger than the area of color area 3, then the electronic device can determine color 2' as the auxiliary color of the first image; if there is no color area corresponding to the color in the first image in angle range A and angle range B, and the positions of color 4' corresponding to color area 4 and color 5' corresponding to color area 5 in the first image are in angle range C in the color wheel, and the area of color area 5 is larger than the area of color area 4, then the electronic device can determine color 5' as the auxiliary color of the first image.
[0104] In the embodiment of the present application, since the electronic device can determine the color with the largest sum of saturation and brightness in the first image as the primary color of the first image, and can determine the secondary color of the first image based on the primary color and the color wheel, the electronic device can accurately obtain the primary color and the secondary color of the first image to improve the accuracy of image processing.
[0105] Step E: The electronic device determines all unit color channels corresponding to the first preset angle range in the color wheel as main color channels.
[0106] In the embodiment of the present application, the center of the first preset angle range coincides with the first position of the main color in the color wheel.
[0107] Optionally, in the embodiment of the present application, the first preset angle range may be a system default, or may be set by the user according to actual usage requirements.
[0108] Optionally, in the embodiment of the present application, all unit color channels corresponding to the first preset angle range may be all unit color channels in the color wheel that have overlapping angles with the first preset angle range.
[0109] Step F: The electronic device determines all unit color channels in the color wheel corresponding to the second preset angle range as auxiliary color channels.
[0110] In the embodiment of the present application, the center of the second preset angle range coincides with the second position of the secondary color in the color wheel.
[0111] Optionally, in the embodiment of the present application, the second preset angle range may be a system default, or may be set by the user according to actual usage requirements.
[0112] Optionally, in the embodiment of the present application, the second preset angle may be the same as or different from the first preset angle.
[0113] Optionally, in the embodiment of the present application, all unit color channels corresponding to the second preset angle range may be all unit color channels in the color wheel that have overlapping angles with the second preset angle range.
[0114] Step G: The electronic device determines other unit color channels in the color wheel except the primary color channel and the secondary color channel as miscellaneous color channels.
[0115] Optionally, in an embodiment of the present application, if the first image does not have a secondary color, the miscellaneous color channel is a unit color channel other than the primary color channel in the color wheel.
[0116] In an embodiment of the present application, since when the first image is of the second type, the electronic device can determine the primary color and secondary color of the first image, and then determine the primary color channel, secondary color channel and miscellaneous color channel, thereby further improving the accuracy of image processing.
[0117] It should be noted that the image processing method provided in the embodiment of the present application can also be applied to other scenarios. For example, in a color absorption scenario, the electronic device can determine the main color and secondary color of the desktop wallpaper through the image processing method provided in the embodiment of the present application, and then specifically color the icons of the application programs on the desktop to make the display effect more coordinated.
[0118] Step 103b2: The electronic device adjusts the third color of the target channel to a third target color value corresponding to the first input.
[0119] Optionally, in the embodiment of the present application, the target channel may be a primary color channel or a miscellaneous color channel.
[0120] Optionally, in the embodiment of the present application, the third color may be the saturation and brightness of the above color parameters.
[0121] Optionally, in an embodiment of the present application, the third target color value may be the saturation and brightness corresponding to the target channel among the saturation and brightness corresponding to the end position of the first input in the target control, that is, different target channels may correspond to different saturations and brightnesses.
[0122] Step 103b3: The electronic device adjusts the third color of the auxiliary color channel to a fourth target color value corresponding to the first input.
[0123] Optionally, in the embodiment of the present application, the fourth target color value may be the saturation and brightness corresponding to the auxiliary color channel in the saturation and brightness corresponding to the end position of the first input in the target control.
[0124] Optionally, in an embodiment of the present application, the primary color channel or the secondary color channel may include at least two unit color channels in the color wheel, and the electronic device may determine the overlap angle of the at least two unit color channels and the target angle range, and obtain at least two overlap angles corresponding to the at least two unit color channels one by one; wherein, for the primary color channel, the target angle range is a first preset angle range; and for the secondary color channel, the target angle range is a second preset angle range. In this way, when the electronic device adjusts the third color of the primary color channel or the secondary color channel, it may adjust the third color of the at least two unit color channels it includes according to at least one adjustment ratio; wherein each adjustment ratio may be the ratio of an overlap angle to the maximum angle of the at least two overlap angles.
[0125] Optionally, in an embodiment of the present application, when the electronic device adjusts the third colors of at least two unit color channels included in the primary color channel or the secondary color channel according to at least one adjustment ratio, the third color of the unit color channel with the largest corresponding overlap angle among the at least two unit color channels can be adjusted to the target color value corresponding to the first input, and each other unit color channel among the at least two unit color channels can be adjusted according to the corresponding adjustment ratio. It can be understood that if the primary color channel or the secondary color channel includes two unit color channels, and the two overlap angles corresponding to the two unit color channels are equal, the electronic device can adjust the third colors of both unit color channels to the target color value corresponding to the first input.
[0126] Optionally, in an embodiment of the present application, if the primary color channel and the secondary color channel include the same unit color channel, the electronic device may adjust the third color of the same unit color channel to: the maximum value of the third target color value and the fourth target color value.
[0127] The image processing method provided in the embodiments of the present application is exemplarily described below with reference to the accompanying drawings.
[0128] Exemplarily, taking the third color of the main color channel adjusted by the electronic device as an example, as Figure 4 shown, the electronic device can evenly divide the color ring into 8 unit color channels (i.e., unit color channel 41 to unit color channel 48). Assuming that the main color channel includes unit color channel 41 and unit color channel 42 (i.e., at least two unit color channels), and the first preset angle range is a, then the electronic device can determine the coincidence angle b between unit color channel 41 and a, and the coincidence angle c between unit color channel 42 and a, and b < c. Thus, the electronic device can adjust the third color of unit color channel 42 to the third target color value, and adjust the third color of unit color channel 41 according to the adjustment ratio b / c; for example, the electronic device adjusts the saturation of unit color channel 42 to saturation A (i.e., the third target color value), and adjusts the saturation of unit color channel 41 to A×(b / c) according to the adjustment ratio b / c. In this way, the electronic device can adjust the third color of the two unit color channels included in the main color channel proportionally to improve the accuracy of image processing, and further ensure a good display effect of the processed image.
[0129] Step 103b4: The electronic device adjusts the fourth color of the first image to the fifth target color value corresponding to the first input.
[0130] Optionally, in the embodiments of the present application, the second effect can be indicated by the third target color value, the fourth target color value, and the fifth target color value.
[0131] Optionally, in the embodiments of the present application, the fourth color can be contrast and vignetting, or contrast and natural saturation.
[0132] Optionally, in the embodiments of the present application, the fifth target color value can be contrast and vignetting corresponding to the end position of the first input in the target control, or contrast and natural saturation.
[0133] It can be understood that since the electronic device adjusts the third color of the first image to the fourth target color value and adjusts the fourth color of the first image to the fifth target color value, the first image after adjusting the color parameters can be displayed with the second effect, that is, the fourth target color value and the fifth target color value can indicate the second effect.
[0134] In the embodiments of the present application, since when the first image is of the second type (i.e., does not include a face image), the electronic device can determine the main color channel, the auxiliary color channel, and the miscellaneous color channel of the first image, and adjust the third color of each channel and the fourth color of the first image to the color values corresponding to the first input respectively, the accuracy of image processing can be further improved to ensure the display effect of the processed image.
[0135] Method 2
[0136] Optionally, in the embodiment of the present application, the above step 103b can be specifically implemented by the following steps 103b5 and 103b6.
[0137] Step 103b5: The electronic device determines a target color temperature adjustment amount corresponding to the target hue range among the two color temperature adjustment amounts corresponding to the first input.
[0138] In the embodiment of the present application, the target hue range is the hue range where the hue of the main color of the first image lies.
[0139] Optionally, in the embodiment of the present application, the target hue range may be a warm hue range or a cool hue range, the warm hue range may be [0, 80] and [330, 360], and the cool hue range may be (80, 330).
[0140] Optionally, in an embodiment of the present application, the first input may correspond to a first color temperature adjustment amount and a second color temperature adjustment amount, and the first color temperature adjustment amount corresponds to a warm color hue range, and the second color temperature adjustment amount corresponds to a cool color hue range, so that the electronic device can determine the target color temperature adjustment amount based on the hue range in which the hue of the main color of the first image is located.
[0141] Step 103b6: The electronic device adjusts the color temperature of the first image based on the target color temperature adjustment amount.
[0142] Optionally, in the embodiment of the present application, the second effect may be indicated by the adjusted color temperature of the first image.
[0143] Optionally, in an embodiment of the present application, if the hue range of the hue of the main color of the first image is a warm hue range, the electronic device can determine that the target color temperature adjustment amount is the first color temperature adjustment amount, and adjust the color temperature of the first image based on the first color temperature adjustment amount. For example, the original color temperature of the first image is 50, and the first color temperature adjustment amount is +20, then the color temperature of the adjusted first image is 70; if the hue range of the hue of the main color of the first image is a cool hue range, the electronic device can determine that the target color temperature adjustment amount is the second color temperature adjustment amount, and adjust the color temperature of the first image based on the second color temperature adjustment amount. For example, the original color temperature of the first image is 50, and the second color temperature adjustment amount is -20, then the color temperature of the adjusted first image is 30.
[0144] It can be understood that since the electronic device can adjust the color temperature of the first image based on the target color temperature adjustment amount, the first image after the color temperature is adjusted can be displayed with the second effect, that is, the adjusted color temperature of the first image can indicate the second effect.
[0145] In the embodiment of the present application, since the electronic device can adjust the color temperature of the first image based on the target color temperature adjustment amount corresponding to the target hue range among the two color temperature adjustment amounts corresponding to the first input, the accuracy of the color temperature of the processed image can be ensured.
[0146] In the embodiment of the present application, since the electronic device can adjust the first image to an effect corresponding to the first input in different ways according to the type of the acquired first image, the flexibility of image processing can be improved.
[0147] The image processing method provided in the embodiment of the present application can be executed by an image processing device. In the embodiment of the present application, the image processing device provided in the embodiment of the present application is described by taking the method for executing image processing by the image processing device as an example.
[0148] Combination Figure 5 , an embodiment of the present application provides an image processing device 50, which may include a display module 51, a receiving module 52 and an adjustment module 53. The display module 51 may be used to display a first image and a target control. The receiving module 52 may be used to receive a first input of a user to a target control. The adjustment control 53 may be used to adjust the first image to a target effect corresponding to the first input in response to the first input received by the receiving module 52. Among them, the target control may be used to adjust color or light and shadow.
[0149] In a possible implementation, the target control can be used to adjust the color, and the image processing device 50 can also include an acquisition module. The acquisition module can be used to acquire the type of the first image before the adjustment module 53 adjusts the first image to the target effect corresponding to the first input. The adjustment module 53 can be used to adjust the first image to the first effect corresponding to the first input in a first manner when the first image is of the first type. The adjustment module 53 can be used to adjust the first image to the second effect corresponding to the first input in a second manner when the first image is of the second type.
[0150] In a possible implementation, the image processing device 50 may further include a determination module. The determination module may be used to determine a preset channel of the first image. The adjustment module 53 may be used to adjust the first color of the preset channel to a first target color value corresponding to the first input. The adjustment module 53 may be used to adjust the second color of the first image to a second target color value corresponding to the first input. The first effect may be indicated by the first target color value and the second target color value.
[0151] In a possible implementation, the preset channels may include a first channel, a second channel, and a third channel. The adjustment module 53 may be specifically used to adjust at least one of the following: adjusting the first color of the first channel to a first sub-color value corresponding to the first channel in the first target color value; adjusting the first color of the second channel to a second sub-color value corresponding to the second channel in the first target color value; adjusting the first color of the third channel to a third sub-color value corresponding to the third channel in the first target color value.
[0152] In a possible implementation, the determination module can be specifically used to determine the primary color channel, the secondary color channel, and the noise color channel of the first image. The adjustment module 53 can be specifically used to adjust the third color of the target channel to a third target color value corresponding to the first input, and the target channel is the primary color channel or the noise color channel. The adjustment module 53 can be specifically used to adjust the third color of the secondary color channel to a fourth target color value corresponding to the first input. The adjustment module 53 can be specifically used to adjust the fourth color of the first image to a fifth target color value corresponding to the first input. The second effect can be indicated by the third target color value, the fourth target color value, and the fifth target color value.
[0153] In a possible implementation, the determination module may be specifically used to determine a target color temperature adjustment amount corresponding to a target hue range among two color temperature adjustment amounts corresponding to the first input, wherein the target hue range is a hue range in which the hue of the main color of the first image is located. The adjustment module 53 may be specifically used to adjust the color temperature of the first image based on the target color temperature adjustment amount. The second effect may be indicated by the color temperature of the first image after adjustment.
[0154] In a possible implementation, the determination module can be specifically used to determine the primary color and the secondary color of the first image. The determination module can be specifically used to determine all unit color channels corresponding to the first preset angle range in the color wheel as primary color channels, and the center of the first preset angle range coincides with the first position of the primary color in the color wheel. The determination module can be specifically used to determine all unit color channels corresponding to the second preset angle range in the color wheel as secondary color channels, and the center of the second preset angle range coincides with the second position of the secondary color in the color wheel. The determination module can be specifically used to determine other unit color channels in the color wheel except the primary color channel and the secondary color channel as miscellaneous color channels.
[0155] In a possible implementation, the determination module can be used to determine the color with the largest sum of saturation and brightness in the colors of the first image as the primary color. The determination module can be used to determine at least one color area in the first image based on the primary color and the color wheel, each color area corresponds to a color, and the angle between the position of the color corresponding to each color area in the color wheel and the first position is greater than or equal to a preset angle. The determination module can be used to determine the color corresponding to the color area with the largest area in at least one color area as the secondary color.
[0156] In the image processing device provided in the embodiment of the present application, since the image processing device can adjust the displayed image to an effect corresponding to the input of the user to the control for adjusting color or light and shadow; that is, when the image processing device processes the image, it only needs one input from the user to adjust the color or light and shadow effect of the image, thereby simplifying the image processing process.
[0157] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described again here.
[0158] The image processing device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0159] The image processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0160] The image processing device provided in the embodiment of the present application can achieve Figures 1 to 4 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0161] Alternatively, if Figure 6 As shown, an embodiment of the present application further provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores programs or instructions that can be executed on the processor 601, and when the program or instructions are executed by the processor 601, the various steps of the above-mentioned image processing method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, they are not described here.
[0162] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0163] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0164] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.
[0165] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0166] The display unit 1006 may be used to display the first image and the target control. The user input unit 1007 may be used to receive a first input from a user to the target control. The processor 1010 may be used to adjust the first image to a target effect corresponding to the first input in response to the first input received by the user input unit 1007. The target control may be used to adjust color or light and shadow.
[0167] In a possible implementation, the target control may be used to adjust the color. The processor 1010 may also be used to obtain the type of the first image before adjusting the first image to the target effect corresponding to the first input. The processor 1010 may be used to adjust the first image to the first effect corresponding to the first input in a first manner when the first image is of the first type. The processor 1010 may be used to adjust the first image to the second effect corresponding to the first input in a second manner when the first image is of the second type.
[0168] In a possible implementation, the processor 1010 may also be used to determine a preset channel of the first image. The processor 1010 may be specifically used to adjust the first color of the preset channel to a first target color value corresponding to the first input. The processor 1010 may be specifically used to adjust the second color of the first image to a second target color value corresponding to the first input. The first effect may be indicated by the first target color value and the second target color value.
[0169] In a possible implementation, the preset channels may include a first channel, a second channel, and a third channel. The processor 1010 may be specifically configured to adjust at least one of the following: adjusting a first color of the first channel to a first sub-color value corresponding to the first channel in a first target color value; adjusting a first color of the second channel to a second sub-color value corresponding to the second channel in the first target color value; adjusting a first color of the third channel to a third sub-color value corresponding to the third channel in the first target color value.
[0170] In a possible implementation, the processor 1010 may be specifically used to determine a primary color channel, a secondary color channel, and a noise color channel of a first image. The processor 1010 may be specifically used to adjust a third color of a target channel to a third target color value corresponding to a first input, wherein the target channel is a primary color channel or a noise color channel. The processor 1010 may be specifically used to adjust a third color of a secondary color channel to a fourth target color value corresponding to the first input. The processor 1010 may be specifically used to adjust a fourth color of the first image to a fifth target color value corresponding to the first input. The second effect may be indicated by a third target color value, a fourth target color value, and a fifth target color value.
[0171] In a possible implementation, the processor 1010 may be specifically configured to determine a target color temperature adjustment amount corresponding to a target hue range among two color temperature adjustment amounts corresponding to the first input, where the target hue range is a hue range where the hue of the main color of the first image is located. The processor 1010 may be specifically configured to adjust the color temperature of the first image based on the target color temperature adjustment amount. The second effect may be indicated by the color temperature of the first image after adjustment.
[0172] In a possible implementation, the processor 1010 may be specifically used to determine the primary color and the secondary color of the first image. The processor 1010 may be specifically used to determine all unit color channels corresponding to the first preset angle range in the color wheel as primary color channels, and the center of the first preset angle range coincides with the first position of the primary color in the color wheel. The processor 1010 may be specifically used to determine all unit color channels corresponding to the second preset angle range in the color wheel as secondary color channels, and the center of the second preset angle range coincides with the second position of the secondary color in the color wheel. The processor 1010 may be specifically used to determine other unit color channels in the color wheel except the primary color channel and the secondary color channel as miscellaneous color channels.
[0173] In a possible implementation, the processor 1010 may be used to determine the color with the largest sum of saturation and brightness in the colors of the first image as the primary color. The processor 1010 may be used to determine at least one color region in the first image based on the primary color and the color wheel, each color region corresponds to a color, and the angle between the position of the color corresponding to each color region in the color wheel and the first position is greater than or equal to a preset angle. The processor 1010 may be used to determine the color corresponding to the color region with the largest area in at least one color region as the secondary color.
[0174] In the electronic device provided in the embodiment of the present application, since the electronic device can adjust the displayed image to an effect corresponding to the input of the user to the control for adjusting color or light and shadow, that is, when the electronic device processes the image, it only needs one input from the user to adjust the color or light and shadow effect of the image, thereby simplifying the image processing process.
[0175] The beneficial effects of various implementations in this embodiment can be specifically referred to the beneficial effects of the corresponding implementations in the above method embodiment. To avoid repetition, they will not be described again here.
[0176] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0177] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0178] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.
[0179] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned image processing method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0180] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0181] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned image processing method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0182] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0183] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned image processing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0184] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0185] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0186] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. An image processing method, characterized in that: The method comprises: displaying a first image and a target control; Receive a first input from a user to the target control; In response to the first input, adjusting the first image to a target effect corresponding to the first input; Wherein, the target control is used to adjust color or light and shadow; The target control is used to adjust color, and before adjusting the first image to a target effect corresponding to the first input, the method further includes: Acquire the type of the first image; The adjusting the first image to a target effect corresponding to the first input includes: When the first image is of a first type, adjusting the first image in a first manner to a first effect corresponding to the first input; When the first image is of a second type, adjusting the first image in a second manner to a second effect corresponding to the first input; The step of adjusting the first image in a second manner to a second effect corresponding to the first input includes: Determine a primary color channel, a secondary color channel, and a miscellaneous color channel of the first image; Adjusting a third color of a target channel to a third target color value corresponding to the first input, the target channel being the primary color channel or the miscellaneous color channel; adjusting a third color of the secondary color channel to a fourth target color value corresponding to the first input; adjusting a fourth color of the first image to a fifth target color value corresponding to the first input; wherein the second effect is indicated by the third target color value, the fourth target color value, and the fifth target color value; The determining of the primary color channel, the secondary color channel, and the miscellaneous color channel of the first image includes: determining a primary color and a secondary color of the first image; Determine all unit color channels corresponding to a first preset angle range in the color wheel as the primary color channel, wherein the center of the first preset angle range coincides with a first position of the primary color in the color wheel; Determine all unit color channels corresponding to a second preset angle range in the color wheel as the auxiliary color channels, wherein the center of the second preset angle range coincides with a second position of the auxiliary color in the color wheel; The other unit color channels in the color wheel except the primary color channel and the secondary color channel are determined as the miscellaneous color channels.
2. The method according to claim 1, characterized in that The step of adjusting the first image in a first manner to a first effect corresponding to the first input includes: determining a preset channel of the first image; adjusting a first color of the preset channel to a first target color value corresponding to the first input; adjusting a second color of the first image to a second target color value corresponding to the first input; The first effect is indicated by the first target color value and the second target color value.
3. The method according to claim 2, characterized in that The preset channels include a first channel, a second channel and a third channel; The step of adjusting the first color of the preset channel to a first target color value corresponding to the first input includes at least one of the following: Adjusting the first color of the first channel to a first sub-color value corresponding to the first channel in the first target color value; Adjusting the first color of the second channel to a second sub-color value of the first target color value corresponding to the second channel; The first color of the third channel is adjusted to a third sub-color value of the first target color value corresponding to the third channel.
4. The method according to claim 1, characterized in that: The step of adjusting the first image in a second manner to a second effect corresponding to the first input includes: Determine a target color temperature adjustment amount corresponding to a target hue range among two color temperature adjustment amounts corresponding to the first input, wherein the target hue range is a hue range in which the hue of the main color of the first image is located; Adjusting the color temperature of the first image based on the target color temperature adjustment amount; The second effect is indicated by the adjusted color temperature of the first image.
5. The method according to claim 1, characterized in that The determining of the primary color and the secondary color of the first image comprises: Determine the color with the largest sum of saturation and brightness among the colors of the first image as the primary color; Determine at least one color region in the first image according to the main color and the color wheel, each color region corresponds to a color, and the angle between the position of the color corresponding to each color region in the color wheel and the first position is greater than or equal to a preset angle; The color corresponding to the color region with the largest area in the at least one color region is determined as the auxiliary color.
6. An image processing device, characterized in that: The device comprises a display module, a receiving module and an adjustment module; The display module is used to display the first image and the target control; The receiving module is used to receive a first input of the user to the target control; The adjusting module is configured to adjust the first image to a target effect corresponding to the first input in response to the first input received by the receiving module; Wherein, the target control is used to adjust color or light and shadow; The target control is used to adjust the color, and the device also includes an acquisition module; The acquisition module is configured to acquire the type of the first image before the adjustment module adjusts the first image to the target effect corresponding to the first input; The adjustment module is specifically configured to adjust the first image to a first effect corresponding to the first input in a first manner when the first image is of a first type; The adjustment module is specifically configured to adjust the first image to a second effect corresponding to the first input in a second manner when the first image is of a second type; The device further comprises: a determination module; The determination module is specifically used to determine the primary color channel, the secondary color channel and the miscellaneous color channel of the first image; The adjustment module is specifically used to adjust the third color of the target channel to a third target color value corresponding to the first input, and the target channel is the primary color channel or the miscellaneous color channel; The adjustment module is specifically configured to adjust the third color of the auxiliary color channel to a fourth target color value corresponding to the first input; The adjustment module is specifically configured to adjust the fourth color of the first image to a fifth target color value corresponding to the first input; wherein the second effect is indicated by the third target color value, the fourth target color value, and the fifth target color value; The determination module is specifically used to determine the primary color and the secondary color of the first image; The determination module is specifically configured to determine all unit color channels corresponding to a first preset angle range in the color wheel as the primary color channels, wherein the center of the first preset angle range coincides with a first position of the primary color in the color wheel; The determination module is specifically configured to determine all unit color channels corresponding to a second preset angle range in the color wheel as the auxiliary color channels, wherein the center of the second preset angle range coincides with a second position of the auxiliary color in the color wheel; The determination module is specifically configured to determine other unit color channels in the color wheel except the primary color channel and the secondary color channel as the miscellaneous color channels.
7. The device according to claim 6, characterized in that The determining module is used to determine a preset channel of the first image; The adjustment module is specifically configured to adjust the first color of the preset channel to a first target color value corresponding to the first input; The adjustment module is specifically configured to adjust the second color of the first image to a second target color value corresponding to the first input; The first effect is indicated by the first target color value and the second target color value.
8. The device according to claim 7, characterized in that The preset channels include a first channel, a second channel and a third channel; The adjustment module is specifically used to adjust at least one of the following: Adjusting the first color of the first channel to a first sub-color value corresponding to the first channel in the first target color value; Adjusting the first color of the second channel to a second sub-color value of the first target color value corresponding to the second channel; The first color of the third channel is adjusted to a third sub-color value of the first target color value corresponding to the third channel.
9. The device according to claim 6, characterized in that The determination module is specifically configured to determine a target color temperature adjustment amount corresponding to a target hue range among the two color temperature adjustment amounts corresponding to the first input, wherein the target hue range is a hue range in which the hue of the main color of the first image is located; The adjustment module is specifically configured to adjust the color temperature of the first image based on the target color temperature adjustment amount; The second effect is indicated by the adjusted color temperature of the first image.
10. The device according to claim 6, characterized in that The determining module is specifically configured to determine the color with the largest sum of saturation and brightness among the colors of the first image as the main color; The determination module is specifically configured to determine at least one color region in the first image according to the main color and the color wheel, each color region corresponds to a color, and the angle between the position of the color corresponding to each color region in the color wheel and the first position is greater than or equal to a preset angle; The determination module is specifically configured to determine the color corresponding to the color region with the largest area in the at least one color region as the auxiliary color.
11. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the image processing method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Image processing method and device, electronic apparatus, and computer-readable storage medium
CN109191403A
Image processing method and device, storage medium and computer device
CN109447958A