Tag: photography

Computational Photography

Lightfielddemo

Lytro, Inc, a technology spin-off company founded by Ren Ng, have been in the news recently with their announcement of a re-focusable camera: take one “image”, and change where the focal plane lies after the fact. This is illustrated in the images above, generated from a single shot from the prototype camera. As you move from left to right across this sequence you can see the focus shifting from the front left of image to back right.I saw this work a few years ago at the mighty SIGGRAPH conference, it comes out of a relatively new field of “computational photography”.

All photography is computational to a degree. In the past the computation was done using lenses and chemicals, different chemical mixes and processing times led to different colour effects in the final image. Nowadays we can do things digitally, or in new combinations of physical and digital.

These days your digital camera will already be doing significant computation on any image. The CCD sensor in a camera is fundamentally a photon-counting device – it doesn’t know anything about colour. Colour is obtained by putting a Bayer mask over the sensor, a cunning array of red, green and blue filters. It requires computation to unravel the effect of this filter array to make a colour image. Your camera will also make a white balance correction to take account of lighting colour. Finally, the manufacturer may apply image sharpening and colour enhancement, since colour is a remarkably complex thing there are a range of choices about how to present measured colours. These days compact cameras often come with face recognition, a further level of computation.

The Lytro system works by placing a microlens array in the optical train, the prototype device (described here) used a 296×296 array of lenses focusing onto a 16 million pixel medium format CCD chip, just short 40mmx40mm in size. The array of microlenses means means that for each pixel on the sensor you can work out the direction in which it was travelling, rather than just where it landed. For this reason this type of photography is sometimes called 4D or light-field photography. The 4 dimensions are the 2 dimensions locating where on the sensor the photon lands, and the direction in which it travels, described by another two dimensions. Once you have this truckload of data you can start doing neat tricks, such as changing the aperture and focal position of the displayed image, you can even shift the image viewpoint.

As well as refocusing there are also potentially benefits in being able to take images before accurate autofocus is achieved and then using computation to recover a focused image.

The work leading to Lytro was done by Ren Ng in Marc Levoy’s group at Stanford, home of the Stanford Multi-Camera Array: dispense with all that fiddly microlens stuff: just strap together 100 separate digital video cameras! This area can also result in terrible things being done to innocent cameras, for example in this work on deblurring images by fluttering the shutter, half a camera has been hacked off! Those involved have recognized this propensity and created the FrankenCamera.

Another example of computational photography is in high dynamic range imaging, normal digital images are acquired in a limited dynamic range: the ratio of the brightest thing they can show to the darkest thing they can show in a single image. The way around this is to take multiple images with different exposures and then combine together. This seems to lead, rather often, to some rather “over cooked” shots. However, this is a function of taste, fundamentally there is nothing wrong with this technique. The reason that such processing occurs is that although we can capture very high dynamic range images, displaying them is tricky so we have to look for techniques to squish the range down for viewing. There’s more on high dynamic range imaging here on the Cambridge in Colour website, which I recommend for good descriptions of all manner of things relating to photography.

I’m not sure whether the Lytro camera will be a commercial success. Users of mass market cameras are not typically using the type of depth-of-field effect shown at the top of the post (and repeated ad nauseum on the Lytro website). However, the system does offer other benefits, and it may be that ultimately it ends up in cameras without us really being aware of it. It’s possible Lytro will never make a camera, but instead license the technology to the big players like Canon, Panasonic or Nikon. As it stands we are part way through the journey from research demo to product.

Photographs, videos and GPS

02 February WestendorfThis post is in part a memory aid but it may be interesting to other amateur photographers, and organisational obsessives.

My scheme for holidays and walks out is to take cameras (Canon 400D, Casio Exilim EX-S10), sometimes a video camera (Canon Legaria FS200) and a Garmin GPS 60 which I use to provide information for geotagging photos rather than navigation, although I once used it as an altimeter to find the top of a cloud covered Lake District mountain. Geotagging is the process of labelling a camera image with the location at which it was taken.

I save images as JPEG, I should probably use RAW format on the SLR but the workflow is more complicated and I rarely do anything particularly advanced with images after I’ve taken them other than cropping, straightening and a little fiddling with contrast. Once home I save all the images from a trip to a directory whose name is as follows:

Z:\My Pictures\[year]\[sequence number] – [description] – [date]

So for my recent skiing trip:

Z:\My Pictures\2011\003 – Hinterglemm – 29jan11

I leave the image file names unaltered. Padding the sequence number with zeroes helps with sorting. The idea of this is that I can easily find photos of a particular trip just using the “natural” ordering of the file system, I don’t rely on 3rd party software and I’m fairly safe from the file system playing sneaky tricks with creation dates. The Z: drive on my system is network attached storage, so it can be accessed from both my desktop and laptop computers. I back this up to the D: drive on my desktop PC using Syncback and I also copy it periodically to a portable drive which I keep at work. Syncback synchronises the files in two directories, I use this in preference to “proper” backup because it doesn’t leave my files in a big blob of an opaque backup format (I got burnt by this when using NTbackup in the past). The drawback is that I can’t go back to a snapshot in time but I’ve never felt the need to do this.

In addition to the images, I also save the GPS file in GPX format to the directory, this is downloaded and converted using Mapsource which is Garmin’s interfacing software. GPX is a format based on XML so is easy to read programmatically and even by humans. I do little inside Mapsource other than converting, and for a multi-session trip, stitching all the tracks together into a single file. Another handy tool in this area is GPSBabel which converts GPS data between a multitude of formats.

I use Picasa for photo viewing and labelling: it’s free, it has basic editing functions, it allows labelling and geotagging of photos in a fairly open manner and it does interesting stuff like face recognition too. As well as all this it links to Google’s web albums, so I can share photos, and it talks nicely to Google Earth.

Both geotagging and labelling images use EXIF (Exchangeable image file format) this is a way of adding metadata to images; nice because it’s a standard and the data goes in the image file so can’t get lost. EXIFtool is a very useful command-line tool for reading and writing EXIF data, and it can be integrated into your own programs. Software like Picasa, and websites such as Flickr are EXIF aware so data saved in this format can be visible in a range of applications.

It is possible to geotag photos manually with Picasa via Google Earth but I’ve collected a GPS track so this is not necessary. There are free software packages to do this but I’ve written my own for fun. The process is fairly simple: the GPS track has a timestamp associated with each location point and the photos from the camera each have a timestamp. All the geotagging software has to do is find the GPS point with the timestamp closest to that of the photo and write that location data to the image file in the appropriate EXIF fashion. The only real difficulty is matching up the offset between image time and GPS time – for this I take a picture of my GPS which shows what time it thinks it is and label this “GPS”.

In fact I usually label photos after they have been geotagged: photos can be exported from Picasa as a Google Earth compatible KMZ file and then upload into Google Earth along with the GPS track in GPX format making it possible to see where you were when you took the photo, which makes labelling easier.

I use www.gpsvizualiser.com to create images of GPS tracks on top of satellite images, this is a bit more flexible than just using Google Earth, I must admit to being a bit bewildered with the range of options available here. Below is an example where height is coded with colour.

GPSTrackHinterglemm

As I go around I sometimes take sets of images to make a panorama. The final step is to stitch together these multiple images to make single, panoramic views, I now use Microsoft Image Composite Editor to do this, it preserves the EXIF data of the input image and does a nice auto-crop. My geotagging program flags up images that were taken close together in time as prospective panoramic images. The image below is a simple to image panoramic view (from Hinterglemm)

Panorama towards Schattberg West from below Schattberg Ost

I mentioned video in the title: at the moment I’m still a little bemused by video. I use the same directory structure for storing videos as I do for pictures but I haven’t found album software I’m happy with or a reliable way of labelling footage – Picasa seems promising although the playback quality is a bit poor. ffmpeg looks like a handy programming tool. Any suggestions welcome!

Hinterglemm

CIMG1253
A view up the Saalbach-Hinterglemm valley, Hinterglemm is in the distance

Mrs SomeBeans and I have been skiing again, staying in Hinterglemm in the SkiCircus area of Austria. Hinterglemm is the upper of the two main villages in a valley running east-west, Saalbach is the larger village and gets more sun but the lifts are spread out around the village. We went with Inghams, flying from Manchester to Salzburg, the transfer time is about 2 hours, with a stops at Zell am See and Saalbach which are both relatively close. Salzburg airport can’t really cope with the number of package tour flights it gets in a short period.

Conditions last week were fantastic, for the first four days of our holiday we didn’t see a single cloud, temperatures were fairly low but there was no new snow during the week. Skiing was best between about 8:30am-10am before most people, other than the locals, had got out on the slopes. I suspect getting up at 7:30 every morning is not most people’s idea of a holiday.

Hinterglemm has a lot of lift capacity out of the village, a short gondola ride takes you to a set of four chairlifts on the south-facing side of the valley and two longer gondolas take you to summits on the north facing side of the valley. The link to Saalbach on the south side of the valley is a bit odd: from Saalbach it an an old 3-seater chair lift, followed by a long t-bar drag lift and an old 2-seater chair lift. The return from Hinterglemm the link is a bit easier but still involves a short t-bar. A nice range of skiing with some big wide pistes, pistes through trees and a few long black runs on the north-facing side of the valley which we didn’t try out. The area is pretty well linked up with some circular routes, and the ability to get to pretty much anywhere in the linked are in a couple of hours at most.

We stayed at the Hotel Glemmtalerhof in a large north-facing room looking towards the Reiterkogelbahn which could have accommodated 5 people. The hotel is right in the middle of the village with only a short (~200m) walk to either the Reiterkogelbahn taking you onto the south-facing slopes or the Unterschwarzachbahn taking you to the north-facing slopes. Food was fabulous and overall a good hotel. Drawbacks were that is was a bit noisy, since it sat on the middle of the village and there seemed to be an awful lot of smoking being done in the reception, cafe and bar area. Across the valley, right next to the Reiterkogelbahn, was the Hotel Alpine Palace Wolf which looked very posh and maybe worth a go in future.

Some of the other guests were a little odd: Sunday night as Gala dinner night featured a dessert buffet, which they ate from copiously pretty much all the way through the meal. Mrs SomeBeans, qualified to teach food hygiene, observed sufficient prodding and sniffing of the desserts that she preferred not to partake.

Once again we were plagued by “other people”. This time the party who didn’t realise that “Boarding at gate 7” meant: “get on the plane”, and one of whose children spent the flight gently pummelling my back through the seat back – I was calm since I decided to treat it as a free massage!

Overall a very good holiday with some fabulous skiing: this trip was unusual in that we were able to travel in term time – normally we are restricted to school holidays. I suspect the lift system in SkiCircus copes fairly well with February half-term, so might give it a go then next year.

A selection of photos:

CIMG1197
This is “twinkly snow”, as you ski past it the ice crystals twinkle.
CIMG1233
Mrs SomeBeans and I on a chairlift, we’re a bit camera shy
CIMG1237
Great snowfields near the top of a mountain
CIMG1247_stitch
The Leoganger Steinberge, a panoramic view from Wildenkarkogel
CIMG1259
Looking towards Hinterglemm,invisible over the edge, with pretty clouds and icicles
GPSTrackHinterglemm
Obviously I captured GPS data, we covered about 180 miles in 7 days including uplift

More photos here, along with captions.

Christmas Calendar 2010

For the past few years I’ve been making my own calendars, as a Christmas present. As best I can I use photos taken in the stated month. This year half of them are taken by Mrs SomeBeans and half by me.

00 Cover Caiman lizard

The cover image – A Caiman Lizard, living at Chester Zoo

01 January Home

January – our house in the snow, and the dark – a small amount of white balance fiddling required to reduce the orange cast from the sodium street lights.

02 February Westendorf

February – ski-ing in Westendorf in the Austrian Tyrol

03 March Hellebore

March – A hellebore, Mrs SomeBeans will have taken this one

04 April Sandstone

April – some sandstone from the Sandstone trail, this will be from close to Frodsham.

05 May Allium and bee

May – Allium and a bee, bees are difficult to photo because they move around so much

06June_StrawberryTree

June – The bark of the Strawberry tree

07 - July - Lilac-breasted roller

July – A lilac-breasted roller at Chester Zoo, a photograph from a works day out

08 August Trentham

August – A building at Trentham Gardens – for some reason this makes me think of India

09 September Helenium

September – Helenium, Mrs SomeBeans making good use of the macro lens she allowed me to buy!

10 - October Gilded water buffalo

October – A gilded water-buffalo at Biddulph Grange, every garden needs one

11 - November Witch hazel leaves

November – Witch hazel leaves taking their autumn colour

12 - December By the Shropshire Union Canal

December – Frost, fog and weak sun by the Shropshire Union Canal

Caerwys – a breezy spring walk

Off to Afon-wen and Caerwys today for a brisk walk featuring steep walking through woods, spring flowers, llamas, highland cows and a newt. You can see the route here:


View Caerwys in a larger map

It’s a walk from “Walking in the Clwydian Range” by Carl Rogers, real men make up their own walks from OS maps and scouting missions but I’m lazy. A cool spring day today, in the distance we could still see the odd patch of snow on the hillsides. The trees were bare but the flowers had started to come out:

Clockwise from top left: Primrose, violet, wood anemone, and celandine
There were many birds out, singing away enthusiastically. I was going to show a picture of a woodpecker which we heard tapping away very close by, but we didn’t see it so it would really have been a conceptual piece so I’d like you take that conceptuality one step further and imagine a picture of a tree with an unseen woodpecker in it. Caerwys is the home of llamas, which I also treat with a degree of respect, since they spit if you offend them:

Although it’s a very rural location there are both signs of modern industrialisation in the from of quarries and sandpits and also the remnants of older work, including this lime kiln:

And also this rather creepy corrugated iron building which put me in mind of “Jeepers Creepers” or “Deliverance“:

With a vivid imagination, a walk in the countryside is never boring! We walked through the village of Caerwys, which is quite pretty – many of the houses seem to be well-made from the local limestone. No photos though, mainly because the streets were full of parked cars which are an aesthetic abomination and I don’t like photographing people’s houses in close up – it seems rude. However, I had no qualms about photographing this fine house across Ysceifiog Lake which was created for fishing by the Earl of Denbigh in 1904:

We next passed through a small nature reserve: Y Ddol Uchaf, which is a designated Site of Special Scientific Interest (SSSI) whose information board promised newts, and lo – I saw that there were newts and it was good:

On the final stretch back to the car we were treated to these handsome chickens:

And some Highland cows, we first sighted some of these in the distance across a field then we passed close by to another group behind a photography unfriendly fence then eventually coming to some easily accessible ones in photogenic mud:

This one, is the bull in the group, I’m a country lad and was easily able to identify him as such by dint of his sizeable testicles (which I refrained from photographing):

So there you go, a memorial of our Easter Sunday walk immortalised for when I am old and incapable of leaving the house.