Where is Markesteijn demosaic for X-trans in darktable and rawtherapee?

I am using fuji X-A5 with the X-trans sensor. I have the latest versions of darktable and rawtherapee. I am looking for the Markesteijn demosaic option but I do not see it in either software.

afaik the X-A5 has a bayer sensor


Thank you, I don’t know why, but I was convinced it had the x-trans. Are you a fuji user? Just wondering if anyone has tested both sensor types and which they prefer.

No, I’m a Nikon user.

x-trans has some advantages and some significant downsides compared to a bayer-CFA. Fuji marketing overhyped some aspects of the advantages (of course they did). While x-trans can still produce moire, it’s not immune to it. I feel it’s rather well controlled. A bayer-cfa camera without AA-filter is more prone to moire. The downside is that demosaicing is more computationally expensive, and/or suffers from more and different artefacting than bayer-CFA sensors. The RGB ratio per unit-cell for bayer is (green first and normalized to it) 1:0.5:0.5 and 1:0.4:0.4 for x-trans AND the x-trans unit-cell is bigger. Effectively for the same sensor area you’ll have less ‘color-accuracy’…loosely speaking…while, maybe(!), a bit more ‘luminance-accuracy’.

At 24mpix, like your X-A5, I don’t think x-trans or bayer should be decisive. Any lens-choice or exposure-triangle decision or misfocus, will have a substantially larger impact on your technical picutre quality.

1 Like

Bayer sensors have the fantastic auto-CA-correction routine which fixes chromatic aberration prior to demosaicing for better results, while X-Trans doesn’t have this available.


I haven’t used a fuji bayer camera, but comparing an X-H1 to a6400 (both 24mp aps-c) I find the high iso noise from the x-trans sensor much less ugly straight out of camera. There seems to be much less (or less extreme) visible chroma noise. I assume that’s due to the difference in demosaicing process. In darktable, the x-trans files require a completely different approach to denoising than raws from my bayer cameras. Using non-local means seems to quickly obliterate detail on the x-trans files, if I use it at all I keep it very low strength, and usually just use the wavelets option. After processing though, I’m perfectly happy with the output from both cameras. At 24mp+ I think any benefits of x-trans are marginal, so I wouldn’t be surprised if fuji abandons it next time they make a major jump up in sensor resolution.

1 Like

Remember that Fuji introduced their X-Trans tech at a time when removing the aliasing filter was still controversial. At that time, X-Trans seemed a smart move, as it allowed them to go without the aliasing filter, while at least sidestepping the moiré issue.

And X-Trans truly does suppress moiré for regular vertical/horizontal line patterns. But it is still a color filter array, and therefore still needs demosaicing, and still produces false-color artifacts if the image patterns align with the color filter patterns. It’s just that in the X-Trans case, these patterns are irregular three-pixel curves instead of regular two-pixel parallel lines. Hence, “worms”, or whatever you want to call the X-Trans demosaicing artifacts.

That said, demosaicing algorithms have improved over the years, both in terms of Bayer-moiré suppression, and in reducing X-Trans worms. And perhaps more importantly, sensor resolution has increased as well, which makes these artifacts smaller, and more likely to be hidden by image softness due to slight misfocusing or lack of lens resolution.

At this point, I think neither Fuji nor raw processors are limited by X-Trans. Modern processors and processing methods can deal with both Bayer and X-Trans with aplomb. Thus, Fuji could easily rid themselves of X-Trans, and they have, in their entry-level X-A/X-M/X-T?00 cameras, and their high-end GFX cameras. But they probably can’t for their mainline X-Series due to marketing reasons. “Giving up” on X-Trans could be perceived as “admitting it was a failure”, which I don’t think it was in the beginning. But by now it is mostly… redundant. A non-issue, really.

(At least this is my understanding and interpretation)


X-trans does translate to slightly higher overall quantum efficiency in “typical” lighting (more sensor area with green CFA pixels - 20 green sensels per 36 instead of 18), but at the obvious cost of more color artifacts. It’s why, for example, X-trans sensors typically perform a bit higher in Bill Claff’s PDR tests.

1 Like

I believe X-Trans has less chroma noise and more luminance noise. This means that noise, even when present, appears more like film grain. Its a matter of taste, but I feel that more noise can be left without ruining the image which would then mean higher detail.