|
|
Line 15: |
Line 15: |
| |} | | |} |
|
| |
|
| ===Parameters=== | | ====Parameters==== |
| | {| |
| | |style="font-size:75%;"| |
| {|class="wikitable" | | {|class="wikitable" |
| |- | | |- |
Line 53: |
Line 55: |
| | CuviStream* | | | CuviStream* |
| | GPU stream ID for execution | | | GPU stream ID for execution |
|
| |
| |} | | |} |
| | | |} |
|
| |
|
| ===Image Type Support=== | | ===Image Type Support=== |
Revision as of 22:14, 18 October 2022
Function
CuviStatus opticalFlowHS(const CuviImage& previous,
const CuviImage& next,
Cuvi32f* flowX,
Cuvi32f* flowY,
const bool usePrevious,
const Cuvi32f lambda = 1.0f ,
const Cuvi32s iterations = 1,
const CuviStream& stream = CuviStream());
|
Parameters
Name
|
Type
|
Description
|
previous
|
const CuviImage&
|
The first image whose features are to be tracked
|
next
|
const CuviImage&
|
Second image, in which to look for features of first image
|
flowX
|
Cuvi32f*
|
Horizontal velocity vector
|
flowY
|
Cuvi32f*
|
Vertical velocity vector
|
usePrevious
|
bool
|
use previous (input) velocity field
|
lambda
|
const Cuvi32f
|
Lagrangian multiplier
|
iterations
|
const Cuvi32s
|
Maximum number of iterations
|
stream
|
CuviStream*
|
GPU stream ID for execution
|
|
Image Type Support
Sample
Error creating thumbnail: Unable to save thumbnail to destination
Example
//Create two 8-bit Grays-scale CuviImage
CuviImage gimg1 = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_GRAYSCALE);
CuviImage gimg2 = cuvi::io::loadImage(path,CUVI_LOAD_IMAGE_GRAYSCALE);
//Create output memory
Cuvi32f* u = new Cuvi32f[gimg.width() * gimg.height()];
Cuvi32f* v = new Cuvi32f[gimg.width() * gimg.height()];
//Calculates flow of each image pixel in two frames using Horn–Schunck method
cuvi::computerVision::opticalFlowHS(gimg1,gimg2,u,v,false);
|