Friday, 6 March 2020

Focus Stacking Home Brew Setup

A short while ago I was impressed reading a project on Instructables. It sparked the idea of trying something similar but programmed by an Arduino. After a couple of weeks thinking (comes hard some days), programming, buying, 3D printing and constructing I ended up with:

IMG_0144

This consists of the electronics bits

IMG_0140

Left to right: relay to activate camera shutter, stepper motor driver module, Arduino Uno R3 with added extra contacts.

The Arduino is programmed using a home 3D printed panel which uses an LCD to indicate what is happening. Three buttons. Top: set the number of photos to be taken, Middle: start the sequence, Bottom: abort / restart.

 IMG_0139

The camera sits on top of a bought unit which was originally designed to use on the Z axis of a CNC machine. The stepper motor takes 16 moves to forward the camera 10mm. This is set by DIP switches on the driver module. I also added a micro switch as the camera is automatically rewound to the start position once all the macro shots have been taken.

IMG_0142

A few odds and ends were used to make the mount for the camera.

For my first test I mounted the Canon M5 fitted with 18-150mm zoom lens plus the Raynox DCR-150 macro / close-up conversion lens to take 36 focus stacked shots of a small cactus flower.

Why go to all the trouble of taking so many photos?
Getting close to things can result in a very shallow depth of focus on any single shot.
For example

First shot:
IMG_0819

Last shot:
IMG_0854

Each photo in the stack has a slightly different area of the subject in focus.
The two programs I use can sort out the in focus parts and combine just those bits to make the final composite shot.

The result using Zerene Stacker to process the individual photos to make one stacked picture

2020-03-05-17.56.05 ZS 
PMax

I recently purchased Focus Stacker and this is the result from the same batch of 36 photos

IMG_0819_IMG_0854

The main difference in output, to my eyes, is the latter has a better colour rendering.
The unit actually works so I'm a happy bunny.

A bit of extra processing in Affinity Photo

 IMG_0819_IMG_0854af

to increase contrast and vibrance.

6 comments:

  1. I am very impressed. This is a superb job.
    It may be worth running the image through an HDR app like EFFEX. I can do it in a couple of minutes if you send me the image, preferably as a PNG.

    ReplyDelete
    Replies
    1. Adrian: I had hoped to work in RAW as Focus Stacker was reported as working with them. Unfortunately it didn't like the Canon M5 RAW version. After ages processing the result was a pink picture. The same happened with a couple of other photo programs. Only Affinity Photo handled them properly, but only with individual shots. In the end I had to re-take them all in jpg. Anyway I processed the last stacked photo in A F to increase contrast and vibrance and added it to the end of this post.

      Delete
  2. could i get the code you used please

    ReplyDelete

Thank you for visiting. Hope you enjoyed the pictures. Any comment, or correction to any information or identification I get wrong, is most welcome. John

Related Posts with Thumbnails