Super Detail with FujiFilm X-Pro1 RAF files and 1/2 pixel Median Filtering
If you're not familiar with the unconventional filter that is used by the FujiFilm X-Pro1, then I recommend this read first: http://www.fujifilm.eu/uk/products/digital-cameras/pro-enthusiast/model/x-pro1/features/fujifilm-x-trans-sensor-technology/
So after playing with this for weeks, I believe this is probably the maximum that we can get out of the Fuji RAF files until the other developers come up with better understanding of the unique X-Trans CMOS sensor
Now this is still not the most ideal workflow for most people. Pixel Peeping aside, the Fuji X files are fantastic, even in Adobe Lightroom. My goal in this was to get a better understanding of what is going on. I wish I knew how to program, because I'd love to create a simpler way to do this. If there's anyone out there that is interested in taking what I've done and turning into a nice little drag and drop application, I think you'd get a lot of fans.
1. Using command line DCRAW: dcraw -a -H 0 -o 4 -q 1 -f -m 15 -g 2.4 12.9 -6 -T
2. Convert TIFF file to LAB file in Photoshop
3. Resize image 200% with Bicubic Smoother
4, Select Lightness Channel under channel panel.
5. Select Median filter under Noise in Filter. Select 1 pixel
6. Resize image 50% with Bicubic Sharper (Nearest Neighbour is actually a more subtle effect which I kind of prefer)
Notes During my experimentation I uncovered a better understanding of what is going wrong with the RAW processing of the files and some assertions and speculations I can make.
SilkyPix and RPP both process very similar files and although I know for certain that RPP uses DCRAW, SilkyPix I believe is a proprietary RAW engine. What I do speculate is the chroma smearing is a result of interpolation errors. Much of it can be suppressed with chroma noise reduction without loss of image quality. However one of the big nagging issues was this 'zipper' aliasing that was happening. After analyzing the files, it seems specifically the red sub-pixels are causing much of this zipper effect, but also part of the interpolation issues. I was able to get rid of a good portion of the chroma smearing by doing 3x3 multi-pass median filtering through DCRAW.
|ACR vs my custom approach. Click on the image to see the differences.|
What the DCRAW?
DCRAW is a command line raw processor that RPP and many others use. Great for those who are comfortable with command line prompt editing, but not for the faint of heart. It requires some installation know how and in my case I had to compile the DCRAW 9.16 for my computer to work properly. Installing the binaries into local/bin was the next step and then the rest is above.
An explanation of the DCRAW commands that I mentioned:dcraw -a -H 0 -o 4 -q 2 -f -m 15 -g 2.4 12.9 -6 -T
-a specifies WB calculation, you can also use -w
-H 0 clips all highlights to solid white (default), You can use -H 2 but will need to correct for it afterwards.
-o 4 saves it in ProPhoto RGB
-q 1 is VNG Interpolation, I found this worked best
-f Interpolates RGB as four colours and eliminates some artifacts in the interpolation
-m 15 is the median filter passes. I found 15 was the minimum that was needed to remove the most amount of chroma smearing. 10 works well too for faster processing, and 20 is just unnecessary as there were no benefits there.
g 2.4 12.9 is the gamma settings I chose. I found this worked best for me
-6 writes the file as 16 bits per colour
-T writes the file as a TIFF
Why 1/2 pixel Median Filtering?
DCRAW clearly produces the best results, but has zipper aliasing issues. This is very apparent in RPP produced files. There are no settings that I can find in that program to combat this, so in using the same processing engine, my approach also enabled DCRAW to do a 3x3 Median filter to the R-G and B-G channels. But it doesn't rid all the issues. By using Photoshop, converting the file to a LAB based TIFF, I then used Median filtering in photoshop to rid of the zippered effects only in the Lightness channel. However you can't do 1/2 pixels in Photoshop. Initially I tried to do this with 1 pixel, but it lost a significant amount of details in textures. I decided to resize the image by a factor of 2, apply the 1 pixel Median filter, then resize it back down to the original size. This got rid of the aliasing artifacts that result in DCRAW or RPP produced images.
Have I gone blind yet?
Probably! Pixel peeping is a sickness, however my goal wasn't just to squeak every detail out of the files. It was more to prove that claim that FujiFilm says that this rivals full frame cameras at a much lower pixel count and no antialiasing filter. I would agree in principal about this especially after my exercise.
If you process your files this way, I have no doubt in my mind that you could print or resolve a file just as well as a 36MP Bayer Mosaic based sensor. Because of the nature of a 2x2 pattern of those cameras, even without anti-aliasing filters, resolution will be lost when you need to deal with aliasing issues. This isn't exclusive to moire problems. A median filter has to be applied or the image looks too digital.
Lastly, if you read this far, thank you and sorry if your'e still scratching your head trying to understand what has been said here. I welcome other thoughts to my experimentation, and always welcome feedback to my efforts.
I didn't mention this initially in this article, but if you're on a Macintosh environment this process is made simplier by downloading this fantastic front end called RAWker raifra.fh-friedberg.de/Mac/index-en.html
I've set it up in the application preferences to do a 15 pass median filter on all images that come in there. RAWker is a great substitute for those on Macintosh that doesn't want to use command line and requires only the installation of the program.