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.

1 Like

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.