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.

Wednesday, 18 July 2007

Cramp

I've been suffering occasional painful leg cramps for years, and in more recent times I've often been disturbed in the night by less painful but annoying foot cramps. Finally, four days ago, I thought of reading Wikipedia on the subject of cramp, and found that cramp can be caused by a variety of things, one of them being not enough salt.

This was interesting, because I know that an excess of salt is harmful, and so for many years I've avoided adding salt to food. What I didn't know was that a salt deficiency can also be harmful.

Wikipedia tells me that the recommended daily intake of salt is less than a teaspoonful. So, for the last four nights I've been taking a small amount of salt dissolved in water before going to bed. So far, it seems to work: I haven't had any more cramps. Magic.

Friday, 25 May 2007

Logitech

In July I bought a cordless keyboard and mouse from Logitech. Not long afterwards, some of the letters on the keytops started fading out, and by now a number of the keys are completely blank. I can manage, but it's rather annoying, so I finally called Logitech in Madrid to complain about it.

I was rather surprised to encounter a nice young lady who, without any argument, promised to send me a replacement keyboard (and mouse). Of course it would have been better if the original keyboard had been faultless, but customer support like this seems worth mentioning.

Saturday, 12 May 2007

Flickr

This past week I joined the photo-sharing site Flickr and began uploading a small selection of my photos to it. The site offers good facilities for organizing, displaying, and sharing photos. So far I'm rather impressed.

Monday, 7 May 2007

In search of the perfect playlist

Here's my current idea for the perfect iTunes playlist.

  1. Make a playlist of my 200 least recently played tracks.
  2. Make another playlist of my 200 least often played tracks, excluding those played in the last two weeks.
  3. Make a third playlist consisting of the above two playlists added together. This is the one I actually use.

Sunday, 30 July 2006

The big over easy

Finish reading Jasper Fforde's The big over easy (2005). Although I liked his Thursday Next novels, I took a while to get around to this one, because a detective story in which Jack Spratt and Mary Mary of the Nursery Crime Department (Reading Police) investigate the mysterious death of Humpty Dumpty sounds too silly for words. Amazingly, Jasper has pulled it off again, managing to make an amusing and engaging novel with some likeable characters out of the most unpromising material. You have to read this to believe it. I still prefer Thursday Next, though.

Thursday, 25 May 2006

The consent of the governed

Since the vote for the independence of Montenegro, I've seen several comments on the Web pointing out the hypocrisy of western Europeans and north Americans in happily accepting independence for Montenegro while reacting with shock and horror to any suggestion of regions seceding from their own countries.

This criticism seems entirely deserved to me. I see no reason why any region of any country that votes for independence shouldn't get it. Government should be by the consent of the governed. If the Basques or the Catalans decide they don't want to be part of Spain; if the Scots, the Welsh, or the Northern Irish decide they don't want to be part of Britain; then why should they be? I wonder why so many people in the world think they have a right to govern other people against their will.