View Source Evision.Alphamat (Evision v0.2.9)

Summary

Types

t()

Type that represents an Alphamat struct.

Functions

Compute alpha matte of an object in an image

Compute alpha matte of an object in an image

Types

@type t() :: %Evision.Alphamat{ref: reference()}

Type that represents an Alphamat struct.

  • ref. reference()

    The underlying erlang resource variable.

Functions

@spec infoFlow(Keyword.t()) :: any() | {:error, String.t()}

Compute alpha matte of an object in an image

Positional Arguments
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
Link to this function

infoFlow(image, tmap, opts)

View Source
@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
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