Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

imfuse: effects of --finalalpha arguments #9

Open
mviereck opened this issue Feb 15, 2021 · 10 comments
Open

imfuse: effects of --finalalpha arguments #9

mviereck opened this issue Feb 15, 2021 · 10 comments

Comments

@mviereck
Copy link
Owner

mviereck commented Feb 15, 2021

imfuse provides option --soft --alpha --finalalpha to generate semi-transparent results that are put on a background image.
Low contrast areas are close to invisible, high contrast areas are close to opaque.
The transparency mask, or alpha channel in imagemagick terms, can be adjustet with --alpha=A%xB%.

EDIT: changed formerly option --soft to --alpha due to some conceptional changes of the function.
I've changed this post accordingly.

From imfuse --help:

--alpha [=LEVEL]     Generate transparent image using the contrast mask as 
                      alpha channel (=transparency channel).
                      The semitransparent result is composed over a background.
                      Good method to reduce noise in low contrast areas.
                      Default background is 'enfuse'. Others are worth a test.
                      Can take an argument as one or two percent values.
                      Simplified: If only one value is given, positive values 
                      make the image more transparent and negative values make
                      it less transparent.
                      Advanced usage: Two percent values A%xB% are applied
                      as '+level A%xB%' on the transparency alpha channel.
                      This allows to adjust transparency of low contrast areas 
                      with A% and high contrast areas with B%. 
                      Negative values and higher than 100% are possible.
                      Try script 'demo-alphalevel' to understand the effects.

The script demo-alphalevel helps to demonstrate the effect of different parameters.
It generates a table with two gradient images in the left colums, and the alpha cannel and the result image in the right colums.

The gradients are just added to get an idea of the +level effect to the alpha channel. In the alpha channel black areas are full transparent, white areas are full opaque.

The first line shows gradients, alpha channel and image with default --alpha=0x100, i.e. no change.
The following lines show the effect with different parameter sets.

gradient+level

@holgerd001
Copy link

Thanks, that's an interesting overview. I'll do some tests.

Default background is 'enfuse'. Others are worth a test.

So far I have tested --soft and different background parameters. But only enfuse provided good results.

@mviereck
Copy link
Owner Author

So far I have tested --soft and different background parameters. But only enfuse provided good results.

Would you like to provide me one of your stacks that I could use for tests and to publish examples on this site, for backgrounds and for different command setups?
In fact I have only few macro stacks and mostly micro stacks to work with.

Some background worth a test:
enfuse saturation mean max min overlay interpolate colordodge hardlight reflect softburn softlight

@holgerd001
Copy link

Would you like to provide me one of your stacks

It's a lot of data. I can zip them together. But where to save?
Would you like to have the full size (about 3.900x2600 px) or 20 percent images (about 780x520 px).

@mviereck
Copy link
Owner Author

mviereck commented Feb 16, 2021

Would you like to have the full size (about 3.900x2600 px) or 20 percent images (about 780x520 px).

The 20% sized images would be great. Please make sure that they were transferred to tif before resizing, otherwise lots of artefacts would appear in some setups.

But where to save?

This site allows free transfer of big files: https://www.swisstransfer.com/en
My mail address is: removed

@holgerd001
Copy link

Some background worth a test:
That are the ARGs I have tested: enfuse, max, mean, median, min. Where only enfuse shows a good result. But I'll try the remaining ARGs.

@mviereck
Copy link
Owner Author

I've received your fly stackshot, thank you very much! Quite nice shots.
Your mail somehow disappeared as I moved it from spam to inbox, so I'm answering here.

I've made some first runs with imfuse. I see some artefacts I did not expect and will look closer.
With the yellow background I found these imfuse backgrounds useable so far:
enfuse saturation colorize colorize2 pinlight pinlight2
Others changed the color too much. My other macro test stacks have a black or white background, there other backgrounds are possible, too.

@mviereck
Copy link
Owner Author

I've documented the way to find a good setup for the "yellow fly" in #10 .
In that case based on --finalblur instead of --soft --background for the bokeh.

@holgerd001
Copy link

imfuse backgrounds useable so far:

How many ARGs exists for background? I found 118 in magick -list evaluate, magick -list compose plus saturation, enfuse, colorize2, pinlight2.

I'm flabbergasted.

@mviereck
Copy link
Owner Author

I'm flabbergasted.

You forgot magick -list color with 681 entrys. :-p
I'll open a new ticket #11 for background discussion.

@mviereck mviereck changed the title imfuse: effects of --soft arguments imfuse: effects of --alpha arguments Feb 18, 2021
@mviereck
Copy link
Owner Author

I've renamed option --soft to option --alpha. Using --soft is no longer valid.
I did some conceptual changes in the function to avoid some artefacts.
Basically the result is quite similar and the arguments stay the same. The result will be more transparent at some points.

@mviereck mviereck changed the title imfuse: effects of --alpha arguments imfuse: effects of --finalalpha arguments Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants