Auto-captioning photos with CAPTCHAner

Sunday, January 13th, 2008

I quite often have completley unachievable ideas, that have no basis whatsoever in fact or reality. So, it’s no surprise that a conversation with Craig, down the pub on Friday has sparked another of them.

It’s become a bit of a theme this year, and after my last posts on the subject – we got to talking about captioning photos. Many of my photos exist on the basis of seeing something shiny, and then taking a picture. I often have no idea what said shiny thing was – but quite often make the effort usually on Google, or Rough Guides to discover its secrets afterwards.

I encourage any account holders to tag as many photos as they want on Blakepics. But mine is a very small community, and Flickr shadows it with even its tiniest fingernail. So, why should you have to tag your own photos? Aren’t there plenty of other people out there that would do that for you?

And I got thinking about the recaptcha project. They use scans of words to present the user with captchas that will help their digitization of old texts. These “unknowns” are combined with”known” text, and the answers compared against previous users results.

So, why not the same for photos? A known photo could be presented to the user “Dog”, “Cat”, “Llama”, or even a traditional captcha. Combine that with an unknown photo, and invite users to give it a caption. According to recaptcha, there are 60 million captchas being solved every day – it’s about time we put all that to good use.

Or perhaps CAPTCHA might just become another word for blackmail. Sure, you can login to your account – but you have to do something for me first. I just like the way Captchaner, sounds (Captcha, Captioner – see what I did there?). Maybe one day we’ll see this on all of our logins.

Your pictures … everywhere

Sunday, January 6th, 2008

Whilst researching Gallery 2 extensions today, I stumbled across the news that PictureSync now supports Gallery2 as an upload medium. I like having all my photos on my own site, so I can do what I like with them without having to pay through the nose to get at the originals, or worrying about migrating them when the next big thing comes along.

That said, I think I often miss out on some of the more social aspects of photography that networks like Flickr, or Facebook provide. So personally, I’m looking forward to the Windows release of this product so I can try it out for myself. Have any of you Mac users out there tried PictureSync? What did you think?

Inline captioning on Gallery2 / Blakepics.com

Sunday, January 6th, 2008

Approximately 20% of the 17,500 photos on Blakepics have captions of any kind. This can be attributed to a whole number of different things.

  1. I’m very lazy.
  2. I have far too many photos.
  3. I put far too many of them on-line.
  4. Captioning photos on Gallery2 is harder than it should be.

Well, one of my new years resolutions last year was “caption more photos”, and without any specific goals – I can say I succeeded tremendously. So this year I thought I’d quantify it so I can feel ever warmer, fuzzier and smug that I fulfilled an ambition for 2008. So I’m aiming to have captions on a massive 35% of them by years end (that’s a minimum of 2,500 more photos), and to help – I’ve armed Blakepics.com with a whole new module. I think I’m finally starting to get to grips with at least some of the Gallery2 API.

So if you have an account on Blakepics.com, you can help out by using this new method of adding captions to your photos. Whenever you’re viewing an album you own or have permissions for (and you’re signed-in of course), you’ll notice a new box called “Change Title” below each thumbnail. Just type your new title into that and click the icon to the right, or just hit enter. The image title will be updated without any reloading the page, or taking you to new forms. Which is especially cool if you’re just browsing the photos and want to quickly update something.

I’ve found it a huge improvement, even over bulk-edit – but please let me know your thoughts. And if you’re interested in this module for your own Gallery, please get in touch. It might not be ready for distribution, but I’m happy to hear from any willing beta testers.

The Netherlands Photo Story

Sunday, December 9th, 2007

For the past week, I’ve been in The Netherlands. It was the first holiday for a very long time where I haven’t actively blogged along the way. So that might all come as a retrospective at some point.

In the meantime, I’ll sum it up extremely briefly as:

  • Coffee shops that actually sell coffee in Amsterdam, are referred to as Café‘s
  • Weed, ‘Shrooms, Prostitutes
  • The most racist of the festive holidays I’ve experienced so far
  • Singstar in Dutch- it’s the taking part that counts
  • Van Gogh, Andy Warhol and most importantly, Heringa/ Van Kalsbeek

These may form the subjects of some posts, at some point… For now, enjoy the usual photo story below. Or check out the full quality version. For Facebook users reading this – yes, you need to click through for the vid :)


The rest of the photos, including the ones in the video above are on Blakepics. Credit for some of these photos also goes to Chorna. The music, “Before it’s too late” by The Goo Goo Dolls.

Geonaming your Geotags – Automatic picture captions

Saturday, October 6th, 2007

This time last year, I wrote about how to Geotag your photos using a simple GPS device and oodles of free software. Not much has changed in that process since, except now there’s a lot more software to choose from and the clever folks over at Trackstick.com have made it a lot easier to export your GPX tracks.

The spatially-aware web is producing a lot more services for us to use, and now Geonames.org some excellent reverse geocoding functionality. That’s the process of taking geo-data (such as longitude and latitude) and getting place names back. Which is really cool for tagging, titling or adding descriptions to your geocoded pictures.

They provide an impressive array of web services in both JSON and XML ranging from postal code searches, to reverse geocoding based on the community-based Wikipedia entries. And if that’s not enough for you, you can download a copy of their huge database and manipulate it off-line however you want.

So me, I wrote some JavaScript to take advantage of the reverse geocoding and tied it into the Blakepics Gallery2 Tags module. I’ll take the Wikipedia entries as an example, because that returns the most landmarks for me. The example code at the bottom of the page actually makes use of two more web services in addition.


The URL to call the web service is pretty simple enough:

var url = "http://ws.geonames.org/findNearbyWikipediaJSON?lat=" + lat + "&lng=" + lon + "&radius=10";

I’ve kept everything in JavaScript rather than building any back-end code whatsoever, so you need to make sure to use the JSON web services and take advantage of the script tags to avoid any cross-domain security policies. The JSONScriptRequest library can be a powerful ally here. This leaves my server to do more important things, but it all depends on your needs for the app.

url += "&callback=showWikipediaNames";
bObj3 = new JSONscriptRequest(url);
// Build the dynamic script tag
bObj3.buildScriptTag();
// Add the script tag to the page
bObj3.addScriptTag();

Then on the callback
function showWikipediaNames(wikijsonData) {
var wikiobjects = wikijsonData.geonames;
if (wikijsonData.geonames) {
for (var i=0;i<wikiobjects.length;i++) {
addSuggestion(wikiobjects[i].title)
}
}
bObj3.removeScriptTag();
}

With me so far? The final step in the process is to add the call to the JavaScript into your Gallery2 templates.

<a href="#" onclick="return showGeoNameOptions(this, {$block.gpsinfo.LoadGPSInfo.lat}, {$block.gpsinfo.LoadGPSInfo.lon});">GeoNames</a>

And before you know it, you have suggestions from geonames on how to tag your photos. Now you can go away and make it suggest some titles and descriptions too. If anyone’s interested in packaging this up into a slightly better Gallery module (or any other application), drop me a line. If this is enough for you, download my example and use it as you see fit.

Download

Pre-requisites