设置窗口/图片标题 [英] Setting window/picture title

查看:169
本文介绍了设置窗口/图片标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有:

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')

,如果你打电话给 imshow(g,[]),它会自动将图像缩放到最小/最大。

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

这篇关于设置窗口/图片标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆