in following code instead of using rgb2lab i have to use srgb2lab, i am getting error?
    4 views (last 30 days)
  
       Show older comments
    
he = imread('peppers.png'); lab_he = rgb2lab(he);
ab = lab_he(:,:,2:3); nrows = size(ab,1); ncols = size(ab,2); ab = reshape(ab,nrows*ncols,2);
nColors = 3; % repeat the clustering 3 times to avoid local minima [cluster_idx, cluster_center] = kmeans(ab,nColors,'distance','sqEuclidean','Replicates',3);
pixel_labels = reshape(cluster_idx,nrows,ncols); figure,imshow(pixel_labels,[]), title('image labeled by cluster index');
0 Comments
Answers (0)
See Also
Categories
				Find more on Physical Units in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!