Fast Stacker v2.0

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Fast Stacker v2.0

Post by pulsar123 »

Image

Live demonstration of Fast Stacker 2.0 in 4K: https://www.youtube.com/watch?v=B0yAh84A31Y

It's been 5 years, and I am finally releasing a completely rebuilt version of my Fast Stacker (automated focus stacking rail) - v2.0, with much better hardware and significantly improved software. The highlights:
  • It is faster (10 mm/s) and more accurate (0.6 microns microsteps), so in principle magnifications up to 60:1 can be handled.
  • It is much more reliable (completely re-written motion algorithm, plus impulse noise suppression resulting in no more fake limiter switches triggering).
  • It is more usable. E.g., backlash compensation can now be done in either direction (so the camera can be pointed up or down).
  • It is much more convenient - UI is significantly simplified and improved. Color higher-resolution display is a big help. The controller now has a large Help menu (so no need to print a guide and carry it with you).
  • All the important parameters can now be typed in using a new Editor mode. (So one can use arbitrary values for the distance between shots etc.)
  • Batteries compartment (8xAA) is now built into the controller, and it also has a power switch. So it's easy to switch from batteries to a power adapter and back.
  • The controller is 3D printed, and I also designed the PCB which can now be manufactured professionally.
  • Some extra niceties: red/green LEDs reflecting the state of the camera (AF / shutter), a small buzzer used for a few functions.
  • Important: telescope support was removed in v2.0.
  • And of course, there is always a catch. The catch: the project is now somewhat more expensive (extra 30$ or so), the controller is larger and heavier.


Updated documentation: https://pulsar124.fandom.com/wiki/Fast_Stacker

The older version (v1.x) discussion on this forum: http://www.photomacrography.net/forum/v ... &start=120
Last edited by pulsar123 on Fri Sep 17, 2021 1:20 pm, edited 1 time in total.

DavyC
Posts: 109
Joined: Sat Sep 22, 2018 1:53 pm
Location: UK

Re: Fast Stacker v2.0

Post by DavyC »

Nice work with this project. You have put a lot of work into this.
Surprised that no other comments made so far.
Saving money on hardware means more money for buying Glass!

Good luck with your project

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

Thanks for the comment!

It's not just saving on hardware, but in fact the ability to implement features which are absent or very inconvenient to use in existing commercial hardware. There is a long list of advantages of my rail over the popular Cognysis rails: https://pulsar124.fandom.com/wiki/Introduction . (As I noted there, the Cognysis products seem to have being designed by an engineer, not a photographer.)

DavyC
Posts: 109
Joined: Sat Sep 22, 2018 1:53 pm
Location: UK

Re: Fast Stacker v2.0

Post by DavyC »

Yes I can see what your thinking was behind this. Now that you have this version 2, is it going to remain a a strictly DIY project for anyone interested to buy in components,
or are you thinking of supplying a kit/kits of components? The problem with others sourcing their own parts is availability.
Having to rejig a motherboard for another substitute part is strictly in the electronic enthusiast camp. Hence limited appeal.

I have a Velbon Mag Slider. I can solder and assemble components, but getting a set of components from 1 source that I know will work, would be better for me and maybe others.
Having the custom 3d printed case and ready to populate pcb is a plus also.

There will always be those just wanting a plug and play solution.

Different strokes for different folks, as they say.

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

I am afraid I have no time or interest for doing this commercially. I enjoy building and perfecting (in terms of hardware and software) gadgets, and provide very detailed descriptions of the build process. The parts I used are all listed on the wiki page, and pretty much are still all available. The online PCB design service I used (easyeda) is pretty easy to master, so it shouldn't be much trouble to customize it to different parts. This project is definitely for people who like both photography and tinkering with electronics and software.

BTW I plan to record a detailed video tutorial (in 4k) on using the new version of my rail. Once it's on youtube, I'll post the link here.

One of the advantages of v2.0 I haven't mentioned is the fact that now I have plenty of space (RAM and flash memory) for future features and improvements. With the old version, I spent like 95% of my time on trying to squeeze out a few additional bytes, which I could use for improvements. With v2.0 I keep adding new features, it's super easy. For example, just the other day I added the new mode of operation - Burst (to be used with live insects). Many cameras cannot do fast shooting in a regular fashion (when you press shutter for each shot), but have a special burst mode when you keep pressing the shutter, the camera keeps taking photos, until you fill up the internal memory buffer. E.g. my Canon 6D camera is pretty lame in terms of regular shooting (maximum 2 fps when shooting RAW), but in the burst mode it does 4.5 fps up to 17 RAW frames. I tested, and the flash works properly in the burst mode. I just implemented the BURST mode into Fast Stacker, so I can shoot live insects at 4.5 fps with a flash.

Here is my first tests of the upgraded Fast Stacker - a grain of rice and a piece of cork, at 10:1. Nikon M Plan 10x 0.25 210 mm objective with 130 mm extension tube (7.5mm working distance), a single flash at 1/32 power with a softbox, a few 3d printed reflectors. ISO 100, electronic shutter (FRSP of Magick Lantern), Canon 6D full frame camera. Around 150 shots each, step 7.5 um. Processed with my Macro-scripts (https://pulsar124.fandom.com/wiki/Open_ ... s_stacking ).

ImageGrain of rice at 10:1 by SyamAstro (800,000 views - thank you!), on Flickr

ImageCork at 10:1 by SyamAstro (800,000 views - thank you!), on Flickr

DavyC
Posts: 109
Joined: Sat Sep 22, 2018 1:53 pm
Location: UK

Re: Fast Stacker v2.0

Post by DavyC »

The Stackshot guys can now breathe a sigh of relief.

Nice work with the photos. The grain of rice reminded me of the egg from 'Alien'.

It will be good to see your upcoming 4k video.

Good luck!

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

DavyC wrote:
Sun Sep 12, 2021 8:38 am
The Stackshot guys can now breathe a sigh of relief.
:lol:

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

https://www.flickr.com/photos/99745838@N03/25077956624

Have you tweaked some parameters before using Zerene so that Zerene can produce better or at least match what Enfuse does?

What I am trying to say is, if you use some software right out of the box and use them with default settings, then claim one is better than the other, it is a bit misleading. There are a lot of stacking algorithms out there and they work well depending on different situations and need some tweaking of parameters for other situations to work well.

Just saying.

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

Just so we are on the same page . . . here is a screen shot from your page, I added red underline.
Attachments
FastStacker.png

pulsar123
Posts: 146
Joined: Fri Jun 12, 2015 12:36 pm

Re: Fast Stacker v2.0

Post by pulsar123 »

I did try to play with settings.

These days, I often use Zerene results over Enfuse. What I observed though (e.g. in my cork shot) that sometimes Zerene aligning engine can fail with some obvious artifacts, while the alignment tool from Hugin did a great job. So now I usually do all the steps except for stacking using my macro-scripts, and then run Zerene for stacking (disabling the alignment feature).

iconoclastica
Posts: 486
Joined: Sat Jun 25, 2016 12:34 pm
Location: Wageningen, Gelderland

Re: Fast Stacker v2.0

Post by iconoclastica »

  • The Cognysis rail does appear to be more durable and sturdy than the Velbon Super Mag Slider I am using, but perhaps that is an overkill; my Velbon has been performing well so far. You can always use a different, more durable rail with my controller and my software.
  • The Cognysis allows for longer (100 mm or 200 mm, depending on the model, versus my 52.5 mm) maximum stacking length. I haven't found this to be a limiting factor yet - perhaps because my focus is on super macro (magnifications 2:1 ... 20:1).
For those that already own the cognisys rail and are willing to experiment, it seems quite possible just to disconnect the original motor and put the FastStacker-motor + controller in place. Or could the FastStacker controller even drive the original cognisys motor?
--- felix filicis ---

rjlittlefield
Site Admin
Posts: 23562
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: Fast Stacker v2.0

Post by rjlittlefield »

pulsar123 wrote:
Mon Sep 13, 2021 6:14 am
What I observed though (e.g. in my cork shot) that sometimes Zerene aligning engine can fail with some obvious artifacts, while the alignment tool from Hugin did a great job.
I can guess about what's going on in these cases, but first some background information...

Zerene Stacker's alignment method is based on minimum difference of luminance values, integrated over all pixel positions, where Hugin's alignment method is based on detection and matching of distinctive local patterns of pixel values ("control points"). There are tradeoffs between these methods. The control point method, which derives from panorama stitching, is able to handle lens distortions, large amounts of shift/translate/scale, and large variations in illumination between images. The integration method, which I chose specifically for focus stacking, is more tolerant of frames that contain little or no focused detail and can do more precise sub-pixel alignment when images vary only in focus.

I handle all email sent to support@zerenesystems.com, so I know that reports of artifacts due to alignment are rare. When they do occur, they usually trace to one of four causes: changes in perspective due to movement of the entrance pupil; random depth ordering or multiple passes over the stack depth (e.g. front-to-back-to-front); subject movement (including movement of reflected objects); and frame-to-frame changes in the overall pattern of illumination, typically caused by drifting clouds in landscapes or flash variation with multiple flashes.

For the cork stack, my best guess would be that last cause: frame-to-frame changes in the overall pattern of illumination.

If that is not the case, then I would be very interested to know what's going on. Sergey, I would be happy to investigate further, if you are interested and can make the stack available to me.

Regarding the images shown at https://www.flickr.com/photos/99745838@N03/25077956624 , if a question were posed about how to improve the Zerene Stacker results, I would comment that:
  • The DMap output is showing small dots of discoloration that are typical of having moved the contrast slider too far left, so that in featureless areas "depth" is being determined by pixel noise rather than real focused detail. Those will go away if the slider is moved right so as to make featureless areas go "black in preview".
  • The overall loss of contrast in PMax compared to DMap suggests that the output was saved with "Retain extended dynamic range". See HERE for more about that.
  • With PMax, color saturation may be retained better by selecting Options > Preferences > PMax Settings > "Use All Color Channels In Decisions".
As for the sharpness issue, redlined by mjkzz, it may be relevant that Zerene Stacker never sharpens its output. If a comparison is made between ZS output and output of a script that does add sharpening, the script will surely win on that score.

Regarding scripting and automation, I should note for the record that there's an API for Zerene Stacker also. I am aware of several automated systems that use ZS under the covers.

None of this should be taken as criticism of the scripting approach using dcraw, Hugin, and ImageMagick. The scripts are an elegant approach for getting a lot of functionality with not much added code, and having everything be open source definitely eases strain on the wallet.

--Rik

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

pulsar123 wrote:
Mon Sep 13, 2021 6:14 am
I did try to play with settings.
OK, sounds fair. However, if you look at the image you posted, I noticed there are some kind of haze around the that object in the image done by Enfuse (see image with red circle). To me, that is NOT sharp.

So the question is, with the Enfuse image, did you do any post on it? Like contrast enhancement, etc (I would say no sharpening as that would not be fair to Zerene when comparing sharpness).
pulsar123 wrote:
Mon Sep 13, 2021 6:14 am
These days, I often use Zerene results over Enfuse. What I observed though (e.g. in my cork shot) that sometimes Zerene aligning engine can fail with some obvious artifacts, while the alignment tool from Hugin did a great job. So now I usually do all the steps except for stacking using my macro-scripts, and then run Zerene for stacking (disabling the alignment feature).
This is new to me, I do not know what algorithm Enfuse uses, but as far as I understand how Zerene works, Zerene's method should be much more accurate for focus stacking because there will be a lot of out of focus area in an image in the stack. I have not been involved in computer vision stuff since 2008 and computer vision has advanced so much, Enfuse might be using some of them. Well, time for me to dive into this again, very interesting.
Attachments
enfuse.jpg
Last edited by mjkzz on Mon Sep 13, 2021 3:45 pm, edited 1 time in total.

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

@Pulsar123,

I was looking at your code and I am wondering if you have ever done any embedded programming? Just curious.

It seems that you are relying upon millis() and micros() for timing, users of your system might not notice it . . . but since you open sourced it, I would expect a bit more robust approach implementing it as I have ALWAYS expected for open source projects. So here is my suggestion : use interrupts :D

mjkzz
Posts: 1681
Joined: Wed Jul 01, 2015 3:38 pm
Location: California/Shenzhen
Contact:

Re: Fast Stacker v2.0

Post by mjkzz »

Regarding scripting and automation, I should note for the record that there's an API for Zerene Stacker also. I am aware of several automated systems that use ZS under the covers.
Rik, where is the API? Is it free to use? Is it Python friendly?

Post Reply Previous topicNext topic