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