LIGHT_CORRECT(1)

πŸ“¦ version 8.12.1, in ubuntu jammy

πŸ’– LIGHT_CORRECT(1) β€” the general commands manual bestie edition πŸ’–

okay so you found the light_correct page in the General Commands Manual, and honestly? it's giving "quiet little tool that fixes your whole photo shoot." no cap. let's get into it. πŸŽ€


✨ NAME ✨

light_correct β€” correct illumination errors on set of images πŸ¦‹


✨ SYNOPSIS ✨

light_correct grey image1 image2 image3 ...

✨ DESCRIPTION ✨

so the vibe is this: the first argument has to be an image of a piece of grey card. everything after it? those are the images that were taken with the same lighting set-up and that need correcting. periodt. πŸ’…

the corrected images get written out to files prefixed with ic_. iconic behavior, honestly.

okay let's do the example because examples eat every time. imagine you've got a directory with these files in it:

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 you run light_correct like this:

example% light_correct grey.v dat*.v

and boom, you get 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

the ic_ prefix did that. you're welcome. πŸ’–


🌸 so how does it actually work though 🌸

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. that's the whole trick. it's lowkey elegant. ✨

it also removes any .desc files it generates, so you don't get problems with im_global_balance(3). not it creating drama with another function. πŸ™ˆ


✨ RETURN VALUE ✨

returns 0 on success and non-zero on error. classic. 🫢


✨ SEE ALSO ✨


The National Gallery and Birkbeck College, 1989-1996.


πŸ’€ friendly reminder bestie: that first arg is the grey card and everything else gets the ic_ glow-up. get the order wrong and you're just correcting a grey card against a pile of photos. πŸŽ€

okay that's the whole page!! mwah πŸ’‹ β€” this was LIGHT_CORRECT(1) from the General Commands Manual, dated 14 Oct 1996, and it lives in the light_correct source/version that shipped with it. go fix those illumination errors, you absolute icon πŸ‘‘πŸŒˆβ­

πŸ“¦ where this page comes from