Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Why I can't use estimateRigidTransform?

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