1IM_GLOBAL_BALANCE(3)       Library Functions Manual       IM_GLOBAL_BALANCE(3)
2
3
4

NAME

6       im_global_balance, im_global_balancef - perform global mosaic balancing
7       on an image
8

SYNOPSIS

10       #include <vips/vips.h>
11
12       int
13       im_global_balance( IMAGE *in, IMAGE *out, double gamma )
14
15       int
16       im_global_balance_float( IMAGE *in, IMAGE *out, double gamma )
17
18

DESCRIPTION

20       These functions takes an image assembled with the  mosaicing  functions
21       (im_*merge*(),  im_*mosaic*()), take it apart, and reassemble it, glob‐
22       ally optimising the image balance.  This is useful for assembling image
23       mosaics  from  sources  where the exposure is uncontrolled and may vary
24       from tile to tile --- such as video, or photographic sources.
25
26       The function finds a set of factors, one for each of the input  images,
27       and  scales  each  image by its factor before reassembling. The factors
28       are chosen so as to minimise the average grey-level difference  between
29       neighboring  images  at  their  overlaps.   Trivial overlaps (where the
30       width and height of the overlap are  both  less  than  20  pixels)  are
31       ignored.
32
33       The  gamma parameter is the gamma of the image input system. It is used
34       during brightness adjustment. Set to 1.0 to disable gamma, to 1.6 for a
35       typical IR vidicon camera, or 2.3 for a typical video camera.
36
37       It  relies  on  information  left by the mosaicing functions in ".desc"
38       files. If the ".desc" file of the input image has been corrupted, or is
39       strangely complicated, or if any of the original input images have been
40       moved or deleted, the function can fail.
41
42       The function will fail for mosaics larger than about  7  by  7  frames,
43       since it will run out of file descriptors (UNIX sets a limit of 256 per
44       process).  To balance larger mosaics, just assemble them  in  7x7  sec‐
45       tions,  balancing  and saving each part in turn, before loading, assem‐
46       bling and balancing the final image.  The function  can  also  fail  if
47       there are significant mosaicing errors.
48
49       im_global_balancef()  works as im_global_balance(), but outputs a float
50       rather than a uchar image. This lets you adjust the range of the  image
51       manually, if the automatically-found scales are causing burn-out.
52
53

RETURN VALUE

55       All functions return 0 on success and -1 on error.
56

SEE ALSO

58       im_lrmerge(3), im_lrmosaic(3).
59
61       Birkbeck College and the National Gallery, 1991 - 1995.
62
63
64
65                                  13 May 1991             IM_GLOBAL_BALANCE(3)
Impressum