---
name: "light_correct"
section: "1"
platform: "linux"
package: "libvips-tools"
version: "8.10.5-2"
release: "Debian 11 (Bullseye)"
platforms: ["linux"]
url: "https://new.carta.tech/light_correct"
---

# light\_correct(1)

correct illumination errors on set of images

## NAME

light\_correct - correct illumination errors on set of images

## SYNOPSIS

**light\_correct grey image1 image2 image3 ...**

## DESCRIPTION

The first argument should be an image of a piece of grey card, subsequent arguments should be images taken with the same lighting set-up which need correcting. The corrected images are written to files prefixed with "ic\_".

For example, suppose you have a directory with the following files in:

  example% ls\
   dat1.1.v dat1.2.v dat2.1.v dat2.2.v dat3.1.v dat3.2.v\
   dat4.1.v dat4.2.v grey.v

then run light\_correct like this:

  example% light\_correct grey.v dat\*.v

to generate this:

  example% ls\
   dat1.1.v dat1.2.v dat2.1.v dat2.2.v dat3.1.v dat3.2.v\
   dat4.1.v dat4.2.v grey.v\
   ic\_dat1.1.v ic\_dat1.2.v ic\_dat2.1.v ic\_dat2.2.v ic\_dat3.1.v\
   ic\_dat3.2.v ic\_dat4.1.v ic\_dat4.2.v

light\_correct works by smoothing out the grey card image, finding grey-mean/pixel for each point, and then multiplying the result by all the following images. It also removes any .desc files it generates, to avoid problems with [im\_global\_balance(3)](/im_global_balance/3.md).

## RETURN VALUE

returns 0 on success and non-zero on error.

## SEE ALSO

[vipsheader(1)](/vipsheader/1.md), [vips(1)](/vips/1.md)

## COPYRIGHT

The National Gallery and Birkbeck College, 1989-1996.
