Robust Local Optical Flow Libary Documentation
V 1.2
|
Motion estimation and illustration. More...
#include <OpticalFlow/RLOFFactory.h>
#include <OpticalFlow/RLOFParameter.h>
#include <iostream>
#include <opencv\highgui.h>
Go to the source code of this file.
Functions | |
static void | denseMotionField (const cv::Mat &img1, const cv::Mat &img2, IFeatureTracker *tracker, FeatureTrackerContext ¶m, cv::Mat &U, cv::Mat &V) |
void | FlowToRGB (const cv::Mat &dx, const cv::Mat &dy, cv::Mat &rgbFlow, const float &max_size=-1, bool use_value=false, cv::Mat &sat=cv::Mat()) |
Convert motion field to RGB colormap. More... | |
void | test1 () |
void | test0 () |
Motion estimation and illustration.
Contains a set of useful function regarding motion estimation and illustration.
Definition in file RLOFTools.hpp.
|
static |
Compute a dense motion field with the prefered optical flow method
img1 | Image at time t. |
img2 | Image at time t+1. |
tracker | Pointer to the RLOF instance. |
param | RLOF parameter. |
U | Resulting u matrice containing dx motions of type CV_32FC1. |
V | Resulting v matrice containing dy motions of type CV_32FC1. |
Definition at line 116 of file RLOFTools.hpp.
void FlowToRGB | ( | const cv::Mat & | dx, |
const cv::Mat & | dy, | ||
cv::Mat & | rgbFlow, | ||
const float & | max_size = -1 , |
||
bool | use_value = false , |
||
cv::Mat & | sat = cv::Mat() |
||
) |
Convert motion field to RGB colormap.
Function converts a motion vector field specified by dx and dy to a 8UC3 RGB colormap using the HSV2RGB transformation.While Saturation(S) and Value(V) channels are used to code the length of a motion vector, Hue(H) is used to display the direction (angle) Therefore lenght of a motion vector is scaled with max_size
dx | 32FC1 motion vectorfield dx component |
dy | 32FC1 motion vectorfield dx component |
rgbFlow | 8UC3 output matrice (colormap) |
max_size | Maximal value to rescale the S or V channel. |
use_value | If set V channels is used to code motion vector length else S channels is used |
sat | If set it has to be 8UC1 and is used the weight the sat channel (by default it should not be used) |
Definition at line 180 of file RLOFTools.hpp.
Referenced by demo().
void test0 | ( | ) |
Test function. Check for all intances available.
Definition at line 342 of file RLOFTools.hpp.
Referenced by main().
void test1 | ( | ) |
Test function. Test the consitens of the accuracy of the library.
Definition at line 276 of file RLOFTools.hpp.
Referenced by main().