I am trying to make a simple conversion of an image from RGB to Grayscale with OpenCV. I am using dev-cp on windows, here is the code:
#include <cv.h>
#include <highgui.h>
using namespace cv;
int main( int argc, char** argv )
{
char* imageName = argv[1];
Mat image;
image = imread( imageName );
Mat gray_image;
cvtColor(image,gray_image,CV_RGB2GRAY);
}
When I execute it, seems it crashes on the cvtColor
.
please try