Category Archives: Gentoo

libdpfp 0.2.0 released

I released libdpfp 0.2.0 yesterday. This library allows you to capture images from Microsoft/DigitalPersona fingerprint scanners. Download link.

It does not yet include the more advanced image enhancement code which I wrote about recently, I will be adding that soon. The big change in this release is that it drops dependence on a kernel-side driver and having to upload firmware. libdpfp is now standalone.

Not requiring firmware avoids the potential distribution issues we had: we don’t have the rights to distribute their firmware. It is now not required because the device stores it, and even brand new devices seem to ship with the firmware already saved on the device. One reason we might need the firmware again is to disable encryption, but I’m reasonably confident we can do that without a firmware image — just waiting for someone who has a device which is encrypting images to come along so that I can test a theory.

The kernel-side driver is no longer required, all USB I/O is now done inside libdpfp itself, through libusb. This simplifies things for users quite substantially, and it’s much nicer writing drivers in userspace than in the kernel. It also means that ports to BSD and even Windows are now realistically possible (if someone contributes the code!), and means good things for users running old kernels on embedded devices.

Bug reports and questions belong on the mailing list, not in comments on this weblog entry. Thanks!

Fingerprint enhancement and recognition

A while ago, I posted some pretty pictures of my toe when I figured out the image format used by the Digital Persona and Microsoft fingerprint readers.

While it’s pretty cool to see your fingerprint on-screen, the real question is how do we make use of these prints? We need a way of storing fingerprints, and a way of saying “does this fingerprint equal the one we stored earlier?” From that point, we can implement fingerprint-based login and other things.

There are various open-source projects aiming to do this kind of thing, I made a list of them here. Unfortunately all of them appear to be dead projects and most of them aren’t useful at all, but I’ve made progress with one of them at least: FVS.

There are various different algorithms which can be used to compare fingerprints. I’ll try to describe the method used by FVS: minutiae detection.

A fingerprint is made up of ridges, basically just the curvy lines which you see. Ridges start and finish, and some of them split (bifurcate) into 2 other ridges. The points where ridge endings and bifurcations happen are known as minutiae. We can compare the positions and directions of the minutiae on two fingerprint images to decide whether they are equal. This is certainly throwing a lot of information away, but this method is very widely used in the fingerprint recognition world.

We start with the initial toe-print. I actually cheated by subtracting an image seen by the sensor before I scanned my toe from the toe-print, so what you can see below is slightly enhanced (clearer) than the original image.

The ridges of the fingerprint are visible above in white. The enhancement step involves finding the ridge direction and the ridge frequency. These details can then be used to apply a Gabor filter to the image, which produces a greatly enhanced version:

The above enhancement takes a few seconds on my system. This is OK for prototyping but is too slow for a real fingerprint login system, I hope we can find ways to optimise this. In addition to the Gabor filter, the image was further enhanced by binarization: all pixels are either black or white, no noise.

The ridges are now shown in black on a white background. The next step is to reduce each ridge line to a single pixel in width. This is known as thinning.

The advantage of thinning is that minutiae are now really easy to detect. We take every pixel on the image, and we ignore it if it is not a ridge (i.e. if it is white). For all the ridge pixels, we count the number of adjacent ridge pixels. If there is only one ridge pixel neighbour, we have found a ridge ending. If there are three ridge pixel neighbours, we have found a bifurcation.


Image borrowed from eFinger project report

FVS includes minutiae detection code based on the above algorithm:

The code isn’t perfect, as it detected many minutiae around the edge of the fingerprint image, where they do not exist. However it should be relatively simple to exclude those as FVS already knows about the edges of the print.

The next challenge is to compare two minutiae sets and decide how similar they are. FVS includes some code to do this, but it just crashes, and I haven’t spent much time debugging it yet. This is a difficult operation: prints of the same finger are never identical: sometimes some minutiae are not visible, they can be spaced slightly differently, and the finger might even be significantly rotated since the last print.

A project called eFinger has built a complete fingerprint recognition database. It uses FVS’s enhancement code, but ships it’s own code for thinning, minutiae detection, and minutiae set comparison. The code is not brilliant (does not consider rotation or anything like that) but should provide a good starting point.

ZD1211 support in Linux 2.6.18


Our driver for USB-WLAN devices based on the ZD1211 chip has progressed through the chain of Linux networking development trees and is now included in the mainline kernel, as of 2.6.18-rc1. I have added the accompanying firmware package to Portage as net-wireless/zd1211-firmware.

We are still developing in out-of-tree git repositories, but I am feeding patches to the in-kernel version which will be sent to Linus during the appropriate merge windows.

Ulrich is AWOL at the moment, probably due to post-World-Cup-depression, but I’m getting back towards actual driver development after some surgery on the softmac layer. Hopefully the minor instability issues will be fixed soon.

Gentoo UK 2006: success

The Gentoo UK 2006 conference is over, after a lot of fun (and a lot of hard work!).

The event was a huge success and I don’t really know how to summarize it. Attendance was great considering that we only gave short notice, about 65 people. There were several people I’d have liked to chat to but didn’t have time, I hope the opportunities will arrive again in the future.

We needed to raise some money on the door to cover our costs (alongside the donations from Grant Slater, Nick Boughton, and the Gentoo Foundation). I’d like to thank everyone for their generosity, especially as many people donated more than the £2 entrance fee — after covering the event costs, we will be sending the rest of the money to the Gentoo Foundation.

The day opened with Hanni Ali, of Kaboot and Ainkaboot. Hanni explained some of his motivations behind Kaboot, a Gentoo-based live distribution, and then moved onto the real meat: the high performance Gentoo-based clustering solutions provided by his company, Ainkaboot. Hanni only recently graduated from university recently, it is very cool that Gentoo has helped him to kick-start his career. I hope we can further involve Hanni in the community in the future.

Next up we had Tim Yamin (plasmaroo), who gave a nice talk about Gentoo’s release process and the tools involved with it. Perhaps through his youth, Tim has an interesting speaking style which keeps the audience entertained and gives something which isn’t usually found during technical presentations.

Andrew Cowie finished the morning by presenting a mixture of slides from a few of his previous talks. Andrew runs a crisis management company called Operational Dynamics. Through his experience with deploying computer systems in the enterprise plus an extensive amount of public speaking experience, Andrew gave a very entertaining and enthralling presentation about how Gentoo rocks in the enterprise and the problems faced in such environments.

We went for lunch in a nice Irish pub called The Quays. I had organised the meal with them a few days before the event (finding a restaurant to cater for 50+ people is hard, it’s really lucky that I found this place). They very kindly provided us with whole of the upstairs section and did not charge us for room hire.

After lunch, I presented a few ideas about problems with contribution flow through the Gentoo community, and started a discussion about potential improvements and solutions. This was beneficial for me at least, I’m more confident about these ideas now and I hope that we can see some more action being taken in this area.

We wrapped the day up with a few shorter sessions: Bryan Østergaard (kloeri) talked about developer relations and the recruitment/retirement process, George Prowse (cokehabit) started a discussion about the Gentoo Women ideas, and I finished off with some slides about the organisation of the event (I’m not going to be in the UK to organise next year’s event, so my aim was to pass on some knowledge and seek help).

I’m going to post a bit more about the event after I have collected some photo’s and the presentation slides and published them on the event website. In the mean time, please send any photo’s of the event in my direction.

Back from GUADEC

I’m back from a fun week in sunny Vilanova. Highlights include the food, the Nit de Sant Joan firework night on the beach, the Fluendo and Nokia parties, meeting with too many interesting people to list, and seeing an OLPC prototype (those things are tiny!).


The Gentoo dev-lunch: foser, Andreas (suka), myself, Zaheer


Joe Shaw and myself at the open-bar Fluendo party

Unfortunately I don’t think I’ll be attending the 2007 event (to be held in Birmingham, UK) as I’ll be working out in Boston. I will probably be at the GNOME Summit later this year.

GUADEC, Vilanova

I’ll be at GUADEC once again this year — hoping to have as much fun as last time :)

I’m staying in the GNOME village with Scott, my long haired fire-juggling friend from near home. We’ll be there from 23rd-30th June.

EDIT: I have been asked to provide evidence of this absurd claim. Here we go then. If you see anyone wondering around Vilanova with flaming batons, you’ll know who it is.

Gentoo UK 2006

Following on from the last 2 years, we’re hosting another Gentoo UK users-and-developers conference this year.

For the last 2 years, we have held the event in the north of England. This year, we decided to try in the south, in a more accessible location: Central London. The event will take place on Saturday July 8th.

The event will be composed of a series of sessions and presentations by Gentoo developers, and one or two by external speakers. Anyone interested in Gentoo is welcome to attend, just let us know you are coming by pre-registering (no cost). There will be plenty of time for socialising with other users and developers before and after the conference. More information is available from the event website.

It’s very encouraging to see interest from developers from other parts of Europe at such short notice. Danny van Dyk, Bryan Østergaard, and Tobias Scherbaum will be flying over for the event, and hopefully a few others will follow (contact me if you are interested). I have made a list of attending developers which is growing all the time.

net-setup enhancements

Users experienced with Gentoo’s console install method may be familiar with net-setup, a simple ncurses/dialog utility to configure network interfaces. It can also be used on a live system (found in the app-misc/livecd-tools package).

One source of confusion during installation is the naming of network interfaces – this is sometimes different from the naming on a live system (eth0 swaps with eth1, etc).

I added two additional dialogs to the net-setup wizard which attempt to make it clear to the user exactly which interface is which. The data mostly comes from sysfs. Here are some screenshots:

This will be available in the next livecd-tools release.

Planet Gentoo Summer of Code

Thanks to Google, a number of Gentoo-oriented Summer of Code projects are being sponsored. Hopefully Gentoo’s Gentoo Summer of Code project page will be updated soon to reflect the projects in development.

We have added some of the participating students to Planet Gentoo and Gentoo Universe, the remaining participants will be added over the next few days. We have also set up Planet Gentoo Summer of Code which provides a feed exclusively from the SoC students. I look forward to watching the projects unfold.