Ask Your Question

lowpolyjoe's profile - activity

2013-05-14 11:45:31 -0600 received badge  Supporter (source)
2013-05-14 11:45:18 -0600 commented answer cvCvtColor Crash?

DOH! <embarrassed>

Thanks.

2013-05-14 11:17:44 -0600 asked a question cvCvtColor Crash?

Just started using OpenCV. Good stuff.

Playing with conversion of 24bit color image (8,8,8) to various representations.

Getting an exception in cvCvtColor. I thought my problem might have been with how i was stuffing my Mat objects with my image data (not using an OpenCV load function), so i left them empty. I assume they are filled with garbage or zeros - i don't care either way for this test. Problem is that i still get an exception with the following code:

cv::Mat matInput(nHeight, nWidth, CV_8UC3);
cv::Mat matOutput(nHeight, nWidth, CV_8UC3);
cvCvtColor(&matInput, &matOutput, CV_BGR2HSV);

"......\src\opencv\modules\core\src\matrix.cpp:698: error: (-5) Unknown array type"

I'm still coming to grips with the type constants and all, but i thought i was inputting a 3 channel image, 8bits per channel BGR matrix (CV_8UC3) and requesting the same type as output. cvCvtColor documentation suggests this is supported unless i've misread it.

OpenCV version 2.4.5.0 prebuilt binaries C++ under MSVC2010 on Windows7 x64 Debug build of my app

I'm sure it's something stupid but I don't want to waste any more time on it. Please point out my mistake.

Thanks, Joe