Curious what the solution might be to this, or if there is just another route I should go.
I am starting to experiment with ARKit (ofxARKit) and OpenCV (ofxCv), and immediately I came to an issue. To pass the camera input to OpenCV, I need to get a Mat from it. I immediately attempted this:
ofTexture tex = processor->getCameraTexture(); tex.readToPixels(pix); img.setFromPixels(pix); Mat cam = toCv(img); contourFinder.findContours(cam);
This doesn’t work, which seems to be because
ofTexture::readToPixels() isn’t compatible with OpenGL ES, as stated in the documentation.
So what is the best way to make a texture usable with OpenCV on iOS?