11
img = imread('pic.jpg','jpg');
r = img(:,:,1);
g = img(:,:,2);
b = img(:,:,3);
figure, imshow(r);
figure, imshow(g);
figure, imshow(b);
如何设置标题在每张图片?
img = imread('pic.jpg','jpg');
r = img(:,:,1);
g = img(:,:,2);
b = img(:,:,3);
figure, imshow(r);
figure, imshow(g);
figure, imshow(b);
如何设置标题在每张图片?
您想要更改数字窗口的属性Name
。
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')
另外,如果你调用imshow(g,[])
,它会自动缩放图像以最低/最高。
不错!这是窗口的标题:)。你能否告诉我如何改变图片上的文字(在窗口中)? – 2010-10-21 19:09:00
???错误使用==> title at 29 错误输入参数数量 错误==> title at 23 h = title(gca,varargin {:});这是当我尝试使用标题('gca','你也可以放置这样的标题') – 2010-10-21 19:12:21
@Miko Kronn:修正了错误。 'gca'不应该在引号中。顺便说一句:如果有帮助,请不要忘记接受答案。 – Jonas 2010-10-21 19:25:03