Category Archives: Image Description

http://esw.w3.org/topic/ImageDescription
skos:related http://crschmidt.net/blog/archives/author/crschmidt/skos.rdf#c5 Image Description

Authorization by Codepiction

Over the last fours years and counting, I have been providing access to a triplestore with description of my photos through a facetted interface. Through those years I have received several requests for excluding people from the searchable interface, as they showed up quite prominently on Google.

It turned out to make the interface much less useful for me — and possibly for others as well — so not too long ago I ended up simply excluding photos depicting people — using SPARQL, of course:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?Photo 
WHERE { ?Photo foaf:depicts ?Person .
        ?Person a foaf:Person }

That, of course, didn’t really improve things from my personal perspective, so watching others experiment with OpenID and social networking, I decided to take the same route — with a twist.

I didn’t really want to maintain or discover a social network for this use, but then it dawned on me: My photos actually represent a social network, as codepiction describes relations between people even better than explicitly stated ones.

With that in mind, I got the most recent version of the PHP OpenID Library up and running, and now use SPARQL to extend the non-person subset created above with photos of codepictees for users logged in with their OpenID — assuming they match with the descriptions in the store:

PREFIX foaf: <http://xmlns.com/foaf/0.1/>
SELECT ?Photo 
WHERE { ?Photo foaf:depicts ?Friend .
        ?OtherPhoto foaf:depicts ?Friend .
        ?OtherPhoto foaf:depicts ?User .
        ?User ?ifp ?OpenID .
        ?ifp a owl:InverseFunctionalProperty }

Note that since I don’t restrict ?User to be distinct from ?Friend (and ?Photo from ?OtherPhoto), the query also returns photos depicting the user. The query also doesn’t explicitly look for foaf:openid, but rather any inverse functional property, and since I’ve used foaf:mbox/foaf:mbox_sha1sum quite a lot in the descriptions of the photos’ depictees, I have added the option to verify your e-mail address — it is not enough to trust what’s returned from an OpenID provider, as there is no validation, and I wouldn’t want everyone to create OpenID identities with my e-mail address.

All in all, you can now use OpenID to log into my facetted interface and — if you are recognized — get access to additional photos. Try it!

Quite slick use of codepiction, if I may say so myself…

NB: I cheated. Parts of the backend still use an old RDQL engine, so some of this was actually not done in SPARQL. Also, I supplemented the above codepiction query with queries regarding albums with codepiction and photographer information (mostly useful for myself, of course), meaning you will actually see more photos than you might expect.

Flickr Machine Tags

Flickr has announced a new addition to the API — Machine Tags:

# Wait, aren’t machine tags just RDF?

No, machine tags are not RDF; they could play RDF on television, though.

See also :

weblog.scifihifi.com/2005/08/05/meta-tags-the-poor-mans-rdf

# Huh, what is RDF ?

RDF Describes Flickr. That’s really all you need to know about RDF.

Of course it’s not quite there, using fixed namespace prefixes instead of URIs, but it’s close enough.

Now, where’s that list of canonical namespace prefixes?

Digital Camcorder Considerations

We want to get a digital camcorder.

There’s a wedding coming up, some travelling, later perhaps more interesting “subjects”, and then of course there’s the gadget dimension.

Among the criteria for selection are:

  • Relative ease of use: OK, I’m geeky, but devices with less than 85 keys are often impossible to figure out…
  • Dependability: We’re prepared to back up to HD and other media, but we still want to be able to trust the media.
  • Quality: The raw footage should be raw, not compressed. The images are more important than the sound.
  • Future proof: I know, not possible in this world, but it seems it’d be OK to go for HD?
  • Comfortable: Small and handy, likely to just be available and ready to go when needed.

Currently on the short list is the Sony HDR-HC3. Compared to its predecessor, the HC1, there are improvements as well as changes to the worse, but overall it seems it’s progress.

What to do?

ObSemWebAngle: Ideally, it should also include GPS integration and other ways of content description! ;-)

Dynamic Tabs for Metadata

I generate and store quite a lot of metadata with my photos, as can be gathered from my faceted photo index. Until now, I have simply displayed most of it beneath each photo on its page, but I wanted to make the interesting parts stand out more, while still providing access to the rest.

CSS and JavaScript to the rescue.

Simon Willison created a small script for toggling sections of page, easytoggle and debugging in Safari, which was subsequently improved to also handle Safari. That seemed like a great way to approach the problem — making it possible to structure the information, while still leaving it accessible to all.

However, there were (of course) a few quirks with that implementation, so I added a few lines of code to make it possible to not display the menu tabs when JavaScript isn’t enabled, and to make the inactive tabs dim until selected: easytoggle3.js

To designate a section as the tab section (to make it not show up without javascript), identify it with #toggle, and add a CSS instruction to make it not display: display: none. The rest of the script works just as the original, where links with class="toggle" are used to identify the parts that should be togglable.

Summer of FOAF

This is turning out to be a very interesting summer – even if the weather here in Denmark doesn’t really make it feel like it’s actually summer.

In June I was in Madrid for the Image Description Workshop organised by SWAD-Europe, in two weeks time I’ll be at the SWAD-E workshop on Metadata for a multilingual world, held locally in Copenhagen, just today a community FOAF Camp in Twente in August was announced, and then of course there’s FOAFcon, the 1st Workshop on Friend of a Friend, Social Networking and the Semantic Web in Galway in September, also by SWAD-E.

Phew.

It’s a good thing that this coincides with a favourable tax return…

(Post title credit goes to danbri in #rdfig.)