X-trans demosaic - Markesteijn 3 artifacts

The idea for opening this topic is to stimulate further development in x-trans demosaicing.

The current options in Rawtherapee are very good regarding sharpness and reconstruction of shapes. But there is a serious lack in highlight details, which exhibit lots of filter overshoot artifacts. And there is the bad looking noise with the crosshatch pattern.

Recently I’ve been comparing Amaze and IGV algorithm for bayer sensors and IGV gives to my eyes more pleasing look images. There is less overshoot on specular highlights and the noise is free from blobs of green and red.
(Now, IGV is not prefect either… It handles clipped data horrible.)

I would be nice to have more algorithm choices. An algorithm that is more focussed on image integrity regarding noise and specular highlights and less on sharpness and detail extraction.

Example of overshoot:
05

are you sure this is overshoot and not a highlight clipping artifact? the purple fringes look suspiciously like the post-whitebalance magenta you’ll get in clipped areas (which then get interpolated into innocent neighbour pixels).

fwiw i have implemented half of googles superresolution demosaicing that works on bayer and xtrans alike. not convinced it’s great for quality (could be tweaked somewhat i suppose) but might serve for a comparison.

High chance that clipping indeed is happening.

Here is another example where i’m sure that the raw is not clipped.
MS3 is just trying to hard to extract detail.

12

Have you tried playing with the 4-pass method in RT? It’s doing Markesteijn on detailed areas, and simple fast-xtrans demosaicing on flatter areas, and switch between the two is controlled by the contrast slider.
You can also add +1 of false color suppression and see if it’s better.

1 Like

Yes, I tried the +fast options. The +fast pass reduces the crosshatch patterning in the noise, but it still has the “blobbiness”.

The false color suppression… after the fact filtering :wink: I dislike it, makes everything look like a cheap video camera image.

I’m really looking for the character of the IGV algorithm. Sharp noise without red/green blobs, and as little as possible demosaic errors on highlights (even if that means they are going to be less sharp).

Here’s a shot with speculars (shot at f/11 with the sun in front, so there’s some diffraction):

3-pass:

4-pass + 1 step of false color suppression + capture sharpening:.

Same as above + defringe:

I don’t see problems here.

I believe that any other similar image, made also with other cameras would have had some problems seeing the high contrasts that the scene has. It is also possible that I do not understand the problem he has exposed.

And here with some foliage, again at f/11:

3-pass:

4-pass + 1 step of false color suppression + capture sharpening:

Same as above + some RL sharpening:

The following picture should give a clear idea about my issues with MS3.
It uses the studio scene of Dpreview, and developed in RT 5.6.
Note how IGV gives a very uniform colorcast, little aliasing/filter overshoots.

Have you tried raising “False color suppression steps”? On the DPR test scene I find 2 works well for the text.

My point is not what can be done after demosaicing. It’s that the demosaicing should be better on itself.

I shoot with an X-T2 and I don’t see any peculiar demosaicing problems with real-life images.
If you really think something else can be done, you should open an issue on GitHub, and provide good examples of when the current demosaicing algorithms for xtrans fail in RT.
But as we showed, there are ways to correct artifacts afterwards, and I’m not sure developers will spend time scratching their heads devising a brand new algorithm for a specific sensor (only Fuji used Xtrans) while the current one work well enough for most people.
But feel free to open an issue and document it, and let’s see.

2 Likes

I agree with you and i use a Fuji. For me a thing that could be improved is the chromatic aberration correction, but i don’t know if it is possible to autocorrect them like with bayer sensors.

Now i use lensfun and it does indeed a good job, but often not a perfect one like autocorrection for bayer.

I have also seen that for native fuji lenses, there is an exif tag that maybe contains even better data to fix ca for native lenses.

example from my XT20:

Chromatic Aberration Params : 360.5 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 6.5e-05 0.000119 0.000149 0.000146 0.000122 9.7e-05 3.5e-05 -3.9e-05 -0.000178 -0.000366 0.000356 0.000657 0.000848 0.000876 0.000823 0.000849 0.000882 0.000958 0.001127 0.001312

And also it contains
Vignetting Params : 327.7272727 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 100 99.73 99.43 99.06 98.59 98.03 97.36 96.18 94.29 91.57 89.01

And distortion one.

… I use exclusively Fuji and the best results in correcting chromatic aberrations I get by checking “Chromatic Aberration” in the “Lens” panel and also using “Defringe” default values, “Linear curve”, "restore linear curve ".

1 Like

Interesting. I use defringe too on residual ca (but only e.g. for magenta and red), but i don’t understand what you mean with “Linear curve”, "restore linear curve ".

Another example of the bad demosaic quality of MS3. 100% crop. Download to file and look yourself at 100%.
Look at the black fur below the eye, its every color but black!
This was shot at base ISO and exposed to the right (it ain’t noise).

I’m not sure this is due to MS3 being bad, or an unavoidalbe aliasing effect due to the sensor layout and interpolation in general. The situation is further complicated by having all kinds of reflections on (partially wet) hair doing funky stuff with the light…

…my version of RT are in italian…Senza%20titolo

Have you tried False Colour Suppression Steps on this raw ?
I used to have similar artifacts on say wet rocks and now have the slider set at 5 (probably overkill) and this problem has gone away.

photographers are weird. my bet is that half of these colours are in fact caused by honest interference:

2 Likes