Image processing method and device
Патент · CN B
Полный текст
The invention provides an image processing method and device, and belongs to the field of image processing. The image processing method comprises the steps of detecting head and shoulder areas of an original poster image by means of a head and shoulder area detection model trained in advance, detecting head and shoulder areas comprising the head and the shoulders of a person, cutting out a shoulder poster image corresponding to the head and shoulder areas, generating a corresponding trimap image by means of the shoulder poster image, inputting the shoulder poster image and the corresponding trimap image into a edge constraint matting algorithm model to obtain a portrait alpha image, and synthesizing the portrait alpha image with a new background to obtain a new poster image. The technical scheme of the invention can improve the accuracy of the poster portrait matting.