Wednesday, June 27, 2018

Focus Stacking With Fuji X-T2 Camera

One of the things I like about my Fuji camera is the company provides free software updates after you buy the camera.  So far I've gotten several updates, which included some very nice new features as well as performance improvements and bug fixes.   I never got that with my Canon cameras.

The latest v4.10 release of the X-T2 software includes a new feature to do focus stacking. Focus stacking is an advanced photography technique where images are captured with different focus points and later combined in software to create a sharp image with more depth of field (DOF) than would be possible with a single exposure.

First a bit of review:

  • Depth of Field or DOF is the distance between the closest and farthest objects in a photo that appears acceptably sharp.  
  • The size of the DOF is determined by the lens focal length, the distance to the subject, and the aperture.  The closer to the subject and the wider the aperture, the smaller the DOF.
  • The DOF can be almost infinite when photographing a landscape using a wide angle lens with a small aperture.  It can be small fractions of an inch when doing close up photography with a macro lens. 
  • It's not always possible to get all the subject within the DOF in a single shot.


Here's an example of a shallow DOF.
60mm macro lens, f/2.4 about 20 inches  from the subject
In the above example, I was focused on the right edge of the glass face of the watch.  
Zoomed in single image

You can see that the scratches on the right edge of the glass are in focus but the blue dial face is not.

I really wanted to learn how to use this new feature on my camera but it's so new there is little information available on how to do focus stacking on the X-T2 camera.  I decided to do some experiments on my own to see if I could figure this out.

There are four settings you must make to use focus stacking on the X-T2 with version 4.10:
  1. Turn on focus bracketing using the menu
    Shooting Setting > Drive Setting > Bkt Setting > Bkt Select > Focus Bkt
  2. Set the focus bracketing settings
    Shooting Setting > Drive Setting > Bkt Setting > Focus Bkt
    This is where the guesswork comes in.  You have to set the number of frames to shoot, how much to move the focus point between frames, and the time between frames.  More on that below.
  3. Turn the shooting dial on the top left of the camera to Bkt
Doing focus stacking requires the camera and subject to not move while shooting.  A sturdy tripod and conditions where the subject does not move are essential.

I picked my old beat up wrist watch as my test subject. It's picked up a lot of additional texture over the years.  I used the Fuji 60mm macro lens set at f/2.4 for my tests.  I could have gotten better results with an aperture around f/5.6 that can produce sharper images, but I wanted to work with a small DOF for my experiments.

With the camera about 20 inches from the subject I tried different variations of starting focus point, number of frames and step size.  I chose a 1-second interval.  This can be set between 0 and 10 seconds.  A 2 - 3-second interval would minimize any camera movement caused by the shutter.

It took several attempts before I found the right combination for this shot.  
  • Starting focus point - the right edge of the glass face.  Plenty of scratches to focus on here.
  • 30 frames
  • A step size of 4.
If I used fewer frames or a smaller step size the DOF wasn't big enough to cover the watch.  It took 30 frames at a step size of 4 to generate a DOF that covered the part of the watch that was visible.  The DOF didn't extend past the back edge of the watch.

30 images stacked into one
It's not easy to see the sharpness in the above image.


Zoomed in focus stacked image
Here's the right edge of the stacked image.  Compare it to the cropped image above and you can see the difference in focus sharpness.

You can see from the second crop that the stacked image is sharp across the entire subject.

Part of watch farthest from the camera
I used Photoshop to combine the 30 images into a stacked image. Others have written about how to do this so I won't get into that here.  Here's the tutorial I used.   In the past, I've used Helicon Focus software for stacking.  It's a much more powerful tool, but it costs $30/year or $115 for life.  If I do more focus stacking I'll probably get a copy again.

This was just an experiment to get a handle on the process and settings.  I'm going to do some more experiments with different subjects, conditions, lenses, etc.  I've added a few other examples below.


30 steps, step size 6, f/4.0, 60mm macro
30 steps, step size 9, f/5.6

Sunday, June 24, 2018

What Were They Thinking?

Glass Beach is the well-known southern beach of MacKerricher State Park in Fort Bragg California. Glass Beach gets its name from the smooth colorful glass pieces that you can find in the pebbly beach. Sounds pretty cool, huh?
Glass and Pebbles
From 1906 to 1967, everything from cars to batteries to bottles, cans, and appliances were unceremoniously pushed over the cliffs into the ocean — a common practice of seaside cities for centuries. Locals referred to it as "The Dumps." Fires were often lit to reduce the size of the trash pile. What were they thinking? When the original dump site filled in 1943, they created another dump down the beach, followed by a third, which remained an active dump site until 1967 when it was closed by the State Water Resources Control Board.  Over several decades the metal was removed and the biodegradable stuff simply degraded and washed into the sea.  Not all items were removed and in this case, were embedded in the rock on the beach.

Spark Plug and Insulator

What was left was mostly pottery and glass from bottles and autos.  The constant waves of the Pacific broke and ground down this trash into small colored pebbles.  Today the most popular thing to do in Fort Bragg is to go to Glass Beach and collect colored glass.  Officially the glass is not to be removed, but when we were there we saw dozens of people collecting it.  Some have made it a cottage industry with glass jewelry shops in town.

In the first half of the 20th century, people dumped their garbage into the ocean.  Why not?  After all, the ocean is huge and will wash all that unwanted stuff away.  The same thought process meant factories dumped toxic waste into waterways and lakes.   We have made great progress in cleaning up our fresh water in developed nations around the world.

We are now filling the oceans with waste plastic that lasts from 450 years to forever. Over 18 billion pounds of plastic ends up in the oceans every year.  Over 1 million plastic bottles are sold around the world every day.  Much of the plastic is used for packaging and single-use purposes.  Water bottles, straws, plastic trays for your salad at a fast food restaurant are used once and discarded. 





Recycling helps.  June and I try to recycle all our household plastic, glass, cardboard, and aluminum.  Globally, the US lags behind Europe in recycling in general and we are doing a terrible job recycling plastics.

What else can we do?   One simple thing is to limit the use of single-use plastics, such as water bottles, straws, and food packaged in plastic.  Instead, we can take our own insulated tumbler, use paper straws or no straws, and not buy food packaged in plastic.

Fifty years from now our children and grandchildren will look at the oceans and ask "What were they thinking?" Let's start thinking about reducing the plastics in our landfills and oceans.