ImageDescriptionRdfExamples
This page shows some examples for ImageDescription intended to inform the work going on to annotate photos from WWW conferences using RDF (see WWW2004). Possible aspects of the photos to be annotated include information about people, events, locations, copyright issues, Dublin Core information about the photo itself and more...
This document currently uses existing vocabularies only, and so is an illustration of how you might combine various vocabularies together, drawing on discussions from various community fora. There is no schema, although you can skip to an example.
Masahide Kanzaki has done a great writeup about describing images using RDF. This page uses some examples from his work and some adapted or copied from people active in this space, such as Matt Biddulph, Jim Ley, Morten Frederiksen and Libby Miller. It isn't comprehensive - please add alternatives and links to examples.
For requirements on the User Interface, ImageDescriptionUserInterface.
- todo:*
- EXIF...
- ...
About the Image itself
Dublin Core to describe the image and its creator
(example from Masahide Kanzaki's writeup)
<foaf:Image rdf:about="http://www.kanzaki.com/art/maiko.jpg"> <dc:title>...japanese characters not working in <pre> for some reason...</dc:title> <dc:creator>Kazuyuki Kanzaki</dc:creator> <dc:date>1996</dc:date> <dc:description>...</dc:description> </foaf:Image>
using Dublin Core to describe the creator of the image in more detail
<foaf:Image rdf:about="http://www.kanzaki.com/art/maiko.jpg"> <dc:creator> <foaf:Person> <foaf:name>Masahide Kanzaki</foaf:name> <foaf:mbox rdf:resource="mailto:webmaster@kanzaki.com"/> </foaf:Person> </dc:creator> </foaf:Image>
using foaf:made/maker to describe the creator of the image
See FOAF spec about maker/made and UsingDublinCoreCreator for information about made/maker and DC
<foaf:Image rdf:about="http://www.kanzaki.com/art/maiko.jpg"> <foaf:maker> <foaf:Person> <foaf:name>Masahide Kanzaki</foaf:name> <foaf:mbox rdf:resource="mailto:webmaster@kanzaki.com"/> </foaf:Person> </foaf:maker> </foaf:Image> <foaf:Person> <foaf:name>Masahide Kanzaki</foaf:name> <foaf:mbox rdf:resource="mailto:webmaster@kanzaki.com"/> <foaf:made rdf:resource="http://www.kanzaki.com/art/maiko.jpg"/> </foaf:Person>
FOAF made used to describe who made the metadata
<foaf:Person> <foaf:name>Masahide Kanzaki</foaf:name> <foaf:mbox rdf:resource="mailto:webmaster@kanzaki.com"/> <foaf:made rdf:resource="http://www.kanzaki.com/art/photoindex.rdf"/> </foaf:Person>
About what's in the image
FOAF Depicts to describe who and what is in the image
<foaf:Image rdf:about="http://www.kanzaki.com/info/masaka.jpg"> <foaf:depicts> <foaf:Person <foaf:name>Masahide Kanzaki</foaf:name> <foaf:mbox rdf:resource="mailto:webmaster@kanzaki.com"/> </foaf:Person> </foaf:depicts> </foaf:Image> <foaf:Image ...> ... <foaf:depicts><wn:Hotel/></foaf:depicts> <foaf:depicts><wn:Car/></foaf:depicts> </foaf:Image>
Describing part of an image and what is depicted by it
This is for use with SVG, from Jim Ley's example.
<foaf:Image rdf:about="http://127.0.0.1/piccies/2003/04/23/Img_0025.jpg"> <img:height>480</img:height> <img:width>640</img:width> <img:area>307200</img:area> <foaf:thumbnail rdf:resource="http://127.0.0.1/piccies/2003/04/23/Img_0025.jpg"/> <img:hasPart> <img:Polygon rdf:about="http://jibbering.com/rdfsvg/#1054337067604_0"> <img:polypath>M1 141 L1 141L14 127 L24 127 L28 119 L28 99 L36 69 L59 38 L76 34 L101 40 L113 54 L133 105 L121 129 L122 139 L137 146 L152 166 L169 204 L185 229 L212 273 L229 294 L243 306 L263 315 L264 329 L253 333 L213 327 L204 311 L185 287 L127 201 L128 215 L125 230 L118 238 L112 250 L112 262 L113 270 L124 271 L133 284 L136 302 L132 349 L134 365 L140 428 L134 436 L117 439 L108 446 L102 480 L37 480 L16 449 L7 434 L3 420 L1 141 z</img:polypath> <img:area>57442</img:area> <svgr:InPosition>W</svgr:InPosition> <img:fraction>0.187</img:fraction> <foaf:regionDepicts> <foaf:Person> <foaf:name>Jenny Sanderson</foaf:name> <foaf:mbox_sha1sum>0f4a7e36214bb4e06a570d6aec8a131695aeb0e0</foaf:mbox_sha1sum> </foaf:Person> </foaf:regionDepicts> </img:Polygon> </img:hasPart> </foaf:Image>
MINDSWAP ontology for image markup
See [1] for an OWL ontology that describes Images, image parts and regions, SVG outlines, as well as Videos, video segments, and stills. It also includes an Object Property "depicts" which allows an instance of any class to be related to an image OR a region of an image.
MINDSWAP ontology example
This is a simple example from our image database at [2] where "tech" is the namespace of the ontology mentioned above. This particular code outlines a section of an image and relates it to an object.
<tech:Image rdf:about='http://www.danandjen.org/images/pihead.jpg'> <tech:hasRegion> <tech:ImagePart rdf:about='#regionhead'> <tech:regionOf rdf:resource='http://www.danandjen.org/images/pihead.jpg'/> <tech:svgOutline rdf:parseType='Literal'> <svg xml:space="preserve" width="525" heigth="350" viewBox="0 0 525 350"> <image xlink:href="http://www.danandjen.org/images/pihead.jpg" x="0" y="0" width="525" height="350" /> <rect x="66.0" y="1.0" width="380.0" height="349.0" style="fill:none; stroke:yellow; stroke-width:1pt;"/> </svg> </tech:svgOutline> <tech:depicts> <pets:PetDog rdf:about='http://owl.mindswap.org/2003/submit-images/11.rdf#Pi'> <tech:depiction rdf:resource='#regionhead'/> </pets:PetDog> </tech:depicts> </tech:ImagePart> </tech:hasRegion> </tech:Image>
This code looks complicated to generate by hand, but is easily supported with our Photo tool, Photostuff [3]
Geo and images
Photos can be taken *of* somewhere and are also taken *at* somewhere. Both are interesting. The latter is rather like the dc:date of a photo or exif information. The former is more like 'nearestAirport' or 'near'. You can also talk about events and their locations. For example you could say that the photos was of an event and the event was located somewhere.
summary in rdfweb-dev thread more
Morten Frederiksen: dcterms:spatial and cyc:near
"This way somewhat sidesteps the issue, as it's not as precise, but in most cases I think it works fine - usually precision is not needed, and most often it's not available. If, at a later point in time, one realizes the exact position of the photographed object, it'd be easy to add coordinates to the anonymous point, and the original statement would still be true." rdfweb-dev mail from Morten
<foaf:Image rdf:about="http://www.wasab.dk/morten/2003/10/photos/england/3/image-36.jpg"> <dcterms:spatial rdf:parseType="Resource"> <cyc:near rdf:parseType="Resource"> <geo:lat>35.75172</geo:lat> <geo:long>139.63952</geo:long> </cyc:near> </dcterms:spatial> </foaf:Image>
Libby Miller: test:creationEvent
(from http://swordfish.rdfweb.org/photos/genfiles/ilrt/026406035665294925.rdf)
This is trying to capture the notion of the photo being taken at a particular place. creationEvent could be modelled more nicely as a class (e.g. a subclass of ical:Vevent, or using part of a cyc vocab).
<Image rdf:about="http://swordfish.rdfweb.org/photos/2002/10/17/Images/10.jpg"> <test:creationEvent rdf:parseType="Resource"> <contact:nearestAirport> <doa:Airport rdf:about='http://www.daml.org/cgi-bin/airport?FLR'> <pos:lat>43.8</pos:lat> <pos:long>11.2</pos:long> <doa:location>Firenze (Florence) [Peretola], Italy</doa:location> <vcard:country>IT</vcard:country> </doa:Airport> </contact:nearestAirport> </test:creationEvent> </Image>
Masahide Kanzaki - ical:Vevent, geo and images
proposal to combine geo and vevent
<Vevent> <location rdf:parseType='Resource'> <dc:title>New York, Sheraton Hotel</dc:title> <geo:lat>40.442673</geo:lat> <geo:long>-79.945815</geo:long> </location> ... </Vevent>
Might also be combined with Image data, e.g:
<foaf:Image rdf:about="http://swordfish.rdfweb.org/photos/2002/10/17/Images/10.jpg"> <foaf:depicts> <Vevent> <url rdf:resource='http://www2004.org'/> <dtstart rdf:parseType='Resource'> <date>2004-05-17</date> </dtstart> <dtstamp rdf:parseType='Resource'> <date>2004-05-22</date> </dtstamp> <summary>www2004</summary> <description>www2004</description> <location rdf:parseType='Resource'> <!-- or cyc:near --> <dc:title>New York, Sheraton Hotel</dc:title> <geo:lat>40.442673</geo:lat> <geo:long>-79.945815</geo:long> </location> </Vevent> </foaf:depicts> </foaf:Image>
Events and images
How do we say that a photo was taken at an event? or is 'of' an event? One possibility:
<foaf:Image rdf:about="http://swordfish.rdfweb.org/photos/2002/10/17/Images/10.jpg"> <foaf:depicts rdf:nodeID="WWW2004"/><!-- description of the vevent elsewhere --> </foaf:Image>
Creative Commons data
Some information is on the CC site. Note that we could use it both for the Image itself, like this:
<foaf:Image rdf:about="http://swordfish.rdfweb.org/photos/2002/10/17/Images/10.jpg"> <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/1.0/" /> <dc:rights> <cc:Agent> <dc:title>Morten Frederiksen</dc:title> <dc:date>1001-07-23</dc:date><!--date of birth - made up --> </cc:Agent> </dc:rights> </foaf:Image>
and for the metadata as well:
<rdf:Description rdf:about=""> <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/1.0/" /> <dc:rights> <cc:Agent> <dc:title>Libby Miller</dc:title> <dc:date>1001-09-26</dc:date><!-- date of birth - made up --> </cc:Agent> </dc:rights> </rdf:Description>
The CC format uses date of birth which may not be appropriate since it is fairly sensitive information. Perhaps we could use foaf:Agent of something similar in this context, identified by mbox_sha1sum or similar.
An example, showing a possible way of comnbining all of these together
this example in a single file; a shorter example, assuming some detail is elsewhere and need not be duplicated; a shorter example, but including a path element
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#' xmlns:foaf='http://xmlns.com/foaf/0.1/' xmlns:dc='http://purl.org/dc/elements/1.1/' xmlns:ical='http://www.w3.org/2002/12/cal/ical#' xmlns:cc='http://web.resource.org/cc/' xmlns:geo='http://www.w3.org/2003/01/geo/wgs84_pos#' xmlns:cyc='http://opencyc.sourceforge.net/daml/cyc.daml#' xmlns:wn='http://xmlns.com/wordnet/1.6/' > <!-- The image: --> <foaf:Image rdf:about="http://example.org/photos/www2004/1.jpg"> <foaf:thumbnail rdf:resource="http://example.org/photos/www2004/sm1.jpg"/> <!-- dublin core properties --> <dc:description>A great photo of Greg Noemail and Another Noemail</dc:description> <dc:creator>Morten Frederiksen</dc:creator> <dc:date>2004-05-18</dc:date> <!-- and/or foaf:maker (or more complex dc:creator in place of maker) --> <foaf:maker> <foaf:Person> <foaf:mbox_sha1sum>65b983bb397fb71849da910996741752ace8369b</foaf:mbox_sha1sum> <foaf:name>Morten Frederiksen</foaf:name> </foaf:Person> </foaf:maker> <!-- creative commons license - as per http://creativecommons.org/technology/metadata/extend --> <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/1.0/" /> <dc:rights> <cc:Agent> <dc:title>Morten Frederiksen</dc:title> <dc:date>1001-07-23</dc:date><!--date of birth - made up --> </cc:Agent> </dc:rights> <!-- location - I like this in addition to event location - they could differ --> <dc:spatial rdf:parseType="Resource"> <cyc:near rdf:parseType="Resource"> <geo:lat>40.442673</geo:lat> <geo:long>-79.945815</geo:long> </cyc:near> </dc:spatial> <!-- depicts a person for whom we can find an email address --> <foaf:depicts> <foaf:Person> <foaf:mbox_sha1sum>2aae0d28fe543424f89664f5ed47278211b37c70</foaf:mbox_sha1sum> <foaf:name>Greg Elin</foaf:name> </foaf:Person> </foaf:depicts> <!-- depicts a person for whom we can't find an email address --> <foaf:depicts> <foaf:Person> <foaf:name>Noemail Person</foaf:name> <foaf:homepage rdf:resource="http://example.com/noemailperson/me.html"/> </foaf:Person> </foaf:depicts> <!-- an alternative --> <foaf:depicts> <foaf:Person> <foaf:name>Another Noemail Person</foaf:name> <foaf:weblog rdf:resource="http://example.com/anothernoemailperson/weblog.html"/> </foaf:Person> </foaf:depicts> <!-- depicts wordnet food and wine--> <foaf:depicts> <wn:Food/> </foaf:depicts> <foaf:depicts> <wn:Wine/> </foaf:depicts> <!-- depicts our event --> <foaf:depicts rdf:nodeID="WWW2004"/> </foaf:Image> <!-- The event itself: --> <ical:Vevent rdf:nodeID="WWW2004"> <ical:url rdf:resource='http://www2004.org'/> <ical:dtstart rdf:parseType='Resource'> <ical:date>2004-05-17</ical:date> </ical:dtstart> <ical:dtend rdf:parseType='Resource'> <ical:date>2004-05-22</ical:date> </ical:dtend> <ical:dtstamp rdf:parseType='Resource'> <ical:date>2004-05-20T17:00:00</ical:date> </ical:dtstamp> <ical:summary>WWW2004</ical:summary> <ical:description>World Wide Web 2004 conference</ical:description> <ical:location rdf:parseType='Resource'> <!--would cyc:near be better? --> <dc:title>New York, Sheraton Hotel</dc:title> <geo:lat>40.442673</geo:lat> <geo:long>-79.945815</geo:long> </ical:location> </ical:Vevent> <!-- about the metadata itself --> <rdf:Description rdf:about=""> <!-- foaf:maker properties - libby described it --> <foaf:maker> <foaf:Person> <foaf:name>Libby Miller</foaf:name> <foaf:mbox_sha1sum>289d4d44325d0b0218edc856c8c3904fa3fd2875</foaf:mbox_sha1sum> </foaf:Person> </foaf:maker> <dc:date>2004-05-20</dc:date> <!-- creative commons license - as per http://creativecommons.org/technology/metadata/extend --> <cc:license rdf:resource="http://creativecommons.org/licenses/by-nc-sa/1.0/" /> <dc:rights> <cc:Agent> <dc:title>Libby Miller</dc:title> <dc:date>1001-09-26</dc:date><!-- date of birth - made up --> </cc:Agent> </dc:rights> </rdf:Description> </rdf:RDF>