Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

capture image from web camera

Tags:

ocaml

I'm trying to learn ocaml and I want get image from web camera. I'm reading Unix system programming in OCaml

How can I get picture from my web camera on linux operating system?

like image 885
John Ostin Avatar asked Jan 29 '13 03:01

John Ostin


People also ask

How do I capture an image from a website?

Right click that URL and click Open in new tab. 6. In the new tab, right click the image and choose Save image as. Now you can name your file and save it to your computer.

How do I capture an image?

Press Ctrl + PrtScn keys. The entire screen changes to gray including the open menu. Select Mode, or in earlier versions of Windows, select the arrow next to the New button. Select the kind of snip you want, and then select the area of the screen capture that you want to capture.


1 Answers

On linux you can use V4L2 - a video capture application programming interface for Linux. Many USB webcams, TV tuners, and other devices are supported. Video4Linux is closely integrated with the Linux kernel.

Look at simple examples (in C programming language):

  • one
  • two

You can use ioctl linux system call in your OCaml program. Look at this modules:

  1. libextunix-ocaml-dev
  2. pleac-ocaml
like image 189
ymn Avatar answered Sep 20 '22 07:09

ymn