error: ‘cvPoint’ was not declared in this scope

error: ‘cvPoint’ was not declared in this scope

imageCorners[0] = cvPoint(0, 0);

解决方案:

imageCorners[0] = cv::Point(0, 0);

参考思路:

https://stackoverflow.com/questions/57053358/opencv-cvpoint-and-cv-font-hershey-simplex-not-declared-in-this-scope

Don’t mix the obsolete C api with the C++ api. Use cv::Point instead of cvPoint, and cv::FONT_HERSHEY_SIMPLEX instead of CV_FONT_HERSHEY_SIMPLEX, e.g.:

cv::putText(image, line1, cv::Point(10,image.rows-18),
cv::FONT_HERSHEY_SIMPLEX, 0.4, cv::Scalar(200,200,250), 1, 8);

你可能感兴趣的:(数字空间建设指南,linux,ubuntu,服务器)