Why does ofxCvPiCam work better than ofxRPiCameraVideoGrabber?

I’m comparing performance on a Raspberry Pi 3 for grabbing frames from an RPi Camera v2 with these wonderful addons:

Both projects build successfully, but i more latency in ofxRPiCameraVideoGrabber as well as some occasional horizontal lines across the image, whereas the video from ofxCvPiCam is smooth/fast.

I’m also finding than when I integrate the grabber into my application, i get a lot of out-of-order frames from the grabber with ofxRPiCameraVideoGrabber where as more complex applications with ofxCvPiCam perform smoothly.

Since my application prefers the grabbing frames to textures, the .getTextureReference() method from ofxRPiCameraVideoGrabber is what I’d like.

Any suggestions on optimizing performance for ofxRPiCameraVideoGrabber grabbing?


Unfortunately I haven’t managed to time to update the ofxCvPiCam addon, which lacks testing on Raspberry Pi 3 with RPi Camera v2 so I totally appreciate taking the time (and risk :wink: ) of trying it out.

ofxCvPiCam doesn’t provide a texture, however, you should be able to use ofCv’s toOf to convert a cv::Mat to an ofImage and do getTexture()


I was building the Openframeworks based project - Watershed Footfall. It is running well on Live Footfall, and configuration is the main issue there.

Only one requirement from the project. How can one record the videos in 30 minute snippets, while at the same time the live footfall processing is going on?

I can use either ofxCvPiCam or ofxRPiCameraVideoGrabber in the Cameramanager.cpp file, I beleive.

Any clues as to the syntax of how I would jig this?
Thank you!