我有一个cv::Mat
要转换为cv::Matx33f
. 我尝试这样做:
cv::Mat m;
cv::Matx33f m33;
.........
m33 = m;
但所有数据都丢失了!知道怎么做吗?
这里的更新 是导致我的问题的代码的一部分:
cv::Point2f Order::warpPoint(cv::Point2f pTmp){
cv::Matx33f warp = this->getTransMatrix() ; // the getter gives a cv::Mat back
transformMatrix.copyTo(warp); // because the first method didn't work, I tried to use the copyto function
// and the last try was
warp = cv::Matx33f(transformationMatrix); // and waro still 0
cv::Point3f warpPoint = cv::Matx33f(transformMatrix)*pTmp;
cv::Point2f result(warpPoint.x, warpPoint.y);
return result;
}