View Source Evision.Alphamat (Evision v0.1.26-rc2)

Link to this section 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

Link to this section Types

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

Type that represents an Alphamat struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

Compute alpha matte of an object in an image

Positional Arguments
Return

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

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