in praise of RawTherapee, "Amaze" demosaicing algorithm

Started Jun 10, 2011 | Discussions
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
in praise of RawTherapee, "Amaze" demosaicing algorithm
Jun 10, 2011

"Pictus" pointed out that the Amaze de-mosaicing algorithm might help with color moire (false color) patterns that emerge at times from our no-AA antiAliasing filter Nex 3/5 cameras.

Copied RawTherapee ( http://rawtherapee.com/downloads ) into my PC, it doesn't really need to be "installed", it just runs immediately in whatever folder you copy it into. Nice.

Redeveloped an old raw file that had been processed and looked good. It had been developed using the AHD de-mosaicing built into Picture Window Pro. But now, re-ran it in RawTherapee using max (5-pass) false color suppression. Sharpening turned off. "Amaze" demosaicing algorithm selected. Result:

  1. False color moire patterns indeed 20% to 50% less noticeable, excellent.

  2. Surprisingly, final sharpness of image (after unsharp mask in Picture Window Pro) also better compared to AHD interpolation.

  3. Even more surprisingly, less noise with RawTherapee/Amaze, even though sharpness better.

Thanks, Pictus, for starting a good train of thought.

Amaze algorithm seems to (with perfect lens, tripod, ISO 200 etc) wring that last bit of clarity out of the Nex sensor that we've all suspected is there. Meaning pretty nice 3 foot diagonal enlargements, see sample image in next post.

Cautionary note that several places on web comment that the Amaze algorithm is not so ideal for noisy images.

RussellInCincinnati
Senior MemberPosts: 3,197
Like?
sample, "Amaze" demosaicing using RawTherapee
In reply to RussellInCincinnati, Jun 10, 2011

Reply   Reply with quote   Complain
jazzroy1972
Regular MemberPosts: 172
Like?
Re: sample, "Amaze" demosaicing using RawTherapee
In reply to RussellInCincinnati, Jun 14, 2011

maybe a before/after comparison would help in understanding what rawtherapee did.

Reply   Reply with quote   Complain
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
of course comparison needed: Amaze vs ADR. Here.
In reply to jazzroy1972, Jun 15, 2011

Silly of me to praise RawTherapee with Amaze demosaicer+RL Deconvolution special multi-pass, mild sharpening, as a raw file converter, with 5-pass false color suppression--without showing easy comparison with older ADR converters that most of us are probably (e.g. Picture Window Pro is) using.

In the sample photos below, hopefully presented at 100% size, are fragments of 4 versions of the Nex raw image file, arrayed above the full scene. The 4 snippets are demosaiced with either a quite typical ADR algorithm embedded into many a converter, or the newer "Amaze" demosaicing algorithm. The Amaze algorithm is available for example in the quite excellent freeware RT RawTherapee program.

  1. First photo on left, a standard ADR demosaiced, unsharpened photo.

  2. 2nd image from left, an Amaze demosaiced photo from RT, which has also been mildly sharpened by RT's "RL Deconvolution" option with its RT defaults. The "RL Deconvolution" to my eye does not do any of the haloing that is usually visible with traditional "unsharp mask" sharpening. RT was also set for the maximum 5 passes of false color suppression, which is intended to (and appears to in this example) get rid of many a speckled-red-and-blue moire pattern problem. As seen in the image of the pink textured awning at the top of the images. RT's moire suppression alone was enough convince me to switch permanently to RT for initial processing of all images.

  3. 3rd image from left, the standard ADR image after putting through a classic "Radius 1" unsharp mask.

  4. last image on right, the Amaze image after putting through a classic "Radius 1" unsharp mask.

Discussion

Will only add to your own judgement about image quality from the above samples, that RT with its various multi-pass algorithms took much longer (but less than a minute) to develop the raw image on my dual core, 2.4ghz PC laptop. Compared to the few seconds it took to do ADR de-mosaicing.

Reply   Reply with quote   Complain
boardsy
Senior MemberPosts: 2,204Gear list
Like?
Re: of course comparison needed: Amaze vs ADR. Here.
In reply to RussellInCincinnati, Jun 15, 2011

WOW! That's an incredibly impressive amount of clean detail pulled out by RT!

How/where do you set the "maximum 5 passes of false color suppression"? RT's "RL Deconvolution" is an either/or option with it's unsharp mask, which seems to have done a slightly better job here, right?

Alan

Reply   Reply with quote   Complain
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
think you're getting the "why use anything else" type idea
In reply to boardsy, Jun 15, 2011

Boardsy: How/where do you set the "maximum 5 passes of false color suppression"? [in RT Raw Therapee with Amaze demosaicing]

Well, in RT version 3.0b1.42 (which you may notice I was already quite comfortable with over 40 years ago):

Boardsy: RT's "RL Deconvolution" is an either/or option with it's unsharp mask

Yes. You can either choose under the "Detail" topic to have no sharpening, or have unsharp mask sharpening with a bunch of parameters that have never looked at (because am not using), or you can choose RL Deconvolution. Said Deconvolution default parameters work so well, that haven't yet looked at any of its many options either. With the defaults, have noticed both much better sharpness , and (how could this be, must have something to do with the overall settings of RT that I haven't messed with or understood yet) less noise than with ADR demosaicing in my Picture Window Pro raw converter.

By the way this is not to denigrate PWpro (or any other ADR algorithm photo editor), which is still an important component of my workflow for every single picture. And e.g. am expecting to see the Amaze algorithm make its way into all photo editors eventually.

Boardsy:

[RL Deconvolution mild sharpening] which seems to have done a slightly better job here, right?

Ah, fun topic, that for some reason none of my family or friends care to discuss at any length.

RL Deconvolution, when used with the RT default settings, seems to just sharpen the image with very little "haloing" or exaggerating of fine detail edges. It just makes a dark/light edge crisper, without actually boosting up the light edge with a fine white line, and darkening the dark edge, the way unsharp mask does.

So you can run RT as my sample images showed, with just RL deconvolution, and have a pretty sharp (well sort of subtly sharp) image. In the full resolution .TIFF master output. My suggestion is to edit that TIFF image, and resize it for some certain purpose, then apply the ideal-strength, standard unsharp mask to that resized photo to make a final print.

The relevant point here is that if you ask for unsharp masking of the first master image to come out of RT, there will a bit of haloing that makes the master not so ideal for further unsharp mask for some final size and purpose.

Whereas the RL Deconvolution sharpening is subtle enough that it does not interfere with later unsharp masking, a pleasant situation indeed.

Put more shortly, RL Deconvolution can sharpen a picture more without producing hard-to-manage artifacts than unsharp masking can. Maybe unsharp masking can make an ultimately sharper looking photo, but if it did so (say on your max res master copy) you sure wouldn't be able to then resize that photo and/or do more sharpening on it.

This all started with looking for moire suppression, was not looking for more detail. But after just a few days, am not sure why anyone would want to develop raw files with a lesser algorithm, once you know about RawTherapee with Amaze and RL Deconvolution. Unless time is of the essence in your workflow. Nice suggestion, Pictus.

Reply   Reply with quote   Complain
Clicked
Forum MemberPosts: 64
Like?
RawTherapee looks promising, but unfortunately no good results with ARW on Linux Mint
In reply to RussellInCincinnati, Jun 15, 2011

I've tried to get RawTherapee working with the Nex .ARW files, but unfortunately there is no way to get a normal look. The difference with JPEGs is huge, colours are completely off, and RawTherapee's forum doesn't offer any solution.

Good to see that on Windows things are fine, but seeing as it's free software, I thought it might be good to mention that there are still major Linux issues, in any case on Ubuntu-like distro's.

Carry on

Reply   Reply with quote   Complain
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
Raw Therapee's not doing well on your Linux box?
In reply to Clicked, Jun 15, 2011

My sole experience is with a Windows PC, interesting to hear you find RT Raw Therapee unusable on Linux. Wonder if you went to some other person's linux box, where they were successfully running a good photo editor, and installed RawTherapee on that box, if it would be just as wildly wrong as it is on your machine.

After verifying problems on a second Linux box...at this point, considering how much money's been spent on my entire stable of photo stuff, if I was in your shoes and had to run Linux, I would go out and buy a cheap, used PC with a crummy monitor, Windows XP and a gigabyte of RAM and a USB port. Just to run RT as the first step in dealing with my images. Have no need for an accurate monitor on my RT box, because all'd be doing with it is demosaicing, pre-sharpening and maybe chromatic aberration correcting. Then would copy those images to my Linux box for all the rest of my editing.

Reply   Reply with quote   Complain
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
another AHD versus Amaze demosaicing comparison
In reply to RussellInCincinnati, Jun 25, 2011

Of interest to some of the more technical forum contributors might be the way that different Raw (or JPEG for that matter) demosaicing algorithms can have a huge effect on a lens's ability to crisply image fine detail.

Here's a 100% crop comparison of the Amaze demosaicing algorithm on top, versus the more typical AHD demosaicing.

The slightly unsettling thing to me is that a few weeks ago, I would have sworn that the top photo was taken with a much sharper lens than the bottom photo. But of course it's simply the same .ARW raw image file, "developed" in two different ways. Both images received, as a final step, the same radius 1 unsharp masking (i.e. a typical kind of sharpening of a photo at its final display size).

Am saying it's unsettling because many of us spend a good deal of time noticing the difference in fine detail rendering among various lenses. But it appears that as you get down to the finest levels of detail, you should not be 100% confident that differences you see in images are really due to the "lens's image quality".

Am not saying that all lenses are the same. And of course if you look at the corners of single image, and compare the clarity with the center of the same image, you can make fair statements about the lens's overall resolution consistency.

But we are on much shakier ground when we try to compare resolution or contrast or color rendering of cameras and/or lenses via sample photos, when the exact post-processing details may also vary across the different images.

Reply   Reply with quote   Complain
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
addendum: Amaze and RL Deconvolution pre-sharpening
In reply to RussellInCincinnati, Jun 25, 2011

In previous post's discussion, as here, the comparison was AHD demosaicing followed up radius 1 unsharp mask final sharpening, for the bottom image.

Compared with Amaze demosaicing plus RL Deconvolution presharpening, in Raw Therapee. Followed by the same radius 1 unsharp mask final sharpening, all for the top image. The test photos are of a New Yorker magazine advertisement halftone image.

Reply   Reply with quote   Complain
nopt
Forum MemberPosts: 85
Like?
RawTherappe on linux here.
In reply to Clicked, Jun 25, 2011

Clicked wrote:

I've tried to get RawTherapee working with the Nex .ARW files, but unfortunately there is no way to get a normal look. The difference with JPEGs is huge, colours are completely off, and RawTherapee's forum doesn't offer any solution.

Good to see that on Windows things are fine, but seeing as it's free software, I thought it might be good to mention that there are still major Linux issues, in any case on Ubuntu-like distro's.

Carry on

Hi Clicked, I haven't really encountered any issues like that, but then I use RAW only. I'm using it on Fedora 14. I think the controls are all there to achieve the same look as jpegs. If you'd like, you could upload a RAW and accompanying jpeg. I wouldn't mind giving it a whirl and sharing the results.

Cheers.

Reply   Reply with quote   Complain
GaryW
Veteran MemberPosts: 7,258Gear list
Like?
Re: addendum: Amaze and RL Deconvolution pre-sharpening
In reply to RussellInCincinnati, Jun 25, 2011

RussellInCincinnati wrote:

In previous post's discussion, as here, the comparison was AHD demosaicing followed up radius 1 unsharp mask final sharpening, for the bottom image.

Compared with Amaze demosaicing plus RL Deconvolution presharpening, in Raw Therapee. Followed by the same radius 1 unsharp mask final sharpening, all for the top image. The test photos are of a New Yorker magazine advertisement halftone image.

The unsharp mask of 1 is too much, especially for the top photo, at least. The RL Deconvolution sharpens all by itself. You may not need any further sharpening. But if it's already sharp and you insist on sharpening, try a .5 radius first. The top photo looks like it's buzzing a bit too much for my taste. But it is sharp.

-- hide signature --

Gary W.

 GaryW's gear list:GaryW's gear list
Sony Alpha NEX-6 Sony E 16-50mm F3.5-5.6 PZ OSS Sony E PZ 18-105mm F4 G OSS Sony Cyber-shot DSC-V3 Sony Cyber-shot DSC-HX5 +12 more
Reply   Reply with quote   Complain
D Cox
Senior MemberPosts: 8,748
Like?
Re: sample, "Amaze" demosaicing using RawTherapee
In reply to RussellInCincinnati, Jun 25, 2011

Much better skin texture than last time you posted this portrait, I think.

If you can remember which thread it was posted in before, we can do a direct comparison.

Reply   Reply with quote   Complain
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
point of the posts is demosaicing *differences*
In reply to GaryW, Jun 26, 2011

GaryW: The unsharp mask of 1 is too much, especially for the top photo, at least. The RL Deconvolution sharpens all by itself. You may not need any further sharpening. But if it's already sharp and you insist on sharpening, try a .5 radius first. The top photo looks like it's buzzing a bit too much for my taste. But it is sharp.

Yes, now that you mention it, the top photo in my post yesterday of the magazine halftone is a bit "buzzy". I appreciate your hint Gary, and will experiment with a smaller sharpening radius. Hmm, that's a fragment of a 1 meter wide enlargement on my monitor, would it still be buzzy at any normal print/display size?.

Anyway, the overall point of interest in this thread is not to show a workflow that is "good" in any absolute sense. Rather it's to show the difference between AHD demosaicing in my quite typical Picture Window Pro program, versus Amaze demosaicing+RL Deconvolution in Raw Therapee. Is there a difference in apparent sharpness, or fine detail, even though both programs' images were put through the same final unsharp masking? Apparently yes.

Maybe I should have just stuck with my original quite clear comparison a few weeks ago (that included RL Deconvolution for the Amaze images) and left it at that, even though that picture was not taken under well-controlled conditionn For some reason had mis-spelled AHD demosaicing as "ADR algorithm" in the picture labels:

Adopting RT Raw Therapee has been for me like getting a whole new set of lenses. And along with RT's 5-pass false color suppression routine, as shown above, it's solved maybe half of Nex moire problems. Without blurring anything.

By the way RL Deconvolution sharpening (am thinking of it as "pre-sharpening", since it does not sharpen so much as to screw up later resizing of an image) is faintly related to the technology involved in the new "lightfield camera", mentioned in another contemporaneous thread of this Sony Nex forum.

Put another way, let's say you like the image quality step-up from bothering to process raw images, rather than accepting Sony in-camera JPEGs. If so, then am suggesting/showing there's a similar jump up in quality to go from most raw file processors, without the newish AHD demosaicing, to Raw Therapee, with its Amaze demosaicing+RL Deconvolution.

If you don't mind spending 1 minute processing each raw file, on a dual core 2.1 gigahetz Intel box. RT does support multiple CPUs (e.g. dual or quad core) well.

Reply   Reply with quote   Complain
D Cox
Senior MemberPosts: 8,748
Like?
Re: point of the posts is demosaicing *differences*
In reply to RussellInCincinnati, Jun 26, 2011

"If you don't mind spending 1 minute processing each raw file, on a dual core 2.1 gigahetz Intel box. RT does support multiple CPUs (e.g. dual or quad core) well."

Well, it's a stop-gap for a year or two until Sony finally bring out sensors with full-colour pixels. Then all this heavy calculation for demosaicing will no longer be needed.

In the mean time the results are quite good.

Reply   Reply with quote   Complain
GaryW
Veteran MemberPosts: 7,258Gear list
Like?
Re: point of the posts is demosaicing *differences*
In reply to D Cox, Jun 26, 2011

D Cox wrote:

"If you don't mind spending 1 minute processing each raw file, on a dual core 2.1 gigahetz Intel box. RT does support multiple CPUs (e.g. dual or quad core) well."

Well, it's a stop-gap for a year or two until Sony finally bring out sensors with full-colour pixels. Then all this heavy calculation for demosaicing will no longer be needed.

They still haven't brought us PD on-chip. It might be longer than a year or two, and that's assuming that they can keep up the pixel count....

In the mean time the results are quite good.

-- hide signature --

Gary W.

 GaryW's gear list:GaryW's gear list
Sony Alpha NEX-6 Sony E 16-50mm F3.5-5.6 PZ OSS Sony E PZ 18-105mm F4 G OSS Sony Cyber-shot DSC-V3 Sony Cyber-shot DSC-HX5 +12 more
Reply   Reply with quote   Complain
GaryW
Veteran MemberPosts: 7,258Gear list
Like?
Re: point of the posts is demosaicing *differences*
In reply to RussellInCincinnati, Jun 26, 2011

RussellInCincinnati wrote:
...

Yes, now that you mention it, the top photo in my post yesterday of the magazine halftone is a bit "buzzy". I appreciate your hint Gary, and will experiment with a smaller sharpening radius. Hmm, that's a fragment of a 1 meter wide enlargement on my monitor, would it still be buzzy at any normal print/display size?.

Why bother with deconvolution or any sharpening then, if you're not going to zoom in on that level of detail? I'm just saying, if you're going for the best pixel-level resolution, don't overcook the sharpening and mess it up. And it might get a bit visible at a lower resolution/print... perhaps not as something very obvious, but just giving it an "off" look, but I can't say that I've tried to make the comparison.

Anyway, the overall point of interest in this thread is not to show a workflow that is "good" in any absolute sense.

That's fine, but I take opportunities to try to get people to think about sharpness, as most people overdo it, IMHO.

Rather it's to show the difference between AHD demosaicing in my quite typical Picture Window Pro program, versus Amaze demosaicing+RL Deconvolution in Raw Therapee.

But I think comparing workflows is fair. If you force yourself to add more sharpening where it is not needed, it's still not its best. Maybe utilize each technique to get its best out of it. I like to make comparisons of real-world, this-is-how-I-would-do-it over perfectly-and-arbitrarily-"fair". But as long as you are clear that you're just forcing an equality of procedure to prove a point, that's OK, but since deconvolution is just another kind of sharpening, I'm not sure you really have to run it through the separate sharpening technique. As I said, if you really think it needs touching up, I'd try a small radius. Often I find deconvolution to be sufficient.

Is there a difference in apparent sharpness, or fine detail, even though both programs' images were put through the same final unsharp masking? Apparently yes.

Maybe I should have just stuck with my original quite clear comparison a few weeks ago (that included RL Deconvolution for the Amaze images) and left it at that, even though that picture was not taken under well-controlled conditionn For some reason had mis-spelled AHD demosaicing as "ADR algorithm" in the picture labels:

Adopting RT Raw Therapee has been for me like getting a whole new set of lenses. And along with RT's 5-pass false color suppression routine, as shown above, it's solved maybe half of Nex moire problems. Without blurring anything.

I agree -- using RAW and taking that extra time is well worth it, at least for shots that matter.

I also like DxO for its noise handling. I find it superior to the free RAW converters. It has its own deconvolution, but only for certain lens/camera combinations, unfortunately.

By the way RL Deconvolution sharpening (am thinking of it as "pre-sharpening", since it does not sharpen so much as to screw up later resizing of an image) is faintly related to the technology involved in the new "lightfield camera", mentioned in another contemporaneous thread of this Sony Nex forum.

It can extract a bit of detail where you though there wouldn't be any more to get. You can definitely overcook deconvolution, though. It's not a cure-all.

On the other hand, normal sharpening is easily overcooked and messes up your low-level detail.

Put another way, let's say you like the image quality step-up from bothering to process raw images, rather than accepting Sony in-camera JPEGs. If so, then am suggesting/showing there's a similar jump up in quality to go from most raw file processors, without the newish AHD demosaicing, to Raw Therapee, with its Amaze demosaicing+RL Deconvolution.

If you don't mind spending 1 minute processing each raw file, on a dual core 2.1 gigahetz Intel box. RT does support multiple CPUs (e.g. dual or quad core) well.

-- hide signature --

Gary W.

 GaryW's gear list:GaryW's gear list
Sony Alpha NEX-6 Sony E 16-50mm F3.5-5.6 PZ OSS Sony E PZ 18-105mm F4 G OSS Sony Cyber-shot DSC-V3 Sony Cyber-shot DSC-HX5 +12 more
Reply   Reply with quote   Complain
ck3
ck3
Senior MemberPosts: 2,758
Like?
Let me be the odd man out
In reply to RussellInCincinnati, Jun 26, 2011

While the amaze algo seems indeed to bring out more detail (at least when viewed at 100% magnifictaion), it also seems to produce artifacts in shadow areas (lower-midtones even)as well as some jaggies, and doesn't really seem to like sharpening very much (which is why it probably shouldn't be compared to an unsharpened conversion using a different algorithm).

I wonder if the differences in detail between amaze and AHD are still visible at more practical magnifications (be it on a print or downsampled for common display sizes) - and hence whether the time spend processing the images is worth it.

With inspecting pictures at 100% it sometimes happens that we miss the wood for the trees

Reply   Reply with quote   Complain
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
interesting, post-processing simplification from full-color sensor
In reply to D Cox, Jun 26, 2011

D Cox: Well, it's a stop-gap for a year or two until Sony finally bring out sensors with full-colour pixels. Then all this heavy calculation for demosaicing will no longer be needed.?

Yes, suppose future hardware advances will also simplify software, particularly full-color sensors. Will be interesting to see what the final advantages are, at each level of chip technology, between having a smaller number of full color pixels, or a larger number of the common "Bayer sensor" R,G,B pixels.

For example, even without full-color pixels, demosaicing can also get real simple when our small sensors reach 32 megapixels and up. Because then you have the option of taking a 2x2 array of R,G,B pixels from the original file, each array holding 2 green pixels, 1 red, and 1 blue, and calculating an overall color for the group, and putting out an 8 megapixel result file. And of course the noise level goes down when you average the results of, for example, 2 green pixels, to get 1 green value for the array. Then when we get 64 etc megapixel cameras, we'll be able to put out a 16 etc megapixel result file with that simple "binning" algorithm.

Hmm, the implication is that we can do simple binning of our current Nex raw files and have an almost 4 megapixel result image. Perhaps a bit too crude for the taste of someone who's bothered to buy a Nex.

Reply   Reply with quote   Complain
RussellInCincinnati
Senior MemberPosts: 3,197
Like?
great question: why care about huge magnification?
In reply to GaryW, Jun 26, 2011

GaryW: Why bother with deconvolution or any sharpening then, if you're not going to zoom in on that level of detail?

Great question. Much enjoying these kinds of arguments. You have made it obvious that the thing to do to make a useful forum demonstration, is run the same file through Raw Therapee, with Amaze+RL Deconvolution, and then again with typical AHD demosaicing, then resize the output to a reasonable size , and display results. Will go offline and do so immediately, this is fun.

Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads