i have tried following code, but it doesnt work:
cv::mat grayImg;
// code change ofimage to cv::mat.
//....
ofImage foo;
foo.setFromPixels(grayImg.data, grayImg.rows, grayImg.cols, OF_IMAGE_SCALE);
// foo works fine for me.
cv::mat graySub = grayImg(cv::Rect(10, 10, 100, 100));
ofImage foo2;
foo2.setFromPixels(graySub.data, graySub.rows, graySub.cols, OF_IMAGE_SCALE);
foo2 doesnt work,
it seems something wrong with cv::mat operator(cv::Rect()) function.
anyone have the same issue? how to fix it>