today | current | recent | random ... categories | search ... who ... syndication

Sunday, July 20 2003

Matthias Wandel : Building a megapixel digital camera from a flatbed scanner

I started playing around with my flatbed scanner to see if I could capture images of stuff around it, by holding the scanner in my hand and rotating it as it scanned.

refers to


Me : A better Photo RDF

@prefix : <>.

@prefix a:<>.

@prefix f:<>.

@prefix g:<>.

@prefix l:<>.

@prefix r:<>.

@prefix t:<>.

@prefix w:<>.


 :title "My double chin";

 :description "Where is my neck?";

 :date "2003-07-19T23:44:44";

 :subject w:Portrait,a:slice_of_life;

 :coverage [g:Point[g:lat 45.5039;g:long -73.5875];

   r:label "Montreal"];

 :creator [f:Person[f:name "Aaron Straup Cope"]];

 :publisher [f:Organization[

   r:seeAlso <>]];

 :rights <>;

 :type "image"; 

 :format "image/jpeg";

 :identifier "IMG_0013";

 t:camera "Clicky Clicky 400";

 t:film "digital";

 l:xmllang "en-ca".

It's written in N3 for two reasons: 1) it is a syntax that mere mortals can (mostly) manage 2) it dramatically cuts down on the amount of text (like the number of characters) needed to describe your meta-data. The example above is probably butting right up against the limit of data you can shove into an Exif Comment field but it is deliberately verbose and you can win a little extra space by doing things like removing new lines. If your description is very long you could even stick it in a separate file and point to it as a external resource. I don't really like those kinds of solutions but atleast a reference to the data is embedded in the image itself which is a good deal better than having to remember [insert clever secondary file for image meta-data scheme here]. see also : /usr/local/bin/jhead -ce

refers to


<s0: />

So, I was farting around with RDFpic and I even went as far as to write a little widget that tries to pre-populate the RDF meta-data with corresponding EXIF data. Basic stuff like the date. The Photo-RDF spec says you should not use the identifier element to note the URI of your image. It is reserved for some random, and possibly repeating, internal marker that your camera uses to flag individual images. The logic here escapes me but, whatever. I want an identifier that points to the actual image, I think, so I'll just use the handy dc:identifier instead. I wrote the RDF to a separate file and then I imported it in to an image I was munging with RDFpic. So far, so good. Next, I immediately exported the data to another file to see what it looked like :





 # Which in case you're not sure

 # yields the following error:


 107 ->xmllint ./2003/07/19/20030719-img_0013.rdf2 

 ./2003/07/19/20030719-img_0013.rdf2:9: \

    error: error parsing attribute name



Beauty, eh?

refers to


Saturday, July 19 2003 ←  → Monday, July 21 2003