Ask Your Question
0

cvtcolor function problem

asked 2012-12-06 18:45:08 -0600

egghead4466 gravatar image

When I try to bompile using make I keep getting this error

‘cvtColor’ was not declared in this scope

I have no idea how to fix this. I have not had any problems in the past and now OpenCV seems to hate me. LOL

Here is the Include's I'm using with no help.

#include <stdio.h>
#include "cv.h"
#include "highgui.h" 
#include </usr/local/include/opencv2/imgproc/imgproc.hpp>
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2012-12-07 00:07:17 -0600

Vladislav Vinogradov gravatar image

All C++ functions and classed are in cv namespace, so use

cv::cvtColor(...);

or add after include:

using namespace cv;
edit flag offensive delete link more
0

answered 2012-12-06 22:57:33 -0600

Haris gravatar image

If you are using OpenCV2.2 use these headers

#include "opencv2/highgui/highgui.hpp"
#include "opencv/cv.h"
edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-12-06 18:45:08 -0600

Seen: 11,313 times

Last updated: Dec 07 '12