An admittedly random look at hacking and trying to easily get electronic devices to improve the author's quality of life rather than ruin it.
The author is particularly interested in home theater, photography, and scuba diving. He's a software developer by trade but, strangely, prefers not to spend his spare time hacking more than necessary. His home page is at http://www.evaandering.com.

Wednesday, April 6, 2011

In my second post, I described my "post-processing," or how I turn a RAW file from my camera into a final image. The reason I use RAW mode on my cameras is that all these adjustments can be made from the original data, not the reduced data in the normal JPG files. And if I want to change something a few weeks or years later I can easily go back into Lightroom, tweak the one thing I want to change and regenerate the JPG.

In this post, I'll give some before and after examples for the adjustments I make. This all comes back to the question of "Do you use Photoshop?" As I already implied in the previous post, "Yes, but that can mean a lot of things." People often assume "Photoshop" means "cheating," "altering reality," or "making things up." But image processing is just another tool and you can put it to any number of uses.

One of the most basic adjustments that you can make to a photo is to change the white balance, or the color of the light. For instance, light on a cloudy day is bluer than light on a sunny day. In the days of film your photo lab would alter this in printing, but if you used slides you were stuck. They actually make different films for different lighting (outdoor, indoor, fluorescent). Fortunately with digital, we can adjust this either at the time you take the photo or later. Since I use RAW it doesn't matter at all when I change it, so I just tend to leave it on Auto and deal with it later. If you are taking photos in JPG mode, you'll get slightly better results if you set your white balance to sunny or shady or whatever fits.

This concept is really important for underwater photography without a flash since water quickly absorbs nearly all the red light. Take a look at this photo below. On the left is what the original might look like, on the right is what it looks like when I've corrected it. You can see that the reds, which were almost lost, have been restored. When you see something like this underwater, your eye sees the red color, unlike the camera. (I picked an extreme example because the difference between sunny, cloudy, and shady light is much less pronounced.)

White balance illustration (Stoplight Parrotfish, Cozumel, Mexico)

Using the same photo as an example, let me illustrate another correction I make to my underwater photos. When you shoot through water, you tend to get haze due to dispersion within the water. This is basically like haze in the air, but because water is 800 times as dense, you get haze between you and subjects a few meters away (rather than a few kilometers in air). You can take some of this haze out by increasing the black level, or basically darkening the darkest parts of the photograph. You can see this below where I've done this on the right. (Look at the water to see the effect most clearly.)

Removing haze with black levels (Cozumel, Mexico)

This next photo is one of my favorites. This shows the effect of increasing the "Clarity" and "Vibrance" in Lightroom to get that warm, saturated film look. (I didn't change the white balance between the two.) The line down the middle is a little hard to see, but take a look at the photograph as a whole and you can see how much richer this simple adjustment makes the part of the photograph on the right.

Clarity and vibrance illustration (Lioness, Nakuru NP, Kenya)

Here's a simple example of using the targeted adjustment tool I mentioned in my second post. On the left is the original version of the photo. On the right I've "grabbed" the blue sky and made it darker (decreased the luminance) to look more like it appears to the eye. (Your eyes are much better than a camera at seeing a deep blue sky against a very bright snowy mountain.) You'll notice the line between the two photos is very distinct in the sky and all but invisible in the white parts. That's because I've only adjusted the blue parts of the photo.

Targeted adjustment tool illustration (Chamonix, Switzerland)

This is a much more extreme version of the same principle and this is one of a handful of photos where I've really altered something. The air in Cairo is horribly polluted and a clear day with a blue sky over the Giza pyramids and Sphinx is incredibly rare. In fact, many postcards use photos taken a decade or more ago. So short of living in Egypt for years, there is no way I could have gotten a photo of the Sphinx backed by a beautiful blue sky. So I cheated. :-) I adjusted the white balance a little to get some blue into the sky. Then I used the Lightroom's targeted adjustment tool to adjust the darkness and hue of the sky to get something that looked somewhat natural.

Targeted adjustment tool illustration (Sphinx of Giza, Cairo, Egypt)

Here's a good example of noise reduction. This is a 1:1 blow-up of part of a picture. It's shot on my small underwater camera (Canon G10) at ISO 800, which I would never have done except that I had so little light to work with, I had no choice. On the left is the image as it comes out of the camera. On the right is after a moderate amount of noise reduction and sharpening from Lightroom. The quality of the noise reduction in Lightroom 3 is much improved over previous versions, so for photos like this, it was almost like buying a new camera. It still doesn't look great, but it's a major improvement and when it's not blown up like this, this photo actually looks decent.

Noise reduction illustration (Hilma Hooker shipwreck, Bonaire)

So, these things are the majority of the image manipulations I do in Photoshop Lightroom. I left out a few, like small (one stop or less) exposure corrections, removing dust and back-scatter, or fixing red-eye when using a flash. The point, for me, is that while a tool like this can help make a photograph somewhat better, it can't make a photograph. It is still the technique, thought process, and, yes, luck that I've had that goes into making the photo what it is. Aside from the Sphinx picture, every photo I've ever taken fits that category. On the other hand, I didn't paste a sky with clouds into that photo. It is also much easier to take a few extra seconds in taking a photograph to capture the best photo you can than it is to "fix" things in Photoshop, so I try not to be lazy in that regard.

So that's what I use image processing software for. What I don't use Photoshop or Lightroom for, and what I gather is many people's perception of the program, is things like this. I think I may have once removed a powerline from an open sky. I don't have anything against extensive "Photoshop"ping per se, but in my opinion when it's used to alter reality and it's not obvious that reality has been altered, it should be disclosed. There are many ways to use these tools and all of them can be valid, the important thing is not to deceive the viewer. But remember, photography is an art and there is now a continuum of methods and styles from raw photojournalism at one extreme through to things like Sin City and Avatar on the other.

If you are wondering how I create these photos with two halves, I use a couple of programs from Imagemagick:

To split a photo into two parts (overwriting the original):mogrify -path test2 -format jpg -crop 50%x100% +repage *
and to stick two pieces back into one montage 469d2b37-2-0.jpg 469d2b37-1.jpg -mode Concatenate -tile x1 lion.jpg

I mentioned earlier that I often get asked "Do you Photoshop your photos?" and that I don't really like the question. But I didn't answer the question either. This post is the second of four planned posts that outline exactly what I do do with my photos. The next post will show some before and after photos.

So to directly answer the question "Do I Photoshop my photos?", the answer is "sort of." :-) I don't actually use Photoshop which is typically the program people think of and comes with Adobe Photoshop CS5 and is geared towards both photographers and graphics designers. I do, however, use a program with some of the same functionality called Adobe Photoshop Lightroom, or Lightroom for short that is really only suitable for photographers.

Lightroom is actually a pretty good name because it evokes the concept of "darkroom." This means that Lightroom lets you do things on the computer that, with film, you needed a darkroom to do. Some of these manipulations are able to "fix" specific problems with photographs are some are ones I use on nearly every photograph. Lightroom is also about much more than image manipulation, it's also about organizing and managing your photographs. I'll deal with that more in the final post in this series.

The first thing I do when I re-import my photos into Lightroom (described at the end of my first post) is set some Lightroom presets. Because I shoot everything in RAW mode, the default look of the photos is rather dull. I change this by setting Lightroom's "Clarity" and "Vibrance" settings to about 50 each. Clarity adjusts the contrast of the photo, but increases the contrast of low contrast regions more than high contrast. Vibrance does something similar to the color saturation, increasing the saturation of dull colors while leaving the very bright, colorful parts of the photo unchanged. There is a very nice discussion of these settings with examples here. I also set my Adobe camera profile to "Manufacturer Standard" which is a bit more colorful than the default. The effect of all these settings is to make digital photographs look more like film, especially the widely used Fuji Velvia slide film, rather than a strictly faithful representation.

The second preset I apply to all my photos is to correct the distortions of my lenses. No lens is perfect and they all distort somewhat. This is especially pronounced with wide angle lenses. Adobe has very good profiles for a lot of lenses, so if I have a profile for my lens, I make the correction. The last set of presets I apply to every photograph is some noise reduction and sharpening with a sharpening mask. The mask is used to apply sharpening to areas where the contrast is changing (like edges) and to not apply it to already smooth areas (like people's faces). The amount of noise reduction I apply depends on the camera used and the ISO value of the photograph. Lightroom makes it easy for me to apply these settings in a batch mode, so it's a very quick operation.

Now that I've done things with my photos "in bulk" I start a process where I scan through my photos multiple times doing the same step (or few) to each photo. I use Lightroom's colors (red and yellow) and numbers (0-5) to track which step I am on. When I reach the last photo, I start the next step on the first photo. The steps I take are:

Reject any photos that are out of focus or obviously junk

Set the white balance of the photos in groups (I select a whole bunch and set them to sunny or shady, etc)

If I've bracketed the shots (taken several at slightly different exposures), I pick the best exposure

I often have several shots that are very close or identical. I pick one

This can be rapid fire shots of people trying to catch a good smile, or wildlife trying to catch a good angle, expression, etc.

Adjust the exposure if needed

For underwater wide-angle photos this often means using the "Auto" exposure mode which takes a lot of the "haze" out of underwater photos by changing the black level

On land, this can be adjusting for high contrast situations and sometimes "fixing" an actual over or under exposure

If needed, crop the photo and/or straighten the horizon

Pick between similar shots (as opposed to nearly identical shots, maybe two photos of the same type of animal or scene on different days)

Check and set the white balance individually if needed

Check and set the exposure if needed. Especially check the highlights and shadows

Clone out any visible dust on the camera's sensor or annoying back scatter for underwater photos

Especially for high ISO shots, check the noise levels and add more noise reduction if needed

You can see on my workflow that there are several points where I am filtering my photos, but I try to space those out so I don't get fatigued. In general I discard somewhere between 50 and 90% of the photos I take. And while it may sound like a lot of work, I probably average less than minute of work for each photo I keep.

On rare occasions I do a few other other touch ups. For instance, I will sometimes use the targeted adjustment tool to make a sky a little darker or bluer or to de-emphasize a distracting background.

There are two points I always keep in mind. First, most of the manipulation I do is to get a similar look to what we used to get from film and the manipulation that used to happen in photo labs when we brought in negatives for printing. Second, human vision is much more adaptable and subjective than the very accurate capture digital cameras are capable of: the human eye easily adjusts to light of different colors from sunlight, shade, etc. and it easily sees the detail in shadows even on a bright summer day. To make a photograph more accurately reflect that experience, it's sometimes necessary to adjust things away from the very linear capture of film or a digital chip. Photography is most often a way of capturing a mood or feeling rather than some objective (whatever that means) reality of a moment in time.

Monday, April 4, 2011

I've written a couple of times about my WD TV Live Plus media player, growing to like it a bit more all the time. The biggest breakthrough in usability was installing the Mediatomb server software on my home media server.

After being pointed at the Western Digital MyBook Live World family of products (why are these names so long?!), I had two thoughts: first, those look really cool and could easily have replaced my media serving hardware, especially with the online instructions to turn it into a webserver. Second, what is this TwonkyServer and how does it compare to Mediatomb?

Fortunately, TwonkyServer has a free trial period and is Linux friendly, so I was able to download it and play with it. Basically it's just another UPnP server and doesn't do anything fundamentally different that Mediatomb. But it does have some nice features and it's cheap, just $20. So bottom line is, I will be buying it. Here's a rundown:

It should go without saying, but this is not free or open software so if this matters to you, it's not an option

TwonkyServer serves up .m3u playlists just fine. For Mediatomb, it didn't do this in my Ubuntu install. There was some discussion of recompiling with JavaScript support and suggestions that this might be improved in future versions of Ubuntu, but it wasn't something I wanted to mess with. TwonkyServers playlist support is good enough that it actually generated playlists out of .m3u files that didn't have the correct prefix on the paths.

TwonkyServer has an ArtistIndex menu selection that gives things like "ABC" "DEF" etc., meaning less scrolling to find what you want if you have lots of artists. I do, so I found this useful.

Even more useful, it deals with "Various Artists" albums in an intelligent way. I have a lot of soundtracks, collections, and especially five years worth of South By Southwest collections, so I have hundreds of artists in my collection with just a song or two. One simple configuration on Twonky's configuration web page, and all these spurious artists disappear and those files are accessible by Album or other metadata, but not by Artist.

Twonky lets me access my songs and photos by rating (1-5 stars). I don't have ratings set on my songs yet but I do on my photos, so this is useful. It also understands my keywords from Lightroom (subject of a future post).

Twonky does some transcoding of things like YouTube and various radio streams, etc. I haven't explored this a lot as the WDTV Live Plus provides a lot of this through it's dedicated applications.

Finally, Twonky treats a file "folder.jpg" in a music folder as the cover art for an album. It may be that Mediatomb does this too, but this is handy.

So, bottom line, TwonkyServer gives enough advantages over Mediatomb that will by buying it. I couldn't find anything that I liked about it less. It also seems quite stable. I had music streams running for days without incident.

About Me

Eric is particularly interested in home theater, photography, and scuba diving. He's a software developer by trade but, strangely, prefers not to spend his spare time hacking more than necessary. His home page is at http://www.evaandering.com