Class cv::VariationalRefinement#

Variational optical flow refinement. View details

Collaboration diagram for cv::VariationalRefinement:

Public Member Functions#

Public Member Functions inherited from cv::DenseOpticalFlow

Return

Name

Description

void

calc(
    InputArray I0,
    InputArray I1,
    InputOutputArray flow )

Calculates an optical flow.

void

collectGarbage()

Releases all inner buffers.

Public Member Functions inherited from cv::Algorithm

Return

Name

Description

Algorithm()

~Algorithm()

void

clear()

Clears the algorithm state.

bool

empty()

Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read.

String

getDefaultName()

void

read(const FileNode & fn)

Reads algorithm parameters from a file storage.

void

save(const String & filename)

void

write(
    const Ptr< FileStorage > & fs,
    const String & name = String() )

void

write(FileStorage & fs)

Stores algorithm parameters in a file storage.

void

write(
    FileStorage & fs,
    const String & name )

Static Public Member Functions#

Static Public Member Functions inherited from cv::Algorithm

Return

Name

Description

static Ptr< _Tp >

load(
    const String & filename,
    const String & objname = String() )

Loads algorithm from the file.

static Ptr< _Tp >

loadFromString(
    const String & strModel,
    const String & objname = String() )

Loads algorithm from a String.

static Ptr< _Tp >

read(const FileNode & fn)

Reads algorithm from the file node.

Additional Inherited Members#

Protected Member Functions inherited from cv::Algorithm

Return

Name

Description

void

writeFormat(FileStorage & fs)

Detailed Description#

Variational optical flow refinement.

This class implements variational refinement of the input flow field, i.e. it uses input flow to initialize the minimization of the following functional: \(E(U) = \int_{\Omega} \delta \Psi(E_I) + \gamma \Psi(E_G) + \alpha \Psi(E_S) \), where \(E_I,E_G,E_S\) are color constancy, gradient constancy and smoothness terms respectively. \(\Psi(s^2)=\sqrt{s^2+\epsilon^2}\) is a robust penalizer to limit the influence of outliers. A complete formulation and a description of the minimization procedure can be found in Brox2004

Member Function Documentation#

calcUV()#

void cv::VariationalRefinement::calcUV(
InputArray I0,
InputArray I1,
InputOutputArray flow_u,
InputOutputArray flow_v )

Python:

cv.VariationalRefinement.calcUV(I0, I1, flow_u, flow_v) -> flow_u, flow_v

calc function overload to handle separate horizontal (u) and vertical (v) flow components (to avoid extra splits/merges)

getAlpha()#

float cv::VariationalRefinement::getAlpha()

Python:

cv.VariationalRefinement.getAlpha() -> retval

Weight of the smoothness term.

See also

setAlpha

getDelta()#

float cv::VariationalRefinement::getDelta()

Python:

cv.VariationalRefinement.getDelta() -> retval

Weight of the color constancy term.

See also

setDelta

getEpsilon()#

float cv::VariationalRefinement::getEpsilon()

Python:

cv.VariationalRefinement.getEpsilon() -> retval

Norm value shift for robust penalizer.

See also

setEpsilon

getFixedPointIterations()#

int cv::VariationalRefinement::getFixedPointIterations()

Python:

cv.VariationalRefinement.getFixedPointIterations() -> retval

Number of outer (fixed-point) iterations in the minimization procedure.

getGamma()#

float cv::VariationalRefinement::getGamma()

Python:

cv.VariationalRefinement.getGamma() -> retval

Weight of the gradient constancy term.

See also

setGamma

getOmega()#

float cv::VariationalRefinement::getOmega()

Python:

cv.VariationalRefinement.getOmega() -> retval

Relaxation factor in SOR.

See also

setOmega

getSorIterations()#

int cv::VariationalRefinement::getSorIterations()

Python:

cv.VariationalRefinement.getSorIterations() -> retval

Number of inner successive over-relaxation (SOR) iterations in the minimization procedure to solve the respective linear system.

See also

setSorIterations

setAlpha()#

void cv::VariationalRefinement::setAlpha(float val)

Python:

cv.VariationalRefinement.setAlpha(val)

Weight of the smoothness term.

See also

getAlpha

setDelta()#

void cv::VariationalRefinement::setDelta(float val)

Python:

cv.VariationalRefinement.setDelta(val)

Weight of the color constancy term.

See also

getDelta

setEpsilon()#

void cv::VariationalRefinement::setEpsilon(float val)

Python:

cv.VariationalRefinement.setEpsilon(val)

Norm value shift for robust penalizer.

See also

getEpsilon

setFixedPointIterations()#

void cv::VariationalRefinement::setFixedPointIterations(int val)

Python:

cv.VariationalRefinement.setFixedPointIterations(val)

Number of outer (fixed-point) iterations in the minimization procedure.

setGamma()#

void cv::VariationalRefinement::setGamma(float val)

Python:

cv.VariationalRefinement.setGamma(val)

Weight of the gradient constancy term.

See also

getGamma

setOmega()#

void cv::VariationalRefinement::setOmega(float val)

Python:

cv.VariationalRefinement.setOmega(val)

Relaxation factor in SOR.

See also

getOmega

setSorIterations()#

void cv::VariationalRefinement::setSorIterations(int val)

Python:

cv.VariationalRefinement.setSorIterations(val)

Number of inner successive over-relaxation (SOR) iterations in the minimization procedure to solve the respective linear system.

See also

getSorIterations

create()#

static Ptr< VariationalRefinement > cv::VariationalRefinement::create()

Python:

cv.VariationalRefinement.create() -> retval
cv.VariationalRefinement_create() -> retval

Creates an instance of VariationalRefinement.

Source file#

The documentation for this class was generated from the following file: