View Source Evision.Alphamat (Evision v0.2.9)
Summary
Types
@type t() :: %Evision.Alphamat{ref: reference()}
Type that represents an Alphamat
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@spec infoFlow(Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Compute alpha matte of an object in an image
Positional Arguments
image:
Evision.Mat
.Input RGB image
tmap:
Evision.Mat
.Input greyscale trimap image
Return
result:
Evision.Mat.t()
.Output alpha matte image
The function infoFlow performs alpha matting on a RGB image using a greyscale trimap image, and outputs a greyscale alpha matte image. The output alpha matte can be used to softly extract the foreground object from a background image. Examples can be found in the samples directory.
Python prototype (for reference only):
infoFlow(image, tmap[, result]) -> result
@spec infoFlow( Evision.Mat.maybe_mat_in(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil ) :: Evision.Mat.t() | {:error, String.t()}
Compute alpha matte of an object in an image
Positional Arguments
image:
Evision.Mat
.Input RGB image
tmap:
Evision.Mat
.Input greyscale trimap image
Return
result:
Evision.Mat.t()
.Output alpha matte image
The function infoFlow performs alpha matting on a RGB image using a greyscale trimap image, and outputs a greyscale alpha matte image. The output alpha matte can be used to softly extract the foreground object from a background image. Examples can be found in the samples directory.
Python prototype (for reference only):
infoFlow(image, tmap[, result]) -> result