This is the 2nd time I face this problem. Previously, it was posted here and fixed. Last time, the attempt was made for Ubuntu Precise. I updated my system to the new Ubuntu LTS 14.04 and the problem occurs again and old fix doesn't seem to work
template <class NumType> void drawCircles(cv::Mat& image, const cv::Mat_<cv::Vec<NumType, 2> > points, cv::Scalar color)
{
Point2d p0;
for (int i = 0; i < points.cols; i++)
{
p0.x = cvRound(points.at<cv::Vec<NumType, 2> >(0, i)[0]);
p0.y = cvRound(points.at<cv::Vec<NumType, 2> >(0, i)[1]);
circle(image, p0, 5, color, 2, 8);
}
}
I've tried to add template keyword from the hints discussed here. Specifically:
p0.x = cvRound(points.at<cv::template Vec<NumType, 2> >(0, i)[0]);
still no help The original error is:
error: expected primary-expression before ‘>’ token
by the way, this same code compiled cleanly in Windows with VS2008 or VS2010
Thank you!