This is just a collection of software and other useful things for people in the lab.

Open CV example code

Note: since openv was built upon the intel IP library (they are moving to be independent of it) - it uses the ipl header format for images. The documentation of OpenCV is abysmal - however, by looking at the source code and by reading the IP docs and by looking at the examples, you should be able to work your way through it.

One of the common problems I have found is that most of the routines only accept 8bit single channel input data - and often the manual doesn't say anything about what is or isn't expected for the image parameters.

A simple example

Reads in PGM image, calculates the Canny edge detection on that image and writes out a PGM image. Note: don't put 10 (or more?) as the aperture paprameter - it seems to cause a problem (bug?).

testCanny.c

The above can be compiled using visual C (see the makefile but you obviously need to change the paths to match your system!) makefile

The above can be compiled using gcc on windows and presumably on Linux as well (see the makefile but you obviously need to change the paths to match your system!) makefilegcc

What about movie input?

The above simple example was for a single file in and single file out. If you are going to process movies - frame after frame - then obviously, if you have the movie on a disk and you know how to parse the movie file format, then you can adapt the code above. Likewise, you can do what many people (to my horror) still do and have their movies stored on disk as 100's if independent files, one file per frame.

However, if you want to interface directly to a camera to process live video, then you've got to either have a driver from the manufacurer of the capture interface (e.g., frame grabber) and look up the various interface protocols for that card, or you're going to have to use some form of standard interface. In the Microsoft windows world, that means using either the older Video For Windows (VFW) framework or the newer DirectShow framwork. These are very complex! Some examples come in the OpenCV demo apps - but you're going to have to learn MSVC version of C++ - at least to some degree - to make sense of these.

In the linux world, there are also attempts to standardize capture device interfaces.

Another alternative is to look at the Java Media Framework (JMF)

At the moment, though I can hack the various demos to get what I want using OpenCV and either VFW or Directshow, I don't have any simple help or examples to pass on - I'll work on it! - in the meantime, I guess you'll have to fight your way through yourself.