Wednesday, March 30, 2005

Never enough time

So I haven't blogged in ages. I have been pretty busy with various things, but unfortunately haven't been able to make much progress on my Vision system lately.

Anthea and I spent 4 days in Prague over the Easter break which was cool. It is a really beautiful city if you can get past the hordes of tourists. Also not quite as cheap as people make out either. I am planning to put photos up on the website soon (I know, you've heard that before!).

Finally got my new phone last week, an xdaIIi. Very cool device and I'm loving it so far. Had a bit of fun last night trying to build synce to get it syncing with linux. Unfortunately synce and all its dependancies are hard masked for amd64 on Gentoo, so I had to build it all in my 32bit chroot and am going to try running all the 32bit binaries with linux32 from my 64bit environment. I got as far as creating a serial connection last night and that worked so I think this strategy might just succeed.

Am going to see Neil and Tim Finn in concert at the Royal Albert hall tonight, so won't have a chance to push on any further with the vision system. I am struggling with the opencv calibration routines at the moment. I need to use these to extract my cameras intrinsic parameters, focal length etc, but it is proving very difficult so far. Hopefully some dedicated hacking this week/weekend will see some progress.

Monday, March 14, 2005

Some progress

Well I've made a little progress tonight. I managed to get the conversion from an opencv image (IplImage) format to an ImageMap (essentially an 2d array of doubles) working. This now means that all my work using libsift so far now works nicely with opencv!

I also managed to get a simple C# test app running where I continuously grab frames from my Logitech Quickcam Pro 4000 and display them to the user. It essentially just calls all the opencv and highgui methods using P/Invoke but it's working well.

It's finally looking like I might start making some progress again!

Oslo and the news

I have just come back from a great weekend in Oslo. It's a interesting place although not really at all like Stockholm which came as a bit of surprise to me. Anthea and I did as much site seeing as we could getting to the Viking ship museum, Folk museum, sculpture park and ski jump in the one and a half days we were there. I'll post the photos to the travelling section of my website shortly.

Saw this on slashdot today. It appears that MDRobotics (makers of the Canada arm I & II on the International Space Station) have been working on a similar project to me. They have created some software that can reconstruct a 3d model of a scene photographed by a stereo camera system. Their software also uses Lowe's SIFT features.

Thursday, March 10, 2005

A little progress

Well I managed to get the quickcam displaying the full resolution image using opencv. It turns out that it was capturing at 640x480 the whole time, it just wasn't displaying the whole image. A bit of tweaking to the capture properties and everything started working correctly. Specifically I needed to add these lines:

cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 640);
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 480);

I was also having a little bit of trouble getting at the raw image data from C# as you access it like this using C:

pix = ((uchar*)(img->imageData + img->widthStep*y))[x];

I ended up writing a function that looks like this (where imageData is an IntPtr):


/// This method is used to get the value of a single pixel from the
/// underlying C
array.
private unsafe byte GetPixel(int x, int y)
{
// the image data is in one long contiguous array so we need to
// skip y rows of widthstep
values before adding our x value to
// index to the right x point in the right row.

return (byte)(((byte*)this.Image.imageData) + this.Image.widthStep * y)[x];
}


Hey... it works :-)

Monday, March 07, 2005

Bits and bytes

So it appears that I am pretty crap at this whole blogging thing... I just can't seem to get into the routine of writing about the stuff I'm doing. It seems that I'd rather be doing, than writing ;-)

Last Friday I got a couple of new toys from Amazon and over the weekend I had some time to have a bit of a play. I got a Nokia HDW-3 bluetooth headset which I intended to use with my computer to do some VoIP (voice over ip) stuff. I managed to get the bluetooth headset recognised and connected by Linux, however try as I might I couldn't get the audio to work with the alsa bluetooth drivers. I will look into this when I get some more time... In the mean time however I tried downloading Skype for Windoze and managed to have a very nice conversation with my parents (in New Zealand) from here in London for the bargin price of only 1.1p a minute. Skype it seems, is a great thing.

Also in my box of Amazon goodies was a new web cam. I got a Logitech Quickcam Pro 4000 for my computer vision project. I managed to get it working under linux in no time at all using the PWC drivers, and had it displaying images using camstream and xawtv. I also managed to get it working with Opencv very quickly. Opencv has just started supporting cameras that use the Phillips chipsets recently as they produce images in the YUV color range. You will need to use the CVS version of opencv for it to work. Unfortunately I didn't get working perfectly. It seems be only capturing the top left hand corner of the image for some reason. I have yet to debug the prolem though.

The other cool thing I did over the weekend was to write a bash script for a friend of mine that will automatically mount a drive for backup. It checks to see if the desired mount point exists eg /mnt/usb and if not attempts to mount it. If it fails it sends an email requesting that the external device be plugged in and switched on. It then retries once every 10mins for an hour and emails success or failure at each stage of the process. When if finally succeeds it runs the command passed as the only argument to the script. It probably doesn't sound very difficult, but I hadn't done any bash scripting for a while and it was a good challenge!

Well, hopefully you hear from me on a slightly more regular basis. I'll try and put up another update on my vision project soon.