Abstract

An important step of many image editing tasks is to extract specific objects from an image in order to place them in a scene of a movie or compose them onto another background. Alpha matting describes the problem of separating the objects in the foreground from the background of an image given only a rough sketch. We introduce the PyMatting package for Python which implements various approaches to solve the alpha matting problem. Our toolbox is also able to extract the foreground of an image given the alpha matte. The implementation aims to be computationally efficient and easy to use. The source code of PyMatting is available under an open-source license at https://github.com/pymatting/pymatting.

Highlights

  • A fundamental problem of many image processing tasks is the extraction of specific objects from an image in order to place them in a scene of a movie or compose them onto another background

  • Alpha matting describes the problem of separating the objects in the foreground from the background of an image given only a rough sketch

  • Alpha matting has been applied to medical image analysis (Fan et al, 2019; Yin, Li, Kanade, & Chen, 2010) and microscopy image restoration (Kanade et al, 2011)

Read more

Summary

Summary

A fundamental problem of many image processing tasks is the extraction of specific objects from an image in order to place them in a scene of a movie or compose them onto another background. Alpha matting describes the problem of separating the objects in the foreground from the background of an image given only a rough sketch. For an image I with foreground pixels F and background pixels B, alpha matting asks to determine opacities α, such that the equality. This problem is ill-posed since, for each pixel, we have three equations (one for each color channel) with seven unknown variables. The implemented methods rely on a trimap, which is a rough classification of the input image into foreground, background and unknown pixels, to further constrain the problem. The implementation aims to be computationally efficient and easy to use

Implemented Methods for Alpha Matting
Implemented Methods for Foreground Estimation
Installation and Code Example
Performance Comparison
PyAMG PETSc
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call