Giter Site home page Giter Site logo

stahta01 / ofxlibdc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kylemcdonald/ofxlibdc

0.0 3.0 0.0 721 KB

Open Frameworks wrapper for libdc1394.

License: Other

C++ 39.84% C 60.16%
codeblocks msys2 win32 openframeworks-addon openframeworks dc1394

ofxlibdc's Introduction

ofxLibdc wraps libdc1394 for openFrameworks

http://damien.douxchamps.net/ieee1394/libdc1394/
http://openframeworks.cc/

It avoids unnecessary threading by using libdc1394's non-blocking image grabbing, which means you can call grabVideo without worrying about it slowing down your application.

Instead of copying the image to an internal buffer before giving it to you, ofxLibdc will fill the image you pass to it. This avoids unnecessary copying.

A minimal example of grabbing with ofxLibdc looks like:

#include "ofxLibdc.h"
class testApp : public ofBaseApp {
public:
	ofxLibdc::Camera camera;
	ofImage curFrame;
	void setup() {
		camera.setup();
	}
	void update() {
		if(camera.grabVideo(curFrame))
			curFrame.update();
	}
	void draw() {
		curFrame.draw(0, 0);
	}
};

Because there is no separate capture thread, there is no overhead from copying images you don't need.

The only parameter you may pass to setup() is the camera number or a camera GUID string. Any other camera parameters are handled by setter functions.

ofxLibdc can dynamically change a number of parameters. setPosition() can be used to change the ROI position without restarting the camera. Other changes can be made, but will cause slight delays. Format 7 can be switched on and off, or between modes, 1394b can be switched on and off, and the ROI can be resized.

For an example of interfacing to the color USB Firefly MV on OSX, see this example project from Lewis Sykes and Elliot Woods.

ofxlibdc's People

Contributors

kylemcdonald avatar memo avatar julapy avatar oftheo avatar

Watchers

James Cloos avatar  avatar  avatar

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.