Search code examples
opencvobject-detection

Error with matchTemplate function in OpenCV


These are includes which I am using

#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc_c.h>

This is namespace

using namespace cv;

But when I am using matchTemplate function, I am catching the following problem

error C3861: 'matchTemplate': identifier not found

Can anyone help me to solve this problem?

Additional information: I am using OpenCV2.3

thank you for spending time to view and comment my problem

Best Regards Hayk


Solution

  • You need imgproc.hpp included, the one that you included has the C version only : cvMatchTemplate