Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
Hi guysss..

I am working with segmentation now...i need to convert l a b space color values to l a b vector...how its possible..??what is the difference bwn lab values and lab vector??how tp represent lab space vector??
Posted
Comments
CHill60 15-Sep-15 12:37pm    
What have you tried? Where are you stuck?
Use the full words not your own made up words ("bwn", "tp", "guysss")
silvsten john 16-Sep-15 0:40am    
Sorry for that...i can give more detail about pblm...nw i am working with slic super pixel segmentation

As this algorithm says..convert whole image pixel RGB values to CIE LAB..i converted RGB to LAB....nw i have set of LAB values for all the pixels in my image ..

The next step is i should find Gradient of lab vector.this is the equation to to find image gradient in lab color space...


G(x,y)=I(x+1,y)-I(x-1,y)+I(x,y+1)
-I(x,y-1).

here I(x,y) denotes lab vector at x,y position..

then my doubt is as i said i have set of l a b values(in double format)..how will i apply these values in this gradient equation as lab vector.

..expecting u understand it..

First try to understand what CIELAB means. Than you will find that your "so called" Lab* Values are the components of a Lab* Vector in the Lab* Colorspace

In very short:
Lab* is a (three dimensinal) colour space. The "*" Comes from history to make a clear difference between the CIE-LAB space and others like Hunter Lab.

See wiki:
CIEAB>[^]

Here you can find all the formulas (including explanation) to convert from e.g. sRGB to XYZ etc.
http://www.brucelindbloom.com/[^]


[EDIT]
Sorry for bad layout, I don't know how to do it better ;)
That is simple vector addition/substratction.You do this component whise.
E.g. (and sorry for the bad representation)

       3    // L*
lab_1= 4    // a*
       2    // b*

       7
lab_2= -1
       1
                     3+7       10
than lab_1 + lab_2=  4+(-1)  =  3
                     2+1        3


And in your case you have simply 4 lab vectors from the source picture you need to calculate:
according to G(x,y)= lab_1 - lab_2 + lab_3 - lab_4 to get the Lab* value in your target gradient.

[/EDIT]
 
Share this answer
 
v4
Comments
silvsten john 16-Sep-15 0:50am    
First ...thanks for ur reply..

Sir actually i converted rgb to l a b values.
i have l a b values corresponding each pixel in the image..

.i can give more detail about pblm...nw i am working with slic super pixel segmentation

As this algorithm says..convert whole image pixel RGB values to CIE LAB..i converted RGB to LAB....nw i have set of LAB values for all the pixels in my image ..

The next step is i should find Gradient of lab vector.this is the equation to to find image gradient in lab color space...


G(x,y)=I(x+1,y)-I(x-1,y)+I(x,y+1)
-I(x,y-1).

here I(x,y) denotes lab vector at x,y position..

then my doubt is as i said i have set of l a b values(in double format)..how will i apply these values in this gradient equation as lab vector...???
[no name] 16-Sep-15 4:28am    
I tried to explain it, see modified answer. Sorry for bad layout there.
CPallini 16-Sep-15 5:14am    
My 5.
[no name] 16-Sep-15 5:23am    
Thank you very much.
silvsten john 16-Sep-15 6:02am    
Thank you very much sir

Then How we can view/output cie lab color mode in image..??
This is a plain wrong question, "how differ"? Just learn how this color space works: https://en.wikipedia.org/wiki/Lab_color_space[^].

Most questions about "difference" are inherently invalid. If you didn't get it yet, try to tell use the "difference" between apple and Apple. :-)

—SA
 
Share this answer
 
Comments
[no name] 15-Sep-15 13:40pm    
Wiki is ok for start a 5. I added also bruce lindbloom in Answer 2. He gives a lot of explanations also.
silvsten john 16-Sep-15 0:39am    
First ...thanks for ur reply sir..i can give more detail about pblm...nw i am working with slic super pixel segmentation

As this algorithm says..convert whole image pixel RGB values to CIE LAB..i converted RGB to LAB....nw i have set of LAB values for all the pixels in my image ..

The next step is i should find Gradient of lab vector.this is the equation to to find image gradient in lab color space...


G(x,y)=I(x+1,y)-I(x-1,y)+I(x,y+1)
-I(x,y-1).

here I(x,y) denotes lab vector at x,y position..

then my doubt is as i said i have set of l a b values(in double format)..how will i apply these values in this gradient equation as lab vector.

..hope u understand my doubt sir...thank u

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900