Hi Fabio,
Just further to your image interrogator question, I thought I would post a bit of a "recipe" on setting the initial stretch parameters based on its use... Just in case this helps any users. I think using the image interrogator is a critical piece of using GHS, and while you can use it without it, I believe enquiring pixel values is a great help. It is definitely in Mike's plans to improve the script to make it easier, but here is the "recipe" in case anyone is interested....
1) Once you have loading your linear image into the script, zoom in on the histogram and choose an SP to the left of the histogram peak, but within the area that is visibly, on a linear histogram basis, above the 0 line - precise placement isn't super critical at this stage.
2) Set b to a high level 10-15 (I usually use 15 now), leave LP and HP at 0 and 1, and then zooming out of the histogram view) slide D to place the histogram peak at or above about 1/4 away across, watching the image preview to make sure you can see all of the background and subject matter comfortably. For most images (unless the entire image is subject matter that you want to show), the contrast will likely be fairly low. (This is because we likely picked this initial SP so low, that we put a lot of contrast to the left of the histogram).
3) Pull up the Image Interrogator and show the preview mode. What we want to do here is show the preview mode so we can see our way around, but what we are actually interested in the "before" value of pixels as shown in the upper left window. What we are interest here is the before values for the dimmest parts of the subject matter (the dimmest parts of what you want to show against the background). Click on a couple of spots in the image and mentally average the R,G,B values (if in colour) and average the before value of the various spots (or the minimum) .
4) Exit the Image Interrogator and enter that estimate for into the text box for SP. (Now I know this involves typing a number, and Mike and I are looking at ways to avoid/streamline this). This value of SP should be to the right (higher value) that you used to create the preview. If this is not the case, use a lower SP for your image interrogation/enquiry. For images, that for most of the area, contain just background you may end up with an SP value well to the right of the histogram peak. For images that are entirely covered with subject matter, it will likely remain to the left of the histogram peak, but somewhat to the right of your initial SP pick.
5) Once you enter the number and hit <return>, you will see the image and histogram change - likely the histogram peak will shift back to the left. What we have done to the image is place that maximum contrast right where the subject matter emerges from the background. If not, you may want to go back a couple of steps and adjust SP, but in most cases this is a pretty sure fire way to get a good value for the initial stretch SP. Take a look at the histogram/image and unless you are very lucky you will have to make some adjustment to b and D, now that we have established SP.
6A) On the extremes you will have as SP well to the right of the linear image histogram peak (see 6B or 6C) if this is not the case. In these cases you may have actually "bifurcated" or split into two the histogram and the image and thrown the histogram peak quite far to the left (the image will likely look awful). The only tricky part here, is that you will find reducing either b or D, or both will start to shift the histogram peak of the resultant image back to the right and reduce the "bifurcation effect", caused by actually placing too much contrast here. In most cases, you will want to remove any bifurcation of the histogram or the image preview by lowering D,b, and both - that way the image should smoothly transition from background to subject matter. You can differentiate between D and b to place the histogram peak where you want it as well. Since this likely represents background that you don't want to highlight in this case it will likely end up less than 1/5th the way across, but don't be overly concerned where the histogram peak is place. A more important goal of this adjustment is described in 6C.
6B) In this extreme, it is likely that your SP chosen is still to the left of the linear histogram peak. Your histogram may look fine, and your image may be ok, or even a little dark. If you haven't used the maximum 15 for your b value, you may consider increasing this. Otherwise you can increase or decrease D to see the dim features in the background that you are after. In most cases, this will involve placing the histogram peak at or to the right of 1/5th the way across, but for now don't be overly concerned where precisely the histogram peak is placed - see 6C and 7.
6C) In either case of 6A or 6B, I have found that my favourite view of images have a LOG histogram view (unzoomed) that, going right from the LHS of the log histogram view rises to a peak, then comes down and quickly transitions from its peak to a MONOTONIC (constant log slope) all the way to the RHS of the log histogram view. This results the "best" distribution of contrast for many images., understanding that you may have a good reason to deter from this, but in most cases, something like this will be your ultimate goal. Your adjustments of b and D should attempt to achieve this - ie trying to establish as best as you can, this monotonic log-histogram decline to the right of the histogram peak.
7) Once you feel you have done the best job you can, you may find you have lowered b even as low as 3 or 4 in this initial stretch. You should always check the RHS to see if the brightest stars are starting to accumulate. If so, you might want to add a dash of HP by lowering it from 1. You may also find that this helps (or hurts) in achieving the "monotonic decline" log histogram shape you are after. It can definitely also be used (decreases) to darken the image somewhat, but this is likely better reserves for a follow-up stretch. The opposite, in terms of lightening the image can be achieved by increasing LP from 0, but you will not be allowed to increase it above SP which will still be at a very low value as it refers to the linear image. Whether reducing HP or increasing LP - the goal is to aheive, as best as you can a good distribution of contrast. When you are there, the image should look pretty good as well, so don't forget to check the preview. When satisfied, execute the initial stretch.
Remaining stretches should involve adressing any remaining bulges in the log histogram profile. These bulges likely correspond to parts of the image that seem "flat" and need contrast to show detail. By looking at the bulges and using the image interrogator to find these "flat spots" in the image, place SP where you want contrast added in the image, and bulges in the histogram profile pushed down. In general use a higher b for sharp bulges, and a lower b for broad based ones, then D to achieve the result. At the same time you can use HP, LP to control the image brightening - keeping an eye as to where the transform sits relative to the "identity" line, and using HP to control both adjust "darkening" and the stars on the far right of the of the histogram.
The recipe isn't foolproof, and is of course, subject to take and the utility of the result, but here it is in case it helps.
Dave