As for determining what i presume is the mid grey i don't know so i left it
out.
The software is often misleading by calling it "mid-grey". That's
really a misnomer and a more accurate term is "neutral". This may
sound like nitpicking but it actually goes to the core of the matter.
In other words, an area of the image which *should* be neutral, but it
isn't. And this doesn't have to be mid-gray (i.e. 127,127,127) either!
Clicking on such an area with the "neutral" color picker will then
remove any mid-range casts present in the image.
In Photoshop this defaults to 127,127,127 but it doesn't have to be.
That can be changed. But even if it is set to the mid-point one can
still click on other "should be neutral" parts of the image and that
will still remove the mid-range cast!
As for properly interpreting a histogram i still haven't a clue.
There are basically two camps here: the "scientists" and the
"artists". The artists ignore (hate!) the histogram and go by "what
feels right". The scientists a.k.a. "histogram worshipers" love the
histogram!
I personally firmly fall in the second category. In a nutshell, the
histogram is *objective* image information. The rule-of-thumb goal is
to set the black and white points in such a way so as to get as close
to the edges as possible but don't do damage. However, that's just the
beginning because there are other considerations (see below).
Setting the black and white points will also help remove casts, with
the neutral point as the last step to "mop up" any remaining casts in
the mid-range. As with the neutral point, you use the black and white
points by clicking on an area of the image which should be black and
white, respectively. Increase the sampling areas to maximum to improve
accuracy. In Photoshop this means use 5x5 instead of 1x1 pixel square.
Finally, those "other considerations". Even though in theory the black
point in an image should have the color value of 0,0,0 (after the
correction) in reality that's often "too black" and makes it hard to
see in the shadows. Therefore, one common procedure is to move this
black point a little bit up. The white point is somewhat the opposite.
Namely, trying to preserve everything in the white point is often
counter-productive since white point data is reflections and other
"blown" area of the image which contain no meaningful image content
anyway. Therefore, one common procedure is to "clip" this and move the
white point a little bit down.
Anyway, all this only scratches the surface but it's a start...
Don.