Jonathan's World
Musings on technology and photography.
Thursday, 31 July 2014
Windows support for M240 Lightroom plugin
I've just released an update to my Leica M240 Lightroom plugin which now enables it to run on Windows as well as Mac. You can download it from my downloads page.
Thursday, 24 July 2014
Lightroom Plugin for M240 Shadows processing
In my previous post I described how I had developed a program to process Leica M240 raw files in order to compensate for the colour casts that are seen when pushing the shadows in post processing:
Following on from that I have now developed a Lightroom plug-in that enables easy processing of M240 raw files, which you are free to download and use: from my downloads page
There are configuration options that allow you to define how the output files are added back into your current Lightroom catalog. You can either keep them in the same folder as your originals (optionally stacking with the original):
Or in a sub folder of your choice below the original:
The current version of this plugin is effective for processing images taken at ISOs below 1000; it is safe to run on higher ISO images but is unlikely that you will see any real benefit on those high ISO files.
I'd be pleased to hear feedback if you find the plugin useful, or have any suggestions on improvements that could be made.
Following on from that I have now developed a Lightroom plug-in that enables easy processing of M240 raw files, which you are free to download and use: from my downloads page
There are configuration options that allow you to define how the output files are added back into your current Lightroom catalog. You can either keep them in the same folder as your originals (optionally stacking with the original):
Or in a sub folder of your choice below the original:
The current version of this plugin is effective for processing images taken at ISOs below 1000; it is safe to run on higher ISO images but is unlikely that you will see any real benefit on those high ISO files.
Tuesday, 1 July 2014
M240 shadow correction in landscape images
In my previous post I introduced how I process Leica M240 images to tackle the 'green shadows' seen when pushing exposure in post processing.
One of my main uses for this technique is to extend the usable dynamic range of landscape images. Here we are often dealing with shadow areas with significant green vegetation. How well does the raw processing technique work on an image with prominent green areas, and is it still worthwhile?
I'm finding that there is a noticeable improvement, not just in removing a green cast but also making those shadow areas less artificial looking.
This is an under exposed photo where I wanted to preserve detail in the sky (I could have let the exposure go a little higher):
After applying the following adjustments:
- exposure (+1 stop)
- highlights (-44 to compensate for the exposure adjustment)
- shadows (+100 this is the significant push to the image)
Applying the same adjustments to the processed raw file shows a much better result:
The effect may not be too great on small web previews, but I hope you can see how much better the processed image is. Its a good basis from which to make final adjustments.
Examining the left hand side in more detail:
The effect may not be too great on small web previews, but I hope you can see how much better the processed image is. Its a good basis from which to make final adjustments.
Examining the left hand side in more detail:
In the original on the left you can see the green cast over most of the hedge. There's a significant improvement to the processed image, notice the shades of brown that have now appeared on the branches in addition to the loss of the sickly green cast. Remember that the right hand image only took a few seconds in Lightroom to adjust exposure and shadows, no iterative fiddling with tone curves was needed.
Fixing the Leica M240 green shadows
Background
An added bonus
Whilst developing the program I also noticed that often in deep shadows the red channel in the raw file was clipped, whilst there was still useful data in the green and blue channels. It struck me that I could make an attempt to recover the lost detail in the clipped channel in much the same way that highlight recovery works to fill in structure from the non-clipped highlights. So I added a nearest neighbour interpolation to recover the lost shadow detail, plus a small amount of normal distribution noise to smooth/mask blotches in the deepest recovered shadows.
Does it work?
Definitely! Here's a quick couple of examples. Firstly, here is a comparison of an image pushed by 5 stops in Lightroom, the left image is the original DNG file and the right hand image is processed raw file:
Underexposing by a further stop means we are running out of adjustments in Lightroom, so with a 5 stop push plus 100% shadows adjustment we get from an image that was 6 stops underexposed:
This is a really extreme case but even this shows a significant improvement in recovered image quality.
And one more, this is even more underexposed (it needed exposure +5, shadows +100% plus a tone curve in Lightroom). A 50% crop from a dark corner:
Yes its very noisy, but the colour cast problem is very effectively dealt with. My intention with real life images is not to have to push them quite this far, but it always good to know that the processing is capable of extracting the maximum from the image.
The Leica M240 camera exhibits discolouration (usually a green cast) in the shadows when images are push processed. Jim Kasson on his excellent blog spent some time investigating this issue and his summary http://blog.kasson.com/?p=3343 describes the problem in a nutshell:
The M240 exhibits nonlinear response at ISOs 200, 400, and 800, artificially depressing darker tones. The darker the tone, the greater the depression. In my previous noise floor tests, I saw the noise floor to be artificially depressed at these ISOs.
and:
This is probably the cause of the green shadows, since in most lighting conditions, for most subject matter, the green channel is the strongest. Depressing all the channels nonlinearly leaves the green channel the last one standing, so to speak.
Because of the above, the green channel shadow shift is probably more accurately characterized as a shadow shift in the direction of the highest-valued raw channel.
From my experience I believe that Jim's analysis is spot on.
The idea
Now its perfectly possible to adjust an individual image in Lightroom or Photoshop to tune out the green cast reasonably effectively, however because this correction is occurring after the image has been demosaiced (and the non-linear gain error occurs in the mosaic data), you need different adjustments for each image.
Inspired by Jim's work I realised that if one could apply gain correction to the mosaic data in the raw file it should be possible to correct all images with one set of adjustments. This means in theory I could simply preprocess any files that were going to be significantly pushed or shadow recovered and not have to make individual colour correction adjustments on each image.
Luckily, processing M240 raw files is made a bit easier by the fact that the M240 uses the DNG format and Adobe make a source code DNG library available free in order to encourage adoption of the DNG format. So its possible to write a program that reads a M240 raw file, applies linearisation corrections each channel and then writes an output DNG file ready to load into Lightroom:
The idea
Now its perfectly possible to adjust an individual image in Lightroom or Photoshop to tune out the green cast reasonably effectively, however because this correction is occurring after the image has been demosaiced (and the non-linear gain error occurs in the mosaic data), you need different adjustments for each image.
Inspired by Jim's work I realised that if one could apply gain correction to the mosaic data in the raw file it should be possible to correct all images with one set of adjustments. This means in theory I could simply preprocess any files that were going to be significantly pushed or shadow recovered and not have to make individual colour correction adjustments on each image.
Luckily, processing M240 raw files is made a bit easier by the fact that the M240 uses the DNG format and Adobe make a source code DNG library available free in order to encourage adoption of the DNG format. So its possible to write a program that reads a M240 raw file, applies linearisation corrections each channel and then writes an output DNG file ready to load into Lightroom:
Whilst developing the program I also noticed that often in deep shadows the red channel in the raw file was clipped, whilst there was still useful data in the green and blue channels. It struck me that I could make an attempt to recover the lost detail in the clipped channel in much the same way that highlight recovery works to fill in structure from the non-clipped highlights. So I added a nearest neighbour interpolation to recover the lost shadow detail, plus a small amount of normal distribution noise to smooth/mask blotches in the deepest recovered shadows.
Does it work?
Definitely! Here's a quick couple of examples. Firstly, here is a comparison of an image pushed by 5 stops in Lightroom, the left image is the original DNG file and the right hand image is processed raw file:
Note the green cast to the grey card and in the color checker the second from darkest grey square. In the full size image the green cast is even more obvious, yet most is removed by the processing.
Underexposing by a further stop means we are running out of adjustments in Lightroom, so with a 5 stop push plus 100% shadows adjustment we get from an image that was 6 stops underexposed:
And one more, this is even more underexposed (it needed exposure +5, shadows +100% plus a tone curve in Lightroom). A 50% crop from a dark corner:
Subscribe to:
Comments (Atom)










