1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-19 11:21:39 +08:00

Moved optflow interfaces and testing app.

Algorithm::info()-related code disabled-after moving to opencv_contrib caused compilation errors

Added usage examples

Added documentation for optflow_io

+bugfix: handling invalid algorithm choice

+ solving MSVC compilation errors; assuming that int and float are 4-bytes long - possibly needs fixing
This commit is contained in:
tpietruszka
2014-08-17 22:21:12 +02:00
parent 468d3ecc49
commit 4738fc2e63
6 changed files with 747 additions and 2 deletions

View File

@@ -41,6 +41,7 @@ the use of this software, even if advised of the possibility of such damage.
#define __OPENCV_OPTFLOW_HPP__
#include "opencv2/core.hpp"
#include "opencv2/video.hpp"
namespace cv
{
@@ -57,8 +58,26 @@ CV_EXPORTS_W void calcOpticalFlowSF( InputArray from, InputArray to, OutputArray
double sigma_dist_fix, double sigma_color_fix, double occ_thr,
int upscale_averaging_radius, double upscale_sigma_dist,
double upscale_sigma_color, double speed_up_thr );
}
//! reads optical flow from a file, Middlebury format:
// http://vision.middlebury.edu/flow/code/flow-code/README.txt
CV_EXPORTS_W Mat readOpticalFlow( const String& path );
//! writes optical flow to a file, Middlebury format
CV_EXPORTS_W bool writeOpticalFlow( const String& path, InputArray flow );
// DeepFlow implementation, based on:
// P. Weinzaepfel, J. Revaud, Z. Harchaoui, and C. Schmid, “DeepFlow: Large Displacement Optical Flow with Deep Matching,”
//CV_EXPORTS_W Ptr<DenseOpticalFlow> createOptFlow_DeepFlow();
// Additional interface to the SimpleFlow algorithm - calcOpticalFlowSF()
CV_EXPORTS_W Ptr<DenseOpticalFlow> createOptFlow_SimpleFlow();
// Additional interface to the Farneback's algorithm - calcOpticalFlowFarneback()
CV_EXPORTS_W Ptr<DenseOpticalFlow> createOptFlow_Farneback();
} //optflow
}
#include "opencv2/optflow/motempl.hpp"