Table of Contents

## Name

im_heq, im_lhisteq, im_lhisteq_raw, im_hsp - process an image using grey level transformations

## Synopsis

#include <vips/vips.h>

int im_heq(in, out, bandno)
IMAGE *in, *out;
int bandno;

int im_lhisteq(in, out, xw, yw)
IMAGE *in, *out;
int xw, yw;

int im_hsp(in, ref, out)
IMAGE *in, *ref, *out;

## Description

im_heq() histogram equalises the unsigned char image held by the IMAGE descriptor in. The result is written to the IMAGE descriptor out. If bandno is 0 then all input bands are equalised independently. In all other cases the input image is equalised using the histogram of bandno only. The latter processing produces better results.

im_hsp() maps in to out with histogram specified by the ref. All images should be unsigned char. Each band of the output image is specified according to the distribution of grey levels of the reference image according to im_histspec(3X) .

im_lhisteq() histogram equalises the one channel unsigned char image pointed to by the Image descriptor in. The result is written to the IMAGE descriptor out. The histogram equalisation is based on a window of size xw by yw centered at the current location of each input pixel. The produced image has a black border of sizes xw/2 (left), xw-xw/2 (right), yw/2 (top) and yw-yw/2 (bottom).

im_lhisteq_raw() is as above, but does not add the black border to the output image.

## Return Value

All functions returns 0 on success and -1 on error.

## See Also

im_histgr(3X) , im_histplot(3X) , im_histspec(3X) , heq(1) , im_lineprof(3X) , im_stdif(3X) .

## Copyright

1991--1996 The National Gallery and Birkbeck College

Table of Contents

- Name
- Synopsis
- Description
- Return Value
- See Also
- Copyright