Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

if your Mat type is CV_32F, you have to access it like

rvec2.at<float>(y,x)  // not double !

if your Mat type is CV_32F, you have to access it like

rvec2.at<float>(y,x)  // not double !

also, you have to use row vecs, not column ones, e.g.

Mat tvec1(3,1,CV_32F);

if your Mat type is CV_32F, you have to access it like

rvec2.at<float>(y,x)  // not double !

also, you have to use row vecs, not column ones, e.g.

Mat tvec1(3,1,CV_32F);
rvec1(3, 1, CV_32F);
rvec1.at<double>(0,0) = 2.3;
rvec1.at<double>(1,0) = 4.5; // <-- indexing changed.
rvec1.at<double>(2,0) = 7.8; // ...

if your Mat type is CV_32F, you have to access it like

rvec2.at<float>(y,x)  // not double !

also, you have to use row vecs, not column ones, e.g.

Mat rvec1(3, 1, CV_32F);
rvec1.at<double>(0,0) rvec1.at<float>(0,0) = 2.3;
rvec1.at<double>(1,0) rvec1.at<float>(1,0) = 4.5; // <-- indexing changed.
rvec1.at<double>(2,0) rvec1.at<float>(2,0) = 7.8; // ...