1IM_MEASURE(3) Library Functions Manual IM_MEASURE(3)
2
3
4
6 im_measure - measure colour patches off images
7
9 #include <vips/vips.h>
10
11 DOUBLEMASK *im_measure(in, box, h, v, sel, nsel, name)
12 IMAGE *in;
13 IMAGE_BOX *box;
14 int h, v;
15 int *sel;
16 int nsel;
17 char *name;
18
19
21 Analyse a grid of colour patches, producing a DOUBLEMASK of averages.
22 Pass an IMAGE, an IMAGE_BOX, the number of horizontal and vertical
23 patches, an array giving the numbers of the patches to measure (patches
24 are numbered left-to-right, top-to-bottom, starting with 1) and the
25 name we should give the output mask. Return a DOUBLEMASK in which rows
26 are patches and columns are bands. Only the central 50% of each patch
27 is averaged.
28
29 Example: 6 band image of 4x2 block of colour patches.
30
31 +---+---+---+---+
32 | 1 | 2 | 3 | 4 |
33 +---+---+---+---+
34 | 5 | 6 | 7 | 8 |
35 +---+---+---+---+
36
37 Then call im_measure( im, box, 4, 2, { 2, 4 }, 2, "fred" ) makes a mask
38 "fred" which has 6 columns, two rows. The first row contains the aver‐
39 ages for patch 2, the second for patch 4.
40
41 Output warnings: a warning is issued if the standard deviation of any
42 patch is greater than 20% of the mean of that patch.
43
44
46 NULL on error.
47
49 im_avg(3), im_deviate(3), im_stats(3).
50
51
52
53 24 October 1992 IM_MEASURE(3)