@Namespace(value="cv::cuda") @Properties(inherit=opencv_cudaoptflow.class) public class NvidiaOpticalFlow_2_0 extends NvidiaHWOpticalFlow
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Modifier and Type | Field and Description |
---|---|
static int |
NV_OF_HINT_VECTOR_GRID_SIZE_1
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_HINT_VECTOR_GRID_SIZE
|
static int |
NV_OF_HINT_VECTOR_GRID_SIZE_2
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_HINT_VECTOR_GRID_SIZE
|
static int |
NV_OF_HINT_VECTOR_GRID_SIZE_4
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_HINT_VECTOR_GRID_SIZE
|
static int |
NV_OF_HINT_VECTOR_GRID_SIZE_8
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_HINT_VECTOR_GRID_SIZE
|
static int |
NV_OF_HINT_VECTOR_GRID_SIZE_MAX
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_HINT_VECTOR_GRID_SIZE
|
static int |
NV_OF_HINT_VECTOR_GRID_SIZE_UNDEFINED
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_HINT_VECTOR_GRID_SIZE
|
static int |
NV_OF_OUTPUT_VECTOR_GRID_SIZE_1
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE
|
static int |
NV_OF_OUTPUT_VECTOR_GRID_SIZE_2
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE
|
static int |
NV_OF_OUTPUT_VECTOR_GRID_SIZE_4
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE
|
static int |
NV_OF_OUTPUT_VECTOR_GRID_SIZE_MAX
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE
|
static int |
NV_OF_OUTPUT_VECTOR_GRID_SIZE_UNDEFINED
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE
|
static int |
NV_OF_PERF_LEVEL_FAST
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_PERF_LEVEL
|
static int |
NV_OF_PERF_LEVEL_MAX
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_PERF_LEVEL
|
static int |
NV_OF_PERF_LEVEL_MEDIUM
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_PERF_LEVEL
|
static int |
NV_OF_PERF_LEVEL_SLOW
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_PERF_LEVEL
|
static int |
NV_OF_PERF_LEVEL_UNDEFINED
enum cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_PERF_LEVEL
|
Constructor and Description |
---|
NvidiaOpticalFlow_2_0(Algorithm pointer)
Downcast constructor.
|
NvidiaOpticalFlow_2_0(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
convertToFloat(GpuMat flow,
GpuMat floatFlow) |
void |
convertToFloat(Mat flow,
Mat floatFlow)
\brief convertToFloat() helper function converts the hardware-generated flow vectors to floating point representation (1 flow vector for gridSize).
|
void |
convertToFloat(UMat flow,
UMat floatFlow) |
static NvidiaOpticalFlow_2_0 |
create(Size imageSize) |
static NvidiaOpticalFlow_2_0 |
create(Size imageSize,
int perfPreset,
int outputGridSize,
int hintGridSize,
boolean enableTemporalHints,
boolean enableExternalHints,
boolean enableCostBuffer,
int gpuId,
Stream inputStream,
Stream outputStream)
\brief Instantiate NVIDIA Optical Flow
|
static NvidiaOpticalFlow_2_0 |
create(Size imageSize,
RectVector roiData) |
static NvidiaOpticalFlow_2_0 |
create(Size imageSize,
RectVector roiData,
int perfPreset,
int outputGridSize,
int hintGridSize,
boolean enableTemporalHints,
boolean enableExternalHints,
boolean enableCostBuffer,
int gpuId,
Stream inputStream,
Stream outputStream)
\brief Instantiate NVIDIA Optical Flow with ROI Feature
|
asAlgorithm, asAlgorithm, calc, calc, calc, calc, calc, calc, collectGarbage, getGridSize
clear, empty, getDefaultName, getPointer, position, read, save, save, write, write, write
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, 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 static final int NV_OF_OUTPUT_VECTOR_GRID_SIZE_UNDEFINED
public static final int NV_OF_OUTPUT_VECTOR_GRID_SIZE_1
public static final int NV_OF_OUTPUT_VECTOR_GRID_SIZE_2
public static final int NV_OF_OUTPUT_VECTOR_GRID_SIZE_4
public static final int NV_OF_OUTPUT_VECTOR_GRID_SIZE_MAX
public static final int NV_OF_HINT_VECTOR_GRID_SIZE_UNDEFINED
public static final int NV_OF_HINT_VECTOR_GRID_SIZE_1
public static final int NV_OF_HINT_VECTOR_GRID_SIZE_2
public static final int NV_OF_HINT_VECTOR_GRID_SIZE_4
public static final int NV_OF_HINT_VECTOR_GRID_SIZE_8
public static final int NV_OF_HINT_VECTOR_GRID_SIZE_MAX
public NvidiaOpticalFlow_2_0(Pointer p)
Pointer(Pointer)
.public NvidiaOpticalFlow_2_0(Algorithm pointer)
public void convertToFloat(@ByVal Mat flow, @ByVal Mat floatFlow)
flow
- Buffer of type CV_16FC2 containing flow vectors generated by calc().floatFlow
- Buffer of type CV_32FC2, containing flow vectors in floating point representation, each flow vector for 1 pixel per gridSize, in the pitch-linear layout.@opencv_core.Ptr public static NvidiaOpticalFlow_2_0 create(@ByVal Size imageSize, @Cast(value="cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_PERF_LEVEL") int perfPreset, @Cast(value="cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE") int outputGridSize, @Cast(value="cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_HINT_VECTOR_GRID_SIZE") int hintGridSize, @Cast(value="bool") boolean enableTemporalHints, @Cast(value="bool") boolean enableExternalHints, @Cast(value="bool") boolean enableCostBuffer, int gpuId, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream inputStream, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream outputStream)
imageSize
- Size 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.outputGridSize
- Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about output grid sizes.
Defaults to NV_OF_OUTPUT_VECTOR_GRID_SIZE_1.hintGridSize
- Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about hint grid sizes.
Defaults to NV_OF_HINT_VECTOR_GRID_SIZE_1.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.inputStream
- Optical flow algorithm may optionally involve cuda preprocessing on the input buffers.
The input cuda stream can be used to pipeline and synchronize the cuda preprocessing tasks with OF HW engine.
If input stream is not set, the execute function will use default stream which is NULL stream;outputStream
- Optical flow algorithm may optionally involve cuda post processing on the output flow vectors.
The output cuda stream can be used to pipeline and synchronize the cuda post processing tasks with OF HW engine.
If output stream is not set, the execute function will use default stream which is NULL stream;@opencv_core.Ptr public static NvidiaOpticalFlow_2_0 create(@ByVal Size imageSize)
@opencv_core.Ptr public static NvidiaOpticalFlow_2_0 create(@ByVal Size imageSize, @ByVal RectVector roiData, @Cast(value="cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_PERF_LEVEL") int perfPreset, @Cast(value="cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_OUTPUT_VECTOR_GRID_SIZE") int outputGridSize, @Cast(value="cv::cuda::NvidiaOpticalFlow_2_0::NVIDIA_OF_HINT_VECTOR_GRID_SIZE") int hintGridSize, @Cast(value="bool") boolean enableTemporalHints, @Cast(value="bool") boolean enableExternalHints, @Cast(value="bool") boolean enableCostBuffer, int gpuId, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream inputStream, @ByRef(nullValue="cv::cuda::Stream::Null()") Stream outputStream)
imageSize
- Size of input image in pixels.roiData
- Pointer to ROI data.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.outputGridSize
- Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about output grid sizes.
Defaults to NV_OF_OUTPUT_VECTOR_GRID_SIZE_1.hintGridSize
- Optional parameter. Refer [NV OF SDK documentation](https://developer.nvidia.com/opticalflow-sdk) for details about hint grid sizes.
Defaults to NV_OF_HINT_VECTOR_GRID_SIZE_1.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.inputStream
- Optical flow algorithm may optionally involve cuda preprocessing on the input buffers.
The input cuda stream can be used to pipeline and synchronize the cuda preprocessing tasks with OF HW engine.
If input stream is not set, the execute function will use default stream which is NULL stream;outputStream
- Optical flow algorithm may optionally involve cuda post processing on the output flow vectors.
The output cuda stream can be used to pipeline and synchronize the cuda post processing tasks with OF HW engine.
If output stream is not set, the execute function will use default stream which is NULL stream;@opencv_core.Ptr public static NvidiaOpticalFlow_2_0 create(@ByVal Size imageSize, @ByVal RectVector roiData)
Copyright © 2024. All rights reserved.