diff --git a/modules/stitching/include/opencv2/stitching/autocalib.hpp b/modules/stitching/include/opencv2/stitching/autocalib.hpp index 30c9b6bda0..3d9869016d 100644 --- a/modules/stitching/include/opencv2/stitching/autocalib.hpp +++ b/modules/stitching/include/opencv2/stitching/autocalib.hpp @@ -50,12 +50,13 @@ namespace cv // See "Construction of Panoramic Image Mosaics with Global and Local Alignment" // by Heung-Yeung Shum and Richard Szeliski. -void focalsFromHomography(const Mat &H, double &f0, double &f1, bool &f0_ok, bool &f1_ok); +void CV_EXPORTS focalsFromHomography(const Mat &H, double &f0, double &f1, bool &f0_ok, bool &f1_ok); -void estimateFocal(const std::vector &features, const std::vector &pairwise_matches, - std::vector &focals); +void CV_EXPORTS estimateFocal(const std::vector &features, + const std::vector &pairwise_matches, + std::vector &focals); -bool calibrateRotatingCamera(const std::vector &Hs, Mat &K); +bool CV_EXPORTS calibrateRotatingCamera(const std::vector &Hs, Mat &K); } // namespace cv diff --git a/modules/stitching/include/opencv2/stitching/blenders.hpp b/modules/stitching/include/opencv2/stitching/blenders.hpp index dc0a37a430..d173acc552 100644 --- a/modules/stitching/include/opencv2/stitching/blenders.hpp +++ b/modules/stitching/include/opencv2/stitching/blenders.hpp @@ -48,7 +48,7 @@ namespace cv { // Simple blender which puts one image over another -class Blender +class CV_EXPORTS Blender { public: enum { NO, FEATHER, MULTI_BAND }; @@ -65,7 +65,7 @@ protected: }; -class FeatherBlender : public Blender +class CV_EXPORTS FeatherBlender : public Blender { public: FeatherBlender(float sharpness = 0.02f) { setSharpness(sharpness); } @@ -83,7 +83,7 @@ private: }; -class MultiBandBlender : public Blender +class CV_EXPORTS MultiBandBlender : public Blender { public: MultiBandBlender(int try_gpu = false, int num_bands = 5); @@ -106,16 +106,16 @@ private: ////////////////////////////////////////////////////////////////////////////// // Auxiliary functions -void normalizeUsingWeightMap(const Mat& weight, Mat& src); +void CV_EXPORTS normalizeUsingWeightMap(const Mat& weight, Mat& src); -void createWeightMap(const Mat& mask, float sharpness, Mat& weight); +void CV_EXPORTS createWeightMap(const Mat& mask, float sharpness, Mat& weight); -void createLaplacePyr(const Mat &img, int num_levels, std::vector& pyr); +void CV_EXPORTS createLaplacePyr(const Mat &img, int num_levels, std::vector& pyr); -void createLaplacePyrGpu(const Mat &img, int num_levels, std::vector& pyr); +void CV_EXPORTS createLaplacePyrGpu(const Mat &img, int num_levels, std::vector& pyr); // Restores source image -void restoreImageFromLaplacePyr(std::vector& pyr); +void CV_EXPORTS restoreImageFromLaplacePyr(std::vector& pyr); } // namespace cv diff --git a/modules/stitching/include/opencv2/stitching/camera.hpp b/modules/stitching/include/opencv2/stitching/camera.hpp index d7ea9e6c05..012e6c01e2 100644 --- a/modules/stitching/include/opencv2/stitching/camera.hpp +++ b/modules/stitching/include/opencv2/stitching/camera.hpp @@ -47,7 +47,7 @@ namespace cv { -struct CameraParams +struct CV_EXPORTS CameraParams { CameraParams(); CameraParams(const CameraParams& other); diff --git a/modules/stitching/include/opencv2/stitching/exposure_compensate.hpp b/modules/stitching/include/opencv2/stitching/exposure_compensate.hpp index dcff81294e..7bcc0f0167 100644 --- a/modules/stitching/include/opencv2/stitching/exposure_compensate.hpp +++ b/modules/stitching/include/opencv2/stitching/exposure_compensate.hpp @@ -47,7 +47,7 @@ namespace cv { -class ExposureCompensator +class CV_EXPORTS ExposureCompensator { public: enum { NO, GAIN, GAIN_BLOCKS }; @@ -61,7 +61,7 @@ public: }; -class NoExposureCompensator : public ExposureCompensator +class CV_EXPORTS NoExposureCompensator : public ExposureCompensator { public: void feed(const std::vector &/*corners*/, const std::vector &/*images*/, @@ -70,7 +70,7 @@ public: }; -class GainCompensator : public ExposureCompensator +class CV_EXPORTS GainCompensator : public ExposureCompensator { public: void feed(const std::vector &corners, const std::vector &images, @@ -83,7 +83,7 @@ private: }; -class BlocksGainCompensator : public ExposureCompensator +class CV_EXPORTS BlocksGainCompensator : public ExposureCompensator { public: BlocksGainCompensator(int bl_width = 32, int bl_height = 32) diff --git a/modules/stitching/include/opencv2/stitching/matchers.hpp b/modules/stitching/include/opencv2/stitching/matchers.hpp index da890c192e..d45e9fc4b6 100644 --- a/modules/stitching/include/opencv2/stitching/matchers.hpp +++ b/modules/stitching/include/opencv2/stitching/matchers.hpp @@ -48,7 +48,7 @@ namespace cv { -struct ImageFeatures +struct CV_EXPORTS ImageFeatures { int img_idx; cv::Size img_size; @@ -57,7 +57,7 @@ struct ImageFeatures }; -class FeaturesFinder +class CV_EXPORTS FeaturesFinder { public: virtual ~FeaturesFinder() {} @@ -70,7 +70,7 @@ protected: }; -class SurfFeaturesFinder : public FeaturesFinder +class CV_EXPORTS SurfFeaturesFinder : public FeaturesFinder { public: SurfFeaturesFinder(bool try_use_gpu = true, double hess_thresh = 300.0, @@ -86,7 +86,7 @@ protected: }; -struct MatchesInfo +struct CV_EXPORTS MatchesInfo { MatchesInfo(); MatchesInfo(const MatchesInfo &other); @@ -101,7 +101,7 @@ struct MatchesInfo }; -class FeaturesMatcher +class CV_EXPORTS FeaturesMatcher { public: virtual ~FeaturesMatcher() {} @@ -124,7 +124,7 @@ protected: }; -class BestOf2NearestMatcher : public FeaturesMatcher +class CV_EXPORTS BestOf2NearestMatcher : public FeaturesMatcher { public: BestOf2NearestMatcher(bool try_use_gpu = true, float match_conf = 0.55f, int num_matches_thresh1 = 6, diff --git a/modules/stitching/include/opencv2/stitching/motion_estimators.hpp b/modules/stitching/include/opencv2/stitching/motion_estimators.hpp index c1b2cab523..c65fd23afe 100644 --- a/modules/stitching/include/opencv2/stitching/motion_estimators.hpp +++ b/modules/stitching/include/opencv2/stitching/motion_estimators.hpp @@ -50,7 +50,7 @@ namespace cv { -class Estimator +class CV_EXPORTS Estimator { public: void operator ()(const std::vector &features, const std::vector &pairwise_matches, @@ -65,7 +65,7 @@ protected: }; -class HomographyBasedEstimator : public Estimator +class CV_EXPORTS HomographyBasedEstimator : public Estimator { public: HomographyBasedEstimator() : is_focals_estimated_(false) {} @@ -79,7 +79,7 @@ private: }; -class BundleAdjuster : public Estimator +class CV_EXPORTS BundleAdjuster : public Estimator { public: enum { NO, RAY_SPACE, FOCAL_RAY_SPACE }; @@ -108,21 +108,21 @@ private: }; -void waveCorrect(std::vector &rmats); +void CV_EXPORTS waveCorrect(std::vector &rmats); ////////////////////////////////////////////////////////////////////////////// // Auxiliary functions // Returns matches graph representation in DOT language -std::string matchesGraphAsString(std::vector &pathes, std::vector &pairwise_matches, - float conf_threshold); +std::string CV_EXPORTS matchesGraphAsString(std::vector &pathes, std::vector &pairwise_matches, + float conf_threshold); -std::vector leaveBiggestComponent(std::vector &features, std::vector &pairwise_matches, - float conf_threshold); +std::vector CV_EXPORTS leaveBiggestComponent(std::vector &features, std::vector &pairwise_matches, + float conf_threshold); -void findMaxSpanningTree(int num_images, const std::vector &pairwise_matches, - Graph &span_tree, std::vector ¢ers); +void CV_EXPORTS findMaxSpanningTree(int num_images, const std::vector &pairwise_matches, + Graph &span_tree, std::vector ¢ers); } // namespace cv diff --git a/modules/stitching/include/opencv2/stitching/seam_finders.hpp b/modules/stitching/include/opencv2/stitching/seam_finders.hpp index 805ace68c1..c383cce884 100644 --- a/modules/stitching/include/opencv2/stitching/seam_finders.hpp +++ b/modules/stitching/include/opencv2/stitching/seam_finders.hpp @@ -47,7 +47,7 @@ namespace cv { -class SeamFinder +class CV_EXPORTS SeamFinder { public: enum { NO, VORONOI, GC_COLOR, GC_COLOR_GRAD }; @@ -59,14 +59,14 @@ public: }; -class NoSeamFinder : public SeamFinder +class CV_EXPORTS NoSeamFinder : public SeamFinder { public: void find(const std::vector&, const std::vector&, std::vector&) {} }; -class PairwiseSeamFinder : public SeamFinder +class CV_EXPORTS PairwiseSeamFinder : public SeamFinder { public: virtual void find(const std::vector &src, const std::vector &corners, @@ -81,14 +81,14 @@ protected: }; -class VoronoiSeamFinder : public PairwiseSeamFinder +class CV_EXPORTS VoronoiSeamFinder : public PairwiseSeamFinder { private: void findInPair(size_t first, size_t second, Rect roi); }; -class GraphCutSeamFinder : public SeamFinder +class CV_EXPORTS GraphCutSeamFinder : public SeamFinder { public: enum { COST_COLOR, COST_COLOR_GRAD }; diff --git a/modules/stitching/include/opencv2/stitching/util.hpp b/modules/stitching/include/opencv2/stitching/util.hpp index 2af347f212..2f90b6abe8 100644 --- a/modules/stitching/include/opencv2/stitching/util.hpp +++ b/modules/stitching/include/opencv2/stitching/util.hpp @@ -59,7 +59,7 @@ namespace cv { -class DisjointSets +class CV_EXPORTS DisjointSets { public: DisjointSets(int elem_count = 0) { createOneElemSets(elem_count); } @@ -76,7 +76,7 @@ private: }; -struct GraphEdge +struct CV_EXPORTS GraphEdge { GraphEdge(int from, int to, float weight) : from(from), to(to), weight(weight) {} @@ -88,7 +88,7 @@ struct GraphEdge }; -class Graph +class CV_EXPORTS Graph { public: Graph(int num_vertices = 0) { create(num_vertices); } @@ -106,13 +106,13 @@ private: ////////////////////////////////////////////////////////////////////////////// // Auxiliary functions -bool overlapRoi(Point tl1, Point tl2, Size sz1, Size sz2, Rect &roi); -Rect resultRoi(const std::vector &corners, const std::vector &images); -Rect resultRoi(const std::vector &corners, const std::vector &sizes); -Point resultTl(const std::vector &corners); +bool CV_EXPORTS overlapRoi(Point tl1, Point tl2, Size sz1, Size sz2, Rect &roi); +Rect CV_EXPORTS resultRoi(const std::vector &corners, const std::vector &images); +Rect CV_EXPORTS resultRoi(const std::vector &corners, const std::vector &sizes); +Point CV_EXPORTS resultTl(const std::vector &corners); // Returns random 'count' element subset of the {0,1,...,size-1} set -void selectRandomSubset(int count, int size, std::vector &subset); +void CV_EXPORTS selectRandomSubset(int count, int size, std::vector &subset); } // namespace cv diff --git a/modules/stitching/include/opencv2/stitching/warpers.hpp b/modules/stitching/include/opencv2/stitching/warpers.hpp index 9dbadb2f4e..45344b0c12 100644 --- a/modules/stitching/include/opencv2/stitching/warpers.hpp +++ b/modules/stitching/include/opencv2/stitching/warpers.hpp @@ -49,7 +49,7 @@ namespace cv { -class Warper +class CV_EXPORTS Warper { public: enum { PLANE, CYLINDRICAL, SPHERICAL }; @@ -62,7 +62,7 @@ public: }; -struct ProjectorBase +struct CV_EXPORTS ProjectorBase { void setTransformation(const Mat& R); @@ -75,7 +75,7 @@ struct ProjectorBase template -class WarperBase : public Warper +class CV_EXPORTS WarperBase : public Warper { public: virtual Point warp(const Mat &src, float focal, const Mat &R, Mat &dst, @@ -96,7 +96,7 @@ protected: }; -struct PlaneProjector : ProjectorBase +struct CV_EXPORTS PlaneProjector : ProjectorBase { void mapForward(float x, float y, float &u, float &v); void mapBackward(float u, float v, float &x, float &y); @@ -105,7 +105,7 @@ struct PlaneProjector : ProjectorBase // Projects image onto z = plane_dist plane -class PlaneWarper : public WarperBase +class CV_EXPORTS PlaneWarper : public WarperBase { public: PlaneWarper(float plane_dist = 1.f, float scale = 1.f) @@ -119,7 +119,7 @@ protected: }; -class PlaneWarperGpu : public PlaneWarper +class CV_EXPORTS PlaneWarperGpu : public PlaneWarper { public: PlaneWarperGpu(float plane_dist = 1.f, float scale = 1.f) : PlaneWarper(plane_dist, scale) {} @@ -131,7 +131,7 @@ private: }; -struct SphericalProjector : ProjectorBase +struct CV_EXPORTS SphericalProjector : ProjectorBase { void mapForward(float x, float y, float &u, float &v); void mapBackward(float u, float v, float &x, float &y); @@ -140,7 +140,7 @@ struct SphericalProjector : ProjectorBase // Projects image onto unit sphere with origin at (0, 0, 0). // Poles are located at (0, -1, 0) and (0, 1, 0) points. -class SphericalWarper : public WarperBase +class CV_EXPORTS SphericalWarper : public WarperBase { public: SphericalWarper(float scale = 300.f) { projector_.scale = scale; } @@ -150,7 +150,7 @@ protected: }; -class SphericalWarperGpu : public SphericalWarper +class CV_EXPORTS SphericalWarperGpu : public SphericalWarper { public: SphericalWarperGpu(float scale = 300.f) : SphericalWarper(scale) {} @@ -162,7 +162,7 @@ private: }; -struct CylindricalProjector : ProjectorBase +struct CV_EXPORTS CylindricalProjector : ProjectorBase { void mapForward(float x, float y, float &u, float &v); void mapBackward(float u, float v, float &x, float &y); @@ -170,7 +170,7 @@ struct CylindricalProjector : ProjectorBase // Projects image onto x * x + z * z = 1 cylinder -class CylindricalWarper : public WarperBase +class CV_EXPORTS CylindricalWarper : public WarperBase { public: CylindricalWarper(float scale = 300.f) { projector_.scale = scale; } @@ -183,7 +183,7 @@ protected: }; -class CylindricalWarperGpu : public CylindricalWarper +class CV_EXPORTS CylindricalWarperGpu : public CylindricalWarper { public: CylindricalWarperGpu(float scale = 300.f) : CylindricalWarper(scale) {}