Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7faa4cd12598db7d59564e3dc9a0913c > files > 303

vips-7.18.2-1mdv2010.0.i586.rpm

<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->

<html>
<head>
<title>IM_HISTGR(3) manual page</title>
</head>
<body bgcolor='white'>
<a href='#toc'>Table of Contents</a><p>

<h2><a name='sect0' href='#toc0'>Name</a></h2>
im_histcum,  im_histeq,  im_histgr,  im_histnD,  im_histnorm,  im_histspec,
 im_identity, im_identity_ushort,  im_ismonotonic  - create, display and
process histograms or luts 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
#include &lt;vips/vips.h&gt; 
<p> int im_histgr(
in, out, bandno ) <br>
IMAGE *in, *out; <br>
int bandno; 
<p> int im_histnD( in, out, bins ) <br>
IMAGE *in, *out; <br>
int bins; 
<p> int im_histcum(hist, lut) <br>
IMAGE *hist, *lut; 
<p> int im_histnorm(hist, lut) <br>
IMAGE *hist, *lut; 
<p> int im_histeq(hist, lut) <br>
IMAGE *hist, *lut; 
<p> int im_histspec(histin, histref, lut) <br>
IMAGE *histin, *histref, *lut; 
<p> int im_identity(lut, bands) <br>
IMAGE *lut; <br>
int bands; 
<p> int im_identity_ushort(lut, bands, sz) <br>
IMAGE *lut; <br>
int bands; <br>
int sz; 
<p> int im_ismonotonic( IMAGE *lut, int *out ) 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<a href='im_histgr.3.html'><b>im_histgr(3)</a>

</b> writes the histogram of image in to image out. If bandno is -1, then out
will have the same number of bands as in, and each band of out will have
the histogram of the corresponding band of in. Otherwise, bandno selects
the band of the image for which the histogram will be found, numbering
from zero. 
<p> Image in may be either FMTUCHAR or FMTUSHORT. If in is uchar,
then out will have 256 elements, one for each possible pixel value. If in
is ushort, then <a href='im_histgr.3.html'><b>im_histgr(3)</a>
 </b> finds the maximum of in, and outputs a histogram
with max + 1 elements.  
<p> For example, suppose you have an image from a 12-bit
camera, where each pixel is in the range [0,4095]. Calling  <a href='im_histgr.3.html'><b>im_histgr(3)</a>

</b> for this image will make a histogram with at most 4096 elements. If the
histogram is smaller than this, then it means that the right hand end of
the histogram was all zero, and has not been generated. 
<p> Also check  <a href='im_histnD.3.html'><b>im_histnD(3)</a>

</b> below for another way to make histograms. 
<p> <a href='im_histnD.3.html'><b>im_histnD(3)</a>
 </b> makes a n-dimensional
histogram from an n-band image (1, 2 and 3 bands only). Because 3D histograms
can get very large very quickly, the  <b>bins</b> parameter sets the length of
each dimension, that is, the number of bins the possible numeric range
of the image is divided into. 
<p> Unsigned 8 and 16 bit images only. 
<p> Use  <a href='im_histplot.3.html'><b>im_histplot(3)</a>

</b> to graph the histogram for visualisation. See the separate manpage. 
<p> <a href='im_histcum.3.html'><b>im_histcum(3)</b></a>

forms a cumulative histogram.  
<p> <a href='im_histnorm.3.html'><b>im_histnorm(3)</a>
 </b> normalises a histogram. The
maximum histogram value becomes equal to the number of pixels in the histogram.
In effect, the histogram  becomes &rsquo;square&rsquo;. Each channel is normalised separately.

<p> <a href='im_histeq.3.html'><b>im_histeq(3)</b></a>
 takes as input a histogram held by the IMAGE descriptor hist
and creates an unsigned char look up table (held by the IMAGE descriptor
lut) which when applied on the original image, (with histogram held by
hist) histogram equalises it. Histogram equalisation is carried out for
each band of hist individually.  
<p> <a href='im_histspec.3.html'><b>im_histspec(3)</b></a>
 creates a lut for transforming
an image with histogram held by histin according to the pdf (probability
density function) of a reference image with histogram held by histref. histin
and histref should have the same number of bands.   
<p> <a href='im_identity.3.html'><b>im_identity(3)</b></a>
 creates
an look-up-table  with Xsize=256, Ysize=1, Bands=bands, Bbits=BBBYTE, BandFmt=FMTUCHAR,
Type=LUT, which is held by the IMAGE descriptor lut.  The created image
consist a bands linear (ramp) lut and is the basis for building look-up
tables.   
<p> <a href='im_identity_ushort.3.html'><b>im_identity_ushort(3)</b></a>
 creates an look-up-table  with Xsize=sz,
Ysize=1, Bands=bands, Bbits=BBSHORT, BandFmt=FMTUSHORT, Type=LUT, which
is held by the IMAGE descriptor lut.  The created image consist of a linear
(ramp) lut and is the basis for building look-up tables.   
<p> <a href='im_ismonotonic.3.html'><b>im_ismonotonic(3)</b></a>

sets out to non-zero if the look-up table (or histogram) in lut is monotonic,
that is, if it&rsquo;s slope is always &gt;0. 
<p> 
<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
All functions return 0 on
success and -1 on error. 
<h2><a name='sect4' href='#toc4'>See Also</a></h2>
<a href='im_hist.3.html'>im_hist(3)</a>
, <a href='im_hsp.3.html'>im_hsp(3)</a>
, <a href='im_heq.3.html'>im_heq(3)</a>
, <a href='im_maplut.3.html'>im_maplut(3)</a>
,
<a href='im_tone_map.3.html'>im_tone_map(3)</a>
, <a href='im_histplot.3.html'>im_histplot(3)</a>
. 
<h2><a name='sect5' href='#toc5'>Copyright</a></h2>
The National Gallery and Birkbeck
College, 1991 - 1994.  <p>

<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
<li><a name='toc3' href='#sect3'>Return Value</a></li>
<li><a name='toc4' href='#sect4'>See Also</a></li>
<li><a name='toc5' href='#sect5'>Copyright</a></li>
</ul>
</body>
</html>