# convert Lab to one dimension

Is it possible to convert Lab color space values to single axix representing the intensity of colour. I tired this by converting the clored image to graysclae image and than using the intensity [0,255] of the grayscale image as the axis. But is their other methods by which this can be done directly without converting into another color space(gray). So that i compare the posotions of each pigments.

edit retag close merge delete

( 2020-06-07 15:12:34 -0500 )edit

This may help?

L, a, b = Lab.split()

L.save('L.png')
a.save('a.png')
b.save('b.png')

( 2020-06-07 15:15:16 -0500 )edit

i don't mean to split the channels into 3 parts and use L as an axis. What i want is i want to visualize/do some calculations on the colour difference of two pixels by ploting given colored image in x as image x coordinate, y as image y coordinate and z as the overall lets say intensity of give (x,y) pixel so that after plotting them in 3d i can do some measuments manually and automatically/programatically to see the colour difference bettewn the two pixels. right now i'm doing this by pling the grayscale image gray intensity value 0,255, but i'm not satisfied with this and also i found that since gray intnsity = r+b+g/3 generally the value of r,b,g is not specifi i.e tow different visually pixels can also have simlar intensity.

( 2020-06-10 12:48:59 -0500 )edit

Sort by » oldest newest most voted

If by intensity you mean luminance / lightness, you can split() a Lab image into its components and thus get the L component.

more

i don't mean to split the channels into 3 parts and use L as an axis. What i want is i want to visualize/do some calculations on the colour difference of two pixels by ploting given colored image in x as image x coordinate, y as image y coordinate and z as the overall lets say intensity of give (x,y) pixel so that after plotting them in 3d i can do some measuments manually and automatically/programatically to see the colour difference bettewn the two pixels. right now i'm doing this by pling the grayscale image gray intensity value 0,255, but i'm not satisfied with this and also i found that since gray intnsity = r+b+g/3 generally the value of r,b,g is not specifi i.e tow different visually pixels can also have simlar intensity.

( 2020-06-10 12:49:02 -0500 )edit

Official site

GitHub

Wiki

Documentation