78 lines
2.6 KiB
TeX
78 lines
2.6 KiB
TeX
% --------------------------------------------------------------------
|
|
% nouveau juillet 2014 à mixart-myrys
|
|
% --------------------------------------------------------------------
|
|
|
|
\chapter{Webcam}
|
|
\label{chap:webcam}
|
|
\index{webcam}
|
|
|
|
Sous Linux, c'est quand même un peu tordu%
|
|
\footnote{Avis personnel !}, dans le même genre
|
|
que la pile son, quoi...
|
|
Nous allonc commencer par les principes et outils
|
|
de base, puis passer à plus
|
|
simple : juste tenter de prendre une photo avec une
|
|
\textsl{webcam} classique en USB, et d'enregistrer cette
|
|
image.
|
|
|
|
% --------------------------------------------------------------------
|
|
|
|
\section{v4l2}\index{v4l2}
|
|
|
|
\textsl{Video For Linux, second edition.}
|
|
|
|
\begin{verbatim}
|
|
tth@delirium:~/Essais/Fonderie$ v4l2-ctl --list-formats-ext
|
|
ioctl: VIDIOC_ENUM_FMT
|
|
Type: Video Capture
|
|
|
|
[0]: 'MJPG' (Motion-JPEG, compressed)
|
|
Size: Discrete 640x480
|
|
Interval: Discrete 0.033s (30.000 fps)
|
|
Size: Discrete 320x240
|
|
Interval: Discrete 0.033s (30.000 fps)
|
|
Size: Discrete 1920x1080
|
|
Interval: Discrete 0.033s (30.000 fps)
|
|
Size: Discrete 1280x720
|
|
Interval: Discrete 0.033s (30.000 fps)
|
|
\end{verbatim}
|
|
|
|
Question : quelle méthode utiliser pour avoir la même chose avec
|
|
des lignes de code écrites en C ?
|
|
|
|
% --------------------------------------------------------------------
|
|
|
|
\section{vgrabbj}
|
|
\index{vgrabbj}
|
|
|
|
|
|
|
|
D'après la manpage :
|
|
« \textit{
|
|
vgrabbj is a program that will grab images from any v4l-capable device
|
|
which supports one of the rgb24, rgb32, yuv420, yuv420p, yuyv, or
|
|
yuv422 palettes and saves the image as a .jpg, .png, or .pnm file.
|
|
} »
|
|
|
|
Quelques options à connaitre : \texttt{-S} échange des
|
|
deux composantes R et B; \texttt{-s <device>} affiche
|
|
les capacités du périphérique v4l\index{v4l}.
|
|
|
|
|
|
% --------------------------------------------------------------------
|
|
\section{Cheese}
|
|
|
|
\begin{quote}
|
|
cheese uses your webcam to take photos and videos, applies fancy special
|
|
effects and lets you share the fun with others. It was written as part of
|
|
Google's 2007 Summer of Code lead by daniel g. siegel and mentored by Raphaël
|
|
Slinckx. Under the hood, Cheese uses GStreamer to apply fancy effects to photos
|
|
and videos. With Cheese it is easy to take photos of you, your friends, pets or
|
|
whatever you want and share them with others. After the success of the Summer
|
|
of Code, the development continued and we are still looking for people with
|
|
nice ideas and patches ;)
|
|
\end{quote}
|
|
|
|
% --------------------------------------------------------------------
|
|
|