且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在OpenCV中将图像调整为特定大小?

更新时间:2023-01-15 18:27:45

您可以使用 cvResize 。或者更好地使用c ++接口(例如 cv :: Mat 而不是 IplImage cv :: imread 而不是 cvLoadImage ),然后使用 cv :: resize 解除分配本身。

You can use cvResize. Or better use c++ interface (eg cv::Mat instead of IplImage and cv::imread instead of cvLoadImage) and then use cv::resize which handles memory allocation and deallocation itself.