Giter VIP home page Giter VIP logo

raspicalib's Introduction

RaspiCalib

RapiCalib is a camera calibration app from an OpenCV tutorial modified to work directly with the Raspberry Pi camera.

A modified RaspiVid application is used to provide the image data (in a way similar to the RaspiCV project). The original RaspiVid.c is modified (see d019d18) to pass image and motion vector buffers to callbacks defined in cv.h. File cv.cpp implements these callbacks and provides the latest captured frame to class RaspiVideoCapture.

The camera_calibration code and the XML configuration file come from the OpenCV library. The original camera_calibration.cpp is modified (see e2bbc46) to support the Raspberry Pi camera.

The exact camera configuration (parametrs passed to the RaspiVid) is in cv.cpp (function process_thread). Currently the configuraton is limited to grayscale format. This can be easily modified (see function cv_init()).

Building

First build the OpenCV library (version 3.1.0) and make sure it is registered by pkg-config:

pkg-config --libs opencv

Then make the USERLAND_DIR variable in Makefile point to Raspberry Pi's userland repository. Makefile references some files required by RaspiCV.c.

Finally, build the application by make and run it by make run or:

 raspicalib default.xml

The application works exactly as described in the tutorial. The Raspberry Pi camera is used if you set the Input element in the XML configuration file to any number in range 0 to 9, e.g. <Input>"1"</Input>.

Acknowledgements

The camera calibration code and tutorial was written by Bernát Gábor as a part of the OpenCV library (license).

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.