【问题标题】:How to show the image name as the title of the window in matlab如何在matlab中将图像名称显示为窗口的标题
【发布时间】:2017-06-05 17:46:50
【问题描述】:

matlab中使用imshow时如何获取图片的名字作为窗口的标题

例如:我使用以下代码来显示原始图像和骨架化图像。

figure
subplot(1,2,1)
imshow(BW_Original)
subplot(1,2,2)
imshow(BW_Thinned)

我想将图像名称显示为弹出窗口的标题。有人可以帮我弄这个吗。谢谢。

【问题讨论】:

    标签: matlab image-processing


    【解决方案1】:

    您需要将图形的'Name' property 更改为您的图像名称,并将'NumberTitle' property 设置为'off'(以删除出现的“Figure #:”):

    set(gcf, 'Name', 'image_name', 'NumberTitle', 'off');
    

    【讨论】:

      【解决方案2】:

      调用figure时可以设置人物名称

      figure('name', 'BW comparison image name here')
      subplot(1,2,1); imshow(BW_Original);
      subplot(1,2,2); imshow(BW_Thinned);
      

      Gnovice 还提到您可能想从名称中删除数字编号,这也可以在调用 figure 时完成:

      figure('name', 'BW comparison image name here', 'numbertitle', 'off')
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-04-10
        • 1970-01-01
        • 2020-11-23
        • 1970-01-01
        • 2014-05-06
        相关资源
        最近更新 更多