All stretching operations can be visualized by looking at the effect on the histogram. We can modify the shape of the histogram to improve the view of the object. By using a process called histogram specification we can make the histogram flat, sloped, or any curve we want.
The process is similar to how some teachers "bell curve" marks. The students are listed by order of grade on the exam. The top student on the list gets 100%, the next 99%, and so on. If the teacher wants most of the class to get a mark near 75%, she can assign more students grades in the 70-80% range. With this technique, the student's final grade depends on his rank in the class, not on the actual mark. The teacher can generate any distribution at will.
When the same process is applied to images, it allows us to force any shape onto the image histogram. This technique is particularly useful for compressing out regions of the histogram that have very few pixels.
Equalizing the histogram makes every pixel brightness level equally likely. While that optimally accentuates contrast in all brightness ranges, the effect is very harsh. Some brightness levels might have fewer pixels but more interesting information. Instead of equalizing across the board, picking a suitable curve can emphasize detail where you need it.
Start out by adjusting the Screen Stretch for your image so that no pixels are clipped to black or saturated to white (the Range stretch setting is useful for this). Now launch the Histogram Specification command, and turn on Auto Full Screen preview.
Try each of the pre-defined curves to see what effect they have. Certain curves work best with certain types of objects.
Once you have found the curve that gives the best effect, you may tweak the curve (by clicking, and then dragging, the individual points on the curve) to improve the final result. Some experimentation will show you how to get the best effect; for example, if the brightest areas of the image are being washed out, lower the height of the curve on the right side of the graph (the bright intensity region).