Log in

View Full Version : is L in LAB colorspace == Y in YUV


E-Male
23rd February 2005, 11:03
i hope this is not the wrong forum

working on porting a filmlook guide from photoshop to avisynth i came across LAB colorspace
curves manipualting the L-channel are used

now i wonder if the L-channel in LAB is the same as Y in YUV?
if it is so i could just mod my curve filter to apply the L-curves to the Y channel

Wilbert
23rd February 2005, 12:16
Nope, according to

http://www.poynton.com/notes/colour_and_gamma/ColorFAQ.html

L = 116*(Y/Yn)^(1/3)-16; 0<=L<=100

with Yn the luminance of the reference white (Yn=235 here).

a,b are functions of (X,Y,Z) (see 35). The relation between (X,Y,Z) and (R,G,B) is given in 18 (note it's RGB Rec.709 here). You should be able to work out the relation (X,Y,Z)<->(Y,U,V) from this.

additional info:
http://en.wikipedia.org/wiki/Lab_color_space

Mug Funky
23rd February 2005, 12:18
in theory it is, but i don't think the same coefficients are used in the colourspace conversion.

try it with a simple colorbars script - take it into photoshop and convert to LAB, and you'll see the colour channels are quite a bit different from those you get with regular (mpeg-1?) YV12.

but it's a good starting place for doing colour curves. i'm doing something similar trying to get a nice film look to my g3's 16bpc linear raw ccd pics that come out of the dcRaw program. so far i have something that looks okay, but i have to tweak it for every photo :(

[edit]

ar, quick typing thar, wilbert :)

E-Male
23rd February 2005, 14:27
thx
i think i'll be able to get the code for using L curves done

EDIT:
using 255 for white i got some nicely working code in my test proggy