US 12,394,174 B2
Image processing method and apparatus, computer device, and storage medium
Junyu Liu, Shenzhen (CN)
Assigned to TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED, Shenzhen (CN)
Filed by TENCENT TECHNOLOGY (SHENZHEN) COMPANY LIMITED, Shenzhen (CN)
Filed on Nov. 23, 2022, as Appl. No. 17/993,848.
Application 17/993,848 is a continuation of application No. PCT/CN2022/080696, filed on Mar. 14, 2022.
Claims priority of application No. 202110296922.1 (CN), filed on Mar. 19, 2021.
Prior Publication US 2023/0091549 A1, Mar. 23, 2023
Int. Cl. G06V 10/46 (2022.01); G06T 5/30 (2006.01); G06T 7/10 (2017.01); G06V 40/16 (2022.01)
CPC G06V 10/462 (2022.01) [G06T 5/30 (2013.01); G06T 7/10 (2017.01); G06V 40/161 (2022.01); G06T 2207/20132 (2013.01); G06T 2207/20221 (2013.01)] 17 Claims
OG exemplary drawing
 
1. An image processing method, performed by a computer device, the method comprising:
performing target object detection on an initial image to obtain an object detection result, the object detection result comprising a first region containing a face in the initial image;
performing image saliency detection on the initial image to obtain a saliency detection result, the saliency detection result comprising a second region containing a saliency feature in the initial image;
cropping the initial image based on the object detection result and the saliency detection result to obtain a corresponding cropped image;
acquiring an image template for indicating an image style, and acquiring layer information corresponding to the image template; and
adding the layer information to the cropped image based on the image template to obtain a target image corresponding to the image style indicated by the image template, comprising:
determining, in response to the type of the layer information being a non-fixed layer, a second layer placement region corresponding to the cropped image based on the image template;
determining a first intersection region between the second layer placement region and the first region, determining a second intersection region between the second layer placement region and the second region, and merging the first intersection region and the second intersection region to obtain a corresponding merged region;
acquiring a layer size of the layer information, and selecting, among a plurality of candidate target regions corresponding to the layer size within the second layer placement region, a region minimally intersecting with the merged region as the target region; and
adding the layer information to the target region.