the color on image segmented
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
below is a part of my coding, i had try insert gray scale image and for figure 2 it produce the image below,
i want to ask where it state about the color produce in figure 2
%Show the results
ifsize(im, 3)==1 % Gray-level image
img=zeros(sz(1),sz(2));
j=1;
imagesc(im); axis off; hold on; colormap gray;
fori=0:k_max-1
LL=(L_global_min==i);
is_zero=sum(sum(LL));
if is_zero
img(:,:,1)=img(:,:,1)+LL*c(j,1);
j=j+1;
end
if i~=i_ground
color=[rand rand rand];
contour(LL,[1 1],'LineWidth',2.5,'Color',color); hold on;
end
end
figure(2);
imagesc(img); axis off;
end
Respuestas (1)
Image Analyst
el 19 de Nov. de 2019
imagesc() applies it's own crazy idea of how it thinks you want the image pseudocolored, and it's almost always wrong. I suggest you don't use it -- I never do. Use imshow() instead. If you want a colormap, pick one of your own choosing with the colormap() function.
0 comentarios
Ver también
Categorías
Más información sobre Red en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!