You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* The size of the block depends on hardware in use, and can be queried using the function getGridSize().
115
+
* The block-based flow vectors generated by the hardware can be converted to dense representation (i.e. per-pixel flow vectors) using upSampler() helper function, if needed.
116
+
* The flow vectors are stored in CV_16SC2 format with x and y components of each flow vector in 16-bit signed fixed point representation S10.5.
117
+
118
+
@param inputImage Input image.
119
+
@param referenceImage Reference image of the same size and the same type as input image.
120
+
@param flow A buffer consisting of inputImage.Size() / getGridSize() flow vectors in CV_16SC2 format.
121
+
@param stream Stream for the asynchronous version.
122
+
@param hint Hint buffer if client provides external hints. Must have same size as flow buffer.
123
+
Caller can provide flow vectors as hints for optical flow calculation.
124
+
@param cost Cost buffer contains numbers indicating the confidence associated with each of the generated flow vectors.
125
+
Higher the cost, lower the confidence. Cost buffer is of type CV_32SC1.
126
+
127
+
@note
128
+
- Client must use critical sections around each calc() function if calling it from multiple threads.
129
+
*/
130
+
CV_WRAP virtualvoidcalc(
131
+
InputArray inputImage,
132
+
InputArray referenceImage,
133
+
InputOutputArray flow,
134
+
Stream& stream = Stream::Null(),
135
+
InputArray hint = cv::noArray(),
136
+
OutputArray cost = cv::noArray()) = 0;
137
+
138
+
/** @brief Releases all buffers, contexts and device pointers.
139
+
*/
140
+
CV_WRAP virtualvoidcollectGarbage() = 0;
141
+
142
+
/** @brief Returns grid size of output buffer as per the hardware's capability.
143
+
*/
144
+
CV_WRAP virtualintgetGridSize() const = 0;
145
+
};
105
146
106
147
//
107
148
// BroxOpticalFlow
@@ -342,6 +383,70 @@ class CV_EXPORTS_W OpticalFlowDual_TVL1 : public DenseOpticalFlow
342
383
bool useInitialFlow = false);
343
384
};
344
385
386
+
//
387
+
// NvidiaOpticalFlow
388
+
//
389
+
390
+
/** @brief Class for computing the optical flow vectors between two images using NVIDIA Optical Flow hardware and Optical Flow SDK 1.0.
391
+
@note
392
+
- A sample application demonstrating the use of NVIDIA Optical Flow can be found at
0 commit comments