Coder Social home page Coder Social logo

wasawi / ofxcvpicam Goto Github PK

View Code? Open in Web Editor NEW

This project forked from orgicus/ofxcvpicam

0.0 2.0 0.0 449 KB

ofxCvPiCam is a minimal grabber for the Raspberry Pi Camera module. It uses the MMAL interface to grab frames and convert them the cv::Mat type which can be processed using the typical opencv calls.

License: Other

Makefile 0.61% C++ 7.43% CMake 0.38% C 91.58%

ofxcvpicam's Introduction

Introduction

ofxCvPiCam is a minimal grabber for the Raspberry Pi Camera module. It uses the MMAL interface to grab frames and convert them the cv::Mat type which can be processed using the typical opencv calls.

I warmly recommend using Kyle McDonalds' ofxCv addon: it makes writing modern opencv code so much easier. The examples included uses ofxCv's drawMat() to display cv::Mat objects in OpenFrameworks. You can of course use your prefered method. In fact, excluding example-ofxCvPiCam and example-ofxCvPiCam-allSettings, examples are from ofxCv

Since this addon is intended for computer vision, you'll get the best results with the grayscale image (which you will need most of the time). If you simply want to use the Pi Camera module in OpenFrameworks without any computer vision please use Jason van Cleave's ofxRPiCameraVideoGrabber addon (GPU accelerated using OMX)

Installation

Either clone out the source code using git:

> cd openFrameworks/addons/
> git clone https://github.com/orgicus/ofxCvPiCam.git

Or download the source from GitHub here, unzip the folder, rename it from ofxCvPiCam-master to ofxCvPiCam and place it in your openFrameworks/addons folder.

Working with ofxCvPiCam

First initialize the grabber by passing the width,height and color mode(boolean: color = true, grayscale = false). Use the grab() method fetch a cv::Mat frame then carry on processing it

Note sometimes frames can be skipped so it's best to check if the returned matrix is not empty.

Credits

This wrapper is mostly done by putting together the work of

Samarth Manoj Brahmbhatt, University of Pennsyalvania -> cv::Mat wrapper listed in his book: Practical OpenCV

Jason Van Cleave -> captureApplication mmal openframeworks demo

Developed at Hirsch&Mann

ofxCvPiCam threhshold ofxCvPiCam settings ofxCvPiCam faces

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.