@autr wrote:
Hi, I'm pulling my hair out trying to get ofTexture into ofxCvImage (either ofxCvColorImage or ofxCvGrayscaleImage) without unsynchronised output. I've tried permutations of cv::Mat, IplImage, ofImage etc.
It seems the fourth parameter on ofxCvImage seems to be depreciated?
// Setup ... int w = 640; int h = 480; ofxCvGrayscaleImage cvimage; ofFbo fbo; ofPixels pixels; ofImage img; fbo.allocate(w,h); pixels.allocate(w,h,1); // I've tried 0 - 4 cvimage.allocate(w, h); // There is no third parameter available? // Draw ... img.setFromPixels(pixels); img.draw(0,0,w,h); // This is fine fbo.readToPixels(pixels); cvimage.setFromPixels(pixels); cvimage.draw(0,0,w,h); // Here the channels are unsynchronised
What am I missing?
Posts: 3
Participants: 2