I have used this code to converting cv::Mat src to ofImage Img and take decision to using ofimage instead of ofpixels.
Img.setFromPixels(src.data,width,OF_IMAGE_COLOR_ALPHA,1);
I have used this code to converting cv::Mat src to ofImage Img and take decision to using ofimage instead of ofpixels.
Img.setFromPixels(src.data,width,OF_IMAGE_COLOR_ALPHA,1);