LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to segment red target in a image and caculate the L*a*b* value

hello, 

 

Anyone can tell me how to segment a color image? This image contains red、white and black background. 

 

I want the red and white parts, and caculate each parts' L*a*b* value. 

 

Thank you very much. 

 

rex

0 Kudos
Message 1 of 2
(2,320 Views)

Sounds like maybe you don't have Image Toolbox?

 

Attached is a VI to convert RGB to Lab.  IIRC, I think there is no one correct answer for conversion to Lab so check the formula.

 

To do your segmentation without the toolbox, unflatten the image cluster and decompose the RGB array into separate 2D arrays (R, G, B).  Threshold your red areas by finding pixels with high R and low G and B.  Find white by finding pixels with R, G, and B values all high. 

Message 2 of 2
(2,295 Views)