diff --git a/modules/videostab/include/opencv2/videostab/deblurring.hpp b/modules/videostab/include/opencv2/videostab/deblurring.hpp index fe335e41bc..6e12243a17 100644 --- a/modules/videostab/include/opencv2/videostab/deblurring.hpp +++ b/modules/videostab/include/opencv2/videostab/deblurring.hpp @@ -51,9 +51,9 @@ namespace cv namespace videostab { -float calcBlurriness(const Mat &frame); +CV_EXPORTS float calcBlurriness(const Mat &frame); -class IDeblurer +class CV_EXPORTS IDeblurer { public: IDeblurer() : radius_(0), frames_(0), motions_(0) {} @@ -81,13 +81,13 @@ protected: const std::vector *blurrinessRates_; }; -class NullDeblurer : public IDeblurer +class CV_EXPORTS NullDeblurer : public IDeblurer { public: virtual void deblur(int idx, Mat &frame) {} }; -class WeightingDeblurer : public IDeblurer +class CV_EXPORTS WeightingDeblurer : public IDeblurer { public: WeightingDeblurer(); diff --git a/modules/videostab/include/opencv2/videostab/fast_marching.hpp b/modules/videostab/include/opencv2/videostab/fast_marching.hpp index b8c1222dc2..ab75eee73b 100644 --- a/modules/videostab/include/opencv2/videostab/fast_marching.hpp +++ b/modules/videostab/include/opencv2/videostab/fast_marching.hpp @@ -54,7 +54,7 @@ namespace videostab { // See http://iwi.eldoc.ub.rug.nl/FILES/root/2004/JGraphToolsTelea/2004JGraphToolsTelea.pdf -class FastMarchingMethod +class CV_EXPORTS FastMarchingMethod { public: FastMarchingMethod() : inf_(1e6f) {} diff --git a/modules/videostab/include/opencv2/videostab/frame_source.hpp b/modules/videostab/include/opencv2/videostab/frame_source.hpp index 547d1b0a18..ff83a681e0 100644 --- a/modules/videostab/include/opencv2/videostab/frame_source.hpp +++ b/modules/videostab/include/opencv2/videostab/frame_source.hpp @@ -53,7 +53,7 @@ namespace cv namespace videostab { -class IFrameSource +class CV_EXPORTS IFrameSource { public: virtual ~IFrameSource() {} @@ -61,14 +61,14 @@ public: virtual Mat nextFrame() = 0; }; -class NullFrameSource : public IFrameSource +class CV_EXPORTS NullFrameSource : public IFrameSource { public: virtual void reset() {} virtual Mat nextFrame() { return Mat(); } }; -class VideoFileSource : public IFrameSource +class CV_EXPORTS VideoFileSource : public IFrameSource { public: VideoFileSource(const std::string &path, bool volatileFrame = false); diff --git a/modules/videostab/include/opencv2/videostab/global_motion.hpp b/modules/videostab/include/opencv2/videostab/global_motion.hpp index 9b2a46dd2c..773e82ecc1 100644 --- a/modules/videostab/include/opencv2/videostab/global_motion.hpp +++ b/modules/videostab/include/opencv2/videostab/global_motion.hpp @@ -60,11 +60,11 @@ enum MotionModel AFFINE = 2 }; -Mat estimateGlobalMotionLeastSquares( +CV_EXPORTS Mat estimateGlobalMotionLeastSquares( const std::vector &points0, const std::vector &points1, int model = AFFINE, float *rmse = 0); -struct RansacParams +CV_EXPORTS struct RansacParams { int size; // subset size float thresh; // max error to classify as inlier @@ -79,19 +79,19 @@ struct RansacParams static RansacParams translationMotionStd() { return RansacParams(2, 0.5f, 0.5f, 0.99f); } }; -Mat estimateGlobalMotionRobust( +CV_EXPORTS Mat estimateGlobalMotionRobust( const std::vector &points0, const std::vector &points1, int model = AFFINE, const RansacParams ¶ms = RansacParams::affine2dMotionStd(), float *rmse = 0, int *ninliers = 0); -class IGlobalMotionEstimator +class CV_EXPORTS IGlobalMotionEstimator { public: virtual ~IGlobalMotionEstimator() {} virtual Mat estimate(const Mat &frame0, const Mat &frame1) = 0; }; -class PyrLkRobustMotionEstimator : public IGlobalMotionEstimator +class CV_EXPORTS PyrLkRobustMotionEstimator : public IGlobalMotionEstimator { public: PyrLkRobustMotionEstimator(); @@ -129,14 +129,14 @@ private: float minInlierRatio_; }; -Mat getMotion(int from, int to, const std::vector &motions); +CV_EXPORTS Mat getMotion(int from, int to, const std::vector &motions); -Mat ensureInclusionConstraint(const Mat &M, Size size, float trimRatio); +CV_EXPORTS Mat ensureInclusionConstraint(const Mat &M, Size size, float trimRatio); -float estimateOptimalTrimRatio(const Mat &M, Size size); +CV_EXPORTS float estimateOptimalTrimRatio(const Mat &M, Size size); // frame1 is non-transformed frame -float alignementError(const Mat &M, const Mat &frame0, const Mat &mask0, const Mat &frame1); +CV_EXPORTS float alignementError(const Mat &M, const Mat &frame0, const Mat &mask0, const Mat &frame1); } // namespace videostab } // namespace cv diff --git a/modules/videostab/include/opencv2/videostab/inpainting.hpp b/modules/videostab/include/opencv2/videostab/inpainting.hpp index e2fed2ce56..fd65eefaaf 100644 --- a/modules/videostab/include/opencv2/videostab/inpainting.hpp +++ b/modules/videostab/include/opencv2/videostab/inpainting.hpp @@ -53,7 +53,7 @@ namespace cv namespace videostab { -class IInpainter +class CV_EXPORTS IInpainter { public: IInpainter() @@ -87,13 +87,13 @@ protected: const std::vector *stabilizationMotions_; }; -class NullInpainter : public IInpainter +class CV_EXPORTS NullInpainter : public IInpainter { public: virtual void inpaint(int idx, Mat &frame, Mat &mask) {} }; -class InpaintingPipeline : public IInpainter +class CV_EXPORTS InpaintingPipeline : public IInpainter { public: void pushBack(Ptr inpainter) { inpainters_.push_back(inpainter); } @@ -111,7 +111,7 @@ private: std::vector > inpainters_; }; -class ConsistentMosaicInpainter : public IInpainter +class CV_EXPORTS ConsistentMosaicInpainter : public IInpainter { public: ConsistentMosaicInpainter(); @@ -125,7 +125,7 @@ private: float stdevThresh_; }; -class MotionInpainter : public IInpainter +class CV_EXPORTS MotionInpainter : public IInpainter { public: MotionInpainter(); @@ -154,7 +154,7 @@ private: Mat_ flowMask_; }; -class ColorAverageInpainter : public IInpainter +class CV_EXPORTS ColorAverageInpainter : public IInpainter { public: virtual void inpaint(int idx, Mat &frame, Mat &mask); @@ -163,11 +163,11 @@ private: FastMarchingMethod fmm_; }; -void calcFlowMask( +CV_EXPORTS void calcFlowMask( const Mat &flowX, const Mat &flowY, const Mat &errors, float maxError, const Mat &mask0, const Mat &mask1, Mat &flowMask); -void completeFrameAccordingToFlow( +CV_EXPORTS void completeFrameAccordingToFlow( const Mat &flowMask, const Mat &flowX, const Mat &flowY, const Mat &frame1, const Mat &mask1, Mat& frame0, Mat &mask0); diff --git a/modules/videostab/include/opencv2/videostab/log.hpp b/modules/videostab/include/opencv2/videostab/log.hpp index 0b976042a1..8f22b88905 100644 --- a/modules/videostab/include/opencv2/videostab/log.hpp +++ b/modules/videostab/include/opencv2/videostab/log.hpp @@ -43,25 +43,27 @@ #ifndef __OPENCV_VIDEOSTAB_LOG_HPP__ #define __OPENCV_VIDEOSTAB_LOG_HPP__ +#include "opencv2/core/core.hpp" + namespace cv { namespace videostab { -class ILog +class CV_EXPORTS ILog { public: virtual ~ILog() {} virtual void print(const char *format, ...) = 0; }; -class NullLog : public ILog +class CV_EXPORTS NullLog : public ILog { public: virtual void print(const char *format, ...) {} }; -class LogToStdout : public ILog +class CV_EXPORTS LogToStdout : public ILog { public: virtual void print(const char *format, ...); diff --git a/modules/videostab/include/opencv2/videostab/motion_filtering.hpp b/modules/videostab/include/opencv2/videostab/motion_filtering.hpp index 1abfb41929..ca0ecf2697 100644 --- a/modules/videostab/include/opencv2/videostab/motion_filtering.hpp +++ b/modules/videostab/include/opencv2/videostab/motion_filtering.hpp @@ -51,7 +51,7 @@ namespace cv namespace videostab { -class IMotionFilter +class CV_EXPORTS IMotionFilter { public: virtual ~IMotionFilter() {} @@ -59,7 +59,7 @@ public: virtual Mat apply(int index, std::vector &Ms) const = 0; }; -class GaussianMotionFilter : public IMotionFilter +class CV_EXPORTS GaussianMotionFilter : public IMotionFilter { public: GaussianMotionFilter(int radius, float stdev); diff --git a/modules/videostab/include/opencv2/videostab/optical_flow.hpp b/modules/videostab/include/opencv2/videostab/optical_flow.hpp index 4da2fe7ee3..6aa82d5a46 100644 --- a/modules/videostab/include/opencv2/videostab/optical_flow.hpp +++ b/modules/videostab/include/opencv2/videostab/optical_flow.hpp @@ -55,7 +55,7 @@ namespace cv namespace videostab { -class ISparseOptFlowEstimator +class CV_EXPORTS ISparseOptFlowEstimator { public: virtual ~ISparseOptFlowEstimator() {} @@ -64,7 +64,7 @@ public: OutputArray status, OutputArray errors) = 0; }; -class IDenseOptFlowEstimator +class CV_EXPORTS IDenseOptFlowEstimator { public: virtual ~IDenseOptFlowEstimator() {} @@ -73,7 +73,7 @@ public: OutputArray errors) = 0; }; -class PyrLkOptFlowEstimatorBase +class CV_EXPORTS PyrLkOptFlowEstimatorBase { public: PyrLkOptFlowEstimatorBase() { setWinSize(Size(21, 21)); setMaxLevel(3); } @@ -89,7 +89,7 @@ protected: int maxLevel_; }; -class SparsePyrLkOptFlowEstimator +class CV_EXPORTS SparsePyrLkOptFlowEstimator : public PyrLkOptFlowEstimatorBase, public ISparseOptFlowEstimator { public: @@ -99,7 +99,7 @@ public: }; #if HAVE_OPENCV_GPU -class DensePyrLkOptFlowEstimatorGpu +class CV_EXPORTS DensePyrLkOptFlowEstimatorGpu : public PyrLkOptFlowEstimatorBase, public IDenseOptFlowEstimator { public: diff --git a/modules/videostab/include/opencv2/videostab/stabilizer.hpp b/modules/videostab/include/opencv2/videostab/stabilizer.hpp index 6533de5e27..c04ff7478f 100644 --- a/modules/videostab/include/opencv2/videostab/stabilizer.hpp +++ b/modules/videostab/include/opencv2/videostab/stabilizer.hpp @@ -58,7 +58,7 @@ namespace cv namespace videostab { -class Stabilizer : public IFrameSource +class CV_EXPORTS Stabilizer : public IFrameSource { public: Stabilizer();