开发者

Setting window/picture title

I have:

img = imread('pic.jpg','jpg');
r = img(:,:,1);
g = img(:,:,2);
b = img(:,:,3);

figure, imshow(r);
figure, imshow(g);
figure, imshow(b)开发者_高级运维;

How to set title over each picture?


You want to change the Name-property of the figure window.

img = imread('pic.jpg','jpg');
r = img(:,:,1);
g = img(:,:,2);
b = img(:,:,3);

figure('Name','this is the red channel'), imshow(r);
figure('Name','this is the green channel','NumberTitle','off'), imshow(g);
title(gca,'you can also place a title like this')    

fh = figure; imshow(b);
set(fh,'Name','this is the blue channel')

Also, if you call imshow(g,[]), it will auto-scale the image to min/max.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜