version UDAMA

This commit is contained in:
tth 2019-10-30 20:09:32 +01:00
parent cf70ca6b81
commit 85c6e943f3
2 changed files with 45 additions and 8 deletions

View File

@ -406,6 +406,9 @@ do
done
\end{verbatim}
En fait, je n'ai pas la moindre idée de ce que peut bien
faire ce code\dots
% -------------------------------------------------------------------
\section{Video for Linux}\index{v4l2}
@ -433,15 +436,41 @@ options :
-n NNN how many frames ?
-O ./ set Output dir
-o bla set output filename
-p NN.N period in seconds
-p NN.N delay between frames
-s WxH size of capture
-u try upscaling...
-v increase verbosity
\end{verbatim}
La plupart de ces options ont un usage quasi-évidents.
L'option \texttt{-s} doit correspondre à une des
résolutions possible de votre capteur.
\subsubsection{Upscaling}\index{upscaling}\label{upscaling}
La fonction que j'ai appelée \textsl{upscaling} est un petit
hack qui permet de doubler artificiellement la résolution
de l'image, en profitant du fait que l'on est capable
de prendre $N$ images en rafale.
Pour être rigoureux dans la prise de vue, ce $N$ doit
être un multiple de 4.
\subsection{video-infos}\index{video-infos}\label{video-infos}
Que contient, que peut faire mon périphérique \textsl{àlc} ?
Quelles sont ses possibilités de réglage ?
\begin{verbatim}
tth@debian:~/Devel/FloatImg$ v4l2/video-infos -h
Options :
-d select the video device
-K set the K parameter
-l list video devices
-T bla add a title
-v increase verbosity
\end{verbatim}
% -------------------------------------------------------------------
\section{Et pour la suite ?}

View File

@ -301,22 +301,30 @@ for (i = 0; i < nbre_capt; i++) {
puts(""); fflush(stdout);
t_final = fimg_timer_get(0);
fprintf(stderr, "pid %d : elapsed %g s -> %.2f fps\n", getpid(),
if (verbosity) {
t_final = fimg_timer_get(0);
fprintf(stderr, "pid %d : elapsed %g s -> %.2f fps\n", getpid(),
t_final, (double)nbre_capt / t_final);
}
#if SAVE_AS_CUMUL
if (to_gray) {
if (verbosity) fputs("converting to gray\n", stderr);
foo = fimg_to_gray(&cumul);
}
#if SAVE_AS_CUMUL
// save cumul to file
if (verbosity) fprintf(stderr, "saving to '%s'\n", outfile);
foo = fimg_save_as_pnm(&cumul, outfile, 1);
if (verbosity) fprintf(stderr, "saving cumul to '%s'\n", outfile);
foo = format_from_extension(outfile);
switch (foo) {
case FILE_TYPE_FIMG:
foo = fimg_dump_to_file(&cumul, outfile, 0);
break;
case FILE_TYPE_PNM:
foo = fimg_save_as_pnm(&cumul, outfile, 1);
break;
}
// free buffers
fimg_destroy(&cumul);
#endif