Dual Demosaicing Slider --- Which Side is Which

I am not sure there would be much need to make the Dual Demosaicing mask visible given that the Capture Sharpening (CS) mask works well enough for those know what they are doing. If I know enough not to use the values the program gives me then I know enough to be able to use the CS mask. I think whatever changes would be necessary to the interface would probably add more confusion for more people than making the mask visible would solve.

It is a matter of convenience. Not necessary but it occurred to me several times it would be great to have.

You can not, as the DD mask max is 100.

Edit: this can easily be solved by alllowing a max DD mask setting of 200. No problem at all, but do we need this?

The itā€™s over 9000 meme has its merits. Been learning to allow play in my gimc commands and filters but not enough to utterly destroy the image obviously.

tl;dr

We do not because it solves the wrong problem, not that it is necessarily a problem. The issue is this

I am happy with just halving the value because that works and gets the right areas. What I do not understand is why you are saying that I should not do that if I want the right areas. I do not pretend to understand the underlying code, but it seems to me that they are just designed to operate with different sensitivity scales for some reason. I used the 125 value example to show the problem with your argument that simply using the same value would get the same result. (All I think I need do is set the DD value to 63 which I believe would give the correct split but you think would not.)

If the program does use different sensitivity scales for the different operations then changing the slider for DD to allow 200 would break the program since you canā€™t have more than 100% of the area blended. I would not wish you to make such a change unless you can work out why using the same figures for DD and CS does not produce the same separations. If the same figure is meant to produce the same separations then there is something else wrong that need to be looked at. (Please note I do not think that this is the case, I am just saying that merely allowing the slider to go to 200 is not the answer, in my opinion.)

@heckflosse Poking fun. By play I mean leeway for the user to explore.

@RichardRegal What would you suggest? Make it concise.

It does not use different sensitivity scales. These are not blend % values.

I made a quick hack to visualize the DD mask.

Hereā€™s a screenshot of the DD mask with a threshold of 10

And this is a screenshot of the CS mask with a threshold of 10

At same threshold the masks are equal.

No. I know they are not blend modes, which merge the result of two different things. They are choosing which part of the picture uses (100% of) one method and which part of the picture uses (100% of) the other. The choice being decided on the level of contrast.

With the DD slider, when I use 0 I get all AMAZE. When I use 20 then much (not necessarily 80%) of the picture uses AMAZE and the rest uses VNG. When I use 100 I get all VNG. Is that not the case, or can I never get to all VNG? (I am pretty sure that when I set it to 100 I was getting all VNG.)

Similarly with CS when I use 0 everything is sharpened When I use 20 quite a bit is sharpened and some is not and when I use 200 next to nothing is sharpened

Now I accept that the scale might not be linear since I am sure the perception of contrast is not liner, but it is certainly a contrast based scale in both cases, with both going from no contrast to the highest level of contrast. As the contrast decreases the use of AMAZE decreases. As the contrast decreases the capture sharpening decreases. (Hmm, is it that the highest level of contrast at which we get to all VNG is a lower level of absolute contrast than the level at which we get no capture sharpening?)

Well OK my choice of the word ā€œsensitivityā€ was not the best one, maybe granularity might have been better. I meant nothing more than how much contrast difference it took to register a 1 point move on each scale.

Wow! Thanks, I really do appreciate that and the effort you are taking.

The visibility of the DD mask example is interesting since all I can say is that it does not match my experience when using the generated TIFFs. I have 2 requests if I may impose on you further.

(a) Have look at what the two masks show when both are set to 99. If 100 on the DD scale is no Amaze and all VNG then the DD screen should be almost all black but there should still be quite a bit of white area on the CS mask.

(b) If you have a picture that will show the differences between the two methods well then generate a couple of TIFFs at different DD settings (say 15 and 30) and look at the areas where the different levels give different looking masks. It was only by looking at actual TIFFs that I found that I was not seeing what I was expecting to see when I set the same figure for both masks.

First, the mask involves a sigmoid, which while tending to zero, never will reach zero.
Second, 100 on the DD scale does not mean no Amaze. Thatā€™s what the mask preview is for. Have a look at it.

@RichardRegal

One thing, which might be confusing (though logical for me) is the fact, that DD gives a different input for CS than single Demosaic, so giving a different CS mask

Well the second follows from the first :-).

OK so 100 on DD means ā€œalmost no AMAZEā€ not ā€œno Amazeā€. I guess my next question then is about the CS slider where presumably 100 means ā€œalmost no sharpening but still a little bitā€ and 200 means ā€œeven less than almost no sharpening but still just the teensiest bitā€. (I am sorry this sounds facetious and I donā€™t mean it to be). The logic being that if you have selected 100 on DD there might be some of the AMAZE areas that you would wish to exclude from sharpening, which you could not do if the sliders had the same maximum.

Is there somewhere I could download the version with the DD mask? I would love to try it and if possible show to myself that I was wrong. (I am not being facetious here either, if I can remove a step from my workflow it would be nice.) If you also have an ideal test raw that would better show the differences in the demosaicing that would be helpful otherwise I can just use one of my own.

Indeed, it is hard to think of it operating any other way. DD needs an initial demosaic to work out where the contrasty areas are. It therefore has to start with (say) AMAZE. Unless you do some form of iterative generation whereby having done the first pass it selects a value for where to use VNG redoes its working to generate a new set of contrast levels, etc then you have to do that.

CS on the other hand needs to work on the actual demosaiced image.

When I generated my TIFFs for comparison I used Amaze only demosaicing and turned on capture sharpening to look at the mask to get the values to use for the DD slider. I then switched to AMAZE+VNG with my chosen value and turned off capture sharpening to make sure that that did not hide/exagerate any differences.

About the transition (the sigmoid):

I will work on this tomorrow as showing the DD mask would be really useful. Technically itā€™s easy. Just need to make the right gui for itā€¦

3 Likes

ā€œI will work on this tomorrow as showing the DD mask would be really usefulā€

Just remember who asked for this first :rofl: :rofl: :rofl: :rofl:

1 Like

He might have been waiting to see whether any one else wanted it too :slight_smile:
Now if someone can explain to my why Photoshop (and Affinity for that matter) want find any any differences when I use difference or subtraction blend modes on an image that I have demosiced once with AMAZE and once with VNG I would be happy. The difference is visible to the eye but not, it seems to the program.

Exactly :wink:

I have been trying to use that to understand the difference in practical terms between a slider that goes from 0ā€“100 and a slider that goes from 0ā€“200 and failed miserably.

However, another point occurs to me with the DD mask. I have been assuming that the slider decides which pixels use the result of the AMAZE algorithm and which pixels use the result of the VNG algorithm. Although each pixel in each algorithm uses the values of its neighbours, the final value that the program uses is either 100% result of the AMAZE algorithm or 100% the result of the VNG algorithm even if all its neighbours happen to use the other algorithm. This is partly as a result of your comment that the values are not % blend values, but I would probably have thought that anyway. That being the case I would expect the DD mask to be just black and white with no shades of grey.

Obviously the same does not apply to CS and the CS mask because one would wish to very the amount of the capture sharpening and not just have it on or off.

Itā€™s so easy. Being able to use 200 instead of 100 just means you are able to set a larger threshold.

Wrong assumption. The contrast threshold is just a value to calculate the mask to blend between a and b. a and b maybe Amaze and VNG4 or sharpened and unsharpened. This a not a binary mask, as you can see from the sigmoid reference I made. On top of this, the mask is gaussian blurred with a sigma of 2.0 before it is applied, to get smoother transitions. And all I mentioned is equal for DD and CS

The values the visualization of the mask shows (the shades of gray) are % blend values. The contrast threshold is not