@Namespace(value="cv") @Properties(inherit=opencv_video.class) public class DISOpticalFlow extends DenseOpticalFlow
This class implements the Dense Inverse Search (DIS) optical flow algorithm. More details about the algorithm can be found at \cite Kroeger2016 . Includes three presets with preselected parameters to provide reasonable trade-off between speed and quality. However, even the slowest preset is still relatively fast, use DeepFlow if you need better quality and don't care about speed.
This implementation includes several additional features compared to the algorithm described in the paper, including spatial propagation of flow vectors (\ref getUseSpatialPropagation), as well as an option to utilize an initial flow approximation passed to \ref calc (which is, essentially, temporal propagation, if the previous frame's flow field is passed).
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Modifier and Type | Field and Description |
---|---|
static int |
PRESET_FAST
enum cv::DISOpticalFlow::
|
static int |
PRESET_MEDIUM
enum cv::DISOpticalFlow::
|
static int |
PRESET_ULTRAFAST
enum cv::DISOpticalFlow::
|
Constructor and Description |
---|
DISOpticalFlow(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
static DISOpticalFlow |
create() |
static DISOpticalFlow |
create(int preset)
\brief Creates an instance of DISOpticalFlow
|
int |
getFinestScale()
\brief Finest level of the Gaussian pyramid on which the flow is computed (zero level
corresponds to the original image resolution).
|
int |
getGradientDescentIterations()
\brief Maximum number of gradient descent iterations in the patch inverse search stage.
|
int |
getPatchSize()
\brief Size of an image patch for matching (in pixels).
|
int |
getPatchStride()
\brief Stride between neighbor patches.
|
boolean |
getUseMeanNormalization()
\brief Whether to use mean-normalization of patches when computing patch distance.
|
boolean |
getUseSpatialPropagation()
\brief Whether to use spatial propagation of good optical flow vectors.
|
float |
getVariationalRefinementAlpha()
\brief Weight of the smoothness term
|
float |
getVariationalRefinementDelta()
\brief Weight of the color constancy term
|
float |
getVariationalRefinementGamma()
\brief Weight of the gradient constancy term
|
int |
getVariationalRefinementIterations()
\brief Number of fixed point iterations of variational refinement per scale.
|
void |
setFinestScale(int val)
\copybrief getFinestScale @see getFinestScale
|
void |
setGradientDescentIterations(int val)
\copybrief getGradientDescentIterations @see getGradientDescentIterations
|
void |
setPatchSize(int val)
\copybrief getPatchSize @see getPatchSize
|
void |
setPatchStride(int val)
\copybrief getPatchStride @see getPatchStride
|
void |
setUseMeanNormalization(boolean val)
\copybrief getUseMeanNormalization @see getUseMeanNormalization
|
void |
setUseSpatialPropagation(boolean val)
\copybrief getUseSpatialPropagation @see getUseSpatialPropagation
|
void |
setVariationalRefinementAlpha(float val)
\copybrief getVariationalRefinementAlpha @see getVariationalRefinementAlpha
|
void |
setVariationalRefinementDelta(float val)
\copybrief getVariationalRefinementDelta @see getVariationalRefinementDelta
|
void |
setVariationalRefinementGamma(float val)
\copybrief getVariationalRefinementGamma @see getVariationalRefinementGamma
|
void |
setVariationalRefinementIterations(int val)
\copybrief getGradientDescentIterations @see getGradientDescentIterations
|
calc, calc, calc, collectGarbage
clear, empty, getDefaultName, position, read, save, save, write, write, write
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zero
public static final int PRESET_ULTRAFAST
public static final int PRESET_FAST
public static final int PRESET_MEDIUM
public DISOpticalFlow(Pointer p)
Pointer.Pointer(Pointer)
.public int getFinestScale()
setFinestScale
public void setFinestScale(int val)
public int getPatchSize()
setPatchSize
public void setPatchSize(int val)
public int getPatchStride()
setPatchStride
public void setPatchStride(int val)
public int getGradientDescentIterations()
setGradientDescentIterations
public void setGradientDescentIterations(int val)
public int getVariationalRefinementIterations()
setGradientDescentIterations
public void setVariationalRefinementIterations(int val)
public float getVariationalRefinementAlpha()
setVariationalRefinementAlpha
public void setVariationalRefinementAlpha(float val)
public float getVariationalRefinementDelta()
setVariationalRefinementDelta
public void setVariationalRefinementDelta(float val)
public float getVariationalRefinementGamma()
setVariationalRefinementGamma
public void setVariationalRefinementGamma(float val)
@Cast(value="bool") public boolean getUseMeanNormalization()
setUseMeanNormalization
public void setUseMeanNormalization(@Cast(value="bool") boolean val)
@Cast(value="bool") public boolean getUseSpatialPropagation()
setUseSpatialPropagation
public void setUseSpatialPropagation(@Cast(value="bool") boolean val)
@opencv_core.Ptr public static DISOpticalFlow create(int preset)
preset
- one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM@opencv_core.Ptr public static DISOpticalFlow create()
Copyright © 2020. All rights reserved.