View Source Evision.DISOpticalFlow (Evision v0.1.21)

Link to this section Summary

Types

t()

Type that represents an Evision.DISOpticalFlow struct.

Functions

Creates an instance of DISOpticalFlow

Creates an instance of DISOpticalFlow

Finest level of the Gaussian pyramid on which the flow is computed (zero level corresponds to the original image resolution). The final flow is obtained by bilinear upscaling.

Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.

Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.

Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.

Whether to use mean-normalization of patches when computing patch distance. It is turned on by default as it typically provides a noticeable quality boost because of increased robustness to illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes in illumination.

Whether to use spatial propagation of good optical flow vectors. This option is turned on by default, as it tends to work better on average and can sometimes help recover from major errors introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this option off can make the output flow field a bit smoother, however.

Weight of the smoothness term

Weight of the color constancy term

Weight of the gradient constancy term

Number of fixed point iterations of variational refinement per scale. Set to zero to disable variational refinement completely. Higher values will typically result in more smooth and high-quality flow.

setFinestScale

setGradientDescentIterations

setPatchStride

setUseMeanNormalization

setUseSpatialPropagation

setVariationalRefinementAlpha

setVariationalRefinementDelta

setVariationalRefinementGamma

setVariationalRefinementIterations

Link to this section Types

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

Type that represents an Evision.DISOpticalFlow struct.

  • ref. reference()

    The underlying erlang resource variable.

Link to this section Functions

@spec create() :: t() | {:error, String.t()}

Creates an instance of DISOpticalFlow

Keyword Arguments
  • preset: int.

    one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM

Return

Python prototype (for reference only):

create([, preset]) -> retval
@spec create([{atom(), term()}, ...] | nil) :: t() | {:error, String.t()}

Creates an instance of DISOpticalFlow

Keyword Arguments
  • preset: int.

    one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM

Return

Python prototype (for reference only):

create([, preset]) -> retval
@spec getFinestScale(t()) :: integer() | {:error, String.t()}

Finest level of the Gaussian pyramid on which the flow is computed (zero level corresponds to the original image resolution). The final flow is obtained by bilinear upscaling.

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: int

@see setFinestScale/2

Python prototype (for reference only):

getFinestScale() -> retval
Link to this function

getGradientDescentIterations(self)

View Source
@spec getGradientDescentIterations(t()) :: integer() | {:error, String.t()}

Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: int

@see setGradientDescentIterations/2

Python prototype (for reference only):

getGradientDescentIterations() -> retval
@spec getPatchSize(t()) :: integer() | {:error, String.t()}

Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: int

@see setPatchSize/2

Python prototype (for reference only):

getPatchSize() -> retval
@spec getPatchStride(t()) :: integer() | {:error, String.t()}

Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: int

@see setPatchStride/2

Python prototype (for reference only):

getPatchStride() -> retval
Link to this function

getUseMeanNormalization(self)

View Source
@spec getUseMeanNormalization(t()) :: boolean() | {:error, String.t()}

Whether to use mean-normalization of patches when computing patch distance. It is turned on by default as it typically provides a noticeable quality boost because of increased robustness to illumination variations. Turn it off if you are certain that your sequence doesn't contain any changes in illumination.

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: bool

@see setUseMeanNormalization/2

Python prototype (for reference only):

getUseMeanNormalization() -> retval
Link to this function

getUseSpatialPropagation(self)

View Source
@spec getUseSpatialPropagation(t()) :: boolean() | {:error, String.t()}

Whether to use spatial propagation of good optical flow vectors. This option is turned on by default, as it tends to work better on average and can sometimes help recover from major errors introduced by the coarse-to-fine scheme employed by the DIS optical flow algorithm. Turning this option off can make the output flow field a bit smoother, however.

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: bool

@see setUseSpatialPropagation/2

Python prototype (for reference only):

getUseSpatialPropagation() -> retval
Link to this function

getVariationalRefinementAlpha(self)

View Source
@spec getVariationalRefinementAlpha(t()) :: number() | {:error, String.t()}

Weight of the smoothness term

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: float

@see setVariationalRefinementAlpha/2

Python prototype (for reference only):

getVariationalRefinementAlpha() -> retval
Link to this function

getVariationalRefinementDelta(self)

View Source
@spec getVariationalRefinementDelta(t()) :: number() | {:error, String.t()}

Weight of the color constancy term

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: float

@see setVariationalRefinementDelta/2

Python prototype (for reference only):

getVariationalRefinementDelta() -> retval
Link to this function

getVariationalRefinementGamma(self)

View Source
@spec getVariationalRefinementGamma(t()) :: number() | {:error, String.t()}

Weight of the gradient constancy term

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: float

@see setVariationalRefinementGamma/2

Python prototype (for reference only):

getVariationalRefinementGamma() -> retval
Link to this function

getVariationalRefinementIterations(self)

View Source
@spec getVariationalRefinementIterations(t()) :: integer() | {:error, String.t()}

Number of fixed point iterations of variational refinement per scale. Set to zero to disable variational refinement completely. Higher values will typically result in more smooth and high-quality flow.

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
Return
  • retval: int

@see setGradientDescentIterations/2

Python prototype (for reference only):

getVariationalRefinementIterations() -> retval
Link to this function

setFinestScale(self, val)

View Source
@spec setFinestScale(t(), integer()) :: :ok | {:error, String.t()}

setFinestScale

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: int

@see getFinestScale/1

Python prototype (for reference only):

setFinestScale(val) -> None
Link to this function

setGradientDescentIterations(self, val)

View Source
@spec setGradientDescentIterations(t(), integer()) :: :ok | {:error, String.t()}

setGradientDescentIterations

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: int

@see getGradientDescentIterations/1

Python prototype (for reference only):

setGradientDescentIterations(val) -> None
@spec setPatchSize(t(), integer()) :: :ok | {:error, String.t()}

setPatchSize

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: int

@see getPatchSize/1

Python prototype (for reference only):

setPatchSize(val) -> None
Link to this function

setPatchStride(self, val)

View Source
@spec setPatchStride(t(), integer()) :: :ok | {:error, String.t()}

setPatchStride

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: int

@see getPatchStride/1

Python prototype (for reference only):

setPatchStride(val) -> None
Link to this function

setUseMeanNormalization(self, val)

View Source
@spec setUseMeanNormalization(t(), boolean()) :: :ok | {:error, String.t()}

setUseMeanNormalization

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: bool

@see getUseMeanNormalization/1

Python prototype (for reference only):

setUseMeanNormalization(val) -> None
Link to this function

setUseSpatialPropagation(self, val)

View Source
@spec setUseSpatialPropagation(t(), boolean()) :: :ok | {:error, String.t()}

setUseSpatialPropagation

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: bool

@see getUseSpatialPropagation/1

Python prototype (for reference only):

setUseSpatialPropagation(val) -> None
Link to this function

setVariationalRefinementAlpha(self, val)

View Source
@spec setVariationalRefinementAlpha(t(), number()) :: :ok | {:error, String.t()}

setVariationalRefinementAlpha

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: float

@see getVariationalRefinementAlpha/1

Python prototype (for reference only):

setVariationalRefinementAlpha(val) -> None
Link to this function

setVariationalRefinementDelta(self, val)

View Source
@spec setVariationalRefinementDelta(t(), number()) :: :ok | {:error, String.t()}

setVariationalRefinementDelta

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: float

@see getVariationalRefinementDelta/1

Python prototype (for reference only):

setVariationalRefinementDelta(val) -> None
Link to this function

setVariationalRefinementGamma(self, val)

View Source
@spec setVariationalRefinementGamma(t(), number()) :: :ok | {:error, String.t()}

setVariationalRefinementGamma

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: float

@see getVariationalRefinementGamma/1

Python prototype (for reference only):

setVariationalRefinementGamma(val) -> None
Link to this function

setVariationalRefinementIterations(self, val)

View Source
@spec setVariationalRefinementIterations(t(), integer()) :: :ok | {:error, String.t()}

setVariationalRefinementIterations

Positional Arguments
  • self: Evision.DISOpticalFlow.t()
  • val: int

@see getGradientDescentIterations/1

Python prototype (for reference only):

setVariationalRefinementIterations(val) -> None