Monday, February 28, 2011

bATT LOW SEE MANUAL

My 2011 Honda Odyssey, Sam (named after Samuel Clemens, Samwise Gamgee, and Samantha Stewart, a character in Foyle's War) has been a big step up from my 1996 Plymouth Voyager. They're both 6-cylinder minivans, but the 2011 Odyssey is larger, more powerful, and gets much better highway MPG. (If the Odyssey were any larger, I'd need to remodel my garage after the Tardis -- larger on the inside than the outside.) There are plenty of gadgets and interfaces as well, but that's not the point of this short post.

All first-year redesigns have teething problems. Consumer Reports advises against buying freshman models for this very reason. In my case, and many others commiserating on the web, there is an annoying problem with the battery management system (BMS).

Mind you, I've never had a car before that would warn me when the battery was getting low. The first symptom would either be a hesitant engine start, or the dreaded machine gun click-click-click of an exhausted battery. So I'm not against a battery management system! But this one has a hair-trigger, and you can't ignore it. It's not a meek idiot light, so thank goodness it doesn't go on forever.
You can imagine how startled I was the first time that warning flashed! I took Sam to the dealer on Jan. 19th, who checked the battery (nothing wrong), cleaned and tightened the negative terminal, and cleared the error. Blessed silence ensued for the next 2½ weeks; then, the warning returned.

A simple Google search revealed that I was not alone, and that most with this symptom did not have real battery problems. We speculate that it's an issue with the sensitivity or monitoring mechanism or programming of the BMS. I took Sam into the dealer again, who told me that they had just been informed by Honda to "inspect" any Odyssey reporting this problem. Sam's work ticket from Feb 9th states,
Called Tech line, sent me a fax of a questionaire to fill out, looked up specs with HDS, hooked up GR8 and ran diag on battery, unplugged connector on battery, faxed all papers to ahm.honda.com.
So Honda is collecting engineering data. Meanwhile, I must be patient while waiting for a fix. Today, on schedule, about 2½ weeks after the last reset, the dreaded bATT LOW has returned.
 I'm hopeful that as the weather warms up the BMS will be less twitchy.

Update 04/29/2011

Today I received two notices from Honda. Neither one of them is regarding the Battery Management System.

The first is a Product Update for the audio unit software addressing a software bug that can affect the clock, radio, and HandsFreeLink. I haven't noticed anything in this area. The update is low-key: the letter mentions scheduling is as part of your 'next planned service appointment.'

The second is an Important Safety Recall Notice for the front windshield wiper arms. They're too flimsy. If the blades are frozen to the windshield and you turn on the wipers, the arms may bend or separate!

I'm still waiting for any word on the Battery Management System. Since I took a long road trip in March, and the weather warmed up, I haven't seen the problem again. Left unresolved, I'm sure it will show up again next winter.

Update 05/19/2011

It's baaaack! After being away for 15 days or so, I fired up Sam last evening, and got the bATT LOW message. Perhaps a little freeway driving and a warmup (it has been chilly this week) will help, at least temporarily.

Update 12/17/2011

Honda has finally released a TSB (Technical Service Bulletin) for a product update on this issue! Hurray!

Honda TSB 11-073 - Product Update: MID Shows BATTERY CHARGE LOW or bATT LOW 
Applies To: 2011 Odyssey – Check the iN VIN status for eligibility 
BACKGROUND
The battery sensor software update improves the accuracy in warning customers when the battery’s state of charge is low by changing these inputs:
  • The sensor factors in the ambient temperature when calculating the current state of charge.
  • The sensor ignores short duration voltage drops, such as when the power sliding doors are opened.
A low battery message may still appear if the customer uses a system for an extended period of time with the engine off, such as playing a movie on the RES or planning a trip using the navigation system.
The new software will not improve vehicles with the following conditions:
  • The vehicle has a low battery because it’s not driven regularly or long enough to recharge the battery.
  • There is a high-current draw problem with the vehicle, such as a high parasitic draw caused by aftermarket accessories (alarms, video game systems, etc.). 
CUSTOMER NOTIFICATION
All owners of affected vehicles will be sent a notification of this product update.
Update 01/15/2013

I had the software update applied a month ago -- I waited a long time so that I could take it in at the same time as Sam's annual oil change. I'm pleased to report that I'm now free of the dreaded chimes!

Sunday, February 27, 2011

Who Designed This? Our Dishwasher Saga

This January our dishwasher died. We had been noticing an occasional whiff of hot plastic, off and on, but didn't locate it until the dishwasher fell into a coma in mid-cycle and wouldn't wake up again. It was time for one of our (least) favorite activities, appliance shopping. At least it wasn't Thanksgiving!

The unit, a Bosch, had already had two repairs in its 8½ years, so our first impulse was to cross Bosch off our list of candidates; however, Consumer Reports gives them an excellent rating on dishwasher repairs. Shopping at hhgregg, where we had a good experience a few years ago buying a washer/dryer, we narrowed our choices down to a Bosch or a KitchenAid. We went with the Bosch, and it was installed the next day.

The rubbery toe plate, not a part of the showroom display, looked odd. It stuck out a quarter-inch so along the whole length of the door. As Joan noted, it would funnel any drips or splashes (I am not a tidy cook) behind the kick plate, to linger and ferment. Ick.
It looks peculiar from the side as well, even if the gap exists to accommodate the rotation of the door. The slot on either end of the horizontal portion (not the metal kick plate with the screw) is a mystery.
Joan wrote an email to Bosch technical support asking why the plate stuck out further than the door. To its credit, Bosch responded within a day, asking for photos. We sent the two you see above, and Bosch's response was, "It's installed wrong."

hhgreg was swift when we contacted them, and sent an installer out on a Sunday. His first reaction was, "I've installed a hundred of them this way." We shared our Bosch correspondence with him, and he agreed that if it was an issue, it was an issue with more than just our one unit. He took our documentation back with him to hhgregg, reassuring us that if we weren't satisfied at any point, we could choose a different dishwasher.

Next, hhgregg notified us that a technician from Capital City, an independent service company, would be coming out to fix our unit. Two days later, he arrived and carefully disassembled the rubber and metal plates, and reassembled them, demonstrating that things only went one way.

Joan sent another email to Bosch, explaining the turn of events and asking for clarification. To this day we haven't heard from them. The design gods were silent.

We tried using the Bosch for a few days and found more design problems, at least for the way we use it. The tines on the bottom rack are held higher than the floor of the rack, shown in this photo:
The added height meant that our 11" dinner plates stood high enough to interfere with the rotating washer arm in all but a few positions. We later learned from Evan Coleman, our hhgregg sales rep, that Bosch claims this is to improve the water coverage of items in the lower rack. Perhaps the design gods are also coping with the unintended consequences of their hidden heating element (more vertical space consumed in the bottom of the unit)?

Another problem with the lower rack was that the tines were all tilted. This may help fit more plates in the available space, just as italic fonts fit more words in the same line, (holds 14 place settings!) but it frustrates someone who wishes to put pots, large mixing bowls, or food processor bowls -- anything with straight sides -- into the unit. It can be done, but it requires stubbornness. On your part, the tines are already so.
Designs change in waves of fashion or marketing, even among prosaic objects such as dishwashers. The design gods of every dishwasher we saw had decided to avoid complaints about wet stemware (think wine glasses); the geologic thrust fault you see below, adjacent to the side of the top rack, forces your stemware to tilt, from left to right, at least 30° off vertical to avoid the pooling of water.
Also, there's not much space left between the flip-down shelf and the crest of the ridge: perhaps 3¾" if I had held the tape measure completely vertical. Demitasse size at best.
Frustrated, we decided to go back to hhgregg and swap for something else. We were soon struggling to choose between two KitchenAid models, both of which were 2" deeper (holds 15 place settings!) than the Bosch, perhaps explaining why the Bosch was rated 2 decibels quieter. The more expensive of the two had a stainless steel facade instead of black (don't care, but it adds to the cost) and top-of-door controls instead of front-of-door (I suppose we could live with it), but it had the fold-down shelves for the top rack, and the less expensive unit did not.

Evan worked diligently with us. He researched whether the costlier model was available in black (no, not through hhgregg), whether we could separately order the upper rack (no), whether the shelf was available as a separate or replacement part (no, too new). He did bring the news that hhgregg would sell us that model for $100 off the floor price, and there would be an additional $60 MGR SAT (Manager Satisfaction?) discount. Plus, because there was a KitchenAid (mail-in) rebate on installation, we could switch to any KitchenAid without that expense. Our net cost to swap the Bosch for the higher KitchenAid would be $150. (We had an extended warranty, which we normally eschew, but because of our experience with the previous Bosch, we had purchased one. Part of the expense for the higher KitchenAid was a bump in the extended warranty.)

We went for it, and hhgregg made the swap the next day. (We do feel that we were treated very well at hhgregg and will shop there again.)

Here is the bottom rack of our new new dishwasher, with straight tines and enough vertical room for dinner plates.
You can't run away from the stemware fad,  also present on the KitchenAid models.
Although the height of the top shelf appears to be within 1/16 of an inch of the Bosch, our mugs and small glasses fit beneath the shelf! Perhaps because it's missing the scalloping on the underside, or, perhaps, the design gods deigned to smile on us just this once.


The new dishwasher isn't perfect; none could be, for that would leave the design gods with nothing more to do. It gulps Rinse-Aid like the desert in a rainstorm, and the instructions (p. 6) state, "Avoid overlapping items like bowls or plates that may trap food." But after our adventures, we're happy with the KitchenAid. Even the stainless steel front, an orphan design in our house, works, calmly reflecting the blues and whites of the kitchen floor.

And the rubber toe plate doesn't stick out. In fact, there isn't one.

Update 07/19/2011
Starting in early June, the new dishwasher started misbehaving. 4 times out of 5, when 'normal cycle' was selected, the unit would turn itself off partway through the job. If we selected '1 hour wash,' it would finish OK. It was still covered by KitchenAid's 1-year warranty, not even considering the extended warranty by hhgregg. 

The washer did not misbehave for the repairman last week, but my description -- even the status lights turning themselves off -- convinced him that there was a poor connection in the master controller to the power supply, one that would disconnect when it got hot. He installed a new master controller yesterday, so as soon as we have a load of dirty dishes, we'll see if that fixed it!

Thursday, February 17, 2011

My Photo Tweaks; assembling and disassembling video

The previous post discussed combining more than one image to generate a stronger single image (panoramic and High Dynamic Range photos). With the time-lapse movies and screen-capture clips of recent posts, I've been involved with a different alchemy, both assembling videos from a series of still images, and extracting still images from a video in order to tweak them.

Warning: this post lets my geek side spill out. I used free, open-source tools that allowed me to twiddle and tweak as long as I had the energy to research. I apologize to the majority of readers, for whom this has little interest. A non-technical post on an entirely different topic will be next up!

Time-Lapse Files

As I mentioned in the time-lapse post, I copy the JPG files of the photos from the PlantCam to my computer. There, I first make a quick video with the ffmpeg command-line tool (more free software) to see what tweaks are needed. The JPG files are numbered sequentially, WSPC0001.JPG, WSPC0002.JPG, and so forth. (WSPC stands for WingScapes PlantCam). To make a video from the raw images, I just type:
ffmpeg -f image2 -i WSPC%04d.JPG -qmax 3 video.mov
This tells ffmpeg to assemble a video from the files with a name of WSPC followed by four digits, at a high quality/low compression level (-qmax 3). If I'm happy with the result, I'm done, but there are often frames that I would rather not include: my face peering into the camera to see if it's working, light flares from the sun when clouds part, frames that are too dark as the sun goes down, and so forth. Small numbers of these can be dealt with by deleting the individual frames, but a complication is that ffmpeg expects consecutive frame numbers, so if any frames are deleted, the video stops there! Renumbering is a must, and that is something you do not want to attempt by hand.

To avoid accidentally deleting the original images, I create a subdirectory, and run my scripts from there. A basic renumbering script looks like this (yes, you coders out there, there are many paths climbing this mountain):
let i=1
for file in ../WSPC*.JPG
do
    nname=`printf "fr-%04d.JPG" $i`
    cp $file $nname
    let i=i+1
done
This script creates a copy of the WSPC images in the current directory, with the same four-digit naming convention, but the numbers will be sequential even if I've zapped some of the original files.

What if you wish to do various operations, such as cropping, contrast adjustment, and so forth? You aren't going to tweak each frame with the GIMP ... there will be hundreds or thousands. Another free, open-source toolkit, ImageMagick, comes to the rescue with its command-line suite. We'll jump in with a script I wrote for the "snow day" time-lapse clip. It may appear intimidating but I'll go through it step-by-step. I don't claim that it's optimal, but it worked.
/bin/rm -f video.mpg fr*.JPG

for i in ../W*.JPG
do
    nname=`printf "fr-%04d.JPG" $ix`
    let ix=ix+1
    stamp=`identify -format "%[EXIF:DateTime] %w" $i`
    fdate=`echo $stamp | cut -f1 -d' ' | sed -e "s/:/\//g"`
    ftime=`echo $stamp | cut -f2 -d' '`
    fwide=`echo $stamp | cut -f3 -d' '`
    let fontsize=$fwide/25
    echo $i $fdate $ftime $fwide
    convert -contrast-stretch 0.30x0.35% -unsharp 3x1.5+0.36+.05 $i $nname

    # create a timestamp watermark.
    #
    convert -size ${fwide}x100 xc:transparent -font FreeMono-Medium -pointsize $fontsize \
            -gravity center -draw \
                "fill black text -1,-1 \"$fdate $ftime\" \
                 fill black text 1, 1 \"$fdate $ftime\" \
                 fill white text 0,0 \"$fdate $ftime\" " \
            stamp_fgnd.png

    # shrink size of the image to the contents (-trim) and change the virtual canvas to that
    # size (+repage), then add the watermark to the image.
    #
    mogrify -trim +repage stamp_fgnd.png
    composite -watermark 65.0 -gravity southwest -geometry +10+5 stamp_fgnd.png \
        ${nname} foo.jpg
    mv foo.jpg ${nname}
done

ffmpeg -f image2 -i fr-%04d.JPG -qmax 4 video.mpg
The first line of the script just removes the files from any previous run. Then, as before, for each WSPC JPG file, we create a proper sequential name. Next we use the identify tool from ImageMagick to extract information from the EXIF data kept in every modern digital image. In this case, we get the time and date that the image was taken, because I want to create a timestamp watermark, and the width of the image, to calculate how large a font to use for that watermark.

Next, we not only copy the original file into the subdirectory, but we modify it with the convert command. The '-contrast-stretch 0.30x0.35%' argument tells convert to stretch (increase) the contrast until no more than 0.30% of the pixels are completely dark, and no more than 0.35% of the pixels are completely bright. Then the '-unsharp 3x1.5+0.36+.05' argument applies an unsharp mask (to sharpen the image) with various values (mask radius, standard deviation, amount, and threshold). Contrast enhancement and sharpening were tasks I did by hand using the GIMP for single images, but here, they are automatically (and uniformly) applied to each frame. I spent a while experimenting with these values, re-running the script each time, until I reached a satisfactory result.

Next, convert is used to create a watermark file (stamp_fgnd.png) using the date and time extracted earlier. The text is drawn twice in black, once offset by one pixel to the left and above and then once to the right and below, before being drawn in white with zero offset. This makes a nice outlined text. A simple timestamp might look like this:
Not knowing how large the final text would be, the initial watermark canvas was made large (as wide as the image and 100 pixels tall) and the text placed in the center. This leaves a lot of empty space around the text, as you see above. Because I want to place this text in the lower left-hand corner of another image, I want to discard the extra space. The script uses the mogrify spell (basically a synonym for convert that writes the result directly into the original file rather than a second file) to slice away the extra (-trim):
What the above image doesn't show you is that the text and the canvas have both been trimmed, but the offset of the text hasn't been corrected. Many viewing programs automatically correct this for you, but the GIMP notices:
The two must be realigned in order for the watermark to show up as expected, so the '+repage' is also done. (Mogrify, like all ImageMagick commands, performs its magic from left to right, so in this case the trim is done before the repage.)

Finally, composite is summoned to combine the timestamp image and the original image. The timestamp is added as a watermark, with the original image contributing 65%. The addition takes place at the southwest corner, with an offset of 10 pixels in X and 5 pixels in Y. The result is written into a temporary file and then copied into the original filename. The result is pleasing, as this frame from the "snowy day" video shows.

One side note: for minimal processing of videos from my camera, such as cropping edges or clipping leading or trailing seconds, I use an ffmpeg incantation directly, rather than the painstaking work described in this post. One example: 
ffmpeg -i 00134.mov -sameq -croptop 160  -cropright 180 -acodec copy piper.mov
Screen Capture

In preparing the earlier posts I also used screen capture to reveal how a particular program works -- using xvidcap I grabbed videos of the GIMP and fotoxx in action. Being screen captures, these videos did not need any contrast enhancement or image sharpening; however, it is difficult to perform an example task without bobbling some aspect, even with practice, and if the task requires the computer to crunch away for 30 or 60 seconds, the video becomes boring. Very boring.

I needed to break the video into separate images, allowing me to delete my mistakes and distractions, and to compress the tedious parts. Fortunately, ffmpeg breaks apart a video quite handily:
ffmpeg -i test-0000.mpeg -qmax 2 -f image2 test-%04d.jpeg
This is exactly the reverse of assembling the video: the separate frames are created as individual, sequentially numbered JPG files. Then I can manually delete a small number of frames, or write a script to skip or speed up entire sections.

I also needed to make an extra copy of each frame to slow down the playback. With xvidcap and the demonstrated program (GIMP, fotoxx) competing for the computer, it was best to capture the desktop at no more than 12 or 13 frames/second. However, ffmpeg wants to produce video that plays at 25 frames/second. This mismatch spawns a hyperactive mouse that is difficult to follow. After losing several arguments with ffmpeg, I decided the easiest course was to double frames.

Here is another example script. It extracts the four-digit number from the name of the original frame, allowing it to process only every other frame between 1290 to 2064, and creating two copies of all the other frames. Thus, the waiting-for-the-computer section zips along four times faster than the moving-the-mouse parts. Finally, ffmpeg is used to assemble a video from the new frames. (I discovered that for screen capture, versus photographs, a different encoding standard, h264, produced smaller files.)
let ix=1
let skip=0

# create two copies of each frame, to make the pace of the playback reasonable
#
/bin/rm -f video.mpg fr*.jpg

for i in ../test*.jpeg
do
    if [ $skip -eq 1 ]
    then
        skip=0
        continue
    fi

    orignum=`echo $i | sed -e "s/..\/test-//" | sed -e "s/.jpeg//"`
    nname=`printf "fr-%04d.jpg" $ix`
    cp $i ${nname}
    let ix=ix+1

    # do not double the boring stretch, in fact, halve it!
    #
    if [ $orignum -gt 1290 ] && [ $orignum -lt 2064 ]
    then
        skip=1
        continue
    fi

    nname=`printf "fr-%04d.jpg" $ix`
    cp $i ${nname}
    let ix=ix+1
done

# reassemble the video using the libx264 video codec
#
ffmpeg -f image2 -i fr-%04d.jpg \
    -vcodec libx264 -vpre lossless_ultrafast -threads 0 video.mkv
The moon is setting, and it's time to wrap up this post and close our book of spells (or web sites with manual pages for command-line tools). Thank you for visiting the lab with me.

Friday, February 4, 2011

My Photo Tweaks; panoramas and HDR

Producing Panoramas

Hiking in scenic locations begs for extra-wide pictures that can't be taken in a single frame. Over the years I have used various tools for combining overlapping images; currently I use fotoxx for this task.

In the following screen capture you will see several steps:
  1. Choose the Panorama option.
  2. Pick two pictures for the panorama.
  3. Set the lens used for the pictures (mine was at 25mm).
  4. Position the images as closely as possible to the proper overlap.
  5. Click on proceed.
  6. Fotoxx highlights the parts it is working on in red.
  7. Skip the match brightness option.

Let's watch the clip.


It's best to set the lens value properly, because it will make aligning the photos much easier and more successful. A wide angle lens makes a square image out of a round view -- think of the 'fish eye' lens, which warps up to 360° of view into a rectangle. With the right lens value, fotoxx can restore the original curvature of view, making alignment of features in the two images practical or, in some cases, achievable at all. 

The photo I wanted on the left of the panorama was originally on the right of the workspace, so my first action was to drag it over until fotoxx swapped the images. Then, using a combination of drag and rotate, I did my best to align the overlap. When objects both at the top and at the bottom of the image are crisply superimposed, you've got the right mix of rotation and positioning. If things aren't working out well, you can try changing the lens value, which alters the degree of curvature, to compensate. (For purposes of shortening the demo I edited out several seconds of my fumbling about placing things.)

Fotoxx takes over after you click on 'Proceed.' It searches for the best match, tweaking your image rotation and position, and choosing which pixels to use in the overlap zone. It can take some time; for this demo, I cut out about ¾ of the frames to speed things up.

When fotoxx decides it has done all it can do, the Match Brightness panel pops up. With this, fotoxx can attempt to match the brightness levels of the component images to make the panorama as seamless as possible. Usually, when I have adjusted each image ahead of time as in the previous post, this isn't necessary.

When I'm satisifed with the panorama, I save it and do final processing with the GIMP. This is primarily doing any rotations needed to level the horizon, cropping out most of the black areas, and trimming the left and right sides. If the panorama, intended to be wide, is too wide, it becomes very short when squeezed into a browser. (Yes, I could also do these things with fotoxx, but I'm already familiar with the GIMP. There is a swarm of photo-editing tools to chose from, and no reason to master them all.)

Here is another photo-taking tip for panoramas. If you hold the camera steady and rotate your body to take the overlapping pictures, objects in the foreground are almost impossible to line up (superimpose). Their picture was taken with the camera in two different locations. For distant objects the shifting is negligible, but it can make you pull your hair out over objects from near to many yards away. I've given up on one or two panoramas where I was sloppy and stumbled over the parallax. It's best to keep the camera in the same position, and rotate it around center of its lens to take the overlapping photos.

High Dynamic Resolution (HDR)

What's HDR? Consider a scene with both deep shadows and bright surfaces or skies. Even with contrast tweaking, it can be impossible to produce an image that clearly shows detail within both the very dark and very bright parts. High Dynamic Resolution, which I have briefly experimented with, is taking two more more photos of the same image at different exposures, and using the best parts of each. To bring out the detail in very dark sections, use those parts of an otherwise overexposed image. To reveal the structure in very bright sections, use those parts of an otherwise underexposed image.

Fotoxx offers an HDR operation in the same menu as Panorama. There is no manual alignment; any adjustments are done by fotoxx. This requires that the two images are, except for the exposure, close to identical; otherwise, fotoxx can't figure out how to combine them. Ideally, your camera has the ability to take a series of photos at different exposures with one press of the button, while you hold the camera still (or deploy it on a tripod). Mine will take 3 shots, but across a limited range of exposure, and the demo that follows is from images taken before I remembered how to do even that!

The two originals do not align exactly but fotoxx eventually figures it out nonetheless. They are not different enough to make a striking improvement when combined with HDR, but there's enough change to demonstrate the principle.

Now let's watch the fotoxx HDR processing in action.

In the first several seconds you can see fotoxx working up a sweat aligning the two images as best it can. Eventually it finishes its work, and the Adjust Image Contribution panel pops up. This panel allows you to specify how much each image contributes to the combined result across the different brightnesses, by manipulating the lines (one for each original image) in a fashion similar to the Adjust Color Curves panel in the GIMP. The fotoxx documentation points out that by bringing out the detail in the dark and bright areas, you effectively decrease the contrast, and Adjust Image Contribution allows you to compensate for that, or to follow other artistic impulses.

When I first tried HDR I stumbled into an issue, motion. If flags are flapping, branches waving, or people walking, the images you combine are of course different. Ghosting or double-exposure will result. There may be techniques to manually correct the resulting image, but those experiments are in the future. Improving photos is a never-ending process!

Thursday, February 3, 2011

My Photo Tweaks; photo editing with the GIMP

If you've viewed other posts in this blog, you know that I rely heavily on photographs to convey impressions and to make the blog appealing. A discussion I had with Chris at Talus Lodge about post-processing of photographs, using pen and napkin, inspired me to put a blog post about photography on my to-do list. Now, five months later, I'm finally getting around to it. I hope you will find it interesting, particularly if, like me, you prefer to casually work with photos before displaying them.

Processing a single photograph is just the beginning, it turns out. Later posts will take a peek at combining photographs for a panorama, using multiple images for high dynamic range, assembling photographs into a video, and extracting images from a video.  I apologize in advance for any lack of clarity, excessive detail, or omitted points in these posts.

The first thing I do in editing an image is to crop the photo to either frame the scene better, or to zoom in on a feature of interest. After all, my current camera, a Panasonic Lumix ZS-3, can produce images that are 3648 pixels wide, whereas the pictures that I post to the blog are about 1000 pixels wide (there are still a lot of computer monitors out there that are only 1024 pixels across). There's plenty of room for cropping.

Because I am a big open-source fan -- my home PCs have been running Linux for at least a dozen years -- I use a program called the GIMP for photo processing. (GIMP stands for GNU Image Manipulation Program. GNU stands for GNU's Not Unix.) It is available for both Windows and Mac OS X as well as Linux. Here is a screen capture of a simple cropping operation using the GIMP.

Note: if the playback is too small to see well because of the width constraint of the blog, click on the full-screen icon on the far right of the playback bar. Depending on the resolution of your monitor, this may work better.



Once the image is cropped, I move on to enhancement with the Adjust Color Curves feature (from the Color menu, select Curves). The histogram, or distribution of pixels from darkest to lightest, is then presented:

In the above histogram, there are few if any extremely dark or extremely light pixels. (You can see a shade guide along the bottom, with darkest at the left and brightest at the right.) The 'Channel' selection allows you to manipulate just the red, green, or blue component of the image, or the overall brightness level, called value. To expand the range of the brightness level, aka improve contrast, I change the 'value' channel.

The histogram is from this low-contrast image:

The trick is to improve the contrast without going too far and creating garish or cartoon-like coloring. The Adjust Color Curves function allows you to manipulate the pixel distribution with great flexibility, more so than programs that sport a single 'contrast' adjustment or perhaps split the adjustment into predefined high-, medium- and low- (or shadow) tones.

Here is a demo of the mechanics of Adjust Color Curves. You use the mouse to alter the shape of the diagonal line that represents the mapping of the original brightness for a pixel (the X value) to a new brightness (the Y value). At the start, the line is a perfect diagonal, so that each pixel's new value is the same as the old. In this example, I drag the endpoints of this line closer to where pixels actually start showing up in the distribution, and the image changes as the line changes. I then bring up Adjust Color Curves once more, and the histogram now reflects the alterations.


Here's that new histogram, showing the distribution of the pixels after I used Adjust Color Curves. The general shape is the same, but spread out a bit to occupy a greater range of brightnesses.
I did not eliminate all the empty space on either flank of the histogram, because if I had, the changes would have been garish. Small adjustments can be made fully, but for large adjustments I usually don't grab more than 50% of what's possible.

As the last step of the above demo, I also ran the 'Unsharp Mask' function. This is an image-sharpening feature, useful for soft-focus or hazy images. I have learned tread lightly here; for instance, the 'amount' field, which is how much of the calculated adjustment to actually apply, I typically set in the 35%-40% range. Also, faces of people usually look better if you don't highlight their bumps, creases, and shadows -- I just skip sharpening those images.  There are techniques to apply sharpening to just the edges within an image I intend to try out. As always, there is the Undo command in the Edit menu if I mess up!

The results of the 'Unsharp Mask' may not be visible with the screen resolution of this demo. That's OK; in this case, subtle is better. Here is the histogram after Unsharp Mask.
I should mention that the line doesn't have to remain straight. You can add points to the line and adjust only portions of it; that's the wonderful power of this tool. Here's a mapping that brightens the lighter bits as well as increasing contrast:

If I had wanted to tone down the bright areas (bringing out structure in sunlit clouds, for example) I would have lowered rather than raised the rightmost portion of the line.

The next post will talk about stitching together a panorama and about generating a High Dynamic Range (HDR) image, both multi-image creations.