摘要 |
Provided is a transparency-based matting method and device, said method comprising: an original image to be matted is obtained, and edge detection is performed on the original image to obtain a detection result (101); according to the detection result, a global or local pixel serves as the neighboring pixel of a target pixel in the original image, the global pixel being a pixel obtained according to a global search algorithm in the original image, and the local pixel being a pixel obtained according to a local search algorithm in the original image (102); according to the original image and the neighboring image, the transparency value α of the target pixel in the original image is obtained; according to the transparency value, the target object is matted from the original image (103). The transparency-based matting method and device reduce matting errors and improve matting performance. |