How to choose a demosaicing algorithm

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.

Sadly, yes. darktable is way better.

Thanks for the comparison.

I see noisy dots more noticeable and reddish in PPG in “LMMSE vs PPG” photo.
AMaZE and LMMSE looks the same to me.

It truly seems that I have to see a 200% crop to start noticing some differences.

I see the colour dots even at 100% and with all demosaicing methods but LMMSE.

I haven’t tried this one, but there is a raw sample from Mavic here https://raw.pixls.us/getfile.php/1052/nice/DJI%20-%20FC220%20-%2016bit%20(4:3).DNG

This all depends at lot on the raw data. This image is likely a pretty easy one for a demosdaicer, no very-high/very-low transitions on single color channels. Also the lens looks “not too sharp”. Things get interesting in parts like “sun on sea at a beach”. Likely lots of reflections on the water. Or on small stones.

Also not that in dt as in other developers there are many steps following the demosaicer. You might rotate a bit for example and immediately the overshoots (like most obviously in PPG) will lead to further errors.

Well - a demosaicer works on pixel-level :slight_smile:

1 Like

VNG4 vs RCD at 200%. VNG4 gives moire but smoothes the sky. RCD gives more digital noise in the sky but almost no moire and better details of the aircraft.

For a picture like this I normally go for dual demosaicing. RCD+VNG4.

1 Like

Speaking of RCD, a while back, its dev (@LuisSanz) indicated that he wanted to improve it. I wonder if there was any progress. Pinging him in case he would like to comment in this thread.

1 Like

Some clues for alternative (academic) methods: Google Scholar with search terms (demosaicing OR demosaicking) x-trans -neural -deep

3 Likes