
How to understand segmentation colour in image?
1 回表示 (過去 30 日間)
古いコメントを表示
Hi all Right now I am in process to understand and learn how to segmented colour in image. I found example coding of programming but I am not very clear with that. Here I attached the example of code in matlab:
cform = makecform('srgb2lab');
lab_he = applycform(he,cform);
ab = double(lab_he(:,:,2:3));
nrows = size(ab,1);
ncols = size(ab,2);
ab = reshape(ab,nrows*ncols,2);
Here is my question; 1. why need to double only 2:3?Why luminosity value no need to be double? 2. What is function to reshape value of ab?
0 件のコメント
回答 (1 件)
Image Analyst
2016 年 4 月 1 日
編集済み: Image Analyst
2016 年 4 月 1 日
The image is converted to LAB color space - see picture below.

Then the a and b channels are extracted into a 3D image. Then a list of all [a,b] pairs are formed into a 2D list where each row is the a and b value for that pixel.
I have several color segmentation demos in my File Exchange. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!