Image Description 'roundtrip'

Background and motivation

Example flow to find and present metadata

  1. Get (JPEG) image file itself
  2. Find RDF in the comment segment in the image file
  3. Find RDF description via rdfs:seeAlso
  4. Get image description as well as annotation on areas of the image
  5. Generate SVG/Imagemap with XSLT or any method

Basic annotation idea

Image file

Many image file formats, including JPEG and PNG, can have arbitrary text comment. It seems easiest to embed RDF/XML metadeta in that comment section. PhotoRDF uses this method. Adobe's XMP uses different segment, but also embeds RDF/XML in a document.

In the RDF, rdfs:seeAlso property element can be used to point external metadata.


 <rdf:Description rdf:about="">
  <dc:title>Sir Roger and me</dc:title>
  <dc:creator>Masahide Kanzaki</dc:creator>
  <rdfs:seeAlso rdf:resource=""/>

Exif 'UserComment' tag can hold some text. It will be handy to have short description embeded in the image itself.

Area annotation in a metadata

External metadata can have anything about the image, such as Exif exerpts, longer description, related 'weblog' text, etc.

One possible and potentially useful extention is annotations on parts (areas) of the image. Through discussion with Jim Ley, he developed a useful image description vocabulary for this purpose (an extension of SVG related vocablary for Annotating Areas of Images with RDF).


 <foaf:Image rdf:about="">
  <dc:title>Sir Roger and me</dc:title>
    <foaf:name>Masahide Kanzaki</foaf:name>
    <foaf:mbox rdf:resource=""/>
    <rdfs:seeAlso rdf:resource=""/>
  <dc:description>Sir Roger Norrington posed with me after the Tchaikovsky Experience, at Queen Elizabeth Hall, London.</dc:description>
     image:points="36,0 0,59 0,132 76,133 76,59 71,0"
     dc:description="Sir Roger Norrington wearing a Japanese clothing."/>
     image:points="85,18 76,65 72,130 140,132 137,58 118,18"
     dc:description="Masahide Kanzaki asked Sir Roger to pose with him."/>

The image description vocabulary defines Polygon, Rectangle and Circle classes, and points property, so that the metadata can be transformed into XHTML imagemap as well as SVG shapes.

Visual representation of area annotation

Metadata RDF can easily be transformed into SVG or XHTML imagemap. Note that dc:description of each area becomes alt attribute of each area, so that browsers can show tooltip on mouseover (title would be better for Mozilla), and can be used by script to show more ellaborated display.


<img src="" usemap="#myimage"/>
<map id="myimage" name="myimage">
  <area shape="poly" alt="Sir Roger Norrington wearing a Japanese clothing."
  <area shape="poly" alt="Masahide Kanzaki asked Sir Roger to pose with him."

Discussions and References

See also: