Zerene - use all color channels in decisions

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

Moderators: Pau, rjlittlefield, ChrisR, Chris S.

Posts: 108
Joined: Sat Jan 28, 2017 11:19 pm

Zerene - use all color channels in decisions

Post by Ultima_Gaina »

Rik, can you be so kind to explain what are the pros and cons of setting "use all color channels in decisions" for Pmax?

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

Post by rjlittlefield »

Pros: can give better results in unusual cases when foreground/background contrast is mainly in color, not luminance.

Cons: consumes more computing resources.

That feature was installed mainly because of one user who works with flies that have colored legs, and reported that he was having trouble with the color losing saturation.

Here is a snippet of email that explains most of the issues:
support@zerenesystems.com wrote: [The user] wrote:
> A priori I'd have thought Stacker should be using variance of the
> position in a colour space that approximates that of human perception,
> rather than just tone.

I considered both options during early development.

The rationale for using just luminance is that the decisions really don't have anything to do with color, only with focus. Once focus is determined, all the color channels get processed using the same decision.

It's simple enough to conjure up a synthetic test case in which this gives the wrong answer. Just cover the subject foreground with a pattern that has constant luminance but changing color, while covering the background with a pattern that has varying luminance. Hey presto, the foreground looks featureless so it goes transparent. However, in most real life images, color variations are accompanied by sufficiently strong luminance variations that you get the same answer either way.

It happens that your flies -- at least the test stack -- are exceptions to that pattern. In your test stack, there's enough more information in the color channels to give a correct decision in some cases where looking at just luminance gets it wrong. As you'll see, the fly's legs do retain more saturation with the new option selected, but more importantly (by my criteria) that's because they go less transparent.

In most of the other stacks I tested, the new option has little or no effect. I did see an increase in saturation in one of my other deep high mag test stacks, but otherwise the differences are pretty minimal. It turns out that using color vs luminance takes noticeably more time and memory, so that's why I made it an option instead of just changing the code. But it wasn't a big enough mod to justify "Pro-only" status, so it's available to everybody.

I'll be interested to hear how well it works for you in other cases. Let me know, please.

Posts: 108
Joined: Sat Jan 28, 2017 11:19 pm

Post by Ultima_Gaina »

Thanks Rik!
So if resources are not an issue, it is advisable to permanently enable this feature, right?

I'm noticing less noise on PMax, to the extent that it looks almost as good as DMap, from this point of view. But maybe this is only because yesterday's tests were based on slightly smaller stacks.

Post Reply Previous topicNext topic