PeakGen
PeakGen

Reputation: 22995

Converting images between colour spaces

In my book, the method to convert a image from one colour space to another is cv::cvtColor(). But, I can't find that method in cv namespace! In other words, I am using VS 2010 express, and the intellisense also got no idea about this method!

I am using opencv 2.4, so is this method is moved to another namespace or something? Please see the following, the method if not in CV

#include <iostream>
#include <opencv2\core\core.hpp>
#include <opencv2\highgui\highgui.hpp>

using namespace std;
using namespace cv;

int main()
{
    Mat m;
    //cv::cvtColor(Mat,Mat,int)  is not there!
}

Upvotes: 0

Views: 54

Answers (1)

fatihk
fatihk

Reputation: 7919

you can have a look at imgproc.hpp :

#include <opencv2\imgproc\imgproc.hpp>

You may also need to add opencv_imgproc24x.lib or opencv_imgproc24xd.lib to your linker inputs

Upvotes: 1

Related Questions