OpenCV for Unity 2.6.4
Enox Software / Please refer to OpenCV official document ( http://docs.opencv.org/4.10.0/index.html ) for the details of the argument of the method.
|
DIS optical flow algorithm. More...
Public Member Functions | |
int | getFinestScale () |
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. | |
int | getGradientDescentIterations () |
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases. | |
int | getPatchSize () |
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases. | |
int | getPatchStride () |
Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality. | |
bool | getUseMeanNormalization () |
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. | |
bool | getUseSpatialPropagation () |
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. | |
float | getVariationalRefinementAlpha () |
Weight of the smoothness term. | |
float | getVariationalRefinementDelta () |
Weight of the color constancy term. | |
float | getVariationalRefinementEpsilon () |
Norm value shift for robust penalizer. | |
float | getVariationalRefinementGamma () |
Weight of the gradient constancy term. | |
int | getVariationalRefinementIterations () |
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. | |
void | setFinestScale (int val) |
void | setGradientDescentIterations (int val) |
void | setPatchSize (int val) |
void | setPatchStride (int val) |
void | setUseMeanNormalization (bool val) |
void | setUseSpatialPropagation (bool val) |
void | setVariationalRefinementAlpha (float val) |
void | setVariationalRefinementDelta (float val) |
void | setVariationalRefinementEpsilon (float val) |
void | setVariationalRefinementGamma (float val) |
void | setVariationalRefinementIterations (int val) |
Public Member Functions inherited from OpenCVForUnity.VideoModule.DenseOpticalFlow | |
void | calc (Mat I0, Mat I1, Mat flow) |
Calculates an optical flow. | |
void | collectGarbage () |
Releases all inner buffers. | |
Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
virtual void | clear () |
Clears the algorithm state. | |
virtual bool | empty () |
Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. | |
virtual string | getDefaultName () |
IntPtr | getNativeObjAddr () |
void | save (string filename) |
Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
void | Dispose () |
void | ThrowIfDisposed () |
Static Public Member Functions | |
static new DISOpticalFlow | __fromPtr__ (IntPtr addr) |
static DISOpticalFlow | create () |
Creates an instance of DISOpticalFlow. | |
static DISOpticalFlow | create (int preset) |
Creates an instance of DISOpticalFlow. | |
Static Public Member Functions inherited from OpenCVForUnity.VideoModule.DenseOpticalFlow | |
static new DenseOpticalFlow | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
static Algorithm | __fromPtr__ (IntPtr addr) |
Static Public Member Functions inherited from OpenCVForUnity.DisposableObject | |
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
Static Public Attributes | |
const int | PRESET_FAST = 1 |
const int | PRESET_MEDIUM = 2 |
const int | PRESET_ULTRAFAST = 0 |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.VideoModule.DenseOpticalFlow | |
Protected Member Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Protected Member Functions inherited from OpenCVForUnity.DisposableOpenCVObject | |
DisposableOpenCVObject () | |
DisposableOpenCVObject (bool isEnabledDispose) | |
DisposableOpenCVObject (IntPtr ptr) | |
DisposableOpenCVObject (IntPtr ptr, bool isEnabledDispose) | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from OpenCVForUnity.DisposableObject | |
DisposableObject () | |
DisposableObject (bool isEnabledDispose) | |
Additional Inherited Members | |
Package Functions inherited from OpenCVForUnity.VideoModule.DenseOpticalFlow | |
Package Functions inherited from OpenCVForUnity.CoreModule.Algorithm | |
Package Attributes inherited from OpenCVForUnity.DisposableOpenCVObject | |
Properties inherited from OpenCVForUnity.DisposableObject | |
bool | IsDisposed [get, protected set] |
bool | IsEnabledDispose [get, set] |
DIS optical flow algorithm.
This class implements the Dense Inverse Search (DIS) optical flow algorithm. More details about the algorithm can be found at [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 (getUseSpatialPropagation), as well as an option to utilize an initial flow approximation passed to calc (which is, essentially, temporal propagation, if the previous frame's flow field is passed).
|
static |
|
static |
Creates an instance of DISOpticalFlow.
preset | one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM |
|
static |
Creates an instance of DISOpticalFlow.
preset | one of PRESET_ULTRAFAST, PRESET_FAST and PRESET_MEDIUM |
|
protectedvirtual |
Reimplemented from OpenCVForUnity.VideoModule.DenseOpticalFlow.
int OpenCVForUnity.VideoModule.DISOpticalFlow.getFinestScale | ( | ) |
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.
int OpenCVForUnity.VideoModule.DISOpticalFlow.getGradientDescentIterations | ( | ) |
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
int OpenCVForUnity.VideoModule.DISOpticalFlow.getPatchSize | ( | ) |
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.
int OpenCVForUnity.VideoModule.DISOpticalFlow.getPatchStride | ( | ) |
Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.
bool OpenCVForUnity.VideoModule.DISOpticalFlow.getUseMeanNormalization | ( | ) |
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.
bool OpenCVForUnity.VideoModule.DISOpticalFlow.getUseSpatialPropagation | ( | ) |
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.
float OpenCVForUnity.VideoModule.DISOpticalFlow.getVariationalRefinementAlpha | ( | ) |
Weight of the smoothness term.
float OpenCVForUnity.VideoModule.DISOpticalFlow.getVariationalRefinementDelta | ( | ) |
Weight of the color constancy term.
float OpenCVForUnity.VideoModule.DISOpticalFlow.getVariationalRefinementEpsilon | ( | ) |
Norm value shift for robust penalizer.
float OpenCVForUnity.VideoModule.DISOpticalFlow.getVariationalRefinementGamma | ( | ) |
Weight of the gradient constancy term.
int OpenCVForUnity.VideoModule.DISOpticalFlow.getVariationalRefinementIterations | ( | ) |
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.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setFinestScale | ( | int | val | ) |
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.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setGradientDescentIterations | ( | int | val | ) |
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setPatchSize | ( | int | val | ) |
Size of an image patch for matching (in pixels). Normally, default 8x8 patches work well enough in most cases.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setPatchStride | ( | int | val | ) |
Stride between neighbor patches. Must be less than patch size. Lower values correspond to higher flow quality.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setUseMeanNormalization | ( | bool | val | ) |
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.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setUseSpatialPropagation | ( | bool | val | ) |
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.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setVariationalRefinementAlpha | ( | float | val | ) |
Weight of the smoothness term.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setVariationalRefinementDelta | ( | float | val | ) |
Weight of the color constancy term.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setVariationalRefinementEpsilon | ( | float | val | ) |
Norm value shift for robust penalizer.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setVariationalRefinementGamma | ( | float | val | ) |
Weight of the gradient constancy term.
void OpenCVForUnity.VideoModule.DISOpticalFlow.setVariationalRefinementIterations | ( | int | val | ) |
Maximum number of gradient descent iterations in the patch inverse search stage. Higher values may improve quality in some cases.
|
static |
|
static |
|
static |