Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

basically, you forgot to link against opencv_videostab248d.lib (w/o d for release)

( linker settings -> input -> additional dependancies )

also, you don't need to specifay a vector allocator, if it's the default one.

following snippet compiled & linked fine for me:

#include "opencv2/videostab/global_motion.hpp"
using namespace cv;
using namespace cv::videostab;
#include <vector>
using namespace std;

int main()
{
    vector<Point2f> ax,by;
    ax.push_back(Point2f(1,1));
    by.push_back(Point2f(3,3));
    Mat t = estimateGlobalMotionLeastSquares(ax,by,AFFINE,0); // MM_AFFINE in 3.0
    return 0;
}

basically, you forgot to link against opencv_videostab248d.lib (w/o d for release)

( linker settings -> input -> additional dependancies )

also, you don't need to specifay specify a vector allocator, if it's the default one.

following snippet compiled & linked fine for me:

#include "opencv2/videostab/global_motion.hpp"
using namespace cv;
using namespace cv::videostab;
#include <vector>
using namespace std;

int main()
{
    vector<Point2f> ax,by;
    ax.push_back(Point2f(1,1));
    by.push_back(Point2f(3,3));
    Mat t = estimateGlobalMotionLeastSquares(ax,by,AFFINE,0); // MM_AFFINE in 3.0
    return 0;
}