Image processing method, electronic device, and non-transitory readable storage medium
AssigneeVivo Mobile Communication Co., Ltd.
InventorChangxin Qiu
Life of this patent
Estimating the term…
Abstract
An image processing method includes displaying a first image and a target control; receiving a first input to the target control by a user. In response to the first input, adjusting the first image to a target effect corresponding to the first input; where the target control is used for adjusting color or light shadow.
Claims9
An image processing method, wherein the method comprises:
- displaying a first image and a target control;
- receiving a first input to the target control by a user;
- and
- 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 for adjusting color;
- wherein before the adjusting the first image to the target effect corresponding to the first input, the method further comprises:
- obtaining a type of the first image;
- and
- the adjusting the first image to the target effect corresponding to the first input comprises:
- in a case that the first image is of a first type, adjusting, in a first manner, the first image to a first effect corresponding to the first input;
- and
- in a case that the first image is of a second type, adjusting, in a second manner, the first image to a second effect corresponding to the first input;
- wherein the adjusting, in the first manner, the first image to the first effect corresponding to the first input comprises:
- 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;
- and
- adjusting a second color of the first image to a second target color value corresponding to the first input;
- wherein
- the first effect is indicated by the first target color value and the second target color value;
- wherein the preset channel comprises a first channel, a second channel, and a third channel;
- and
- the adjusting the first color of the preset channel to the first target color value corresponding to the first input comprises 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 the 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;
- or
- 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;
- wherein the adjusting, in the second manner, the first image to the second effect corresponding to the first input comprises:
- determining a main color channel, an auxiliary color channel, and a variegated 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, wherein the target channel is the main color channel or the variegated color channel;
- adjusting a third color of the auxiliary color channel to a fourth target color value corresponding to the first input;
- and
- 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;
- wherein the determining the main color channel, the auxiliary color channel, and the variegated color channel of the first image comprises:
- determining a main color and an auxiliary color of the first image;
- determining all unit color channels corresponding to a first preset angle range in a color wheel as the main color channel, wherein a center of the first preset angle range coincides with a first position of the main color in the color wheel;
- determining all unit color channels corresponding to a second preset angle range in the color wheel as the auxiliary color channel, wherein a center of the second preset angle range coincides with a second position of the auxiliary color in the color wheel;
- and
- determining an unit color channel other than the main color channel and the auxiliary color channel in the color wheel as the variegated color channel.
An electronic device, comprising a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or the instructions, when executed by the processor, cause the electronic device to perform:
- displaying a first image and a target control;
- receiving a first input to the target control by a user;
- and
- 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 for adjusting color;
- wherein the program or the instructions, when executed by the processor, cause the electronic device to further perform:
- obtaining a type of the first image;
- and
- the program or the instructions, when executed by the processor, cause the electronic device to perform:
- in a case that the first image is of a first type, adjusting, in a first manner, the first image to a first effect corresponding to the first input;
- and
- in a case that the first image is of a second type, adjusting, in a second manner, the first image to a second effect corresponding to the first input;
- wherein the program or the instructions, when executed by the processor, cause the electronic device to perform:
- 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;
- and
- adjusting a second color of the first image to a second target color value corresponding to the first input;
- wherein
- the first effect is indicated by the first target color value and the second target color value;
- wherein the preset channel comprises a first channel, a second channel, and a third channel;
- and
- the program or the instructions, when executed by the processor, cause the electronic device to perform 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 the 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;
- or
- 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;
- wherein the program or the instructions, when executed by the processor, cause the electronic device to perform:
- determining a main color channel, an auxiliary color channel, and a variegated 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, wherein the target channel is the main color channel or the variegated color channel;
- adjusting a third color of the auxiliary color channel to a fourth target color value corresponding to the first input;
- and
- 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;
- wherein the program or the instructions, when executed by the processor, cause the electronic device to perform:
- determining a main color and an auxiliary color of the first image;
- determining all unit color channels corresponding to a first preset angle range in a color wheel as the main color channel, wherein a center of the first preset angle range coincides with a first position of the main color in the color wheel;
- determining all unit color channels corresponding to a second preset angle range in the color wheel as the auxiliary color channel, wherein a center of the second preset angle range coincides with a second position of the auxiliary color in the color wheel;
- and
- determining an unit color channel other than the main color channel and the auxiliary color channel in the color wheel as the variegated color channel.
A non-transitory readable storage medium, wherein the non-transitory readable storage medium stores a program or instructions, and the program or the instructions, when executed by a processor of an electronic device, cause the electronic device to perform:
- displaying a first image and a target control;
- receiving a first input to the target control by a user;
- and
- 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 for adjusting color;
- wherein the program or the instructions, when executed by the processor, cause the electronic device to further perform:
- obtaining a type of the first image;
- and
- the program or the instructions, when executed by the processor, cause the electronic device to perform:
- in a case that the first image is of a first type, adjusting, in a first manner, the first image to a first effect corresponding to the first input;
- and
- in a case that the first image is of a second type, adjusting, in a second manner, the first image to a second effect corresponding to the first input;
- wherein the program or the instructions, when executed by the processor, cause the electronic device to perform:
- 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;
- and
- adjusting a second color of the first image to a second target color value corresponding to the first input;
- wherein
- the first effect is indicated by the first target color value and the second target color value;
- wherein the preset channel comprises a first channel, a second channel, and a third channel;
- and
- the program or the instructions, when executed by the processor, cause the electronic device to perform 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 the 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;
- or
- 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;
- wherein the program or the instructions, when executed by the processor, cause the electronic device to perform:
- determining a main color channel, an auxiliary color channel, and a variegated 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, wherein the target channel is the main color channel or the variegated color channel;
- adjusting a third color of the auxiliary color channel to a fourth target color value corresponding to the first input;
- and
- 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;
- wherein the program or the instructions, when executed by the processor, cause the electronic device to perform:
- determining a main color and an auxiliary color of the first image;
- determining all unit color channels corresponding to a first preset angle range in a color wheel as the main color channel, wherein a center of the first preset angle range coincides with a first position of the main color in the color wheel;
- determining all unit color channels corresponding to a second preset angle range in the color wheel as the auxiliary color channel, wherein a center of the second preset angle range coincides with a second position of the auxiliary color in the color wheel;
- and
- determining an unit color channel other than the main color channel and the auxiliary color channel in the color wheel as the variegated color channel.
Dependencies are inferred from the claim text.