I am having an issue trying to convert my cv::Mat to a 2D array. A value of type uchar* cannot be used to initialize an entity of type int*.
I converted my Mat to CV_32SC1
which I believe is of type int and definitely not uchar.
label = cv::imread(test_set_boundary[i], CV_LOAD_IMAGE_ANYDEPTH);
label.convertTo(label, CV_32SC1);
int* dataMat = label.data; //error here
unsigned char* dataMat = label.data; //works here