mexopencv  0.1
mex interface for opencv library
mexopencv_videostab.hpp
Go to the documentation of this file.
1 
11 #ifndef __MEXOPENCV_VIDEOSTAB_HPP__
12 #define __MEXOPENCV_VIDEOSTAB_HPP__
13 
14 #include "mexopencv.hpp"
15 #include "mexopencv_features2d.hpp"
16 #include "opencv2/videostab.hpp"
17 
18 
19 // ==================== XXX ====================
20 
24  ("Translation", cv::videostab::MM_TRANSLATION)
25  ("TranslationAndScale", cv::videostab::MM_TRANSLATION_AND_SCALE)
26  ("Rotation", cv::videostab::MM_ROTATION)
27  ("Rigid", cv::videostab::MM_RIGID)
28  ("Similarity", cv::videostab::MM_SIMILARITY)
29  ("Affine", cv::videostab::MM_AFFINE)
30  ("Homography", cv::videostab::MM_HOMOGRAPHY)
31  ("Unknown", cv::videostab::MM_UNKNOWN);
32 
36  (cv::videostab::MM_TRANSLATION, "Translation")
37  (cv::videostab::MM_TRANSLATION_AND_SCALE, "TranslationAndScale")
38  (cv::videostab::MM_ROTATION, "Rotation")
39  (cv::videostab::MM_RIGID, "Rigid")
40  (cv::videostab::MM_SIMILARITY, "Similarity")
41  (cv::videostab::MM_AFFINE, "Affine")
42  (cv::videostab::MM_HOMOGRAPHY, "Homography")
43  (cv::videostab::MM_UNKNOWN, "Unknown");
44 
46 class LogToMATLAB : public cv::videostab::ILog
47 {
48 public:
49  virtual void print(const char *format, ...);
50 };
51 
56 cv::videostab::RansacParams toRansacParams(const MxArray &arr);
57 
62 MxArray toStruct(const cv::videostab::RansacParams &params);
63 
64 
65 // ==================== XXX ====================
66 
71 MxArray toStruct(cv::Ptr<cv::videostab::ILog> p);
72 
77 MxArray toStruct(cv::Ptr<cv::videostab::IFrameSource> p);
78 
83 MxArray toStruct(cv::Ptr<cv::videostab::DeblurerBase> p);
84 
89 MxArray toStruct(cv::Ptr<cv::videostab::MotionEstimatorBase> p);
90 
95 MxArray toStruct(cv::Ptr<cv::FeatureDetector> p);
96 
101 MxArray toStruct(cv::Ptr<cv::videostab::ISparseOptFlowEstimator> p);
102 
107 MxArray toStruct(cv::Ptr<cv::videostab::IDenseOptFlowEstimator> p);
108 
113 MxArray toStruct(cv::Ptr<cv::videostab::IOutlierRejector> p);
114 
119 MxArray toStruct(cv::Ptr<cv::videostab::ImageMotionEstimatorBase> p);
120 
125 MxArray toStruct(cv::Ptr<cv::videostab::InpainterBase> p);
126 
131 MxArray toStruct(cv::Ptr<cv::videostab::MotionFilterBase> p);
132 
137 MxArray toStruct(cv::Ptr<cv::videostab::IMotionStabilizer> p);
138 
143 MxArray toStruct(cv::Ptr<cv::videostab::WobbleSuppressorBase> p);
144 
145 
146 // ==================== XXX ====================
147 
155 cv::Ptr<cv::videostab::ILog> createILog(const std::string& type);
156 
162 cv::Ptr<cv::videostab::VideoFileSource> createVideoFileSource(
163  std::vector<MxArray>::const_iterator first,
164  std::vector<MxArray>::const_iterator last);
165 
174 cv::Ptr<cv::videostab::IFrameSource> createIFrameSource(
175  const std::string& type,
176  std::vector<MxArray>::const_iterator first,
177  std::vector<MxArray>::const_iterator last);
178 
184 cv::Ptr<cv::videostab::WeightingDeblurer> createWeightingDeblurer(
185  std::vector<MxArray>::const_iterator first,
186  std::vector<MxArray>::const_iterator last);
187 
196 cv::Ptr<cv::videostab::DeblurerBase> createDeblurerBase(
197  const std::string& type,
198  std::vector<MxArray>::const_iterator first,
199  std::vector<MxArray>::const_iterator last);
200 
206 cv::Ptr<cv::videostab::MotionEstimatorL1> createMotionEstimatorL1(
207  std::vector<MxArray>::const_iterator first,
208  std::vector<MxArray>::const_iterator last);
209 
215 cv::Ptr<cv::videostab::MotionEstimatorRansacL2> createMotionEstimatorRansacL2(
216  std::vector<MxArray>::const_iterator first,
217  std::vector<MxArray>::const_iterator last);
218 
227 cv::Ptr<cv::videostab::MotionEstimatorBase> createMotionEstimatorBase(
228  const std::string& type,
229  std::vector<MxArray>::const_iterator first,
230  std::vector<MxArray>::const_iterator last);
231 
238 cv::Ptr<cv::videostab::SparsePyrLkOptFlowEstimator> createSparsePyrLkOptFlowEstimator(
239  std::vector<MxArray>::const_iterator first,
240  std::vector<MxArray>::const_iterator last);
241 
250 cv::Ptr<cv::videostab::ISparseOptFlowEstimator> createISparseOptFlowEstimator(
251  const std::string& type,
252  std::vector<MxArray>::const_iterator first,
253  std::vector<MxArray>::const_iterator last);
254 
262 cv::Ptr<cv::videostab::IDenseOptFlowEstimator> createIDenseOptFlowEstimator(
263  const std::string& type,
264  std::vector<MxArray>::const_iterator first,
265  std::vector<MxArray>::const_iterator last);
266 
273 cv::Ptr<cv::videostab::TranslationBasedLocalOutlierRejector> createTranslationBasedLocalOutlierRejector(
274  std::vector<MxArray>::const_iterator first,
275  std::vector<MxArray>::const_iterator last);
276 
285 cv::Ptr<cv::videostab::IOutlierRejector> createIOutlierRejector(
286  const std::string& type,
287  std::vector<MxArray>::const_iterator first,
288  std::vector<MxArray>::const_iterator last);
289 
296 cv::Ptr<cv::videostab::KeypointBasedMotionEstimator> createKeypointBasedMotionEstimator(
297  std::vector<MxArray>::const_iterator first,
298  std::vector<MxArray>::const_iterator last);
299 
305 cv::Ptr<cv::videostab::FromFileMotionReader> createFromFileMotionReader(
306  std::vector<MxArray>::const_iterator first,
307  std::vector<MxArray>::const_iterator last);
308 
314 cv::Ptr<cv::videostab::ToFileMotionWriter> createToFileMotionWriter(
315  std::vector<MxArray>::const_iterator first,
316  std::vector<MxArray>::const_iterator last);
317 
327 cv::Ptr<cv::videostab::ImageMotionEstimatorBase> createImageMotionEstimator(
328  const std::string& type,
329  std::vector<MxArray>::const_iterator first,
330  std::vector<MxArray>::const_iterator last);
331 
337 cv::Ptr<cv::videostab::ColorInpainter> createColorInpainter(
338  std::vector<MxArray>::const_iterator first,
339  std::vector<MxArray>::const_iterator last);
340 
346 cv::Ptr<cv::videostab::ColorAverageInpainter> createColorAverageInpainter(
347  std::vector<MxArray>::const_iterator first,
348  std::vector<MxArray>::const_iterator last);
349 
355 cv::Ptr<cv::videostab::ConsistentMosaicInpainter> createConsistentMosaicInpainter(
356  std::vector<MxArray>::const_iterator first,
357  std::vector<MxArray>::const_iterator last);
358 
364 cv::Ptr<cv::videostab::MotionInpainter> createMotionInpainter(
365  std::vector<MxArray>::const_iterator first,
366  std::vector<MxArray>::const_iterator last);
367 
373 cv::Ptr<cv::videostab::InpaintingPipeline> createInpaintingPipeline(
374  std::vector<MxArray>::const_iterator first,
375  std::vector<MxArray>::const_iterator last);
376 
389 cv::Ptr<cv::videostab::InpainterBase> createInpainterBase(
390  const std::string& type,
391  std::vector<MxArray>::const_iterator first,
392  std::vector<MxArray>::const_iterator last);
393 
399 cv::Ptr<cv::videostab::GaussianMotionFilter> createGaussianMotionFilter(
400  std::vector<MxArray>::const_iterator first,
401  std::vector<MxArray>::const_iterator last);
402 
410 cv::Ptr<cv::videostab::MotionFilterBase> createMotionFilterBase(
411  const std::string& type,
412  std::vector<MxArray>::const_iterator first,
413  std::vector<MxArray>::const_iterator last);
414 
420 cv::Ptr<cv::videostab::LpMotionStabilizer> createLpMotionStabilizer(
421  std::vector<MxArray>::const_iterator first,
422  std::vector<MxArray>::const_iterator last);
423 
430 cv::Ptr<cv::videostab::MotionStabilizationPipeline> createMotionStabilizationPipeline(
431  std::vector<MxArray>::const_iterator first,
432  std::vector<MxArray>::const_iterator last);
433 
443 cv::Ptr<cv::videostab::IMotionStabilizer> createIMotionStabilizer(
444  const std::string& type,
445  std::vector<MxArray>::const_iterator first,
446  std::vector<MxArray>::const_iterator last);
447 
454 cv::Ptr<cv::videostab::MoreAccurateMotionWobbleSuppressor> createMoreAccurateMotionWobbleSuppressor(
455  std::vector<MxArray>::const_iterator first,
456  std::vector<MxArray>::const_iterator last);
457 
466 cv::Ptr<cv::videostab::WobbleSuppressorBase> createWobbleSuppressorBase(
467  const std::string& type,
468  std::vector<MxArray>::const_iterator first,
469  std::vector<MxArray>::const_iterator last);
470 
471 #endif
cv::Ptr< cv::videostab::GaussianMotionFilter > createGaussianMotionFilter(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of GaussianMotionFilter using options in arguments.
cv::Ptr< cv::videostab::MotionEstimatorRansacL2 > createMotionEstimatorRansacL2(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of MotionEstimatorRansacL2 using options in arguments.
cv::videostab::RansacParams toRansacParams(const MxArray &arr)
Convert MxArray to RansacParams.
cv::Ptr< cv::videostab::ConsistentMosaicInpainter > createConsistentMosaicInpainter(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of ConsistentMosaicInpainter using options in arguments.
cv::Ptr< cv::videostab::MotionEstimatorL1 > createMotionEstimatorL1(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of MotionEstimatorL1 using options in arguments.
cv::Ptr< cv::videostab::IDenseOptFlowEstimator > createIDenseOptFlowEstimator(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of IDenseOptFlowEstimator using options in arguments.
cv::Ptr< cv::videostab::DeblurerBase > createDeblurerBase(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of DeblurerBase using options in arguments.
cv::Ptr< cv::videostab::InpainterBase > createInpainterBase(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of InpainterBase using options in arguments.
cv::Ptr< cv::videostab::MoreAccurateMotionWobbleSuppressor > createMoreAccurateMotionWobbleSuppressor(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of MoreAccurateMotionWobbleSuppressor using options in arguments.
cv::Ptr< cv::videostab::WeightingDeblurer > createWeightingDeblurer(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of WeightingDeblurer using options in arguments.
cv::Ptr< cv::videostab::LpMotionStabilizer > createLpMotionStabilizer(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of LpMotionStabilizer using options in arguments.
cv::Ptr< cv::videostab::KeypointBasedMotionEstimator > createKeypointBasedMotionEstimator(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of KeypointBasedMotionEstimator using options in arguments.
cv::Ptr< cv::videostab::IMotionStabilizer > createIMotionStabilizer(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of IMotionStabilizer using options in arguments.
cv::Ptr< cv::videostab::ColorInpainter > createColorInpainter(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of ColorInpainter using options in arguments.
cv::Ptr< cv::videostab::SparsePyrLkOptFlowEstimator > createSparsePyrLkOptFlowEstimator(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of SparsePyrLkOptFlowEstimator using options in arguments.
cv::Ptr< cv::videostab::MotionStabilizationPipeline > createMotionStabilizationPipeline(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of MotionStabilizationPipeline using options in arguments.
cv::Ptr< cv::videostab::ColorAverageInpainter > createColorAverageInpainter(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of ColorAverageInpainter using options in arguments.
cv::Ptr< cv::videostab::MotionInpainter > createMotionInpainter(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of MotionInpainter using options in arguments.
cv::Ptr< cv::videostab::WobbleSuppressorBase > createWobbleSuppressorBase(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of WobbleSuppressorBase using options in arguments.
const ConstMap< cv::videostab::MotionModel, std::string > MotionModelInvMap
inverse motion model types for option processing
Logger class to log messages from videostab in MATLAB.
cv::Ptr< cv::videostab::ISparseOptFlowEstimator > createISparseOptFlowEstimator(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of ISparseOptFlowEstimator using options in arguments.
cv::Ptr< cv::videostab::FromFileMotionReader > createFromFileMotionReader(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of FromFileMotionReader using options in arguments.
cv::Ptr< cv::videostab::TranslationBasedLocalOutlierRejector > createTranslationBasedLocalOutlierRejector(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of createTranslationBasedLocalOutlierRejector using options in arguments...
const ConstMap< std::string, cv::videostab::MotionModel > MotionModelMap
motion model types for option processing
cv::Ptr< cv::videostab::IFrameSource > createIFrameSource(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of IFrameSource using options in arguments.
mxArray object wrapper for data conversion and manipulation.
Definition: MxArray.hpp:123
Common definitions for the features2d and xfeatures2d modules.
MxArray toStruct(const cv::videostab::RansacParams &params)
Convert RansacParams to MxArray.
Global constant definitions.
cv::Ptr< cv::videostab::IOutlierRejector > createIOutlierRejector(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of IOutlierRejector using options in arguments.
cv::Ptr< cv::videostab::ToFileMotionWriter > createToFileMotionWriter(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of ToFileMotionWriter using options in arguments.
cv::Ptr< cv::videostab::VideoFileSource > createVideoFileSource(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of VideoFileSource using options in arguments.
cv::Ptr< cv::videostab::ImageMotionEstimatorBase > createImageMotionEstimator(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of ImageMotionEstimatorBase using options in arguments.
std::map wrapper with one-line initialization and lookup method.
Definition: MxArray.hpp:927
cv::Ptr< cv::videostab::MotionFilterBase > createMotionFilterBase(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of MotionFilterBase using options in arguments.
cv::Ptr< cv::videostab::InpaintingPipeline > createInpaintingPipeline(std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of InpaintingPipeline using options in arguments.
cv::Ptr< cv::videostab::ILog > createILog(const std::string &type)
Create an instance of ILog of the specified type.
cv::Ptr< cv::videostab::MotionEstimatorBase > createMotionEstimatorBase(const std::string &type, std::vector< MxArray >::const_iterator first, std::vector< MxArray >::const_iterator last)
Create an instance of MotionEstimatorBase using options in arguments.