Well, I my computers are now a gentoo free zone. I had an epiphany of sorts a week or two ago when I did an emerge sync and saw a million updates (amongst which was kde for about the billionth time in only a few weeks) and I found myself letting out a rather large sigh. I suddenly realised I was spending far longer on administrative tasks on my computer than I was actually using them! This could not go on, it was time for action and so I decided to try out a new distro with a binary update mechanism – no more compiling everything from source for me!
I looked at Novel Linux Desktop, and if it hadn’t been for the 50USD price tag I would have tried it, but instead I decided to give Ubuntu a go. I thought I would try installing the new distro on my laptop first, as the laptop install is the acid test of any distro, and I didn’t want to nuke my desktop (my primary machine) until I was really sure about my choice.
While trying to backup my gentoo install for my laptop I accidentally deleted /etc …well no going back now! I stuck in the Ubuntu cd and in about 1/2 an hour I had a beautiful new ubuntu/gnome desktop. Within one evening of use I realised I had to make the upgrade to my desktop as soon as possible.
The upgrade to my desktop went pretty smoothly. I was trying to be too smart for my own good to start off with, fearing that because of my complicated software RAID setup the installer wouldn’t cope, but after messing round for a couple of hours I finally gave up and in frustration just stuck the install cd in and the ubuntu installer sailed through, auto detecting all my RAID partitions correctly and the install was very straight forward.
I can’t recommend Ubuntu enough. Everything just works, installing new software is a snap, and most ironically of all even when packages aren’t available installing software from source seems to be less problematic than Gentoo!
Don’t get me wrong now. I’m not bashing Gentoo here. I like that distro, and have learnt so much about linux in the last couple of years while using it, but now I am basking in the happy glow that my ubuntu is giving me and I won’t be looking back!
Well, it’s Sunday night and I really wish that weekends were three days long. I could really do with just one more day off this weekend. I feel like I haven’t had a decent break in ages and need a bit of relaxing and unwinding time. Most of the travelling Anthea and I do is pretty full on and not much time for relaxing so I haven’t really had a break since Christmas and beginning to feel a bit flat.
Had a few little wins over the weekend and am feeling pretty happy about it. I finally seem to have my xdaIIi syncing with Evolution properly. I am using SynCE and multisync to sync my Evo contacts, task list and calendar. It seems like a pretty solid setup now. I think my initial problems were down to some faulty partnerships I created while trying to set everything up.
I also managed to get a bit of solid hacking done on my Vision project this weekend. I don’t really have any visable results to show for my efforts, but I know I am making progress. Hard to explain to your significant other that you are really excited because you’ve finally figured out how to calculate the intrinsic matrix for your camera and undistort images 😉
I also managed to get some of the translation and rotation matrix multiplication working. Well actually it’s still untested as of yet, but it compiles and runs. I am rapidly approaching the point where I am going to need to get the other camera now so I can do proper stereo. I was holding off purchasing until I was sure I was going to be able to get the first one working correctly with opencv and mono and have now reached the point where I am pretty happy with it.
Anthea and I went for a huge walk around Hyde park in the sun today. It’s amazing the change in Londoners when spring rolls round and the sun comes out. I’m sure half of London was in the park playing frisbee or walking the dog or playing with the kids, and it’s really nice to see so many people out and enjoying themselves.
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.
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.
So on the weekend I was trying to work on the next step in my vision project (really must get around to putting up a web page about it) and struck a wee problem with P/Invoke and marshalling using Mono on linux.
Actually it was two wee problems.
I was getting a run time exception saying that Mono couldn’t find the library I was trying to use via DllImport. I thought this was strange because the library was definitely in my ld.so.cache and I was pretty sure I had my C# code correct.
I decided to try a different approach and use an example I knew should work to test if it was in fact my code/c library combination that was causing it to fail, or if it was a problem with my Mono environment. So I tried the ncurses example from Mono: A Developer’s Notebook (excellent book by the way) and what do you know? It didn’t work 😦
Well, after a bunch of emails traded with some very helpful guys on the Mono-List I was getting close to working out the problem. After turning on logging and info using the MONO_INFO and MONO_LOG enviroment settings (see “man mono” for more details) I was able to see that Mono was infact finding the assembly but not loading it for some reason. Another guy suggested it might be something to do with gmodule. Well, I’d had some problems with a few other apps after I had changed to gcc 3.4.3 from gcc 3.3.4 recently so I switched back to gcc 3.3.4 recompiled gmodule and hey! it works…. kinda
So, now the ncurses example was working but I still couldn’t use P/Invoke with my target C library (the opencv library). Another helpful soul had suggested that if I use ldd to examine libopencv.so I would see that there was no reference to libstdc++ which was causing my problem. This was indeed the case, and after hacking a few linker steps in the opencv makefiles I was happily creating CvImage objects and loading highgui windows from my C# app!
Ahhhh… I just love it when I learn something new, and this time round I learnt a whole lot!
At home I do all my development on a linux machine, and hence don’t use VS.NET. However the other night I found out about a neat little feature of Kwrite (text editor in KDE) that does essentially the same as the aforementioned tool. There is a “File->Export->HTML” option in Kwrite that will take all your nicely formatted and colourised code and produce an html version of it… fantastic!
Expect to see nicely formatted code snippets on my blog from now on =)