Jump to content

Correcting the green shadows


Guest JonathanP

Recommended Posts

Advertisement (gone after registration)

This is how 5 stops underexposure looks. Actually incredible that you can make a good picture of it in post.

Jonathans result at 50% on the darkest patches. With a little help from Lightroom.

This sensor deserves the best treatment in the pipeline because it is good.

 

Herb

Welcome, dear visitor! As registered member you'd see an image here…

Simply register for free here – We are always happy to welcome new members!

  • Like 2
Link to post
Share on other sites

50% crop -5 stops

Welcome, dear visitor! As registered member you'd see an image here…

Simply register for free here – We are always happy to welcome new members!

  • Like 1
Link to post
Share on other sites

Jonathan,

After closer inspection of the color patches made with the ColorChecker and comparing the -5 stops image with and without your plugin there seems to be a side effect.

Or maybe it is the (intended?) side effect of Leica's choice of surpressing shadow noise which result in green shadows but maybe (maybe!) also in smoother skies.

In the darkest blue patch I can see magenta blotches in the image with green shadow correction. The plain Leica version is not smooth but free of magenta blotches.

Also it looks as if a slight tendency of banding in dark blues gets more visible in the corrected image. It might be the case that dark blue skies will look cleaner in the plain Leica files.

But sofar I have not any proof of this in actual images.

It is still very hard to believe that Leica just went for green shadows instead of a bit of noise and banding in the darkest shadows only.

Anyway your plugin and the work of Jim Kasson is still terrific and an eye-opener.

Best,

Herb

Link to post
Share on other sites

Guest JonathanP

Hi Herb,

 

It is possible that any banding may become slightly more noticeable as there is a small compression of the shadows dynamic range (as pointed out by brusby earlier - sorry I should have noticed and responded). The algorithm has to lift the lowest values to correct the roll-off, the curve applied is like my exaggerated, simplified diagram attached - an input pixel value of 0 is raised to 4 (out of 16384 max) and there is no correction for any pixel values above 400. But of course we are dealing with integer pixel values and although I do floating point maths on the correction and then convert to integer at the last moment, at such low numbers the jump from one integer to the next may be visible.

 

The magenta blotches may also be due to the integer rounding of such small values or the black level clipping recovery. I do want to have a go at improving the latter - it is a bit of a trade off of processing time vs performance.

 

Anyway, thanks for the feedback, thats really useful. I do wish that Leica had done whatever they wanted to the jpeg images but kept the raw files as linear as possible (lens corrections not withstanding), but at least we can make some corrections and I'm finding it of help on real world images.

 

Jonathan

Welcome, dear visitor! As registered member you'd see an image here…

Simply register for free here – We are always happy to welcome new members!

  • Like 1
Link to post
Share on other sites

  • 3 months later...
Guest JonathanP
Is it possible to make this plug-in work with M8 files?

 

Hello,

 

I'm not sure the same problem exists with the M8 or M9; the M240 has a non-linear response for very small pixel levels which is the cause of the green shadows. I've not heard of anyone commenting on the issue with either of the CCD cameras and don't have one to test, but would be happy to help if it turns out to be a problem.

 

Jonathan

Link to post
Share on other sites

  • 8 months later...
Guest JonathanP

Just a quick heads-up for anyone using my M240 'green shadows' Lightroom plugin to let you know a new version is now available.

 

The previous versions used a single correction algorithm that was optimised for ISO200 but was not very effective for higher ISOs. I always felt it should be possible to get better performance particularly around the mid ISOs 400-800. So I set about converting the application to use individual look-up tables for each ISO. That was the easy part, but how do you build all the correction curves? Faced with the daunting task of hand crafting corrections for ISO400 to 3200, I decided to try and measure the response roll-off, but how to do this without specialist test equipment? After mulling over several ideas, I realised that if I could make the assumption that for 'normal' exposures the camera response could be considered linear (there's not been any evidence found of rogue colour casts at higher pixel values) then I could compare the response of the camera at each ISO for a normally exposed image and one that was deliberately underexposed by 5 to 6 stops.

 

I used a 20step Q14 greyscale chart:

 

Welcome, dear visitor! As registered member you'd see an image here…

Simply register for free here – We are always happy to welcome new members!

 

and a B&W 6stop ND filter. Starting at ISO200 I setup the camera on manual exposure and took a correctly exposed image, then repeated the same exposure with the 6stop filter attached. I then stopped down the aperture and increased the ISO by one stop and took another pair of images.

 

Using the profile edition of RawDigger its possible to extract the average RGB pixel values from each of the greyscale steps and import into Excel. This allowed me to compare the relative RGB values for each step with and without the ND filter. Plotting these differences shows how the M240 response varies for each Bayer filter colour against level and ISO. Here are the curves for the Green channel:

 

 

There's a few interesting things that come out of this:

  • the plugin will benefit from calibration curves for each ISO.
  • something really different happens for ISO1600 and 3200 (which isn't a surprise given the findings Jim Kasson made).
  • I suspect we may find improvements at 1600 and 3200 of limited value; the effect of noise on the lowest values is clear from the wobbliness of the curve. I could repeat the measurements and average out but I suspect we are really hitting the useful noise floor at these levels.
  • optimisation at ISO 400 and 800 should be worthwhile due to the nice shape of the gain curve.
  • this has all been done on one sample of the M240. However if the cause of the response (especially for ISO 800 and below) is software roll-off then it should apply to other M240 cameras.

I have now released a new version (1.4) of my Lightroom plugin to support these per-channel calibration curves. This has indeed resulted in significantly better performance (particularly at non base ISOs) as follows:

  • ISO 200: slight improvement (previous versions had a tendency to slightly boost overall image luminosity which is now fixed)
  • ISO 400: worthwhile improvement
  • ISO 800: significant improvements compared to previous versions
  • ISO 1600 and 3200: its difficult to get any dramatic improvements here as the camera has a different response for 1600 and above and at low pixel levels it gets quite noisy. I've tuned this to look a little better but you may be able to achieve similar effects by just general adjustments.

This version of the plugin now uses lookup tables to correct raw channel values of levels 0 to 99 for each R,G,B channel at ISOs 200, 400, 800, 1600 and 3200. The initial values I used for these lookup tables was based on the measurements that I took with the 20step grey scale wedge above. This proved to be an excellent starting point however it was clear that a small amount of manual tuning was beneficial for optimum performance, the discrepancy probably caused by small errors in my measurements.

 

A big challenge was how do you make adjustments to a 15 lookup tables each with 100 floating point numbers? Manually tuning 1500 floating point numbers was clearly not realistic.

 

So to tune the calibration curves I had to first develop an tool that parsed the C++ header files and rendered a curve with draggable adjustment points. This adjustable curve is displayed along with the original so that it is very easy to judge even small changes. When the "write curve" button is clicked the application creates an updated look-up table by cubic spline interpolation between the adjustment points and merges this back into the header file. This allowed quick round-trip adjust-test-adjust... cycles for each lookup table:

 

The new version is available from my download page: http://blog.perkins.org.uk/downloads

 

I hope it helps,

 

Jonathan

  • Like 3
Link to post
Share on other sites

  • 1 year later...
  • 4 weeks later...
  • 3 weeks later...
  • 1 month later...

i downloaded the plugin from the dropbox. I installed them, but have no clue where to find the plugin in LR. I Work with lightroom 6, but have LR 5 also on my computer, just in case that i don´t work with LR6. It would be great if somebody can give me an instruction.

Link to post
Share on other sites

  • 2 weeks later...

You first need to find where the plug-in has been installed/copied to.

 

Than go to the File menu in LR and select Plug-in Manager.  This allows you to add, remove, enable and disable the various plug-ins some of which are pre-installed.  At the bottom of the left hand pane select Add and navigate to where the plug-in is installed.  Select the plug-in and choose Add Plug-in.  This should add the selected plug-in and enable it.  To use the plug-in you can go to File, Plug-in Extras and select the one you want.

 

Hope that's helpful.

Link to post
Share on other sites

Thanks Bob for your help, but it doesn´t work

 

My Green Show m240  Folder contains the follwowing files

ProgressBar.lua

PluginInit.lua

PluginInfoProvider.lua 

m240shadows.lua

M240_Shadows.exe

M240_Shadows Info.lua

M240_Shadows

 

When i redirect Lightroom Pluin Manager to this folder it says, can´t load plugin.

Holger

www.holgergross.com

Link to post
Share on other sites

Ok, when you use the link above it will take you to the dropbox and show another link to a folder, don't click on this link, use the Download button at the top right.  This should get you a zip file called M240greenshadow_plugin.zip.  Expand this and you will get a file called M240Shadows.lrplugin.  Move this to a folder of your choice and then follow the instructions above on how to install the plug-in.

 

Hope it works this time  :)

Edited by Bobitybob
Link to post
Share on other sites

  • 4 months later...
  • 1 year later...
13 hours ago, marcelography said:

Hi, Bob :)  I've just stumbled upon this thread, I've been looking for the plugin for some time!

Would you mind sharing it again, please?

Best,

 

Marcelo

Marcelo

The dropbox was not mine, if you look further up the thread it beloned to the member jmahto and the plugin was developed by the member jperkins.  I’m not at home at the moment so I can’t check if I still have a copy of this file as I swaped my 240 for an SL sometime ago and now don’t us it.  I will check and if I have I’ll let you know. In the meantime I’m not sure about jperkins but jmahto is still active on the forum so I would ask him if he still has a copy.

Regards

Edited by Bobitybob
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...