Ask Your Question
1

convert Lab to one dimension

asked 2020-06-07 08:54:14 -0500

dineshlama gravatar image

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 flag offensive close merge delete

Comments

supra56 gravatar imagesupra56 ( 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')
supra56 gravatar imagesupra56 ( 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.

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

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-06-07 13:38:23 -0500

mvuori gravatar image

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

edit flag offensive delete link more

Comments

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.

dineshlama gravatar imagedineshlama ( 2020-06-10 12:49:02 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-06-07 08:54:14 -0500

Seen: 48 times

Last updated: Jun 07