Vision co-processor Raspberry Pi (Raspbian Jessie/OpenCV)

Hello all,
Machine vision routinely finds it’s way into every few programming threads. FIRST has yet to give us a task that cannot be solved with the basic control system, but speed is almost always better in vision system, which can become an intensive process. A co-processor is a good way to offload some vision related tasks. The Raspberry pi 3 is readily available and low cost; a good entry level co-processor.

Open-CV is almost a necessity in machine vision, and can sometimes be an issue to get up and running (despite taking a few hours to build and install). I have a image of Raspbian Jessie with Open-CV installed that I am willing to share. I think there may be some licensing issues with my posting a download link, but PM me and I’ll get you set up with the image and some documentation. I am not overly knowledgeable on the install process, so I will not be a huge help if issues arise, but the community is a great resource. The image is a bare bones Open-CV install built to run with python 2/3, no vision code or Pi/robot-Rio interface code is included.

Regards,
Skye Leake

Take a look here for some samples. I’ve built OpenCV python bindings for the pi 3, and there’s some examples for python code to get people started.

In case you don’t want to use an image, here’s a script that automatically sets up an opencv python development environment on a raspberry pi.

If anyone has figured out how to utilize the H.264 hardware decoder on the Pi with OpenCV without virtual hardware, that would be awesome. I have a C920 camera, which has H.264 compressed output (which is why you pay so much for it). Just changing the fourcc capture property doesn’t seem to do the business. I have heard of setting up a gstreamer pipeline (which does use to hardware decoder) and setting the sink to /dev/video1 can work, but I’d like a cleaner solution.

Have you considered using libavcodec/libavformat?

Hm, I hadn’t heard of that. I’ll see if I can get something to work with it. Thanks

@Skyehawk, does your image include the java artifacts for OpenCV?

No, it is very barebones. However the build files for OpenCV have not been purged so it can be rebuilt and reinstalled. But if you are going to go through all that trouble you may as well work from scratch…

Sorry I couldn’t be more help,
Skye Leake

No problem, and thanks. I have a build almost complete…and once I’m sure it’s working properly I’ll image it too–for the Java addicts among us.

FYI, I was finally able to get OpenCV fully built with Java 8 bindings and installed on a Pi 3 running Jessie.

I’ll try to find a way to share an image (my card is 32GB, so a full image would be prohibitive) but in the meantime, here are the “Installing OpenCV 3.1.0 on Raspberry Pi Debian Jessy with Java Library” instructions I followed from Robin Henniges.

I also compared notes along the way with Adrian Rosebrock’s excellent “Raspberry Pi 3 + Raspbian Jessie + OpenCV 3” instructions.

Following the two together should allow you to build an OpenCV build with Java and Python bindings, but my image will only have Java.

Full credit and thanks to both bloggers for their work and diligent documentation!