Skip to content

robcio83/libwebcam

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libwebcam

Lightweigh C++ webcam library

Main featues:

  • Image acquisition
  • Webcam enumeration
  • C++ 11 compliance
  • Portablity (Windows, Linux)
  • Built on top of Video4linux (Linux) and DirectShow (Windows)
  • Ease of use

Usage example:

...
#include <libwebcam/webcam.h>
...
int main()
{
    try{
        webcam::video_settings video_settings;
		video_settings.set_format(webcam::format_JPEG());
		video_settings.set_fps(6);
		video_settings.set_resolution(webcam::resolution(320, 240));
		
		unsigned char device_number = 1;
		webcam::device device(device_number, video_settings);
		device.open();
		for(int i=0; i<100; i++){
		    webcam::image * image = device.read();
		    //do somethig with image
		    delete image;
		}
		device.close();
    }
    catch (const webcam::webcam_exception & exc_){
		std::cout<<exc_.what()<<std::endl;
	}
	return 0;
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 92.2%
  • CMake 3.9%
  • Batchfile 3.3%
  • Other 0.6%