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

meta

Me : A better Photo RDF




@prefix : <http://www.w3.org/2000/PhotoRDF/dc-1-0#>.



@prefix a:<http://aaronland.info/weblog/categories#>.



@prefix f:<http://xmlns.com/foaf/0.1/>.



@prefix g:<http://www.w3.org/2003/01/geo/wgs84_pos#>.



@prefix l:<http://sophia.inria.fr/~enerbonn/rdfpiclang#>.



@prefix r:<http://www.w3.org/2000/01/rdf-schema#>.



@prefix t:<http://www.w3.org/2000/PhotoRDF/technical-1-0#>.



@prefix w:<http://xmlns.com/wordnet/1.6/>.



</home/asc/tmp/photo/2003/07/19/20030719-img_0013.jpg> 



 :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 <http://aaroncorp.com/profile.foaf>]];



 :rights <http://creativecommons.org/licenses/by-nc-sa/1.0>;



 :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

meta

<s0:http://purl.org/dc/elements/1.1/identifier />

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 :



 <s0:http://purl.org/dc/elements/1.1/identifier>



  /home/asc/tmp/photo/2003/07/19/20030719-img_0013.jpg



 </s0:http://purl.org/dc/elements/1.1/identifier>



  



 # 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



 <s0:http://purl.org/dc/elements/1.1/identifier>   



          ^



Beauty, eh?

refers to

meta

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