Tuesday, November 20, 2012

0 Comments
Posted in Arrangement, Art, Business

FujiFilm RAF/RAW Process Interactive Comparison.


Just a small follow up on all the RAW experimentation I've been doing with the FujiFilm X-Pro1 RAF files.

Here's an interactive mouseover table to see the differences. Areas too look for are in the wood grain (you'll see a lot of colour or chroma noise in the different examples), Smearing of details (look at the texture of the walls to see how it gets smeared and creates the water colour effect), Aliasing issues (look on hard contrast edges to see a zipper aliasing effect), and lastly loss of details (in the red brick you'll see the various levels of details in the pores of the brick).


Mouse over the links below to swap. Click on the links to view 100% (opens into new window)

Some quick comments:

DCRAW 9.16: Gives the highest details, however has aliasing artifacts. Some chroma noise (even after filtering). Command line prompt only. Requires some technical know how. I use VNG interpolation and 15 pass median filtering.

1/2 Median: Is the filtering I apply to DCRAW to combat the aliasing artifacts. Requires a program that has Median filtering, and very process intensive.

Raw Photo Processor (RPP 4.7): Utilizes a proprietary method that seems similar to DCRAW but I haven't confirmed what extraction library it uses (I early assumed that it was DCRAW because every function that I've done in the program can be done with precisely the same results in woring with DCRAW directly). Works very well for details, but aliasing and chroma noise is high. The technique of 15 passes of median averaging in DCRAW clears up more chroma noise than what is produced by this program.

Graphic Converter (Patched): Patched with DCRAW 9.16 gives very similar results to RPP however this program is much friendlier to use than RPP and has some real nice post processing options. Could almost be used as an all in one solution.

In Camera JPG: The default standard. Still exhibits some detail smearing compared to something like DCRAW output, but has no aliasing or chroma noise artifacts.

SilkPix Developer Pro 5: The software that is part of Fuji's RAW processing uses an older SilkyPix engine. This current version is very clean however does show some chroma smearing (look at the green colour that appears under the window ledge and the loss of other colours). Shows very little chroma noise and no real aliasing errors. Very clean output and slightly softer than raw DCRAW output, but lot less aliasing even over the 1/2 Pixel Median filter. I would highly recommend this option if it weren't for the fact that the cost of the software is pretty high. 

FujiFilm Raw File Converter: This software bundled with the camera uses an older SilkyPix engine. It does a pretty good job, but the interface is very difficult to use and understand. Compared to the latests version of SilkPix it exhibits chroma noise and some detail smearing.

Lightroom 4.3: Has low amounts of chroma noise, but very heavy detail smearing. Loss of details but no aliasing artifacts. Even at 100% it's hard to see the 'Watercolour' effect if you don't know what to look for. I suspect a very heavy pre-demosaic median filter and bicubic interpolation algorithm is the cause of the issues. However it's still one of the easiest to use, and if you can handle some of the image quality loss, most likely won't notice the detail loss.


Friday, November 2, 2012

0 Comments
Posted in Arrangement, Art, Business

Super Detail with FujiFilm X-Pro1 RAF files and 1/2 pixel Median Filtering

This is my follow up from my original article: http://frontallobbings.blogspot.ca/2012/09/squeezing-maximum-out-of-fujifilm-x-pro1.html

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.

Super Detail - with 1/2 pixel Median filtering
Original

The Process
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)
7. Save.

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 No Sharpening vs DCRAW with custom processing
ACR vs my custom approach. Click on the image to see the differences.
In terms of Adobe Camera RAW, their approach is much different than the other two. Their interpolation algorithms are based on some sort of bilinear approach. This results in no zipper or aliasing artifacts and less chroma smearing, but it creates the dreaded watercolour effect when sharpened and a significant loss of detail. I was able to recreate this by doing a bilinear interpolation in DCRAW with the RAF files and then do a median filtering on it. Sadly, unless Adobe reengineers their RAW processing engine, I do not think we'll see a better version for some time from them. It means I don't recommend using Adobe Camera RAW to process the files if your'e hoping for maximum details.

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.