Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

estimateRigidTransform returns scale 0

Hi,

i use estimateRigidTransform, in most cases it works, but sometimes it return a 0 scaleX/Y and transX/Y. Thats my code to calce the values.

Mat M = estimateRigid(...); transx = M.at<double>(0,2); transy = M.at<double>(1,2); scalex = sqrt(pow(M.at<double>(0,0),2)+pow(M.at<double>(0,1),2)); scaley = sqrt(pow(M.at<double>(1,0),2)+pow(M.at<double>(1,1),2));

what doues it mean if the method returns all 0 ? I thought if it find no transfrom the Matrix is empty.

estimateRigidTransform returns scale 0

Hi,

i use estimateRigidTransform, in most cases it works, but sometimes it return a 0 scaleX/Y and transX/Y. Thats my code to calce the values.

Mat M = estimateRigid(...); estimateRigid(...);

transx = M.at<double>(0,2); M.at<double>(0,2);

transy = M.at<double>(1,2); M.at<double>(1,2);

scalex = sqrt(pow(M.at<double>(0,0),2)+pow(M.at<double>(0,1),2)); sqrt(pow(M.at<double>(0,0),2)+pow(M.at<double>(0,1),2));

scaley = sqrt(pow(M.at<double>(1,0),2)+pow(M.at<double>(1,1),2));

what doues it mean if the method returns all 0 ? I thought if it find no transfrom the Matrix is empty.