Jump to content
You must now use your email address to sign in [click for more info] ×

AP Focus merge vs. ZereneStacker: case study with UV reflectance z-stacking

Recommended Posts

Not sure whether this is feedback or share your work, it's kind of both.


I've been playing with UV reflectance z-stacking. Here I focus on the post-processing aspect.


One problem is that during camera conversion, some of the Bayer filter elements most likely got damaged. This is no big deal for single captures, but if you stack 50 or more, one gets a lot of "creative" color streaks. Below blow up of those color streaks.




That leads to a lot of post-processing after stacking. I thought of doing a dust delete data in the 5D2 body, but that does not work, because during conversion, the dust shaker hardware is removed, and without it, the dust delete data cannot be obtained. 

But because these color dots are in fixed positions, they can be screened out with a Gaussian blur mask. Do the following in Affinity Photo:
- Open a dozen images in AP.
- Add a Gaussian Blur live filter on top of the first image.
- Add a mask to the Gaussian Blur live filter. Blur of about 2.5 pixels worked well for me, but that depends a lot on your camera and the type of Bayer damage you have.
- Fill mask layer only with black.
- Paint with a small white brush (4 pixels worked well for me) over any color spots in the mask layer. Do that at 150-300%. You'll spend some quality time at this. Don't bother fix those color spots right at the edge of the frame. The Gaussian Blur from the edge of the image is going to mess it up.
- Once done with first image, copy-paste Gaussian blur filter with Mask into next source image.
- Check for pesky color spots in second image and refine mask.
- Copy-refine for the the rest of the images.

Open one of the CR2 source images, develop it. Now start macro recording and paste the final version of the Gaussian Blur live filter with mask on top of the image layer. Stop macro recording and save it as something like "UV prep". The cool thing in AP is, that the live filter with mask is saved in the macro step. So the macro does not paste from computer memory, but the stored filter-mask. That means even if you quit the application, the Blur-Mask is still stored. Super cool.

In Open-batch, select the Macro, select your output format (e.g., tif for Zerene), add files, and press OK [Another cool thing in AP, saving/export is not part of macros, but is in the batch dialog. No more infuriating confusions about save functions as in PS]. I am extremely impressed with AP batch processing. All 12 cores on my MacPro desktop go continuously full throttle (100%) for several minutes. I have not seen that with any other application. They really program the batch processing well.

I also tried APs focus merge function, and am quite impressed, but Zerene still seems to have the edge. PS is worse than useless for serious macro stacking, so most people use either ZereneStacker or HeliconFocus. I have not found a way to touch up the final stack layer by layer, as you can in ZS or HF. If I stack with the color artifacts still in place, AP has trouble with proper alignment, while Zerene nails it. Last but not least, tone mapping is much better in Zerene than in AP. This could be fixed before feeding the files into AP.


One problem with APs tif export is, that Zerene only reads them as B&W file (or single channel?). Feeding the same files into AP gives me a color image. Not sure yet what is going on there

Attached four images.
- Stacktrail Zerene. Notice the color streaks, but clean edges of flower and good tonality straight out of stacking.

- Stacktrails AP. Notice color streaks, and edge of flower is blurry (alignment issue) and image is overexposed.

- AP stack: stack of images after batch processing with Gaussian blur mask in AP. Flower edges are clean, but still a bit over exposed. It seems that AP-alignment is misled by color artifacts.

- B&W Zerene: Cleaned tifs stacked in Zerene, resulting in B&W image (hmmm ....)


The AP cleaned tif can be run back through DxO, and those secondary DxO tifs can be given to Zerene to stack in color. There is something funny going on how either AP encodes .tifs or Zerene reads them.

It also seems easier to do RAW conversion in DxO (curves etc). and then feed DxO tifs to AP for color removal. It requires to run hundreds of images three times before stacking, but so be it.


Below a vis - UV comparison of another species, with UV run through Zerene. Flowers are about 2 mm tall.



Link to comment
Share on other sites

  • 1 month later...

I came across this when looking for posts on focus stacking. I see that there have been no responses. Perhaps it is because, like me, it is hard to understand the procedure you are using. What, for a start, is UV-reflectance z-stacking? I would guess it is focus stacking of images taken in UK light. Again, what is a Bayer filter?


What you have been doing could well be of interest if I could understand more. Could you give us more information Please?



Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

  • 1 month later...

Sorry, did not see this reply.

Z-stacking: you move the camera set-up but leave focus unchanged. This is the option of choice for macro, because you change magnification while changing focus.

Focus stacking: leave camera in place, change focus setting on objective lens. This works better for long distance shots.


UV-reflectance: instead of visible light, I use UV light and exclude all visible light with a visual opaque filter. If you look through the Baader U filter, you see nothing, it looks black.


Bayer filter/mask: the sensor of a digital camera has color filters over each pixel. In most cases, in a 2x2 array, diagonal 2 are green filtered, one is red, one is blue. So each pixel only sees one color, the rest of the color information is interpolated. There are other options, and there is the Foveon 3 layer chip. But by and large, most digital cameras use a Bayer mask.


I hope that helps. This is a bit more photo tech-geekery, and certainly an out-there method.


I now follow the thread, do should reply quicker.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.