Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Load cv triangulate points()

Hi everyone,

I am working on cv triangulatepoints(). I have keypoint values and projection matrix and I did tringulation using opencv function. But I could not able to load the points to point3d variable. I am getting error at "double w = out.at<double>(3,0);". I am trying to take x,y,z axis for one keypoint out of my 383 keypoints. Can anyone please suggest me.

int N = inp1.size(); cv::Mat out = cv::Mat(4,N, CV_64FC1); cv::triangulatePoints( P, P1, inp1, inp2, out);

cout<< "out = " << out << endl;

double w = out.at<double>(3,0); double x = out.at<double>(0,0)/w; double y = out.at<double>(1,0)/w; double z = out.at<double>(2,0)/w; pointcloud.push_back(cv::Point3f(x,y,z));

Load cv triangulate points()

Hi everyone,

I am working on cv triangulatepoints(). I have keypoint values and projection matrix and I did tringulation using opencv function. But I could not able to load the points to point3d variable. I am getting error at "double w = out.at<double>(3,0);". I am trying to take x,y,z axis for one keypoint out of my 383 keypoints. Can anyone please suggest me.

int N = inp1.size(); inp1.size();

cv::Mat out = cv::Mat(4,N, CV_64FC1); CV_64FC1);

cv::triangulatePoints( P, P1, inp1, inp2, out);

cout<< "out = " << out << endl;

double w = out.at<double>(3,0); out.at<double>(3,0);

double x = out.at<double>(0,0)/w; out.at<double>(0,0)/w;

double y = out.at<double>(1,0)/w; out.at<double>(1,0)/w;

double z = out.at<double>(2,0)/w; out.at<double>(2,0)/w;

pointcloud.push_back(cv::Point3f(x,y,z));

click to hide/show revision 3
No.3 Revision

Load cv triangulate points()

Hi everyone,

I am working on cv triangulatepoints(). I have keypoint values and projection matrix and I did tringulation using opencv function. But I could not able to load the points to point3d variable. I am getting error at "double double w = out.at<double>(3,0);". out.at<double>(3,0);. I am trying to take x,y,z axis for one keypoint out of my 383 keypoints. Can anyone please suggest me.

int N = inp1.size();

inp1.size(); cv::Mat out = cv::Mat(4,N, CV_64FC1);

CV_64FC1); cv::triangulatePoints( P, P1, inp1, inp2, out);

cout<< out); "out = " << out << endl;

double endl; w = out.at<double>(3,0);

double out.at<double>(3,0); x = out.at<double>(0,0)/w;

double out.at<double>(0,0)/w; y = out.at<double>(1,0)/w;

double out.at<double>(1,0)/w; z = out.at<double>(2,0)/w;

pointcloud.push_back(cv::Point3f(x,y,z));

out.at<double>(2,0)/w; push_back(cv::Point3f(x,y,z));