Saturday, December 08, 2018

A little something called "SuperResolution"...

A friend recently picked up a Nikon D850 and more recently a new Fuji GFX 50R.  Both are very high resolution cameras.  In my case, the highest resolution camera in the closet is a 24mpixel Sony A6000.  Beginning to feel a little "behind the curve" in the Mpixel Race (whatever that is) I wondered how close I could come to 50mpixel sensor output given my current tool set.

Several years ago I saved a link to an article that described a process for creating very high resolution photographs.   I found that recipe after having written about how to generate high resolution images from a single base image.  This blog entry combines the two techniques, and adds a few things that I've learned along the way (which I will Note: in the text below).

Base setup -
  • Sony NEX-5T set to jpg output (to streamline the stack blend processing)
  • Lenses
    • Sigma 19mm EX DN E
    • Nikon Nikkor 50mm f/1.8 AiS
    • Nikon Nikkor 85mm f/1.8 K pre-Ai
  • Camera handheld
  • Multiple exposures shot using the "S" fastest continuous shutter release function
    • Shot 20 to 30 images of each subject that would next be used to create an image stack
  • Follow the "SuperResolution" recipe (with two important Notes and one Observation) using
    • Hugin to align the image stack
    • Gimp (v2.8) to perform a linear 2x "cubic" uprez from approx 4900 pixels (native Sony NEX-5T file size) to 9500pixels
    • Gimp (v2.8) to blend the layered image stack
    • Gimp (v2.8) to apply a 2 pixel unsharp mask
In the following side by side comparisons, along the left hand side I have labeled from "File Viewed at 100%" to "File Viewed at 400%".  This applies in all three comparison cases to the left hand column only and represents the base image at its native resolution viewed at the indicated enlargements.  The right hand indications of "File Viewed at 50%" thru "File Viewed at 200%" apply in all three cases to right three image columns.  These three columns represent the output of various processing techniques I used to explore the idea of "superresolution".

Setup One - Nikon Nikkor 50mm f/1.8 Ai set at f/8

Super Resolution Investigation ~ Base Image
Scene Setup

Super Resolution Investigation ~ Comparisons

Setup Two - Nikon Nikkor 85mm f/1.8 K pre-Ai set at f/1.8

Super Resolution Investigation ~ Base Image
Scene Setup

Super Resolution Investigation ~ Comparisons

Setup Three - Sigma 19mm f/2.8 EX DN E set at f/4

Super Resolution Investigation ~ Base Image
Scene Setup

Super Resolution Investigation ~ Comparisons

Comments -

Regarding the optics, all three lenses performed very well, indeed.  They are sharp and contrasty in the base image.  Printing at 300dpi using the native 16mpixel sensor resolution of the Sony NEX-5T will easily generate a 17inch on the long dimension high resolution image.

As for the "superresolution" techniques, here is what I have thus far experienced.

My early understanding of how "cubic" up-rez works was insufficient.  Up-rez'ing an image at 150dpi or 300dpi will yield jagged edge transitions and will amplify "noise" across an image field. 

Note: What I've learned is that by increasing the sample rate of the "cubic" filter that the output up-rez'd image will contain fewer artifacts.  In clear terms - to perform a 2x up-rez requires, minimally, a 600dpi filter sample rate.  This is fundamental to understanding how to retain the most image quality when performing an up-rez. 

For this comparison I set the "cubic" filter sample rate to 1200dpi.

Using the Gimp's "cubic" Image Scale function quickly generates a 9500pixel file from the base 4900+pixel image.  No new information is added, of course.  Image problems (shake, mis-focus, etc) and sensor "noise" are amplified.  Following my early attempts at understanding "superresolution", this approach still has some promise.  Compared with the following two "superresolution" examples that follow, the simple "cubic" up-rez technique is somewhat lacking.

Looking at the blended image stack examples I see the results can be pretty interesting.  The very first thing I see is a dramatic drop in sensor "noise".  The images are much smoother than even the original base image.  In fact, blending just two images produces a very useful reduction in noise, even in a non-up-rez'd image, that this technique is worth utilizing.

The second thing I see is that stacked images do indeed appear to add information to the resultant image.  This is much like what we expect out of the "superresolution" functions in some Olympus and Sony mirrorless cameras where, in those cases, they "wiggle" the sensor electronically.  For the handheld technique, this is a very nice finding.

The technique of image stacking wasn't as straightforward as described in the recipe.  My first attempts were actually rather soft.  On close inspection I found that the Hugin "aligned" image output was not really "aligned."  The images were all too often many pixels mis-aligned, but only in the "y" dimension.  The "x" dimension seemed to be correctly positioned.  There is something I don't yet understand about the Hugin image stack output and how to import them correctly aligned into the Gimp.

Note: To achieve correct image stack alignment I chose a scene segment with clear dark to light transitions (like a raindrop or door keyhole or a piece of paper with writing) and set the "view" to 400% so that I could see every pixel magnified.  Using the base image (the image at the bottom of the stack) as the reference I worked with each layer, one at a time (turning off the visibility to all the other layers and by setting the "opacity" to 50% so I could see both the layered image and the base image). Then I used the keyboard arrows to move the layered image to set the exact alignment.  It was time consuming but yielded, obviously, the best results.

Observation: The recipe calls for a minimum of 20 images stacked and blended to get the most information.  In my case, I found that as few as 5 layers above a base image can yield outstanding results.  Perhaps my process technique isn't as accurate as it could be, but I can't see any "improvement" in the amount of information an image stack gives by going beyond those first 5 layers.

The last item in the recipe was the strong suggestion that a 2 pixel unsharp mask sharpen function be applied to the up-rez'd blended "superresolution" image stack.  To my eyes the results are quite impressive.  It appears, at first glance, as if a 300dpi 30inch print can be made while retaining all the native blended layer file resolution of the up-rez'd image stacked file.

It appears that my output is similar to the recipe examples.  Before declaring victory and moving on to another area of investigation I needed to compare my results, not only with the original "superresolution" recipe, but with the output of the latest generation of high resolution cameras.  Looking thru Flickr for Fuji GFX full resolution images I have come to realize that the handheld "superresolution" technique produces a different "look."  The native GFX file resolution is clearly superior to the approach being explored here.  Have I missed something in my own process?  Or is this just the way things are?

While clearly superior to native resolution base image output, using the handheld "superresolution" technique produces an image that reminds me of the soft, gentle tonal transitions I see in old contact print large format film. That is, the "feeling" of the image is that of light gently scattering through the gelatin surface coatings of traditional 20th century print papers. 

Saturday, December 01, 2018

Process ~ when it seems to work

Looking back over the past two years I see that a lot has changed in my understanding of the craft of photography.  I've looked as deeply as I could (without access to a full optical lab) at the subject of lenses, resolution, and what really happens when we talk about resolution and "sharpness".

I was prodded into action by a couple of articles on The Online Photographer's blog about how to make "good" black and white images from digital files.  The outcome of that was I rediscovered how much I enjoy making monochrome images.  As a bonus it seems to me that my current output has become "sharper" and "smoother" than my earlier 4x5inch and 8x10inch enlargements and contact prints.

Which leads me to a short story about the path I've taken in transitioning from large format film to APS-C digital.

Uffizi Gallery ~ Florence, Italy 2018

The thing that kicked me into digital was it's ease of access and immediacy.  I could see something, snap a photo of it, and review the results before I continued on my way.   The change certainly was not because digital was as sharp as large format film.  It wasn't.

When I started into digital I acquired a Canon 40D (later a 50D, a 7D, and a 5D MkII) and two lenses, a 24-105L and a 10-22mm EF-S.  I paid a lot for all this equipment so I was "all in" as they say.

Looking back I'm shocked at my early digital work.  In a small size the images are merely OK.  But comparing the original files against my current output I can't believe I hadn't chucked the whole plot into the ocean and returned to film.  The Canon sensors and lenses, while famed and widely lauded, are "soft".  The original files are nearly unusable.  I can't stand to "pixel peep" them.

Thinking I might shoot a bit of video I started picking up old Nikon Nikkor manual focus lenses.  They are widely available and can be had for little money.  I went with Nikon because Canon's old R/FL/FD mount lenses would not fit on Canon EOS without serious modification.

Uffizi Gallery ~ Florence, Italy 2018

With the Nikkor lenses all I needed was a simple adapter.  But manually focusing, even with AF confirmation chips in the adapters, was a hit and miss operation.  For this one reason I never could see how much sharper than Canon zooms a good fixed focal length lens really is.

One of the first things I did after buying a Sony A6000 was to mount one of my Nikkors on the camera and see how sharp the system was.  I was shocked by what I saw.  The APS-C sensored images were demonstrably sharper than anything I ever saw out of the Canon system.

Knowing what resolution was possible and wanting a bit of auto focus, I purchased a trio of Sigma Art DN lenses, tested them, found them to be as sharp as my Nikkors.  Back when I owned Canon cameras Sigma was still known as a low cost, low quality aftermarket supplier.  Over the years Sigma's reputation changed and some of that is due to the quality of the Art DN series.

Now I have a choice between using the old manual focus Nikkors and newer AF capable small lenses.  I find that around town and when I can relax and take my time I like using the Nikkors.  When my wife and I are traveling the Sigma lenses are just about perfect.

Accedemia ~ Florence, Italy 2018

On this end of the long road of experience I find that coupling high quality imaging with a better understanding of how to make a "luminous" black and white image that something startling to me is possible.  When I compare my old 8x10inch film contact prints with a digital print, the digital image in many ways "looks" better.  When I compare a 20x24inch enlarge 4x5 image to a similarly sized digital image I see the very same thing.   The digital image in many ways "looks" better.

While there is so much more I could say about all this (I have obviously skimmed over many important details), the bottom line is: The tiny, very lightweight Sony APS-C mirrorless cameras produce images at least the equal in terms of quality as any high quality large format film camera I ever hauled through the world.

Wednesday, October 24, 2018

On William Mortensen...

This just popped up today and I thought I ought to share it.

While certain details of Mortensen's life might not be accurately recounted here, the overall subject is interesting. 

I'm happy to see people talking about him.  His Camera Craft published books were a source of information and inspiration to me for years.  In fact, I still have a book or two of his on the bookshelf.

Saturday, October 20, 2018

On the Art of Photography...

I very much enjoy this interview with Keith Carter.  It's a very human, non-equipment centered conversation.

Anne Brigman ~ Pictorialist

There is an interesting article on Messy Nessy concerning Anne Brigman.  If you know about early pictorialism in photography, you likely already know about her.

Thursday, September 13, 2018

Nikon Nikkor 24mm f/2.8 Ai ~ a closer look

I've wanted to like the Nikon 24mm f/2.8 manual focus lens.  Really, I have.  But every time I compare it against the cheap, small, light, modern Sigma 19mm f/2.8 EX DN E, it loses out.  The corners are soft every single time I try to conduct a comparison.  I had a f/2 version of the 24mm Nikkor that behaved just as poorly.

Having owned these lenses for years I sold the f/2 version out of frustration.  The entire experience has been nearly maddening.  I couldn't imagine how Nikon could've screwed up two versions of the same focal length.

Early one morning I was cogitating on the edges of a dream-like state and something occurred to me.  I suddenly felt I should check for field curvature.  Figure 1 illustrates the effect I'm talking about.

What I thought about was how Nikon might have designed these lenses to have a plane of focus that was equidistant from the lens (IOW, a curved field).  So I quickly set up a test.  The scene is simple.  To place the two bottles near the edge of the frame, I scribed an arc from the lens where all three bottles sat on that arc.

Then I compared three lenses.
  • Nikon Nikkor 24mm f/2.8 Ai at f/4
  • Nikon Nikkor 28mm f/3.5 Ai at f/4
  • Sigma 19mm f/2.8 EX DN E at f/2.8
I thought the 24mm Nikkor would show an arc that described the point of focus for that lens.  After having used the 28mm f/3.5 I thought it would show a point of focus as a straight line.  I knew the Sigma would be a flat field lens.  I've used this one for years and it is my reference lens for resolution and field flatness in this focal length range.

Here is the scene setup.  As you can see, the bottles near the edge of the frame are well forward of the railing.  The railing represents the straight line.  The three bottles were placed on an arc equidistant from the lens, where the center bottle is resting against the railing/straight line.

Scene Setup ~ Nikon 24mm f/2.8 Ai

Here are the results (click on the image and select the full resolution image to look at the details).

Field Curvature Comparison
Indeed, the 24mm f/2.8 Ai Nikkor appears to be designed with a point of focus that is equidistant from the lens across the field.  This, to me, means it is deliberately not a "flat field" lens.
With this lens, however, the portion of the image that is in focus does not "pull" or exhibit sagittal distortions.  The subject is rendered "naturally".  And this may be the very reason why the lens was designed this way in the first place.
Considered in this new understanding, the Nikon Nikkor 24mm f/2.8 is actually a very fine optic.  I just have to keep in mind it's characteristics when using it.
As for the 28mm f/3.5 lens, the edge performance at f/4 is not sufficiently good for me to draw any conclusions about it's design nor field curvature.  I could've stopped the lens down further, but the depth of field might have been too great for me to detect it's point of focus at the edges of the frame.
The control lens, however, is quite outstanding and, though the effect is subtle, the railing is more in focus than the bottles.  This re-confirms for me that it's design is more "flat field" than the Nikkor 24mm.  Not "better" than the Nikkor 24mm, just "different" and more in line with what I expected (before conducting this little test).

Illustration ~ Fig 1
Figure 1

Friday, September 07, 2018

Hyperfocal Distances ~ Nikon Nikkor 24mm f/2.8 Ai

Recently a friend explained to me that he was having trouble focusing a Zeiss 25mm manual focus lens on his Nikon DSLRs.  Since very wide angle lenses give deep depths of field I suggested to him that he set the lens at it's hyperfocal distance, stop the lens down to f/11 and "call it good to go."

He wasn't familiar with the term "hyperfocal."  So I whipped out my favorite depth of field calculator and suggested he put the focus at 6 feet 6 inches, set the aperture to f/11 and that everything from 2 feet to infinity would be in focus.  I asked him to let me know what he thought after he tried it out.

Well, needless to say, he was thrilled and he sent me a couple sample images.

Which gave rise to the question of how this might look in practice.  So I took out a Nikon Nikkor 24mm f/2.8 Ai, setup up a tripod, and photographed a scene with different subjects at different distances to show how it works.

Here is the base scene -

Scene Setup Hyper Focal

And here is a look at the results for the lens focused at the hyperfocal distance, where it is focused at infinity, where it is focused on the foreground, and a look at what happens when a smart sharpen is applied to the hyperfocal image.

Comparison ~ Hyper Focal

What I see is that setting a lens to it's hyperfocal distance does indeed work.  Everything from the orange clothespin in the foreground to the windows at infinity are "acceptably" in focus.  It's a matter of how much of an "airy disk" we can accept before saying something is "out of focus."  Frankly, the detail at infinity isn't all that bad.

Of course, if I took the time to focus on infinity, subjects at that distance were slightly more in focus and the foreground dropped resolution.  When I focused on the foreground the clothespins were slightly better focused and the background dropped resolution.  From the above image you can see for yourselves by how much resolution changes in the various scenarios.

Taking the hyperfocal image and applying a light smart sharpen was rather interesting.  Of course sharpening an image does not add resolution.  It adds contrast to the dark/light transition zones of an image.  That is to say, it adds "apparent" resolution because the human eye sees increased contrast as increased resolution (up to a point).

Walking out into the "real world", here are a couple examples how how setting the Nikkor 24mm at f/11 and the focus at the hyperfocal distance looks in practice.

Passages ~ Paris, France
Passages ~ Paris, France

Monday, August 20, 2018

Learning to trust Focus Peaking

One of the many subjects I enjoy photographing are automobiles and motorcycles.

Twice a year here in Paris there is a large gathering of cars and bikes.  In trying to capture the overall atmosphere of the event I like to photograph the vehicles at rest and in motion.

la traversee de Paris estivale 2018

Over the years I've become somewhat dependant on autofocus when working with cars moving on the road.  I thought I'd lost the ability to accurately track a vehicle and come away with a very sharp image.

However, I've noticed that sometimes an AF lens will lock on to something that I don't want.  For instance the AF system can lock onto the foreground or background, particularly if the subject's contrast is lower than the surrounding area.  This has happened to me even when I set an AF point (such as center) to try and limit the AF to "seeing" the subject.

This mis-focus state happens surprisingly often and after some car events I have found many images that were less than sharp where I intended it to be.  It didn't matter if I used a DSLR or a mirrorless camera.

la traversee de Paris estivale 2018

Which got me to thinking about trying old manual focus lenses and learning to work with my Sony mirrorless cameras "focus peaking" function.  It would take practice and these car events happen only twice a year.  Practicing on cars driving on the street outside of these events is problematic as people here don't like their picture taken and will call the police.  I'd have to just jump in and see what I could do during la traversee de Paris itself.

Fortunately I had a glimpse of what might be possible when I photographed vintage automobiles in front of les Invalides.  As some of the cars were in motion I snapped a few images while trying to keep the "focus peaking" properly over the subject.  It was a little complicated because those old 35mm film days muscle memories of focusing on race cars had atrophied.  But I came away with enough very sharp images that I was rather happy.

la traversee de Paris estivale 2018

A month later I found myself snapping photos of quickly moving cars on la place de la Concorde.  My setup was a Sony A6000 camera, a Lens Turbo II focal reducer, and a lovely Nikon Nikkor 85mm f/1.8 K pre-Ai lens.  The focal length of the lens seemed to be about "right" for reaching out and capturing images of event participants.  Interesting cars were coming from all directions and I worked the manual focus ring like a madman trying get the right "focus peaking".

Once I got home and was able to review the outcome I realized I lost perhaps 5 of the hundreds I took due to the lack of critical sharpness!  And two slightly out of focus images I was really interested in keeping were easily sharpened up using a "smart sharpen" function during image processing.  That "hit rate" far exceeds anything I've ever experienced with AF lenses.  It didn't matter if I shot the 85mm at f/5.6 (where there is a bit of depth of field) or wide open (where I really need to "nail" the focus to keep things sharp).

la traversee de Paris estivale 2018

I'm pleasantly surprised and the outcome pleases me.  I can feel those old muscle memories about how to work manual focus lenses in quickly changing situations coming back.  It's a good feeling.

But it brings a question: Why am I _still_ wrangling over what to take to Nice during the winter?  You see, there will be a Carnival there and it will be yet another quickly changing environment.  For whatever reason I'm still a bit worried about taking my old Nikkors in place of the AF optics.  What to do?  Fortunately I have a few months to sort it all out.

la traversee de Paris estivale 2018