Stark & Wayne
  • by Dr Nic Williams

OpenCV is a fast computer vision and deep learning library. We're excited to make OpenCV available to every Cloud Foundry application through a new buildpack: https://github.com/cloudfoundry-community/opencv-buildpack

What can OpenCV do? Firstly, it can determine that the author is human.

drnic-is-human

And it does other things too. I first used it on a tiny RaspberryPi with a camera. Each frame is piped into OpenCV for processing. YouTube is filled with interesting examples.

Bringing OpenCV to Cloud Foundry will open up a huge range of possibilities. Of course, you cannot connect a camera directly to your Cloud Foundry-hosted web app; so you'll be pushing images into your app via HTTP upload, a popping them off a queue, or the application could be pulling them from another source.

The follow language libraries support OpenCV 3+ of which I'm aware:

The buildpack repository includes a sample Python app https://github.com/cloudfoundry-community/opencv-buildpack/tree/master/fixtures/py-sample which is used as the example in the README.

To add OpenCV to any application, use the new cf v3-push command and pass the repo URL as the first buildpack. The last buildpack in the list must be primary buildpack that will run your application:

git clone https://github.com/cloudfoundry-community/opencv-buildpack
cd opencv-buildpack
cf v3-push py-sample-app-with-opencv -p fixtures/py-sample \
  -b https://github.com/cloudfoundry-community/opencv-buildpack \
  -b python_buildpack

If your language has bindings for OpenCV 2 only, let me know in the issues and I'll look to add OpenCV 2.

The recent CF Summit EU 2017 in Basel Switzerland had a range of talks on multi-buildpacks, which was the genesis of my excitement which lead to this OpenCV buildpack. Please watch Keaty Gross at her keynote, or her talk, or from Topher Bullock's talk.

Find more great articles with similar tags author-drnic buildpack opencv cloudfoundry