I don't understand this because prevPts and currPts are not used anywhere !
Mat prevPts(2,prevFeatures.size(), CV_64F), currPts(2,currFeatures.size(), CV_64F);
for(int i=0;i<prevFeatures.size();i++) { //this (x,y) combination makes sense as observed from the source code of triangulatePoints on GitHub
prevPts.at<double>(0,i) = prevFeatures.at(i).x;
prevPts.at<double>(1,i) = prevFeatures.at(i).y;
currPts.at<double>(0,i) = currFeatures.at(i).x;
currPts.at<double>(1,i) = currFeatures.at(i).y;
}
I don't understand this because prevPts and currPts are not used anywhere !