Gmeasure is a project mainly written in C, it's free.
A distance measuring tool for the N900
Gmeasure is a tool for measuring distances in images. It is mainly build for the N900.