the color on image segmented
3 ビュー (過去 30 日間)
古いコメントを表示
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
回答 (1 件)
Image Analyst
2019 年 11 月 19 日
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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!