How to capture from webcam in Linux using Mono?

How can I capture a frame from a video-4-linux device (ex: / dev / video0) using Mono and C #? Angstrom Linux runs on BeagleBoard .

+4
source share
3 answers

I captured v4l2 using C. This is probably the only language I would choose for this. There are many low level calls in the driver. You need to map the kernel memory to your application and copy buffers. You must also set up a ton of configuration for the device. If you need to, I would consider writing a C library and using Platform Invoke. Another option is to write two programs and send data to your C # application through some kind of IPC.

+5
source

You can use Emgu CV for this, it specifically advertises that it can be compiled with Mono.

Main site: http://www.emgu.com/wiki/index.php/Main_Page
Compiling in mono: http://www.emgu.com/wiki/index.php/Compiling_with_Monodevelop
Sample code for capturing video in webcams: http://www.emgu.com/wiki/index.php/Camera_Capture_in_7_lines_of_code

+3
source

I am not familiar with Mono or C # on linux, but you may have to write an interface module that provides a diver API or a reasonable abstraction. I think that then you can import the module into C # code. It looks like Mono supports DLLImport.

( http://www.mono-project.com/Interop_with_Native_Libraries )

0
source

All Articles