I am trying to calculate the tone curve to compliment my histogram. I am running into some confusion on what the tone curve actually is and how it would be calculated.
From what I have searched, the tone curve shows the original (input) value along the x axis against the resulting (output) value along the y axis.
The tone curve for the original image is a straight line from the bottom left to the bottom right.
Am i correct in thinking along the x axis is just the histogram of the image, when the image is adjusted then the tone curve for each x position is the difference between the original histogram and the current histogram?
So to calculate the tone curve:
- Calculate original histogram
- Calculate histogram for adjusted image
- Calculate difference between histograms for each value 0-255
- Plot the difference + or - the original tone curve line (from bottom left to top right)