Setting window/picture title

前端 未结 1 1274
既然无缘
既然无缘 2021-02-14 04:54

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);
相关标签:
1条回答
  • 2021-02-14 05:16

    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 讨论(0)
提交回复
热议问题