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));