libbgrab 2.1 review

Download
by rbytes.net on

libbgrab is a framegrabber library for Linux using the v4l driver and bt/conexant analog SD video input cards. To implement consta

License: GPL (GNU General Public License)
File size: 552K
Developer: A. Schiffler
0 stars award from rbytes.net

libbgrab is a framegrabber library for Linux using the v4l driver and bt/conexant analog SD video input cards.

To implement constant throughput and to avoid frame loss delays, triple buffering is used through local buffer copying in a separate grabbing thread.

The library consists of two parts that are usually used together:

1. framegrabber access (bgrab.c/bgrab.h)
2. xwindows output (xutils.c/xutils.h)

Additional routines allow for image processing:

3. Motion JPG compression (RTjpeg.c, RTjpeg.h, mmx.h)
4. MMX optimized image filters (asm/*)

Examples and Demo Programs:

Note: All demo programs are hardcoded for Tuner/NTSC input. You have to modify the code and recompile for other inputs!

+++ testgrab

See demo program "testgrab" for a quick intro on how to use libbgrab. See
source code comments for additional usage notes. The source code will
probably have to be edited to adapt for your video input - it is just a
demoprogram! Use Q to quit with the live-video window active. Use F and D
to change channels.

+++ glgrab (GLX only)

A very similar program uses OpenGL as output driver and maps the live
image as a texture on a polygon - try "glgrab" for nicely scaled,
full-screen output ... not always at full frame rates ;-). Works fine with
my Matrox G400 and Geforce2MX cards and the GLX drivers.

+++ asciigrab

Also included is a demo "asciigrab" that converts video in realtime into
ASCII CHARACTERS - just start it in a large enough terminal ... .
See source code for additional usage notes. This program has actually been
exhibited in the "net_condition" art exhibition at the ZKM, Karlsruhe,
Germany on a big projection screen http://www.zkm.de).

+++ delaygrab

A nice example of using MUCH memory, try "delaygrab" in which a few
seconds of video is beeing stored and shown according to a delay-map. If it
runs, try pressing the keys 1, 2 and 3 to switch effects. This effect will
be used in upcoming exhibitions at the ZKM, Karlsruhe, Germany with
temperature sensors. A similar program with a network interface was
developed for the world exhibition Expo2000, Hannover 2000 and can be found
in the "expograb" directory.

+++ zoomgrab (3Dfx Glide only)

Also included is a demo "zoomgrab" that shows a live video image at any
scale using a 3dfx graphics card (required). The numbers in "zoomdef.txt"
define zoom scales in ONE SECOND intervals (range: 0.01 to 200.0, first
number in line) and mixer volume settings (range: 0 to 100, second number
in line) that will be smoothly applied to the image and the volume. See
source code for additional usage notes. This program was also part of an art
exhibition at Weimar, Germany in 1999.

+++ artcam (3Dfx Glide only)

A similar demo called "artcam" also uses glide for display. This demo
changes the colors of an image in realtime using a precalculated
conversion table.

+++ webcam

And then there is the really complete and useful "webcam" application - see
the README in the /webcam directory for more explanation and usage
information of this nice little utility.

+++ greydetect

A utility program called "greydetect" makes measurements of the mean
greyscale values in rectangular areas. It can be used for scientific
measurements. See the README in the /greydetect subdirectory for more info
and usage information.

+++ difftrigger

The tool program "difftrigger" can be used as a security or interface
application to detect changes in images (i.e. from moving objects).
See the README in the /difftrigger subdirectory for more info and usage
information. Very similar is the application "tracker". Here the
difference images can be used to track the motion within a rectangular
area and send it to an external program via TCP/IP.

+++ rgbmix

Yet another art-program is the demo "rgbmix". It uses three framegrabber
inputs to get b/w images and mixes them together into a single RGB color
output image. This might make it into the lobby of a big company someday.
Any buyers ... :-)

+++ tracker

Yet another specialized tracking program is "tracker". Again this a program
that was developed for an installation and requires several other utilities
to be useful (asciireflector and reflector2midi). See the local README for
information on this tool. If you want to see it in action, check the passage
from the Frankfurt Airport Terminal to the Trainstation June-December 2000.
Diagrams of the installation and documentation are included in the /tracker
directory.

+++ rtjpegrecord
+++ rtjpegplay

A new addition to libbgrab for capturing live video is RTjpeg. This library
works only on MMX capable CPUs and provides fast motion Jpeg compression
routines. The resulting format is NOT compatible with standard MPEG or JPEG
files - i.e. one needs the RTjpeg library to decompress the generated stream.
The sample applications for recording and playback can be found in the /examples
directory. Since the input video format is YUV420 and a color conversion
would be required for standard RGB X-windows screens, no output will be shown
during the recording phase. To record use "rtjpegrecord" - experiment with the
quality settings for best results. The default setting achieves a 12:1 compression
ration at excellent image quality. To view use "rtjpegplay" on 16bit bpp screens.

libbgrab 2.1 search tags