开发者

Setting window/picture title

开发者 https://www.devze.com 2023-01-20 16:06 出处:网络
I have: img = imread(\'pic.jpg\',\'jpg\'); r = img(:,:,1); g = img(:,:,2); b = img(:,:,3); figure, imshow(r);

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

精彩评论

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