Monday, January 29, 2007

movellan, guest, differences

i talked more with movellan last thursday. he's not as keen on working with us as he was before. he had been under the impression that we could work more directly on the robotics problem. he's encouraging though.
on friday i met with guest again. he gave me some code for ppm manipulation, like scaling.

i also washed my phone, so now it's even harder to talk with guest. he's more of a phone person and not so much on the email. we're going to meet again this friday. we were supposed to meet today, but he hasn't showed up.

our own code now has code for doing a diff from n frames ago, and for doing a running average difference. unfortunately video does not play on my laptop, so i'll have to test it later.

Wednesday, January 24, 2007

Blob detection library

I was Googling around and found a blob detection library that we can potentially use. The only thing is that it's written in Java; we'll need to port it to C first before we can try it with the video footage we've captured so far. The nice thing about Java is its similarity to C--there should be no problems porting it to the C language.

I'd also like to figure out what algorithm it's using, and compare it with the currently available algorithms out there. This will require reading the library code, though.

Friday, January 19, 2007

Video differences

We now have a video diff application. Here is a processed version of the clip posted previously. It looks pretty promising, and better than I expected. Right now, it compares all subsequent frames with the first frame captured from the camera, but we eventually want to diff from the previous frame instead (to account for changes in scenery/time of day).

The current code for the video diff program is on Subversion, at svn://svn.lifeafterking.org/cse190/videodiff/. To compile:
gcc -O2 -march=pentium4 -mtune=pentium4 -mmmx -g -o videodiff videodiff.c
To run:
ffmpeg -vcodec ppm -f image2pipe | ./videodiff | ffmpeg -vcodec pgm -f image2pipe -i - -vcodec mpeg4 [output file]
And there you have it. :)

Wednesday, January 17, 2007

Initial video capture

This was taken earlier this morning from the sixth floor of EBU1. Near the end of the video, it shows a van leaving a parking space and stopping in the middle of the parking lot. After, the driver gets out, puts something in the trunk, and gets back in. I preferred footage of someone walking to his/her car, but this works for the time being.

Anyways, off to class.

Tuesday, January 16, 2007

Initial footage from camera

So, it looks like the command for ffmpeg is actually incorrect with the version that I'm using. It should be:

ffmpeg -an -s 960x720 -vcodec ppm -f image2pipe test.ppm

or this for B&W:

ffmpeg -an -s 960x720 -vcodec pbm -f image2pipe test.pbm

(of course, replacing test.pbm/ppm with "-" to output to standard output)

Result (clicking on image goes to the full sized version):


Friday, January 12, 2007

schmoozing

i talked with professor Guest today at work. he is excited about the idea of finding out which parking spots were open using a webcam. he said he's been meaning to do a similar project on his own. work was rather slow and the bosses were away at lunch, so we didn't have much to do related to our jobs.
i also saw doctor Movellan last night at robotics. when Movellan heard that we only had 9 weeks, he said he didn't think that was enough time. He suggests that we use frame-by-frame difference to track moving objects.
ekiga will display video just fine, but i can't get ffmpeg, luvcvideo, and mplayer to do any video capture. i might just have to go straight debian. mooneer was able to get both my camera and his working. none of this ubuntu stuff.
i'm off to class, k c u later bye.

Forget DirectShow, we're using Linux

So, it turns out that there's actually a lot of stuff out there for Linux video/webcam capture. This stuff is also much easier than trying to deal with DirectShow. For instance, this shows a ffmpeg command that will convert the webcam input to a series of grayscale PGM images, one per frame. I can even use prerecorded video instead of the camera by using the filename of the video instead of /dev/video0. With some well-written scripts and the actual detection application, a GUI for the entire system isn't even needed.

Oh yeah, and Linux supports the Logitech camera using the uvcvideo driver. Excellent. :)

Anyways, we'll record some video for testing this weekend.