CPC G06T 5/70 (2024.01) [G06T 5/20 (2013.01); G06T 7/194 (2017.01); H04N 5/262 (2013.01); H04N 23/632 (2023.01); H04N 23/667 (2023.01); G06T 2207/10024 (2013.01); G06T 2207/20021 (2013.01); G06T 2207/20221 (2013.01)] | 18 Claims |
1. A method for processing an image, comprising:
obtaining a lens effect instruction, and determining a target blurring algorithm from a plurality of preset blurring algorithms based on the lens effect instruction, wherein the plurality of preset blurring algorithms are algorithms for simulating optical lens effects;
obtaining a target image by blurring an image to be processed based on the target blurring algorithm;
in response to a mobile terminal turning on an optical lens mode and switching from a first optical lens effect to a second optical lens effect, obtaining processing data of the image to be processed in a first blurring algorithm processing process corresponding to the first optical lens effect; and
performing image processing on the image to be processed based on the processing data by using a second blurring algorithm corresponding to the second optical lens effect;
wherein the optical lens effects comprise at least one of:
soft-focus bokeh effect, black and white bokeh effect, swirly bokeh effect and standard bokeh effect.
|