1IM_HISTPLOT(3) Library Functions Manual IM_HISTPLOT(3)
2
3
4
6 im_histplot - graph an image of one horizontal or vertical line
7
9 #include <vips/vips.h>
10
11 int im_histplot(in, out)
12 IMAGE *in, *out;
13
14
16 im_histplot(3) plots a graph of a horizontal or vertical image file
17 with one line. It is suitable for displaying the output of histogram
18 functions such as im_histgr(3) and for displaying line profiles.
19
20 Note that if you try to directly plot the result of im_histgr(3) you
21 will often get a very, very large image, since im_histplot(3) will draw
22 an image as high (or as wide) as the largest pixel value in the image
23 (potentially huge). Use im_histnorm(3) to normalise the histogram maxi‐
24 mum before plotting.
25
26 The input image should be either one horizontal line (Ysize=1) or one
27 vertical line (Xsize=1). If the image is FMTUCHAR, the graph is drawn
28 as 256 by line-length pixels. For all other unsigned integer types,
29 im_histplot(3) finds the image maximum, and draws the graph as max by
30 line-length pixels.
31
32 For signed integer types, im_histplot(3) finds minimum and maximum,
33 moves min up to zero, and draws the graph as min + max by line-lenth
34 pixels.
35
36 For float types, im_histplot(3) finds minimum and maximum, and scales
37 the image range so as to make the graph square.
38
39
41 The function returns 0 on success and -1 on error.
42
44 im_histgr(3), im_histnorm(3), im_extract(3).
45
47 National Gallery and Birkbeck College, 1995
48
49
50
51 10 May 1991 IM_HISTPLOT(3)