user2565010
user2565010

Reputation: 2010

OpenCV C++ resize() not found

I installed opencv 2.4.9 for macOS and integrated it with Xcode. However, although it finds most functions, when calling the resize() function, I get the build error 'Use of undeclared identifier resize'.

Can anybody please tell me how to fix this?

Upvotes: 2

Views: 2199

Answers (1)

chappjc
chappjc

Reputation: 30579

You don't mention how you are calling it, but there are two resize functions: a member of Mat that changes the number of rows, and cv::resize() that interpolates to resize an image. For the latter you need imgproc.hpp.

#include <opencv2/imgproc/imgproc.hpp>
//...
cv::resize(src, dst, dst.size(), 0, 0, interpolation);

Upvotes: 7

Related Questions