+
+ // Create greyscale array
+ if (g_srcGray == NULL)
+ {
+ Log(LOGDEBUG, "%d %d %d", g_srcRGB->rows, g_srcRGB->cols, CV_8UC1);
+ g_srcGray = cvCreateMat(g_srcRGB->rows,g_srcRGB->cols,CV_8UC1);
+ }
+
+ // Convert the RGB source file to grayscale
+ Log(LOGDEBUG, "About to cvCvtColor(%p, %p, %d)", g_srcRGB, g_srcGray, CV_RGB2GRAY);
+ cvCvtColor(g_srcRGB,g_srcGray,CV_RGB2GRAY);
+
+
+ Log(LOGDEBUG, "About to cvCreateMat");