@Namespace(value="cv::cuda") @Properties(inherit=opencv_cudaoptflow.class) public class NvidiaOpticalFlow_1_0 extends NvidiaHWOpticalFlow
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Modifier and Type | Field and Description |
---|---|
static int |
NV_OF_PERF_LEVEL_FAST
enum cv::cuda::NvidiaOpticalFlow_1_0::NVIDIA_OF_PERF_LEVEL
|
static int |
NV_OF_PERF_LEVEL_MAX
enum cv::cuda::NvidiaOpticalFlow_1_0::NVIDIA_OF_PERF_LEVEL
|
static int |
NV_OF_PERF_LEVEL_MEDIUM
enum cv::cuda::NvidiaOpticalFlow_1_0::NVIDIA_OF_PERF_LEVEL
|
static int |
NV_OF_PERF_LEVEL_SLOW
enum cv::cuda::NvidiaOpticalFlow_1_0::NVIDIA_OF_PERF_LEVEL
|
static int |
NV_OF_PERF_LEVEL_UNDEFINED
enum cv::cuda::NvidiaOpticalFlow_1_0::NVIDIA_OF_PERF_LEVEL
|
Constructor and Description |
---|
NvidiaOpticalFlow_1_0(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
static NvidiaOpticalFlow_1_0 |
create(int width,
int height) |
static NvidiaOpticalFlow_1_0 |
create(int width,
int height,
int perfPreset,
boolean enableTemporalHints,
boolean enableExternalHints,
boolean enableCostBuffer,
int gpuId)
\brief Instantiate NVIDIA Optical Flow
|
void |
upSampler(GpuMat flow,
int width,
int height,
int gridSize,
GpuMat upsampledFlow) |
void |
upSampler(Mat flow,
int width,
int height,
int gridSize,
Mat upsampledFlow)
\brief The NVIDIA optical flow hardware generates flow vectors at granularity gridSize, which can be queried via function getGridSize().
|
void |
upSampler(UMat flow,
int width,
int height,
int gridSize,
UMat upsampledFlow) |
calc, calc, calc, calc, calc, calc, collectGarbage, getGridSize
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 NV_OF_PERF_LEVEL_UNDEFINED
public static final int NV_OF_PERF_LEVEL_SLOW
public static final int NV_OF_PERF_LEVEL_MEDIUM
public static final int NV_OF_PERF_LEVEL_FAST
public static final int NV_OF_PERF_LEVEL_MAX
public NvidiaOpticalFlow_1_0(Pointer p)
Pointer.Pointer(Pointer)
.public void upSampler(@ByVal Mat flow, int width, int height, int gridSize, @ByVal Mat upsampledFlow)
flow
- Buffer of type CV_16FC2 containing flow vectors generated by calc().width
- Width of the input image in pixels for which these flow vectors were generated.height
- Height of the input image in pixels for which these flow vectors were generated.gridSize
- Granularity of the optical flow vectors returned by calc() function. Can be queried using getGridSize().upsampledFlow
- Buffer of type CV_32FC2, containing upsampled flow vectors, each flow vector for 1 pixel, in the pitch-linear layout.public void upSampler(@ByVal UMat flow, int width, int height, int gridSize, @ByVal UMat upsampledFlow)
public void upSampler(@ByVal GpuMat flow, int width, int height, int gridSize, @ByVal GpuMat upsampledFlow)
@opencv_core.Ptr public static NvidiaOpticalFlow_1_0 create(int width, int height, @Cast(value="cv::cuda::NvidiaOpticalFlow_1_0::NVIDIA_OF_PERF_LEVEL") int perfPreset, @Cast(value="bool") boolean enableTemporalHints, @Cast(value="bool") boolean enableExternalHints, @Cast(value="bool") boolean enableCostBuffer, int gpuId)
width
- Width of input image in pixels.height
- Height of input image in pixels.perfPreset
- Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about presets.
Defaults to NV_OF_PERF_LEVEL_SLOW.enableTemporalHints
- Optional parameter. Flag to enable temporal hints. When set to true, the hardware uses the flow vectors
generated in previous call to calc() as internal hints for the current call to calc().
Useful when computing flow vectors between successive video frames. Defaults to false.enableExternalHints
- Optional Parameter. Flag to enable passing external hints buffer to calc(). Defaults to false.enableCostBuffer
- Optional Parameter. Flag to enable cost buffer output from calc(). Defaults to false.gpuId
- Optional parameter to select the GPU ID on which the optical flow should be computed. Useful in multi-GPU systems. Defaults to 0.@opencv_core.Ptr public static NvidiaOpticalFlow_1_0 create(int width, int height)
Copyright © 2020. All rights reserved.