Ad
Ad
Ad
Pages: « 1 2 3 [4] 5 »   Bottom of Page
Print
Author Topic: Optimal Capture Sharpening, a new tool  (Read 32930 times)
Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #60 on: November 27, 2012, 11:24:30 AM »
ReplyReply

Hi again Bart.
Now I have shot the target at distances beween 11 and 3,7 meters. Should one try to remove the CA in the resulting files before proceeding? by feeding them to ACR, which now does this automatically?
Edit:
Ooops - I discovered that I had activated silent shooting, but not  mirror lock-up, because on the Canon 5D2, the latter can not be combined with burst, and that is what I use in the field for exposure triplets. Should I repeat the test shots with mirror lock-up, or is it better that they reflect real life conditions?
Kind regards - Hening.
« Last Edit: November 27, 2012, 12:00:50 PM by Hening Bettermann » Logged

BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #61 on: November 27, 2012, 12:50:05 PM »
ReplyReply

Hi again Bart.
Now I have shot the target at distances beween 11 and 3,7 meters. Should one try to remove the CA in the resulting files before proceeding? by feeding them to ACR, which now does this automatically?
Edit:
Ooops - I discovered that I had activated silent shooting, but not  mirror lock-up, because on the Canon 5D2, the latter can not be combined with burst, and that is what I use in the field for exposure triplets. Should I repeat the test shots with mirror lock-up, or is it better that they reflect real life conditions?

Hi Hening,

Yes, CA removal should be done first because that involves resampling which will affect sharpeness that will require more Capture sharpening. So you can let ACR do its stuff, which may include distortion correction if you normally use that.

Whether the mirror lockup is required, depends on how sturdy your tripod is and at which shutterspeed the shots were taken. Mirror induced vibration is usually most visible in the 1/15th to 1/60th sec. region. When you concentrate only on the vertical edge, then mirror vibration effects will have less noticeable impact. When you can see that the central blur spot in the recorded image of my 'star' target is not circular but elliptical (stretched vertically), then I'd reshoot.

It's a good thing that on the Northern hemisphere we have plenty of dark and cold evenings ahead ...

Cheers,
Bart
Logged
Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #62 on: November 27, 2012, 01:36:02 PM »
ReplyReply

Thank you. I think I re-shoot anyway. Can not hurt to have both ideal and real life conditions. Good to be sure about the CA. Good light! Hening.
Logged

Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #63 on: December 01, 2012, 10:00:03 AM »
ReplyReply

Hi again...

I am trying to read the pixel coordinates for the target and am in doubt exactly which pixels to choose. The devil is in the detail...Even after CA removal in ACR, the 2000% view shows visible CA. The screen shot shows the upper left corner of the slanted square (after 90 cw rotation) displayed in ImageJ. (The TIF has my camera profile embedded - not sure if ImageJ reads this.)
So which 2 pixels would you choose to determine the angle?

Kind regards - Hening

Logged

BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #64 on: December 01, 2012, 12:51:25 PM »
ReplyReply

Hi again...

I am trying to read the pixel coordinates for the target and am in doubt exactly which pixels to choose. The devil is in the detail...Even after CA removal in ACR, the 2000% view shows visible CA. The screen shot shows the upper left corner of the slanted square (after 90 cw rotation) displayed in ImageJ. (The TIF has my camera profile embedded - not sure if ImageJ reads this.)
So which 2 pixels would you choose to determine the angle?

Hi Hening,

Good question, because the angle determination in the first step of the analysis will have an impact on the accuracy of the result. As your example shows, it is not always obvious how to pick the endpoints on the edge segment that's going to be used.

First of all, I would choose a longer segment to base the measurement on (longer base distance gives higher precision), but your crop is sufficient to demonstrate the principle of what to do. In the first attachment I show which end-points I would choose. I used ImageJ's Straight line tool (5th icon on the toolbar) to mark the pixel centers of coordinates [63,19] and [238,37] as endpoint. The reason I chose them is because they both are 'relatively' neutral grey and have a Green value that's quite similar (104 vs 102), which suggests that they are on the same position on the ramp of the edge profile. This is further confirmed by the pixels in between where the line is also almost centered on ( [119,25] and [179,31]).

Your question therefore allows me to share a little secret, which allows to confirm whether the right pixels were chosen. When, after drawing the line, you select the menu option Analyse|Plot Profile, then you should get a graphic plot of the pixel values along that line that should produce an almost horizontally trending signal, like in attachment 2. A longer line will show it even clearer, the signal fluctuates along the average with repeating similar highs and lows. That works best if you select end-points that are roughly mid-grey. When you activate the Live button in the Plot window, then the plot will update as you drag the endpoints. As a bonus, when the trend looks a bit convex (higher in the middle, lower at both endpoints), or concave (drooping in the middle), then that's a signal of a Barrel or Pincushion distortion (even more obvious when the slanted edge is nearer one of the images edges).

When you fill in the coordinate pairs, then the Slanted edge evaluation tool will calculate an angle of 5.873 degrees, which is very close to the designed angle of the target, 5.71 degrees, which suggests that the target was shot pretty close to perfectly level. This is assuming that a longer edge segment produces a similar angle readout. The exact angle is not very important, as long as it is accurately determined. An angle of approx. 5.7 degrees will allow to super-sample the edge transition at 1/10th of a pixel accuracy, which is good enough to get an accurate discrete edgeprofile of even the sharpest lenses, even from an 8-bit/channel image.

This angle is now used in the calculations on the pixel values of a horizontal row across the almost horizontal edge that will be filled in under section 2 of the tool. So if you want to re-analyse the edge at a later date, or with a different Raw conversion, I suggest you save these coordinates in a text file or a spreadsheet. That will save you from having to determine the coordinates again. The edge will be constant for all images shot with the same setup on a sturdy tripod, assuming the camera didn't move/rotate between shots. The only thing that can change is the image contrast and thus edge sharpness due to Raw converter settings, but the angle is now fixed for the shots in this session.

Cheers,
Bart
Logged
Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #65 on: December 02, 2012, 11:54:55 AM »
ReplyReply

Hi again...

Thank you for your reply. - Now I managed... My angle is 5.553 degrees. [Of course I had planned to use a wider basis, but wanted to save Lula's disk space with the screen shot :-)] I also had the bright idea to choose an image that was shot at f/8 rather than the previous f/2.8 :-), so as to bring down the CA.
This had some effect, but there is still CA (This is a Contax Sonnar 2.8/85, after all... What marvel of a lens did you use for your demonstration, which shows a perfectly neutral grey step wedge?)

When I looked at the first list of values, I saw that at the light end, there where 2 identical values, 65535, obviously the monitor white. After I excluded one of them, the calculated sigma went up from 0.67... to 0.70... 

So this leads to question #2: How many, and which, pixels to include in the row of pixels across the edge? Because the dark end is far from as well defined.

In my next attempt, I tried to limit at the dark end visually. The plot seems to extend more than necessary to the left. At the same time, the downward spikes go further down than the "black" level.

So I identified the lowest value in the list and deleted values representing pixels to the left of that.

Now the sigma is calculated to 0.50...

I see that your plot includes about 15 pixels on either side of dark and light. But this will lead to a very different sigma.

So which is the the right procedure?

Kind regards - Hening.
Logged

BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #66 on: December 02, 2012, 01:43:16 PM »
ReplyReply

Hi again...

Thank you for your reply. - Now I managed... My angle is 5.553 degrees. [Of course I had planned to use a wider basis, but wanted to save Lula's disk space with the screen shot :-)] I also had the bright idea to choose an image that was shot at f/8 rather than the previous f/2.8 :-), so as to bring down the CA.
This had some effect, but there is still CA (This is a Contax Sonnar 2.8/85, after all... What marvel of a lens did you use for your demonstration, which shows a perfectly neutral grey step wedge?)

Hi Hening,

Most of my samples were taken from a EF-100mm f/2.8L Macro lens, and the Raw conversions were white balanced and corrected for Chromatic aberrations with Capture One (version 6 at that time, so I'll have to repeat a test with Version 7 and see if it changed much). Your Raw converter also added a bit of a zipper effect to the sharp edge, but that doesn't really bother the analysis tool because it will hone in on the average brightness anyway (that's one of the benefits of oversampling).

Quote
When I looked at the first list of values, I saw that at the light end, there where 2 identical values, 65535, obviously the monitor white. After I excluded one of them, the calculated sigma went up from 0.67... to 0.70... 

So this leads to question #2: How many, and which, pixels to include in the row of pixels across the edge? Because the dark end is far from as well defined.

Okay, first of all the bright end of the scale is too bright at 65535, you should reduce the exposure a bit. When you shoot a relected white, e.g. a colorchecker or as in this case a resolution chart, the paper white usually should read something like 235-240 in an 8-bit range if exposed to the right, therefore around 60000-62000 in a 16-bit range at the most. I usually include enough darkest and brightest pixels on either side of the edge that they run pretty horizontal except for some noise fluctuation. depending on the sensel pitch, that could require some 120 pixels, or even 160 for significant amounts of diffraction. Try and avoid clipped pixels (saturated black or white), because that will mean that the real signal cannot be reconstructed anymore.

That also means that the whole edge transition will be characterized, right from where it starts to pick up some blur from the bright end on top of the uniform dark, to where there is no influence anymore at the bright end from the blurred dark side of the edge. A tighter selection will produce sililar results as long as the selection is symmetrical, but it is best to avoid that potential influence by allowing some of the uniform unblurred ends of the edge in the selected range.

Quote
In my next attempt, I tried to limit at the dark end visually. The plot seems to extend more than necessary to the left. At the same time, the downward spikes go further down than the "black" level.

So I identified the lowest value in the list and deleted values representing pixels to the left of that.

Now the sigma is calculated to 0.50...

I see that your plot includes about 15 pixels on either side of dark and light. But this will lead to a very different sigma.

So which is the the right procedure?

What I usually do is the following.
I zoom in on the edge with the magnifying glass tool, and then switch to the rectangular selection tool at the left of the toolbar. I draw a quick horizontal selection across the edge with the mouse pointer, and then use the keyboard to resize (with the Alt key plus the arrow keys) the selection dimensions to 1 high and 120 wide (you can see the dimensions in the ImageJ status bar). I then select the menu choice Analyze|Plot Profile, and click the 'Live button'. When you then reactivate the image window by clicking on its edge (to avoid undoing the selection) you can move the selection rectangle around and position it on the edge with the arrow keys, while the Profile Plot updates dynamically until the center of the edge profile is about centered in the plot window.

You can then copy the values from the Profile Plot window and paste them where you need them.

Cheers,
Bart
Logged
Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #67 on: December 02, 2012, 02:10:21 PM »
ReplyReply

Hi Bart, thank you for your fast reply.


Okay, first of all the bright end of the scale is too bright at 65535, you should reduce the exposure a bit. When you shoot a relected white, e.g. a colorchecker or as in this case a resolution chart, the paper white usually should read something like 235-240 in an 8-bit range if exposed to the right, therefore around 60000-62000 in a 16-bit range at the most.

Is there a way to achieve this other than trial and error? What I did was point my Pentax spot meter to an area on the test image that I believed was defined as middle gray and exposed after that.
I would have to re-shoot all images - or could it be done in the raw converter?

Kind regards - Hening.
Logged

BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #68 on: December 02, 2012, 03:37:32 PM »
ReplyReply

Hi Bart, thank you for your fast reply.

Is there a way to achieve this other than trial and error? What I did was point my Pentax spot meter to an area on the test image that I believed was defined as middle gray and exposed after that.
I would have to re-shoot all images - or could it be done in the raw converter?

Hi Hening,

I assume the exposure meter picked up some of the darker areas as well, and decided to increase the exposure level a bit too much.

There is some chance that the Raw file holds more highlight detail than it showed. If it does, then you can reduce the exposure level in the Raw converter, until the conversion is no longer clipped to white. Just give it a try, and maybe a different Raw converter can restore a bit more highlight detail and reduce the zipper artifacts as well. Lightroom is e.g. pretty good at highlight recovery.

Cheers,
Bart
Logged
Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #69 on: December 02, 2012, 03:43:49 PM »
ReplyReply

Hi again,
while you answered, I wrote the following:

Ooops -
It is only in ImageJ that the white patch of the gray scale on your target reads 65535 - in Raw Developer and PhotoLine its about 175 (in 8 bit). The reason seems to be that my output from RD is in my own camera profile. After change to ProPhoto, ImageJ says between ca 61 500 and 62 534 - would that be OK?
--edit: well if I need not re-shoot then I can just adjust a little in the raw converter.
Kind regards - Hening
« Last Edit: December 02, 2012, 03:49:48 PM by Hening Bettermann » Logged

Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #70 on: December 02, 2012, 05:40:48 PM »
ReplyReply

Hi again -
This is a little off topic in relationship to blur radius - but why is 65000 too bright? Why would one give away dynamic range?
Kind regards - Hening.
Logged

BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #71 on: December 02, 2012, 06:32:27 PM »
ReplyReply

Hi again,
while you answered, I wrote the following:

Ooops -
It is only in ImageJ that the white patch of the gray scale on your target reads 65535 - in Raw Developer and PhotoLine its about 175 (in 8 bit). The reason seems to be that my output from RD is in my own camera profile. After change to ProPhoto, ImageJ says between ca 61 500 and 62 534 - would that be OK?
--edit: well if I need not re-shoot then I can just adjust a little in the raw converter.

Hi Hening,

62000-ish sounds fine to me, no clipping involved so the entire range of brightnesses is available for the characterization of the edge profile. It would mean though, that the edge profile is valid for ProPhoto RGB data (=gamma 1.8 compensated). I'm not sure what the contrast/gamma is for the Camera profile setting. What you preferably want is to know is the apparent blur for your normal workflow. It seems that if the Camera profile is part of your normal workflow and indicative for what you base your sharpening on, then the images would be a bit on the bright side. However, if you base your workflow and sharpening on the ProPhoto converted image data, then you should also do the blur analysis in that colorspace.

Cheers,
Bart
Logged
BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #72 on: December 02, 2012, 06:40:56 PM »
ReplyReply

Hi again -
This is a little off topic in relationship to blur radius - but why is 65000 too bright? Why would one give away dynamic range?

Hi Hening,

Only if the data is really clipped, which would obscure the real shape of the edge profile at the top of the curve, it could be an issue. When the real shape of the edge profile is clipped at the top, then the estimation of the actual shape becomes more of a guess. The only thing to limit the guesswork in such a case, is to limit the selection of pixels to include only really relevant pixels. In that case the estimation of the full curve shape will still be based on relevant pixels, and the program will try to fit as good a curve shape as it can.

Cheers,
Bart 
Logged
Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #73 on: December 03, 2012, 11:58:25 AM »
ReplyReply

I'm not sure what the contrast/gamma is for the Camera profile setting. What you preferably want is to know is the apparent blur for your normal workflow. It seems that if the Camera profile is part of your normal workflow and indicative for what you base your sharpening on, then the images would be a bit on the bright side.


Hi Bart, thank you for your answers.

My normal workflow is output from Raw Developer in my camera profile (ICC), which is linear, then open in PhotoLine. PL opens the image by default as an RGB image in ProPhoto. I will then set the image type to Lab and attach standard Lab as the profile.
Now for the test I have also opened in Photoshop.

Here is what happens:
In RD, the white patch of your target reads RGB 167-176-177. So this would be UNDERexposed, and so is the visual impression.

On the processed TIF opened in PhotoLine, the RGB reading is 255, and so is the visual impression: only the bottom 5 gray patches are distinguishable, the rest is white.
No change after transition to Lab.

In Photoshop, the visual impression is the same - but the RGB reading is 32000! - 100 for L* in Lab! (of the RGB image; no change to Lab made here).

ImageJ: same as PhotoLine, RGB reading 65535.

What is going on here??
Logged

BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #74 on: December 03, 2012, 03:17:22 PM »
ReplyReply


Hi Bart, thank you for your answers.

My normal workflow is output from Raw Developer in my camera profile (ICC), which is linear, then open in PhotoLine. PL opens the image by default as an RGB image in ProPhoto. I will then set the image type to Lab and attach standard Lab as the profile.
Now for the test I have also opened in Photoshop.

Here is what happens:
In RD, the white patch of your target reads RGB 167-176-177. So this would be UNDERexposed, and so is the visual impression.

Hi Hening,

I am not familiar enough with Raw Developer by Iridient Digital to know what happens there, but could it be that the image is in linear gamma? That would explain its seemingly underexposed look, afterall 176 in linear gamma space, is 208 in gamma 1/1.8 space, which is only slightly on the dark side, but good enough to test with.

Quote
On the processed TIF opened in PhotoLine, the RGB reading is 255, and so is the visual impression: only the bottom 5 gray patches are distinguishable, the rest is white.

No change after transition to Lab.

I'm not familiar at all with Photoline, but it is clearly not acceptable that such a level of exposure gets clipped.

Quote
In Photoshop, the visual impression is the same - but the RGB reading is 32000! - 100 for L* in Lab! (of the RGB image; no change to Lab made here).

ImageJ: same as PhotoLine, RGB reading 65535.

What is going on here??

Well, when Photoline, and Photoshop, and ImageJ, all see clipped data, then it's probably something to do with Raw Converter's TIFF output.

Cheers,
Bart
Logged
Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #75 on: December 03, 2012, 05:32:17 PM »
ReplyReply

Hi Bart,
thank you for your answer.
I have figured out that the clipping is introduced by ACR. The upcoming version 2.0 of Raw Developer (overdue since oktober, and exspected in a few days) will have CA removal, both manual and automatic, so I'll wait for that before I proceed with the slanted edge tool.
Thank you again for this tool, and for your help using it.
Hening
Logged

Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #76 on: December 05, 2012, 03:40:38 PM »
ReplyReply

Hi again

I fooled around a little with your target and tool. Attached are 4 screen shots of the upper half of the target, enlarged to approx. the same size as the screen display of the original.
1- original
2-TIF developed in Raw Developer with R-L Deconvolution, 10 iterations, radius 0.6=default
3-same, r=0.8, my visual optimum
4-same, r=1.07 as calculated with your online tool. Using your method, the angle of the slanted edge was calculated to 5.553 degrees.
Shots are with a Contax Sonnar 2.8/85 at f/8 on a Canon 5D2.
It seems to me that your target performs best as the basis for visual judgement.

Good light! - Hening.
« Last Edit: December 05, 2012, 03:42:11 PM by Hening Bettermann » Logged

BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #77 on: December 06, 2012, 03:29:59 AM »
ReplyReply

I fooled around a little with your target and tool. Attached are 4 screen shots of the upper half of the target, enlarged to approx. the same size as the screen display of the original.

Hi Hening,

I'm not sure whether it's because you are shooting from the computer display instead of a printed test chart, or that something else went wrong, but frankly samples 2 ... 4 look horribly oversharpened (judging by the halo that was produced). Even shot no. 1 (I assume it's a screenprint instead of a photo of the screen) shows an issue due to quick display downsampling below 100% zoom.

Therefore, I'd hesitate to draw any conlusions about the proper Capture sharpening radius based on this attempt. My tool will happily process anything (within reason) that's thrown at it, but that doesn't mean that the outcome isn't influenced by the input quality. On the contrary, it specifically measures that input quality.

That leads to the conclusion that;
either the target was compromised too much by using a screen display instead of a high resolution print,
or there was an issue with the Raw converter (which also adds those zipper artifacts along sharp edges),
or some strange combination of the two.

I suggest you consider getting a printed version of the resolution target, preferably a high resolution inkjet print (approx. 600-720 PPI), or as a minimum use the source file at 100% zoom (just displaying the slanted edge part of the chart) if you insist on using a screen display. But more importantly, I'd try another Raw processor, or different settings, because what I've seen sofar doesn't get me excited (which is puzzling because Iridient Digital's 'Raw Developer' gets a lot of praise amongst it's followers).

Cheers,
Bart
Logged
Hening Bettermann
Sr. Member
****
Offline Offline

Posts: 570


WWW
« Reply #78 on: December 06, 2012, 11:08:20 AM »
ReplyReply

Hi Bart,

thank you for your detailed answer. So I'll try to have the target printed and mounted ASAP.
Yes #1 is a screen shot of your png.
It surprises me, too, that RD should not be so good. Last time I compared it to ACR CS5, combined with SmartSharpening in PS, RD was absolutely superior. But that was on overall rendering with emphasis on color, not on resolution in particular.
This is off-topic, but what is the best raw converter in your view?

Kind regards - Hening.
Logged

BartvanderWolf
Sr. Member
****
Offline Offline

Posts: 3752


« Reply #79 on: December 06, 2012, 01:39:12 PM »
ReplyReply

Hi Bart,

thank you for your detailed answer. So I'll try to have the target printed and mounted ASAP.
Yes #1 is a screen shot of your png.
It surprises me, too, that RD should not be so good. Last time I compared it to ACR CS5, combined with SmartSharpening in PS, RD was absolutely superior. But that was on overall rendering with emphasis on color, not on resolution in particular.
This is off-topic, but what is the best raw converter in your view?

Hi Hening,

I'm still surprised if RD can't do better, but of the ones I use myself, RawTherapee, Lightroom/ACR, and Capture One v7 all produce state of the art Raw conversions. Of course they are also quite different, with respect to the target audience they are designed for, and the strength of different features they offer. RawTherapee, although some Mac users report some difficulties in getting it to run, is free to use and might be worth a try to see if that changes the conversion quality much.

You could also sent me a link to your file by PM, which would allow me to check if I can find anything out of the ordinary, with the converters I mentioned.

Cheers,
Bart
Logged
Pages: « 1 2 3 [4] 5 »   Top of Page
Print
Jump to:  

Ad
Ad
Ad