Sunday, June 10, 2007

f-spot face detection


I'm a bit off the schedule with my project, but nothing to be worried about. I took the last couple of days to get familiar with f-spot's code, and I'm still in the process, but there are already some visible effects. I managed to register a little extension, initially in the Tools menu, but due to some problems (see below) had to switch to the Export submenu.
The code is registered as a Mono.Addin and it just passes the filename of the picture being viewed to a facedetect sample program from the opencv library to get the following result.
Ok, now to the details.
The wiki at http://f-spot.org/Extend_F-Spot is outdated. Stephane has already coded an extension point for the Tools menu, the extension has to use the ITool interface. The code for that is in the trunk/src/Extensions in the ITool.cs and ToolMenuItemNode.cs files.
I'd love to use that, but...

I have no idea how to call anything inside the main program from the addin, except for the little example in the export extension, that passes the list of currently selected images to the extension. I tried transferring a similar functionality to the ITool interface, but I have no way of knowing if it works because...

Right now my environment got screwed up by an apt-get upgrade of my ubuntu (gutsy) and for some reason make all in the svn trunk builds an unusable binary that crashes with some nullpointer exception. What's weird - the binary compiled before the system upgrade works fine.

So, while waiting on some updates of the mono libs in gutsy I'll be hacking the face detection algorithm in octave :) I'll probably take some parts from the opencv, it seems to do a pretty good job :

It turns out, that it wasn't a bug in gutsy's libraries, but some mess I've created in the f-spot's glade file ;-) works fine now. Thanks to Sebastian Dröge for his help :)

Init

Hi all!
This will be the place where I'll be posting any new hacks I've done, especially the progress on my face detection feature for f-spot, that I'm doing with the Google SoC this year.

-- Edit --
Since my feeds are now syndicated within planet.gnome.org I guess I'll follow the others, and say :

Hello Planet Gnome !!

:D
It's pretty cool to be listed among all the gnome hackers, whose blog entries I've been following for ca 2 years now :)