I’m trying to get a ofxCvColorImage from a spout texture.
This is working fine with ofImage :
ofPixels tmpPix; spoutInput.getTexture().readToPixels(tmpPix); ofImage tmpOfImage; tmpOfImage.setFromPixels(tmpPix); tmpOfImage.draw(0, 0);
But with a ofxCvColorImage, I always end up with some vertical lines, like a color channels remap issue.
What I tried :
ofxCvColorImage tmpCvColorImage; tmpCvColorImage.setFromPixels(tmpPix.getData(), 1024, 768);
I tried to allocate, with OF_IMAGE_COLOR, to allocate the texture with GL_RGB, (I think the spout texture comes in GL_RGBA)
I ended up trying to copy the pixels from the ofImage to a ofxCvColorImage, but the same issue occurs.
Any hint ?