Showing posts with label camera. Show all posts
Showing posts with label camera. Show all posts

Tuesday, September 28, 2010

Fusing channel - array of cheap camera

I decided to do another experiment with my multitude of USB webcams and Gstreamer. This time I am capturing 2 shots using the stereo config I used before, but with an InfraRed filter with 850nm as the pass-band over one of the cameras. The rig looks nothing spectacular but costs only $40 net.
Testing out disparate info fusion using 2 cameras and 1 with an ir filter.

There is some parallax and neither the camera nor the mount is calibrated. Registration of the multi-band images is purely by trial and error at this stage. I have written it up with matplotlib, numpy and PIL to allow more automated transform estimation.

InfraRed 850nm Image
The overlapped section is cropped using array subsetting and channels are reassigned as InfraRed , Red , Green instead of plain RGB to form a False Colour Composite. Some of the misaligned sections can be seen highlighted. I also have 950nm and 750nm filters to test more detail in the spectral response. The compositing will obviously become harder and harder as a manual process till I build a stable mount, but I kind of like the extensibility with clip-on-mounting.
RGB Image
The solution is to use the well developed feature based image matching techniques and let feature descriptors like SURF, SIFT or Harris Corners pick up the bits I picked up by hand. The spectral variation provides additional challenge.
Composite Image
I finish off with the composite built so far.  Low costs systems like this can be used for environmental studies where lugging large cameras and spectrometers around rough terrain is not pleasant.

Monday, April 26, 2010

Making the BeagleCam - frame processing for objects

After a bit of fiddling with opkg - opencv samples were installed. The plan is to make an office behaviour analysis system with a hallway camera. The school already has several surveillance cameras but I can't really get to them, but I did make a javascript based frame-by-frame loop for this system.

After testing the opencv samples for a bit I realized that a filtered image stream can be very handy in saving processing and storage. The idea is to utlize gstreamer chaining to slot in an openCV facedetect module and save only frames where face is detected.

I can currently capture timestamped frames using gstreamer:

gst-launch v4l2src num-buffers=1 ! video/x-raw-yuv,width=640,height=480,framerate=30/1 ! ffmpegcolorspace ! jpegenc ! filesink location=$(date +"%s").jpg

Then I can use OpenCV peopledetect and facedetect in the chain with queued up frames and start saving once the detection starts producing output frames. This will greatly reduce the amount of boring hallway frames and the board will concentrate on processing interesting events i.e. people approaching the camera. This can then be used for interesting data mining work such as time spent in the office, walking speed, hallway meetings between colleagues and number of days without changing shirts.

Time to ensure the gstreamer opencv module works properly on beagleboard.