next up previous contents
Next: 2.10 Morphology Up: 2. VIPS packages Previous: 2.8 Frequency filtering   Contents

2.9 Histograms and LUTs

See figure 2.11.

VIPS represents histograms and look-up tables in the same way -- as images.

They should have either Xsize or Ysize set to 1, and the other dimension set to the number of elements in the table. The table can be of any size, have any band format, and have any number of bands.

Use im_histgr() to find the histogram of an image. Use im_histnD() to find the n-dimensional histogram of an n-band image. Perform operations on histograms with im_histcum(), im_histnorm(), im_histspec(), im_invertlut(). Visualise histograms with im_histplot(). Use a histogram (or LUT) to transform an image with im_maplut(). Build a histogram from scratch with im_identity() or im_identity_ushort().

Use im_lhist*() for local histogram equalisation, and im_stdif*() for statisticaol differencing. The im_tone_*() functions are for operations on the L channel of a LAB image. Other functions are useful combinations of these basic operations.

Figure 2.11: Histogram/LUT functions
\begin{figure}\begin{quote}
\begin{verbatim}example% vips -help histograms_lut...
...channel of LabS or LabQ image through LUT\end{verbatim}
\end{quote}
\end{figure}



John Cupitt 2004-11-02