This file is indexed.

/usr/share/gtk-doc/html/libvips/libvips-histogram.html is in libvips-doc 8.4.5-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>histogram: VIPS Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="index.html" title="VIPS Reference Manual">
<link rel="up" href="ch03.html" title="VIPS operation API by section">
<link rel="prev" href="libvips-freqfilt.html" title="freqfilt">
<link rel="next" href="libvips-draw.html" title="draw">
<meta name="generator" content="GTK-Doc V1.25 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libvips-histogram.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch03.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libvips-freqfilt.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libvips-draw.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libvips-histogram"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libvips-histogram.top_of_page"></a>histogram</span></h2>
<p>histogram — find, manipulate and apply histograms and lookup tables</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libvips-histogram.stability-level"></a><h2>Stability Level</h2>
<acronym title="The intention of a Stable interface is to enable arbitrary third parties to
develop applications to these interfaces, release them, and have confidence that
they will run on all minor releases of the product (after the one in which the
interface was introduced, and within the same major release). Even at a major
release, incompatible changes are expected to be rare, and to have strong
justifications.
"><span class="acronym">Stable</span></acronym>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="libvips-histogram.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-maplut" title="vips_maplut ()">vips_maplut</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-percent" title="vips_percent ()">vips_percent</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-stdif" title="vips_stdif ()">vips_stdif</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-hist-cum" title="vips_hist_cum ()">vips_hist_cum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-hist-norm" title="vips_hist_norm ()">vips_hist_norm</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-hist-equal" title="vips_hist_equal ()">vips_hist_equal</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-hist-plot" title="vips_hist_plot ()">vips_hist_plot</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-hist-match" title="vips_hist_match ()">vips_hist_match</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-hist-local" title="vips_hist_local ()">vips_hist_local</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-hist-ismonotonic" title="vips_hist_ismonotonic ()">vips_hist_ismonotonic</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="libvips-histogram.html#vips-hist-entropy" title="vips_hist_entropy ()">vips_hist_entropy</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libvips-histogram.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;vips/vips.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="libvips-histogram.description"></a><h2>Description</h2>
<p>Histograms and look-up tables are 1xn or nx1 images, where n is less than
256 or less than 65536, corresponding to 8- and 16-bit unsigned int images. 
They are tagged with a <a class="link" href="VipsImage.html#VipsInterpretation" title="enum VipsInterpretation"><span class="type">VipsInterpretation</span></a> of 
<a class="link" href="VipsImage.html#VIPS-INTERPRETATION-HISTOGRAM:CAPS"><span class="type">VIPS_INTERPRETATION_HISTOGRAM</span></a> and usually displayed by user-interfaces 
such as nip2 as plots rather than images.</p>
<p>These functions can be broadly grouped as things to find or build 
histograms (<a class="link" href="libvips-arithmetic.html#vips-hist-find" title="vips_hist_find ()"><code class="function">vips_hist_find()</code></a>, <a class="link" href="libvips-create.html#vips-buildlut" title="vips_buildlut ()"><code class="function">vips_buildlut()</code></a>, <a class="link" href="libvips-create.html#vips-identity" title="vips_identity ()"><code class="function">vips_identity()</code></a>), 
operations that 
manipulate histograms in some way (<a class="link" href="libvips-histogram.html#vips-hist-cum" title="vips_hist_cum ()"><code class="function">vips_hist_cum()</code></a>, <a class="link" href="libvips-histogram.html#vips-hist-norm" title="vips_hist_norm ()"><code class="function">vips_hist_norm()</code></a>), 
operations to apply histograms (<a class="link" href="libvips-histogram.html#vips-maplut" title="vips_maplut ()"><code class="function">vips_maplut()</code></a>), and a variety of utility 
operations.</p>
<p>A final group of operations build tone curves. These are useful in
pre-press work for adjusting the appearance of images. They are designed
for CIELAB images, but might be useful elsewhere.</p>
</div>
<div class="refsect1">
<a name="libvips-histogram.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="vips-maplut"></a><h3>vips_maplut ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_maplut (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
             <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
             <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *lut</code></em>,
             <em class="parameter"><code>...</code></em>);</pre>
<p>Optional arguments:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><em class="parameter"><code>band</code></em>
: apply one-band <em class="parameter"><code>lut</code></em>
 to this band of <em class="parameter"><code>in</code></em>
</p></li></ul></div>
<p>Map an image through another image acting as a LUT (Look Up Table). 
The lut may have any type and the output image will be that type.</p>
<p>The input image will be cast to one of the unsigned integer types, that is,
VIPS_FORMAT_UCHAR, VIPS_FORMAT_USHORT or VIPS_FORMAT_UINT.</p>
<p>If <em class="parameter"><code>lut</code></em>
 is too small for the input type (for example, if <em class="parameter"><code>in</code></em>
 is
VIPS_FORMAT_UCHAR but <em class="parameter"><code>lut</code></em>
 only has 100 elements), the lut is padded out
by copying the last element. Overflows are reported at the end of 
computation.
If <em class="parameter"><code>lut</code></em>
 is too large, extra values are ignored. </p>
<p>If <em class="parameter"><code>lut</code></em>
 has one band and <em class="parameter"><code>band</code></em>
 is -1 (the default), then all bands of <em class="parameter"><code>in</code></em>
 
pass through <em class="parameter"><code>lut</code></em>
. If <em class="parameter"><code>band</code></em>
 is &gt;= 0, then just that band of <em class="parameter"><code>in</code></em>
 passes 
through <em class="parameter"><code>lut</code></em>
 and other bands are just copied. </p>
<p>If <em class="parameter"><code>lut</code></em>

has same number of bands as <em class="parameter"><code>in</code></em>
, then each band is mapped
separately. If <em class="parameter"><code>in</code></em>
 has one band, then <em class="parameter"><code>lut</code></em>
 may have many bands and
the output will have the same number of bands as <em class="parameter"><code>lut</code></em>
.</p>
<p>See also: <a class="link" href="libvips-arithmetic.html#vips-hist-find" title="vips_hist_find ()"><code class="function">vips_hist_find()</code></a>, <a class="link" href="libvips-create.html#vips-identity" title="vips_identity ()"><code class="function">vips_identity()</code></a>.</p>
<div class="refsect3">
<a name="vips-maplut.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>output image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>lut</p></td>
<td class="parameter_description"><p>look-up table</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-maplut.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-percent"></a><h3>vips_percent ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_percent (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
              <em class="parameter"><code><span class="type">double</span> percent</code></em>,
              <em class="parameter"><code><span class="type">int</span> *threshold</code></em>,
              <em class="parameter"><code>...</code></em>);</pre>
<p>vips_percent() returns (through the <em class="parameter"><code>threshold</code></em>
 parameter) the threshold 
above which there are <em class="parameter"><code>percent</code></em>
 values of <em class="parameter"><code>in</code></em>
. If for example percent=10, the
number of pels of the input image with values greater than <em class="parameter"><code>threshold</code></em>

will correspond to 10% of all pels of the image.</p>
<p>The function works for uchar and ushort images only.  It can be used 
to threshold the scaled result of a filtering operation.</p>
<p>See also: <a class="link" href="libvips-arithmetic.html#vips-hist-find" title="vips_hist_find ()"><code class="function">vips_hist_find()</code></a>, <a class="link" href="libvips-arithmetic.html#vips-profile" title="vips_profile ()"><code class="function">vips_profile()</code></a>.</p>
<div class="refsect3">
<a name="vips-percent.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>percent</p></td>
<td class="parameter_description"><p>threshold percentage</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>threshold</p></td>
<td class="parameter_description"><p>output threshold value</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-percent.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-stdif"></a><h3>vips_stdif ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_stdif (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
            <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
            <em class="parameter"><code><span class="type">int</span> width</code></em>,
            <em class="parameter"><code><span class="type">int</span> height</code></em>,
            <em class="parameter"><code>...</code></em>);</pre>
<p>Optional arguments:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p><em class="parameter"><code>a</code></em>
: weight of new mean</p></li>
<li class="listitem"><p><em class="parameter"><code>m0</code></em>
: target mean</p></li>
<li class="listitem"><p><em class="parameter"><code>b</code></em>
: weight of new deviation</p></li>
<li class="listitem"><p><em class="parameter"><code>s0</code></em>
: target deviation</p></li>
</ul></div>
<p>vips_stdif() preforms statistical differencing according to the formula
given in page 45 of the book "An Introduction to Digital Image 
Processing" by Wayne Niblack. This transformation emphasises the way in 
which a pel differs statistically from its neighbours. It is useful for 
enhancing low-contrast images with lots of detail, such as X-ray plates.</p>
<p>At point (i,j) the output is given by the equation:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="function">vout</span><span class="gtkdoc opt">(</span>i<span class="gtkdoc opt">,</span>j<span class="gtkdoc opt">) =</span> &#64;a <span class="gtkdoc opt">*</span> &#64;m0 <span class="gtkdoc opt">+ (</span><span class="number">1</span> <span class="gtkdoc opt">-</span> &#64;a<span class="gtkdoc opt">) *</span> meanv <span class="gtkdoc opt">+</span> 
      <span class="gtkdoc opt">(</span><span class="function">vin</span><span class="gtkdoc opt">(</span>i<span class="gtkdoc opt">,</span>j<span class="gtkdoc opt">) -</span> meanv<span class="gtkdoc opt">) * (</span>&#64;b <span class="gtkdoc opt">*</span> &#64;s0<span class="gtkdoc opt">) / (</span>&#64;s0 <span class="gtkdoc opt">+</span> &#64;b <span class="gtkdoc opt">*</span> stdv<span class="gtkdoc opt">)</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>Values <em class="parameter"><code>a</code></em>
, <em class="parameter"><code>m0</code></em>
, <em class="parameter"><code>b</code></em>
 and <em class="parameter"><code>s0</code></em>
 are entered, while meanv and stdv are the values
calculated over a moving window of size <em class="parameter"><code>width</code></em>
, <em class="parameter"><code>height</code></em>
 centred on pixel 
(i,j). <em class="parameter"><code>m0</code></em>
 is the new mean, <em class="parameter"><code>a</code></em>
 is the weight given to it. <em class="parameter"><code>s0</code></em>
 is the new 
standard deviation, <em class="parameter"><code>b</code></em>
 is the weight given to it. </p>
<p>Try:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting">vips stdif $VIPSHOME<span class="gtkdoc opt">/</span>pics<span class="gtkdoc opt">/</span>huysum<span class="gtkdoc opt">.</span>v fred<span class="gtkdoc opt">.</span>v <span class="number">0.5 128 0.5 50 11 11</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>The operation works on one-band uchar images only, and writes a one-band 
uchar image as its result. The output image has the same size as the 
input.</p>
<p>See also: <a class="link" href="libvips-histogram.html#vips-hist-local" title="vips_hist_local ()"><code class="function">vips_hist_local()</code></a>.</p>
<div class="refsect3">
<a name="vips-stdif.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>output image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>width of region</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>height of region</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-stdif.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-hist-cum"></a><h3>vips_hist_cum ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_hist_cum (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
               <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
               <em class="parameter"><code>...</code></em>);</pre>
<p>Form cumulative histogram. </p>
<p>See also: <a class="link" href="libvips-histogram.html#vips-hist-norm" title="vips_hist_norm ()"><code class="function">vips_hist_norm()</code></a>.</p>
<div class="refsect3">
<a name="vips-hist-cum.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>output image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-hist-cum.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-hist-norm"></a><h3>vips_hist_norm ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_hist_norm (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
                <em class="parameter"><code>...</code></em>);</pre>
<p>Normalise histogram ... normalise range to make it square (ie. max ==
number of elements). Normalise each band separately.</p>
<p>See also: <a class="link" href="libvips-histogram.html#vips-hist-cum" title="vips_hist_cum ()"><code class="function">vips_hist_cum()</code></a>.</p>
<div class="refsect3">
<a name="vips-hist-norm.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>output image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-hist-norm.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-hist-equal"></a><h3>vips_hist_equal ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_hist_equal (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                 <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
                 <em class="parameter"><code>...</code></em>);</pre>
<p>Optional arguments:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><em class="parameter"><code>band</code></em>
: band to equalise</p></li></ul></div>
<p>Histogram-equalise <em class="parameter"><code>in</code></em>
. Equalise using band <em class="parameter"><code>bandno</code></em>
, or if <em class="parameter"><code>bandno</code></em>
 is -1,
equalise bands independently.</p>
<p>See also:</p>
<div class="refsect3">
<a name="vips-hist-equal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>output image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-hist-equal.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-hist-plot"></a><h3>vips_hist_plot ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_hist_plot (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
                <em class="parameter"><code>...</code></em>);</pre>
<p>Plot a 1 by any or any by 1 image file as a max by any or 
any by max image using these rules:</p>
<p><span class="emphasis"><em>unsigned char</em></span> max is always 256 </p>
<p><span class="emphasis"><em>other unsigned integer types</em></span> output 0 - maxium 
value of <em class="parameter"><code>in</code></em>
.</p>
<p><span class="emphasis"><em>signed int types</em></span> min moved to 0, max moved to max + min.</p>
<p><span class="emphasis"><em>float types</em></span> min moved to 0, max moved to any 
(square output)</p>
<div class="refsect3">
<a name="vips-hist-plot.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>output image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-hist-plot.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-hist-match"></a><h3>vips_hist_match ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_hist_match (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                 <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *ref</code></em>,
                 <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
                 <em class="parameter"><code>...</code></em>);</pre>
<p>Adjust <em class="parameter"><code>in</code></em>
 to match <em class="parameter"><code>ref</code></em>
. If <em class="parameter"><code>in</code></em>
 and <em class="parameter"><code>ref</code></em>
 are normalised
cumulative histograms, <em class="parameter"><code>out</code></em>
 will be a LUT that adjusts the PDF of the image
from which <em class="parameter"><code>in</code></em>
 was made to match the PDF of <em class="parameter"><code>ref</code></em>
's image. </p>
<p>See also: <a class="link" href="libvips-histogram.html#vips-maplut" title="vips_maplut ()"><code class="function">vips_maplut()</code></a>, <a class="link" href="libvips-arithmetic.html#vips-hist-find" title="vips_hist_find ()"><code class="function">vips_hist_find()</code></a>, <a class="link" href="libvips-histogram.html#vips-hist-norm" title="vips_hist_norm ()"><code class="function">vips_hist_norm()</code></a>,
<a class="link" href="libvips-histogram.html#vips-hist-cum" title="vips_hist_cum ()"><code class="function">vips_hist_cum()</code></a>.</p>
<div class="refsect3">
<a name="vips-hist-match.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input histogram</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ref</p></td>
<td class="parameter_description"><p>reference histogram </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>output histogram</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-hist-match.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-hist-local"></a><h3>vips_hist_local ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_hist_local (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                 <em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> **out</code></em>,
                 <em class="parameter"><code><span class="type">int</span> width</code></em>,
                 <em class="parameter"><code><span class="type">int</span> height</code></em>,
                 <em class="parameter"><code>...</code></em>);</pre>
<p>Performs local histogram equalisation on <em class="parameter"><code>in</code></em>
 using a
window of size <em class="parameter"><code>xwin</code></em>
 by <em class="parameter"><code>ywin</code></em>
 centered on the input pixel. </p>
<p>The output image is the same size as the input image. The edge pixels are
created by copy edge pixels of the input image outwards.</p>
<p>See also: <a class="link" href="libvips-histogram.html#vips-hist-equal" title="vips_hist_equal ()"><code class="function">vips_hist_equal()</code></a>.</p>
<div class="refsect3">
<a name="vips-hist-local.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>output image</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>width</p></td>
<td class="parameter_description"><p>width of region</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>height</p></td>
<td class="parameter_description"><p>height of region</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-hist-local.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-hist-ismonotonic"></a><h3>vips_hist_ismonotonic ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_hist_ismonotonic (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                       <em class="parameter"><code><span class="type">gboolean</span> *out</code></em>,
                       <em class="parameter"><code>...</code></em>);</pre>
<p>Test <em class="parameter"><code>in</code></em>
 for monotonicity. <em class="parameter"><code>out</code></em>
 is set non-zero if <em class="parameter"><code>in</code></em>
 is monotonic.</p>
<div class="refsect3">
<a name="vips-hist-ismonotonic.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>lookup-table to test</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>set non-zero if <em class="parameter"><code>in</code></em>
is monotonic </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-hist-ismonotonic.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="vips-hist-entropy"></a><h3>vips_hist_entropy ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
vips_hist_entropy (<em class="parameter"><code><a class="link" href="VipsImage.html" title="VipsImage"><span class="type">VipsImage</span></a> *in</code></em>,
                   <em class="parameter"><code><span class="type">double</span> *out</code></em>,
                   <em class="parameter"><code>...</code></em>);</pre>
<p>Estimate image entropy from a histogram. Entropy is calculated as:</p>
<div class="informalexample">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="gtkdoc opt">-</span><span class="function">sum</span><span class="gtkdoc opt">(</span> p <span class="gtkdoc opt">*</span> <span class="function">log2</span><span class="gtkdoc opt">(</span> p <span class="gtkdoc opt">) )</span></pre></td>
      </tr>
    </tbody>
  </table>
</div>

<p></p>
<p>where p is histogram-value / sum-of-histogram-values.</p>
<div class="refsect3">
<a name="vips-hist-entropy.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>input histogram </p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>image entropy</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><code class="literal">NULL</code>-terminated list of optional named arguments</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="vips-hist-entropy.returns"></a><h4>Returns</h4>
<p> 0 on success, -1 on error</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="libvips-histogram.other_details"></a><h2>Types and Values</h2>
</div>
<div class="refsect1">
<a name="libvips-histogram.see-also"></a><h2>See Also</h2>
<a class="link" href="VipsImage.html" title="VipsImage">image</a><a class="link" href="libvips-arithmetic.html" title="arithmetic">arithmetic</a><a class="link" href="libvips-create.html" title="create">create</a>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>