Stacking software: CZP vs. HF -new images

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mgoodm3
Posts: 273
Joined: Mon Sep 08, 2008 8:50 am
Location: Southern OR

Post by mgoodm3 »

I find that CZP uses way too much sharpening and contrast in its native form. When I drop the contrast adjustment and the sharpening from CZP, I get very similar results between "Do stack", "Pyramid stack" and HFocus (with coins at least).

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

Post by rjlittlefield »

Sharpening is definitely part of the trouble. CZP and HF have different levels of sharpening built into them. I really should say that with quote marks, "sharpening". CZP does explicit sharpening; HF does a bit of blurring, at least in practice. Anyway, doing the same strong narrow USM on both outputs will definitely blow up noise way out of proportion in the CZP output. A better comparison would be to apply different USM's to each output so as to produce as nearly equal overall effect as possible. The issue only comes up when comparing products. A workflow tuned to each product would do different things naturally, attempting to produce the best result in each case.

But I don't think that's the whole problem. Looking past the excessive sharpening, I'm pretty sure I see a bit of "smearing" in the CZP output. That may have to do with limitations in CZP's alignment procedure. As far as I know, CZP only aligns to the nearest whole pixel, and there's no guarantee that it will do even that well in frames where not very much is in focus. If the stacking algorithm were picking pixels from just one aligned frame, that would be OK, but the pyramid maximum contrast procedure will grab detail equally from two frames that are equally well focused but slightly misaligned. I think that's what's happening here. These images are pretty sharp right down to the pixel level. If one frame ends up a pixel off from the other, the result would be pretty much what we see here. If that is what's happening, then it's definitely bad news for problems like this because as far as I know, CZP has no handles to affect its alignment behavior, other than turning it off altogether.

Excellent tests, NU!

--Rik

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

Post by rjlittlefield »

I checked a bit further. There's definitely a big difference in overall alignment between the CZP and HF stacks. If you layer the two renditions of the same antenna in Photoshop and click between them, it's like looking at two frames shot from completely different positions. You can confirm this straight from what's visible on the web page, by noting the difference in position of the first strong bristle in the angle between the antenna and eye.

In fact, now that I see this difference in virtual viewpoint, I see that I can also fuse up the middle panel of these latest pictures as a crossed-eye stereo pair. Fuzzy, but cool.

--Rik

mgoodm3
Posts: 273
Joined: Mon Sep 08, 2008 8:50 am
Location: Southern OR

Post by mgoodm3 »

Here is my own testing of the various stacking protocols. I realize coins are different from bugs, but I find them difficult to tell apart once tweaked. there is a little more contrast in the Pyr max con. The fuzzy areas in the pics are because I am shooting these images through about 1 mm of plastic.

D200, Stacked - nikon 105/5 (f4) + nikon 50/1.4 (f5.6), 9 images. The originals were reconned from RAW at 2048 x 1536. these are 800 x 800 crops of those (70% JPG), no addotional processing.

Helicon - Method B, 4, 6.

Image

CombineZP Pyramid max contrast

Image

CombineZP Pyramid do stack (975 sharpening, 0 contrast)

Image

CombineZP Do stack (950 sharpening, 0 contrast)

Image

Graham Stabler
Posts: 209
Joined: Thu Dec 20, 2007 11:22 am
Location: Swindon, UK

Post by Graham Stabler »

Looking again at the original problem blow-ups. The loss of detail and noise look very similar to what you get when converting an image to a gif. It seems as if there are or have been at some stage insufficient levels so pixels of similar brightness/colour have been lumped together.

From what I recall of running my batches in CZP I had best results when I used TIFs, lots of levels and loss-less compression. Before that I remember some disappointment when zooming in.

For me I had to choose CZP because I can't afford to manually remove halos from hundreds of output images, if we can work out ways to get reliably good quality images then that would be a bonus too.

Graham

NikonUser
Posts: 2693
Joined: Thu Sep 04, 2008 2:03 am
Location: southern New Brunswick, Canada

Post by NikonUser »

Graham: I don't understand the ins and outs of digital imaging so this may be irrelevant. I took a look at the levels histogram from those original blow-ups; each formed a 'normal curve' in the central part of the scale with no gaps. However, when I stretch the curve to fill the entire 0-255 scale many gaps occur.
NU.
student of entomology
Quote – Holmes on ‘Entomology’
” I suppose you are an entomologist ? “
” Not quite so ambitious as that, sir. I should like to put my eyes on the individual entitled to that name.
No man can be truly called an entomologist,
sir; the subject is too vast for any single human intelligence to grasp.”
Oliver Wendell Holmes, Sr
The Poet at the Breakfast Table.

Nikon camera, lenses and objectives
Olympus microscope and objectives

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

mgoodm3,

The subject matter you like to work with is nearly "ideal" for stacking techniques. It's not too surprising that you see very little difference between the programs (as far as "combining" is concerned). Most subjects that lack overlapping parts at very different focal planes are relatively easy work for the software. That's why it was easier to do these insect eyes, (even at 40X) than it is to make a much lower magnification image of an insect's body that has legs, hairs, and antennae jutting out all over the place.

(I don't know the protocols about handling collectible coins, but it would be great if you could avoid shooting through the plastic).

mgoodm3
Posts: 273
Joined: Mon Sep 08, 2008 8:50 am
Location: Southern OR

Post by mgoodm3 »

Many nicer coins are graded for quality and encapsulated (slabbed) by third parties which help to provide protection for the coin and liquidity in the market. Since the grading is guaranteed, the capsules can't be opened unless you physically break them apart.

So, for the most part I am stuck with shooting through plastic. When the plastic is shined up, it doesn't present too much of a problem. The coin I posted was not shined up prior because I wanted a quick comparison. I'll post a slab sometime to show what they look like.

I figured that coins were easier than bug since they are just a single surface. I was just surprised about ow similar the outputs of the two programs are. For me, HF is quick and easy and produces images that are very similar to the original with little work. CombineZP is more difficult and the baseline settings are a bit too agreesive for me, but more powerful if you want to tweak things.

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

mgoodm3,

It would be interesting to see a comparison between a high mag shot through the plastic and the same coin photographed after it was removed from the plastic.

(You must have one you could "open"... :wink: )

mgoodm3
Posts: 273
Joined: Mon Sep 08, 2008 8:50 am
Location: Southern OR

Post by mgoodm3 »

Plastic vs. no plastic would be interesting. Hard to crack them out as the slabs tend to self destruct and their pretty tough. Maybe I can find a cheap one to crack out.

Since many objectives are made for a cover slip... would it ever be of use to try on out with a coin in a slab?

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

mgoodm3,

Most objectives (starting about 10X and above) are designed to be used with coverslips of 0.17mm thickness. The higher the numerical aperture the more critical this becomes.

Some objectives have correction collars that allow you to change the amount of correction to accommodate coverslips that vary slightly from the "ideal" thickness. Usually these adjustments are limited to a narrow range.

Of more interest to you would be a few objectives that are typically made for inverted microscopes. These have correction collars that accommodate a large range of thicknesses (0-2mm) in order to allow imaging through culture dishes.

But truthfully, I wouldn't fool around with those. My concern would be more about the "flatness" of the plastic. Correction collars can be designed to correct for spherical aberration based on "thickness". But it is important that the surfaces be perfectly flat and both top and bottom surfaces are planoparallel. The higher the magnification, the more any surface irregularities will effect image quality.

mgoodm3
Posts: 273
Joined: Mon Sep 08, 2008 8:50 am
Location: Southern OR

Post by mgoodm3 »

Here is what a slab looks like (a 3D stereo pair to boot).

The plastic is pretty high quality and generally quite smooth. The nice part with coins is that you generally don't need a huge amount of magnification. I would be interested in playing with an objective with a correction for plastic - any models to look out for? (10x or below)

Image

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

Post by rjlittlefield »

Commenting specifically on the coin images...

In theory, coins are ideal for a depth map approach because the stamping process guarantees no overlaps. HF generally does depth maps better than any other tool I know, so I'd expect it to do a "gold standard" job on this problem.

That's consistent with what I see in these four images. Doing the "layer and flash" test in Photoshop, I can't find a single place where I prefer any of the other images over HF's.

There are lots of places, though, where I definitely prefer HF's output in this case. Look in the base of the U-shaped contour around pixel coordinates (230,300). HF's image is clean and crisp, but CZP's Do Stack and Pyramid Do Stack are fuzzy. CZP's Pyramid Maximum Contrast is crisp at that place, but it's a little bit fuzzy and smeared over most of the lower right quadrant and it has a distinctly pixellated appearance around the highlights at upper right.

I'm definitely giving the nod to HF for this one.

--Rik

mgoodm3
Posts: 273
Joined: Mon Sep 08, 2008 8:50 am
Location: Southern OR

Post by mgoodm3 »

I also notice some green fringing that I hadn't noticed before on the highlights that is most prominenton the CombineZP images and only faintly visible on the HF.

Post Reply Previous topicNext topic