Tuesday 21 August 2007

HDR photography

I feel a bit silly because I've had Adobe's Creative Suite 2 for more than two years, but I've only just discovered the HDR capabilities built into Photoshop CS2.

Most digital photos that we see use three bytes to store each pixel: one byte each for Red, Green, Blue. This is known as 8-bit colour because each colour is represented by 8 bits (one byte).

Many digital cameras and scanners are now capable of providing 16-bit colour: two bytes per colour, or six bytes per pixel.

HDR (High Dynamic Range) consists of 32-bit colour: four bytes per colour, twelve bytes per pixel. Furthermore, the four bytes are used to store a floating-point number, which means that an unlimited range of light intensities can be represented.

This is a nice idea, but cameras and scanners don't yet produce HDR, nor can monitors or printers display it adequately. However, human ingenuity has found ways to make use of it nevertheless.

An HDR image can be created by taking multiple exposures of the same scene using a range of different shutter speeds; Photoshop CS2 (or various other programs) can combine the different exposures into one HDR image.

Photoshop CS2 (or various other programs) can then take this HDR image and reduce it down to a normal 8-bit or 16-bit image, suitable for display or printing, using a clever algorithm to adjust the lighting optimally in each part of the image. This can produce pleasing and sometimes rather strange and uncanny results. To see examples, go to Flickr and search for "HDR". I suggest you then click Most interesting.

Taking multiple exposures is rather a nuisance: you need a good tripod, and if anything moves in the scene you will get blurring or ghosting. Fortunately, the clever algorithm used for HDR can also be applied (with somewhat inferior but still useful results) to a normal 16-bit image. In Photoshop CS2, just convert the image from 16-bit to 32-bit, and then convert it back to 16-bit again using the Local Adaptation option. You'll probably need to display the histogram and make some manual adjustment to get a good result.

Here's an example of a 14-bit scanned negative with Local Adaptation, which (as I understand it) tries to give all parts of the photo a similar level of brightness. I added 15% contrast afterwards to give a more natural effect.

Boats at Orta

Here, for comparison, is the scanned negative without modification:

Boats at Otra (unmodified scan)

You might think you could achieve the same effect just by fiddling with the brightness, contrast, etc., but I tried and I couldn't.

Thursday 16 August 2007

Living with Calvin

Living with our six-year-old son Marc (the same age as Calvin of the Calvin and Hobbes cartoon strips) gives me a better appreciation of the realism underlying Watterson's art.

Our boy is not American, he doesn't go around with a stuffed tiger, and he's not prejudiced against girls. Nevertheless, the similarity to Calvin is occasionally striking, especially at mealtimes, when he's inclined to go off into flights of fantasy and comedy routines — anything rather than eat his food.

Reading Calvin and Hobbes is a good preparation for parenthood. Though you have to wait some years for your baby to grow into the role.

Wednesday 15 August 2007

Microsoft Office

Last week I received Microsoft Office Standard 2007 from Amazon UK, and installed Word, Excel, and PowerPoint. I didn't install Outlook because I don't plan to use it: I'm happy with Mozilla Thunderbird.

I have little or no personal use for Excel or PowerPoint, but Excel is needed for work and PowerPoint may be occasionally handy, if only as a viewer for incoming files.

So far I've used Word 2007 a bit and it seems OK. The user interface has changed but it's not too hard to get used to. I'll be gradually migrating my OpenOffice Writer files to Word.

Although I haven't installed Outlook, Microsoft keeps pressing me to install Outlook updates. How can a company be so successful, so rich, and so stupid?

Wednesday 1 August 2007

OpenOffice

I don't have Microsoft Office on my current computer, and I've been using the free OpenOffice suite in its place. I don't use it heavily, but I maintain a number of small files using mainly OpenOffice Writer (the equivalent of MS Word). Until now, it's seemed to work well enough, though it's not 100% compatible with MS Word.

Today I was adding to one of these files, which consists of a multi-column table, when I suddenly realized that the last column was missing. I haven't deleted that column; it's just inexplicably disappeared.

I'm deeply shocked. A program that can lightly throw my data away isn't a program I can trust in future. I'll have to migrate my OpenOffice files to some other program and write it out of my future plans. What a nuisance. Especially as I strongly dislike Microsoft.