Re: [gtk-list] Displaying images from a camera as fast as possible?



Nils wrote:
> I'm about to write a program that continuously gets images from a camera and I
> want to display them (as many as possible) using GTK. Any suggestions about
> how to do this? Appropriate widgets?
> 

I might have something for you.
Here in our office we have a UK$20 B/W camera watching our front door for
visitors. The camera generates normal 625 line pictures which we digitise on
the cheapest video capture card we could find. The digitiser runs under the
video-for-linux drivers as seen on the BTTV project's WWW pages.

The pictures are broadcast (should be multicast..) as JPEGs on our LAN by means
of BPTP (Brainless Picture Transfer Protocol!) which I lashed up in an afternoon just
to get it going, and still haven't finished it (you know the story...)!

                   ------------------------------------

Anyway - the GTK part of all this is the displayer. I used a trivial GTK program
to drive IMLIB to display the incoming JPEGs from the network. It will run at about
4 frames a second(*) on a Pentium 90 running GTK+ 1.0.6 and Imlib 1.4. I've not made
any attempt to optimise it(**) - Imlib is probably *not* the right way to go for
rendering what is effectively a motion-JPEG(***). I just couldn't be bothered to do
it the hard way with libjpeg.

(*) Four frames a second where frames are 128x96 pixels.
(**) Not even to allow for the fact that all frames are B/W.
(***) Maybe it should though.

If there's interest in my little bodge^H^H^H^H^H^H program, then I'll maybe link
it to the GTK Applications Page (http://metalab.unc.edu/gtk/) if Sergei will
have such junk on his nice page!

--

Steve                                       | Steve's law of House Rewiring:
S.Hosgood@swansea.ac.uk                     | "No matter how many power sockets
Phone: +44 1792 297292 + ask for Steve      |  you fit in a room, you will run
Fax:   +44 1792 295811                      |  out within the first week of use
--------------------------------------------+  even if you took Steve's law of
http://iiit.swan.ac.uk/~iisteve/steve.html  |  House Rewiring into account"




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]