Thursday, May 17, 2012

Demosaicing the Fuji X-Pro1 Part 2

This post is a follow-on to my previous post on Demosaicing the  Fuji X-Pro1.

I was somewhat bemused to find that the original post, which was a largely technical article, was picked up on a number of photography news sites.  Anything with "Demosaicing" in the title should have been a dead give away that the content wasn't really light reading.  Some of the interpretations and comments on the forums were "interesting" to say the least. Especially the the suggestion I was in some way "lazy" was certainly a new take(!) This after going to a lot of trouble support the X-Pro1, resulting in PhotoRaw being the first raw developer to provide non-beta X-Pro1 support (other than SILKYPIX, which had pre-release help from Fuji).

However, interesting comments on web the aren't the point of this post. A reader pointed me to betas of both DCRaw and RPP that support the X-Pro1, so I took a look at both.

The betas are here:
  • DCRaw "9.13test": //tinyurl.com/6vkeqrq 
  • RPP Version 4.5.0 (1520) Beta: http://tinyurl.com/6t4raxa
Here are the results - the crops I'll show here are the same as for the original article. Except where noted, all settings are default.

IMPORTANT NOTE: the RPP and DCRaw images here are from betas, and they are from betas that are almost certainly at a far earlier stage of development than the ACR beta in the previous post. As Adobe provided that beta to DPReview, its a pretty good assumption that Adobe is comfortable with it as a near final product. The two betas in this post are quite possibly real early stage.

First, for reference, the same PhotoRaw crop as in the previous post

PhotoRaw 3.5.4 400% crop


Then DCRaw

DCRaw "9.13test" 400% crop

Firstly, note that I've adjusted exposure on the DCRaw image be closer to the others. Most raw developers, including ACR and PhotoRaw, add a tone curve to their images; DCRaw doesn't. The results from DCRaw unfortunately aren't too pretty - the beta version shows zipper effect on straight lines, and also artifacts on the highlights. Resolution also appears lower. Interestingly enough, these are similar issues to the ones I ran into with the the "Attempt 1" VNG interpolation scheme I described trying and abandoning in the previous post. 

Here it's probably important to put artifacts in some kind of context. No raw processor is perfect, but what needs to be considered is both the severity and frequency of artifacts. So:
  • PhotoRaw displays colored pixels on sharp (one or two) pixel transitions out of saturated highlights. That's a severe artifact, but there aren't that many such areas in any given image. In most images, you won't see such a situation at all.
  • ACR and SILKYPIX display chroma smearing. That's a low severity issue because most users will never notice. But the image is smeared everywhere(!)
  • What DCRaw is showing is zipper effects on straight lines. That's a problem because straight lines are really common, and the artifact is really noticeable.

The test version of DCRaw came with source code, and a quick look shows, perhaps unsurprisingly, that "9.13test" appears to be using a modified VNG algorithm for X-Pro1 images.


RPP Half 400% crop

Next up is RPP. Firstly, there is an obvious difference between RPP on one hand and ACR, PhotoRaw, SILKPIX etc on the other hand as to color rendering. Secondly, the beta uses an interpolation scheme called "Half" by default. Visually this appears not really be interpolation at all - rather it seems to reduce image resolution to the number of "real" pixels. The results are just plain ugly - the less said the better. Fortunately you can also select VNG interpolation.


RPP VNG 400% crop

RPP's VNG interpolation does a much better job. But, as is the case for DCRaw, it loses plot quite badly on straight edges, giving zipper effects, and seems not to quite have the resolution of ACR, PhotoRaw and SILKYPIX. Visually, if I had to take a guess, I think that RPP's VNG interpolation has the same core as DCRaw, but does some noise reduction in post-processing afterwards.

Conclusion


The conclusion really is the same as the previous post:

Firstly, Fuji X-Pro1 images are a pig to interpolate, and don't appear to show better resolution than a conventional sensor, even when using Fuji's official raw developer, SILKYPIX.

Secondly, raw developers are a trade-off - none are perfect, and all work inside of constraints on memory size and processor speed.

Update: part three shows how a modified form  of PhotoRaw gets very, very close to the performance of SILKYPIX.

Finally, if you're interested in my (somewhat cynical) view on the relationship between camera manufacturers and software developers, you can read this post

7 comments:

Ario Arioldi said...

Sandy,
RPP normally has two conversion modes - “half” and “interpolated” and “half” is the default one. You can redefine it through Camera Default.
Half-mode is very fast and good enough for web, small prints or previews.
If you want full resolution output enable VCDMF or AHDMF interpolation at the bottom of the control panel. VCDMF is recommended. (from RPP web site).
Andrey, the developer, while offering this preliminary support for the X1-Pro files, commented that so far regretfully he was just able to use VGN with this particular file.

Sandy said...

Ario,

Thanks, that explains what "half" is.

I suspect that most people that have worked on demosaicing's first though when looking at the X-Pro1's sensor would be "gradients". Didn't work too well for me, but it's quite possible that someone else will have better luck

MikeJMcFarlane said...

Hi, really interesting read. I didn't understand it all, but got the gist of it.
I wouldn't pay any mind to forum comments, after reading the comments about the new Leica LE on dpreview I've decided to stay away from most comment sections, they are just too depressing.
I think the quantitative approach you take to your image evaluation is good, but the Fuji images from both the x-pro1 and x100 have a something extra that goes beyond metrics and resolution. It's certainly a very subjective thing and very qualitative, but they just have a visual appeal to some, like me.
Anyway, happy coding, and cursing:-)
Mike

Sandy said...

Mike, thanks. The cursing and whatever are fortunately done for me. The new version of PhotoRaw has been with Apple since before I wrote the first post. While I might do some stuff to enhance the current algorithm, it's close enough in performance to ACR and SILKYPIX to release. While obviously I'd like to be able to match (or preferably outperform) ACR and SILKYPIX, no raw developer on the iPad is going to match desktop based ones. PhotoRaw's competition are other IPad apps, and to some extent in-camera JPEGs. Desktop is another world.

dev* said...

Your analysis of the additional converters is appreciated. It's disappointing that we aren't seeing any better results. From everything I've seen, the resolution of the X-Pro 1 is really kind of disappointing to me, especially considering the cost. I have yet to see any full crops that show any benefit from the lack of the AA filter - the resolution is the same or worse than comparable 16MP sensors on the market, and that doesn't seem sensible - even accounting for the demosaicing, there *should* be more luminosity detail in these images than on a conventional sensor with filter, but I'm just not seeing it.

The high iso RAWs from the dpreview samples make me wonder too... they look great overall, but they also look processed - obviously not true RAW data, even when you look at them in silkypix with noise reduction and sharpening turned off. On any sensor you should see evidence of per-pixel voltage differences in high iso raw images, it's an inescapable effect of the technology. It's how much varience there is that determines how noisy the image looks, but it should always be visible that it's happening on a per-pixel basis, because that's simply how it works electronically. The high iso RAWs for the X Pro don't show this at all, they show a mottling pattern that varies from one area of the image to the next - clear signs of noise reduction.

It makes be wonder how much detail might be getting lost if these images aren't truly raw at all, but just processed images with extended color data. For the most part I love this camera and it's output, but right now it feels like Fuji has crippled it's "pro" aspect by providing such sub-par raw output.

Johan Borg said...

Fascinating posts, thanks!

The "half" conversion mode of RPP doesn't make much sense to me for the XP1, given the layout of the pixels. In fact, when I proposed the X-Trans layout last summer it was precisely because its natural downscale is 3:2, not 2:1. I realize my suggestion was rather naive, but I still wonder how much of the sensor's potential can be squeezed out of only half the pixel count:

http://forums.dpreview.com/forums/readflat.asp?forum=1000&message=38889859

Sandy said...

Johan,

Interesting that your posts talk about chroma subsampling in light of the level of chroma smearing ACR and SILKYPIX are showing. Makes you wonder....