How to choose a demosaicing algorithm

Thanks, I didn’t know about Arvix, will give it a look. I didn’t explain myself properly but my idea was that as it’s not used in any other cameras, be it for photography or scientific instruments, there’s not many motivation to research on it, like Bayer has with all kinds of different algorithms for different scenarios.

I think the available demoasicer for xtrans is quite good. What do you notice are its shortcomings?

Agree with you on there, it’s quite good and I really can’t fault it. The only thing I sometimes notice is a pattern in the noise, but that’s just pixel peeping(bad habit…) and it’ll never show up the final image.

I’ve been using denoise a half strength for my base ISO (160) RAF files

Thanks, I will give it a try. I assume it’s the wavelets auto preset with the strength at half?

Its the default.

1 Like

Perspective correction tries to detect vertical and horizontal lines, and my guess is that the choice of demosaicing algorithm may make that easier or harder, even if the demosaiced results are virtually identical to our eyes. Ctrl and/or Shift may be used to enhance edge and contrast, respectively, before detection is attempted.

The behaviour boiled down to the demosaicing method choice no matter what I tried. As a workaround, to get the best of two worlds, once the perspective is ideal from a temporary demosaicing method, one can change the method back to the preferred one.

Actually, no. rotate and perspective gives a different result for each invocation, even if the algorithm is the same:
Amaze (module reset, then re-detected structure and applied full correction):


Difference between Amaze versions (also the detected params are different):
image

PPG (same reset + redo):


Difference between PPG versions:
image

darktable 3.9.0+1319~gc969328d1

1 Like

That is strange because it was more predictable (and repeatable given the same steps taken) for me many moons ago. This then is worse than my experience, where only changing demosaicing algorithms had a significant impact.

It is great to think that in this day in age we could just analyse the image and just have something decide what is the best option and maybe we will arrive at that. Granted I have not put much effort into to this but given what little effort I have put in to looking at changes in the result of the different aligo’s just from a stand point of visual inspection…often it just looks like a different pattern of grain or noise wrt to another one …not better and not worse often. Obviously it can have wider impact on rotation and perspective calculations but I can say from some experience searching for automated ways to analyse histological sections with much simpler qualifiers, ie stained cells organelles capillaries nerves…its not that easy even with colors and distinct structures. These are large elements in the image and it is still not easy to accurately and consistently isolate, segment and quantify…

Where would one begin to define qualifiers for an automated analysis of “better” and what would that be?? I have seen some analysis of these types that use some sort of RMS statistics but what would be measured and compared…I am not being in anyway sarcastic just curious…

1 Like

This garnered more interest than I anticipated. The point is that the choice of algorithms and other things earlier in the pipe influences what happens afterwards. This is well known and should be taken into account when making decisions about the workflow.

I use fuji & x-trans iii.

The problem with DT is that it selects markestejin 1 pass instead of the markestejin 3 pass. I see a difference, so each time I have to go and change it.

I realize that they chose the 1 pass to make DT run faster but when dealing with colours (calibration & and balance rgb…) it makes a difference.

Thanks

1 Like

Curious…any change these settings interact with the demosaicing to contribute to any of this??

Just curious

image

You can create an auto-applied preset.

2 Likes

Y’know, took me a couple of days to connect the dots, but RawTherapee’s dual demosaic options do precisely what you posit…

https://rawpedia.rawtherapee.com/Demosaicing#Dual_Demosaic

3 Likes

Among other points already made, good luck even getting reliable information for any camera on the behaviors of its OLPF, or even whether it has one. That, among other things, impacts the demosaicing algorithm.

(For example, while most people are fairly certain the Sony A7M4 DOES have at least a weak OLPF, because omitting it is a characteristic of the R family, some sources state that it doesn’t. Even if it does, the strength of the OLPF varies from camera to camera.)

As it is, color profiling is already a matter of “Is there a user who owns the camera AND a ColorChecker and is willing to take the time to submit reference shots?” and that’s not the case for many cameras.

FYI, it’s arxiv, not arvix - https://arxiv.org/

1 Like

DT is almost the same except the automatic mode - but we have the visualising

3 Likes

A 200% crop sample from my DJI Mavic.

LMMSE

LMMSE vs AMaZE

LMMSE vs PPG

DxO PureRAW with no added sharpening

1 Like

The DXO crop is zoomed in more. Also, it’s full of blocky artefacts; it may have sharpening built into the demosaicing step.

1 Like

Open each of them in a new tab. It should be 200%, but I cropped it differently why just comparing them in discuss pixls.us may look strange.

With raw files from DJI Mavic I have never been happy about the result from PureRAW. Over sharpening and smearing. CR2 files from Canon on the other hand, very good result.

OK, thanks. The blockiness remains, though.