Ask Your Question
0

Why I can't use estimateRigidTransform?

asked 2017-05-18 23:14:50 -0600

yxchng gravatar image
vector<cv::Point2f> dest5Points = {
    cv::Point2f(30.2946, 51.6963),
    cv::Point2f(65.5318, 51.5014),
    cv::Point2f(48.0252, 71.7366),
    cv::Point2f(33.5493, 92.3655),
    cv::Point2f(62.7299, 92.2041)
};

vector<cv::Point2f> source5Points = {
    cv::Point2f(stof(tokens[1]), stof(tokens[2])),
    cv::Point2f(stof(tokens[3]), stof(tokens[4])),
    cv::Point2f(stof(tokens[5]), stof(tokens[6])),
    cv::Point2f(stof(tokens[7]), stof(tokens[8])),
    cv::Point2f(stof(tokens[9]), stof(tokens[10]))
};

cv::Mat warp_mat = cv::estimateRigidTransform(source5Points, dest5Points, false);

I am using estimateRigidTransform the way above. However, i am getting the error "undefined reference to `cv::estimateRigidTransform(cv::_InputArray const&, cv::_InputArray const&, bool)'"

Does anyone know how to solve this? Thanks

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2017-05-19 00:24:12 -0600

berak gravatar image

updated 2017-05-19 00:26:31 -0600

  1. open http://docs.opencv.org/master/
  2. type estimateRigidTransform into the searchbar to get here
  3. look at the address bar, to figure out, which module it is in
  4. #include "opencv2/video.hpp" and link -lopencv_video
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-05-18 23:14:50 -0600

Seen: 1,315 times

Last updated: May 18 '17