next up previous contents
Next: Clipping Error Up: Minimum Information Loss Previous: Building a Logarithmic Histogram

Search for the Optimum Clipping Interval

All we have to do is to apply a discrete algorithm on the histogram formed in the previous chapter. The length of the interval is CLIP, and we can find its position by shifting the interval along the complete histogram in discrete steps of one. In each step the error sum is increased by the outgoing histogram member and decreased by the incoming one. The pseudo code is given in algorithm 1.

tex2html_wrap5375

Algorithm 1



The optimum clipping interval starts at H[best], and ends at H[best+CLIP-1]. The algorithm runs in linear time tex2html_wrap_inline5369. The actual [a,b] interval is then:
 equation970

 equation974
or in linear scale:
 equation977

 equation981
Now clipping can be done at [A,B] and the final image can be generated. Figure 6.2 shows a logarithmic histogram of the images shown in color plates 1 and 2, and the optimum clipping interval for contrast C=50.

  figure985
Figure 6.2: Logarithmic histogram with optimum interval of C=50


next up previous contents
Next: Clipping Error Up: Minimum Information Loss Previous: Building a Logarithmic Histogram

matkovic@cg.tuwien.ac.at