The View Up Here

Random scribblings about kites, photography, machining, and anything else

  • Flickr Gallery

  • Advertisements

Posts Tagged ‘Image Processing’

Panorama Workflow

Posted by Tom Benedict on 23/07/2010

I’ve had some opportunities to play with my camera on the ground as well as in the air, and to test a number of image sets on the software I’ve been using.  Two days ago my wife and I took our kids to Pololu Valley to go hiking.  On the off-chance the weather would be nice, I brought my KAP gear.  The weather was fantastic, with solid winds for kite flying, and beautiful partly-cloudy skies.  Time to play!

I ran about 5GB of images through the camera from various vantage points.  In creating the base images I tried to incorporate everything I had learned from the earlier experiments.  The resulting photographs turned out quite well, so I’m considering the new workflow to be a win.  I’m sharing it here in the hopes that someone else doing kite aerial photography will give it a try and take it even further.  Here are the details:

  • If you can shoot RAW, shoot RAW.  I can’t, but in the near future I’ll be able to.
  • Use Manual Exposure mode on your camera.  Set it on the ground, check it, and double-check the histograms to make sure you’re getting bullseye exposures.
  • Use at least 1/1000 second exposure speed.  I’m using 1/1250.
  • Use the slowest ISO setting you can to control noise.  This is of less concern with a DSLR, but every bit helps.  I made this set at ISO 80.
  • Use the sweet-spot aperture on your lens if possible.  My lens is sharpest around f/4 to f/5.  I couldn’t use this aperture and hold the other numbers, so my lens is wider than ideal.  But the benefits in noise at ISO 80 make this a reasonable choice.  I give up some sharpness for lower noise, and keep the fast exposure speed to avoid blur.

Once the camera is in the air, all my panoramas were made with the camera vertical.  With a KAP rig this either means building the rig around a vertical camera (Brooxes BEAK rig), or using an L-bracket on a conventional rig, or having a dedicated Horizontal/Vertical axis on the rig.  I recently modified my rig to add the HoVer axis, so this is the route I went.

The idea with this technique is to start the rig on a slow spin, and to trigger the shutter continuously.  This technique was developed by a French KAPer who goes by the name of Vertigo on the KAP forums.  With a sufficiently fast shutter speed, this works perfectly.  My A650IS does one frame every 1.1 seconds.  With a 10-second-per-rev rotation rate, this works out about perfectly.  I’m upgrading to a Canon EOS T2i DSLR in the near future, which has a much faster frame rate.  I’m planning to build an electronic release cable for this camera that will give me the same 1-frame-per-second rate my A650IS has so I can continue to use this technique.

  • Start the rig rotating at a rate that gives you adequate overlap between images, and minimizes motion blur from the rotation, given the camera’s shutter speed.
  • Once the camera is rotating cleanly (no see-sawing on rotation, no jerkiness in the pan axis, no swinging around, etc.) trip the shutter.
  • Make at least two complete orbits of the camera, tripping the shutter non-stop the entire time.  This is for a couple of reasons:  First, it gives you plenty of frames to choose from in case one is blurry.  Next, it gives you a range of random tilt angles that you can use to fill in gaps later on.  Finally, if the rig starts to move, the second orbit will still produce a clean panorama.
  • If you want to make a larger panorama, change the tilt after two orbits and make two more orbits at the new tilt value.
  • While all of this is going on, do everything you can to minimize camera motion.

This should produce a nice set of images from which to work.  You may well end up using them all, so don’t toss any of them!

I use Autopano Pro for stitching.  Some of the tricks I’ve picked up will apply to other packages.  But if you find yourself scratching your head and thinking, “No, I’ve never seen that,” don’t sweat it.  Your software is different.  Skip that part.

One of the first problems I ran into is that Autopano Pro deals really well with point features, but not very well at all with linear features.  For example, it’ll match up individual stones on a beach like a champ, but it will produce lousy horizons if the horizon is just water and sky.  It makes no effort whatsoever to correct for lens distortions if the bulk of the picture is water and sky.

The fix I found was to use PTLens to correct lens distortions before using Autopano Pro.  PTLens is a $25 plug-in for Photoshop.  Even better, it’ll run as a stand-alone program and will batch process hundreds or even thousands of images at once.  If you’ve got a block of images you photographed as fodder for panorama stitching software, it’s no problem at all to batch process them all to remove lens distortions.  Water horizons should now be ramrod-straight lines across the frame.

So back to the process:

  • Run the entire image set through PTLens to remove barrel distortion, vignetting, and chromatic aberrations, but nothing else.
  • Process the images with Autopano Pro, or the panorama software of your choice.
  • Do everything you can to get completely horizontal, completely straight horizons for water.  Nothing kills a pano faster than a grossly errant horizon.
  • Save as 16-bit TIFF images.  16-bit workflow can be a real PITA, especially on a smaller machine, but it hides a lot of ills when it comes to large-scale processing like Levels and Curves.

At this point I open up the images in Photoshop.  I’m still using Photoshop 7.  I’ll upgrade to CS5 as soon as I can afford it.  But for now it still does everything I need.  Want is a whole ‘nuther story, but as far as my needs go, it’s fine.

  • View 100% and check for stitching errors.  Repair all of these with the rubber stamp or heal tools.
  • If your kite line shows up in the image, remove it using the same tools.
  • If you cropped your panorama wide enough to have gaps in ground or sky, open up all the images that went into the panorama, as well as the second orbit you made from that same location.  Use the rubber stamp tool to pull patches from any and all of the input images to repair problems on the panorama.  (This is one of the best reasons to make a second orbit!)  Since you used a fixed exposure, you should be able to rubber-stamp these into the panorama with no changes necessary.
  • Once the panorama is defect-free, look at your levels.  If you did your job setting the manual exposure on the ground, the exposure should be dead-nuts on, or need very little tweaking.
  • Do all your dodging and burning at this point to get the exposure just the way you want.  This can involve lots and lots of time, depending on how meticulous you are with your exposures.  If you’re the kind of person who got into photography in the days of film, and spent your afternoons in the positive darkroom dodging and burning the same negative over and over and over, you may be on this step for a while…

At this point the bulk of the workflow is complete.  But I would advise you not to stop here.  In Photoshop under the File menu is a command called File Info.  Click it.  It lets you edit the header information associated with your image.  At the very least I would fill out:

  • Title – What is the name of the original file on your computer?  Leave out the extension since that can change without changing the image.
  • Author – Your name.  You’re the author of your image.
  • Caption – Describe the photograph clearly and concisely, and include enough information so that you could read it and know where on the planet you were when you made the photograph.
  • Copyright Status – Change this to “Copyrighted Work”.  The moment you tripped the shutter, your photograph was a copyrighted work.  Not marking this just sets you up for someone to use your photograph without your knowledge.  If you choose to license your photographs under the Creative Commons license, of course, you should set this appropriately.
  • Copyright Notice – Mine reads: Copyright © Tom Benedict
  • Date Created – The date you tripped the shutter on your camera to make the photographs that went into this image.
  • City / State / Province / Country – Fill them in.
  • Source – Give yourself some hints here.  Is it a straight shot?  Digital?  Film?  Stitched?  My digital panoramas are all marked “Digital-Stitched”.

The neat thing is that most of the photo sharing sites on the Internet will automagically read your header information and fill in their own forms for you.  You may still want to provide more information than this, but the base information will be there.

The even neater thing is that in the event someone downloads your photograph and puts it on their own site without your knowledge, your header information is indexed by most search engines.  Even better, when you challenge them and they claim the photograph as an “orphaned work”, you can demonstrate that they did not make an honest effort to find the photographer in order to ask for permission since your info is all right there with the image.

So that’s it in a nutshell.  How well does it work?  See for yourself:

Pololu Valley Wetlands 2

– Tom

Advertisements

Posted in Kite Aerial Photography, Photography, Software | Tagged: , , , , , , , , , , , , , | Leave a Comment »

A KAP Outing that Wasn’t

Posted by Tom Benedict on 22/11/2009

Since finishing the Worldwide KAP Week 2009 Book, I’ve had more time to do photography, and to at least attempt to do KAP.  Last weekend I got out of the house for a few hours to do some KAP up on Mana Road, a dirt track that runs from Waimea to Mauna Kea’s Summit Road on the south side of the mountain.  The weather in Waimea was rainy, and my plan was to keep driving up Mana Road until I came out above the clouds.  This worked out better than I thought, and I eventually got to do some KAP at a large water shed.

The Water Shed

The photo received some positive comments when I posted it on Flickr, including one from someone who said how much they enjoyed seeing pictures of Hawaii that don’t appear in the tourist literature.  In looking through the photography I’ve done, I realized a good percentage of it has been done at beaches, or in places that are stereotypically tropical Hawaii.  I hate getting stuck in a rut, so the comment on the water shed photo was timely.  Exactly the kind of direction I need!

Yesterday my wife took my daughters to dance, so my son and I threw our stuff in my Jeep and headed out.  My plan was to hike out to some remote kipukas on the slopes of Mauna Loa and try my hand at KAP there.  The wind was favorable, but as it turns out the weather wasn’t.

A kipuka is a forested cinder cone that has been surrounded by fresh lava.  This cuts off the kipuka from the surrounding area, making it a pocket ecology.  Kipukas are common wherever there are cinder cones out on a relatively flat area near an active volcano.  The saddle between Mauna Loa and Mauna Kea has dozens of kipukas that host native Hawaiian flora, and numerous endemic Hawaiian birds.  My son packed binoculars to do some bird watching, and I packed my KAP gear.

By the time we got to the turn off to Mauna Kea Summit Road, it was obvious our plans had to change.  A line of clouds was blowing through the saddle between Mauna Kea and Mauna Loa, and already the area we were planning to hike was covered by clouds.  Rather than turn around and call it a loss, we pulled in at Puu Huluhulu, a large kipuka situated at the turn off to Summit Road.  My son and I have hiked this area frequently, and it’s a favorite of ours.  I had some level of hope that we could reach the top before the clouds rolled through, and that I could get a kite and camera airborne before things socked in.  But the clouds moved faster than we did.  By the time we got to the top everything was an opaque mass of white.  My kites stayed in my bag, but my camera didn’t.  A day that’s bad for kite aerial photography is often a good day for ground photography.  The most obvious subject to work with was the twisted trees that grow on Puu Huluhulu.  It’s trees like this that originally inspired the art of bonsai.

Misty Trees

But there were a number of other subjects that also drew my eye.  Completely overcast skies often make for poor landscapes, but they make for great macro photography.  This plant is about as big as my palm, though the adult plants grow much larger.

Fuzzy Plant

When the clouds and the wet and the cold finally got to be too much, my son and I hiked back to my Jeep.  The misty photography and macro photography felt good, but I was still disappointed that we were packing it in and turning around.  But then I remembered just how close the far end of Mana Road was.  Even better, Mana Road does lead back to Waimea.  It’s not the smoothest ride home, but it was a chance to keep the day from ending before it had really started.  I asked, my son said yes, so we headed out Mana Road.

Stream Bed Panorama

Not too far in we ran across a really picturesque stream bed.  The water wasn’t running, which was a little surprising given the amount of rain the area had received recently, but we were fairly high up so things had probably drained well before we got there.  The clouds that had made KAP at Puu Huluhulu impossible had cleared the air between Mauna Kea and Puu Oo, one of the two active vents on Kilauea.  The two steam plumes from Puu Oo and from the lava flow entering the sea near Kalapana were both clearly visible.  I set up my tripod and lined things up to make a panorama.  When I metered the sky and the ground, however, I found I couldn’t get both the foreground and the steam plumes in the same shot.  The sky was just too bright, and the overcast sky made the foreground too dark.  So I wound up shooting it as an HDR panorama.  It wasn’t quite the look I was after, but it served to balance the two strongest elements in the frame.

Pools

By the time I’d finished the panorama, my son had hiked up slope to a really pretty tree.  Rather than follow, I hiked down the stream bed until I reached the pools I’d spotted while photographing the panorama.  The overcast sky made for nice reflections, so I arranged things for a low angle shot that would pick that up.

Lichen

The same soft light that made for good close-up photography on Puu Huluhulu also made for nice macro photography here.  Some recent experiments at work using CombineZP made me want to try the technique in the field.  The idea is to take pictures at a range of focuses, and use CombineZP to take the sharpest part of each shot and combine them into a single image with infinite apparent depth of field.  I don’t know how enamored I would be of this if I didn’t have CHDK running on my A650.  One of my favorite scripts is a bracketing script that will bracket whatever your last control setting was.  I use it to do HDR photography, but it can also be used for CombineZP.  The A650 can be set to do manual focus, so once MF is selected, the bracketing script can be set up to rack focus through a nice wide range, taking pictures along the way.  I set this to do 37 focus positions, shifting by 3 clicks in focus each time.  (The A650 has well over a hundred focus positions, so techniques like this are quite straightforward.)  When I got home I put the files into CombineZP, and got this in return.

Nene

A few miles down the road my son spotted nene off to one side.  I stopped and got out, with some faint hope of photographing them.  Unfortunately the A650 doesn’t have much in the way of long focal length in its zoom range.  I’ve tried several times to photograph nene with my 20D, but light, weather, or the patience of the birds has always thwarted my attempts.  I was overjoyed to find these geese to be very patient with me.  They let me get quite close without reacting much at all.  I was happy to walk away with a couple of good photographs of them.

Nene

Mana Road is miles and miles of beautiful scenery that changes every time you go around a bend.  I’ve been out on it several times, and each time there is something different to photograph.  I still haven’t figured out quite how I’d like to photograph the koa forest the road winds through, so that’s still one I have to return to once I have a clear idea in mind.  Just past the koa forest, though, the road became quite muddy.  At one point the road dropped away entirely, and I was looking out past my Jeep’s hood into space.

I’m sure there are those who would give a loud “WHOOP!” and hit the gas, but I’m not one of those.  I hit my brakes, turned off the engine, and got out to look.  I saw a muddy slope with about a 25% grade, maybe 40′ high, and covered in skid marks.  I wasn’t keen on the idea of driving it, but of course I had to photograph it!

Whoops!

The wind was too gusty to get a stable kite shot, so I opted for my 20′ carbon fiber pole.  This is a converted breem pole I picked up for $20 and stuck a ball head on for photographic work.  Setting up the shot took about as much time as setting up a tripod, and the CHDK intervalometer script meant I didn’t need to remotely trigger the camera.  All that was required was a little patience waiting for the “click!” sounds coming from the camera, and lining things up between shots.

The Watershed

After photographing my Jeep and the slippery slope, I wound up backing out and going down the lower road.  This avoided the inevitable skid, and got us back on track.  A little further down the road we came across a water shed.  This is smaller than the water shed I’d photographed the previous week, but being closer to the road it offered more opportunities for close photography.  These water sheds are essentially large catchment systems used to collect rainwater for the cattle that graze in the surrounding fields.  The roof of the shed has gutters that are piped into the tanks.  When it rains (which it does quite frequently) the rainwater runs off the roof, through the pipes, and into the tanks.  The water in the tanks is then diverted to troughs for the cattle to use.

The Watershed

I’ve driven past this water shed several times, and have made numerous attempts to photograph it.  But I’ve been disappointed with the results.  I know the picture I’m after, but I just never managed to get it.  This time I got close.

Ideally I’d have liked to be about five to six feet to the right, and aimed the camera more to the left.  Unfortunately there’s a barbed wire fence in the way that makes that angle painful, if not impossible.  I’m still working out how to get the shot I’m after, but this one worked out better than the others I’ve tried.

I did finally get a kite airborne once.  I was on the leeward side of a stand of trees, so the air was minimal and tossy at the ground, and blowing like a freight train higher up.  Kite handling was rough, heavy, and not fun at all.  I clipped on my KAP rig and tried to do some photography of a water tank that’s managed by the water department.  With the wind through the trees and the altitude of the rig, I couldn’t hear the shutter whenever I told it to take a picture.  So it was no surprise when I got home and saw that the only picture I had from the one KAP session of the day was a picture of my feet when I tested the shutter on the ground.

Ah well…

So it was the KAP outing that wasn’t, but I still had a good time.

– Tom

Posted in Kite Aerial Photography, Photography | Tagged: , , , , , , , , , , , , | Leave a Comment »

Stereo Aerial Photography and False Color

Posted by Tom Benedict on 26/06/2009

It’s always fun to see what can be done with aerial photography: large stitched panoramas, Photosynths, 3D modeling, 2D maps.  One technique that KAP lends itself to particularly well is stereo aerial photography.

With an airplane, stereo photography is typically done by pointing the camera 90 degrees to the direction of flight, and taking a succession of pictures as the airplane flies across the landscape.  Careful choice of frame rate, airspeed, and altitude yields good results.

With a kite, a similar technique can be used:  Point the camera 90 degrees to the kite line, start the shutter going, and carefully walk backwards.  The kite will quickly settle into a stable flight angle with the increased apparent wind speed from the walking, and a nice steady stream of pictures is the result.  This is an example from a recent flight over the contact between two lava flows on the Big Island of Hawaii:

Lava Stereo Pair - True and False Color

The top two pictures are the natural color images as they came off the camera.  The bottom two require more explanation:

Another technique I’ve used with aerial photography is to apply false color techniques to boost certain details, certain colors, or to change the contrast of the image so that particular features will catch the eye.  Most of my experimentation along these lines has been done using an image manipulation program called ImageJ, and a plug-in called DStretch.  ImageJ is a general purpose image manipulation program written in Java.  DStretch is an implementation of the principal component algorithm for contrast stretching that was written by Jon Harman.  It was originally written for bringing up faint details in pictographs, but it has proven to be useful with aerial imagery as well.

In order to get a sense of scale of the image, the thin yellow line in the top pair is a three-section 25′ painter’s pole thath as been collapsed to its shortest length.  My flying partner and I were using it to lower a camera into one of the holes we found in the lava in order to explore the inside.

This probably isn’t the best example of either technique, but it’s the first time I used them in combination.  At some point I’ll write a more in-depth article about building stereo pairs, and a second article about the use of ImageJ and DStretch with aerial photography.  In the meanwhile, enjoy.

Tom

Posted in Kite Aerial Photography, Photography | Tagged: , , , , , , , , | 1 Comment »

Photosynth from a Kite

Posted by Tom Benedict on 12/06/2009

Photosynth is a web-based program that lets you assemble a number of pictures of a single subject and combine them into a 3D navigable scene built from your pictures.  It doesn’t create a 3D model, but it does arrange all the still pictures so that a viewer can move around the scene and see each picture from the angle it was taken at.  People have made some truly phenomenal synths of a range of subjects.  It’s well worth a visit.

Of course I had to try it from a kite.  I pulled out the raw pictures from a couple of previous KAP outings and came up with some decent synths:

As it turns out KAP is very well-suited to making synths.  To make a well-connected synth requires a number of pictures, capturing the subject from multiple angles.  By its very nature KAP takes pictures from a variety of angles and positions.  I’ve made a number of KAP flights specifically to generate a synth, but for the most part they have been the serendipitous outcome of a flight otherwise geared toward still photography.  These are some of the better ones, taken with Photosynth in mind:

But there are times when things just plain don’t work.  Photosynth doesn’t like water because picture-to-picture, water varies, so there’s nothing really to tie one image to the next.  I’ve had some oddball results from synths that included large bodies of water.  Special techniques need to be used.

One in particular, a synth from a set of flights over the Kiholo Bay Inlet, had a number of problems with it.  Discussion with the Photosynth development team led to the conclusion that it was the water, the lack of a good pool of overlapping images, and just a poor sampling of the area in general that led to the problems.  I’m planning a second trip to Kiholo Bay to try to take a better set of pictures for making a synth there.

An added side-benefit of Photosynth is that in the process of tying all the images together, it creates a point cloud indicating which points in the images tie to points in other images.  A good set of high detail pictures can generate a very dense point cloud.  It’s possible to extract the point cloud and use it to create a rendered 3D image of the scene.

Photosynth Surface Extraction

This model was generated using the point cloud from the Waikoloa Archaeological Site in the list above.  Considering there was no GIS data, no ground control grid, no real spatial or metric information of any kind, it’s remarkably accurate.  Though it also shows some of the problems with this method.  The road surface in the cut is quite smooth, so there are patches without any points in the point cloud.  These show up as gaps in the surface.  There are also some very rough areas of terrain on the same size scale as the mesh spacing in the surface.  This caused issues as well.  All in all, though, it’s a neat technique.

But the flight at the Kiholo Bay Inlet has been the most instructive of all.  Because of the sparse data set, it really pushed the Photosynth algorithm, and indicated some new approaches that would help with making synths from a kite.  When I go back, the plan is to:

  • Get the camera airborne over the water, and walk the length of the pond while pointing it at the far shore.  Take pictures every five seconds to get good overlap between frames.
  • Turn the camera 180 degrees and walk back the other way, taking pictures of the near shore.  Again, take pictures every five seconds to get good overlap between frames.
  • Turn the camera 90 degrees to face down the length of the pond, and tilt it down until the horizon is just out of view.  Walk the length of the pond taking pictures every five seconds.
  • Turn the camera 180 degrees to face back the other way down the length of the pond, and walk back taking pictures every five seconds.

At this point there should be enough images with enough overlap to make very good references for both shores, and enough images to tie the two shores together into a single frame of reference.  From here on out images can be taken to place them inside this frame of reference:

  • Get the camera to a good high altitude over the far shore, 50-100m or so, and begin taking hemispherical panorama sets.  Start at one end of the pond and work toward the far end, moving maybe 10-20m between sets.  This should provide a view in every direction from any point above the pond, and the high altitude should let the straight-down ortho shots tie into the frame of reference we generated above.
  • Make a second pass at a lower altitude with the camera over the near shore.  Similar spacing between hemispherical sets.
  • Finally, switch back to manual control and take detail sets of some of the features at the site (resting turtles, the turtle observation station, various rock features, key features along the shoreline, etc.)

At the end of the day, the pictures need to be culled to remove:

  • Blurries – Photosynth doesn’t work well with them, and they’re no fun to look at.
  • Bad exposures – For the same reasons as above.
  • Frames with more than 50% water in them – This was one of the key issues with my first attempt at this site.  Photosynth doesn’t deal well with water.

Finally, put all the images into Photosynth and see what comes out!

It’s a long process, and the number of images involved can be quite large.  Each set of images for the hemispehrical panoramas is 40 to 48 frames.  Ten spots along the pond can generate almost 500 images.  The two passes will crank that number up to about a thousand.  Throw in the initial framework images, and the total will probably exceed 1500 images.  This is more than I did at Green Sand Beach, by far my largest synth to date, but it should make for a very complete synth of the Kiholo Bay Inlet.

I should have a chance to try this over the weekend, if the weather holds.  Time will tell.

Tom

Posted in Hawaii, Kite Aerial Photography, Photography, Photosynth | Tagged: , , , , , , , , | Leave a Comment »

Nyquist Sampling and the Need for Unsharp-Masking

Posted by Tom Benedict on 31/05/2009

Every digital camera takes blurry pictures.  This is not because of any conspiracy between camera makers.  It’s simple physics and good design.  Here’s why:

Let’s say you have a really good lens with outstanding image quality.  And let’s say you’re using that lens to photograph a pinpoint light source like a star on a really clear still night.  The lens won’t be able to focus the star to an infinitessimally small point, no matter how good it is.  This is basic physics.  Instead it will focus to a circle of some very small diameter, on the order of only a few microns for a good lens.  For the sake of discussion let’s pick a number and say eight microns for our lens.  Now let’s say we stick a digital detector behind the lens and try to image the star.  If the detector has pixels that are twelve microns across, the star will under-fill a pixel and will show up as a single pixel in the images.  If the detector has pixels that are two microns across, the image of the star will fill multiple pixels, and it will be resolved as a small, but blurry circle.  The first case is called under-sampling.  You’re not taking full advantage of the optical quality of the lens, and the resulting images may look somewhat jaggy.  The second is called over-sampling.  You’re trying to subdivide the light into too many pixels, and you wind up having to toss half your resolution away because the optical quality of the lens isn’t up to the task.

In an ideal situation a camera’s pixel size should be about half of the finest detail the lens can resolve.  It’s a balance between the two conditions described above.  It’s not so finely sampled that you run into the optical quality of the lens, and it’s not so coarsely sampled that details are lost inside a single pixel.  The result is a fully resolved, but slightly fuzzy looking image. This balance of how finely to sample an analog signal was formalized in the Nyquist-Shannon Sampling Theorem.  The theorem says that if your sampling frequency is twice the highest frequency in your analog data, you can fully reconstruct the original signal.  Put in photographic terms, you want your pixels to be about half the size of the smallest feature your optics can produce.

How this usually works out in practice is this:  A camera manufacturer will take a detector with a given pixel size, and want to build a camera around it.  The specifications are then handed to their optical designers: pixel size, desired focal length, desired maximum and minimum apertures, etc.  The optical designers then design a lens for that detector and hand it to the mechanical designers so they can build a camera body around the lens and detector that will bring the image the lens produces to a good focus on the detector.  A camera built this way produces fully resolved, but slightly fuzzy looking images.  From the standpoint of sampling theory, this is ideal.

But from the standpoint of graphic design, it’s not.  A Nyquist sampled image may have preserved as much of the original analog signal as possible, but it does so at the cost of not having any truly sharp edges in the image.  The images often lack that sharp snappy look that we associate with a really good picture.  When you zoom in to the pixel level they wind up looking a little soft.

Because of this, one of the first things people like to do when bringing an image fresh off a camera into a program like Photoshop is to sharpen it up a little.  Make it a little more snappy.  There’s nothing wrong with this, but it needs to be done with some care.  Over-doing the sharpening can result in an image that looks artifical, or just plain bad.  One of the better tools for this is the Unsharp Mask took.

One question I hear frequently is, “If the tool sharpens the image, why is it called unsharp mask?”  The reason is that the tool doesn’t increase the sharpness of the image.  It decreases the unsharpness through the use of a slightly out of focus, or unsharp image.  Here’s the idea behind it:

Every image has some fuzziness to it.  In the film world it comes from basic physics: no lens is perfect, apertures cause diffraction, etc.  In the digital world you add Nyquist sampling to the equation.  The result, either way, is that every image has some fuzziness to it.  So if you can subtract the fuzziness from the image, the sharpest parts should be what’s left.  The trick is to make an unsharp image, or mask, to subtract.

In the digital world this is fairly straightforward.  You take the original image, blur it out to some degree, and then subtract some percentage of that blurry image from the original.  In the Unsharp Mask tool in Photoshop there are two sliders, Radius and Amount.  These set how blurry your unsharp mask is, and how much of that is subtracted from the original image.  From the previous description of Nyquist sampling, it should be apparent that the Radius needs to match the fuzziness of the image.  It’s not arbitrary.  In perfect Nyquist sampling, that radius should be close to 0.5 pixels.  Designs rarely work out perfectly, though, so your camera’s numbers may vary.  Likewise the amount to subtract is not arbitrary, and should be matched to the detector, lens, and aperture used.  With both sliders, some experimentation is required.

I’ve continued to mention film in this article because unsharp masking is not strictly a digital tool.  Like so many of the tools in Photoshop, unsharp mask has its origins in the film world.  It’s a technique I’ve never used in the darkroom myself, but I’ve known photographers who have.  By far the best description I’ve found is this article on unsharp masking by Alistair Inglis.  It’s worth reading through his article even if you never intend to set foot in a darkroom.  It will give you a better idea of why this technique works, and how it is being done in software.  It’s interesting to see how much of the article focuses on keeping the original negative and the unsharp mask in perfect registration.  This, of course, is not of great concern in the digital world where you can specify precisely where a given pixel will go.  But in the world of film the ability to keep two or more images in perfect registration can make or break any number of techniques that have been developed over the years.  It’s a fascinating article, and good food for thought.

— Tom

Posted in Photography | Tagged: , , , , , , | Leave a Comment »