【问题标题】:How to display the image after rotation in gnu octave?如何在 gnu 八度音程中显示旋转后的图像?
【发布时间】:2020-07-03 17:31:29
【问题描述】:
I = imread("C:/Users/Hp/Desktop/download.jpg");
J = imrotate(I,90,nearest);
image(J);

这是我用来旋转图像的代码。该代码没有给出任何错误,但它没有显示旋转的图像。 帮助将不胜感激

【问题讨论】:

    标签: image octave


    【解决方案1】:

    你有一个错误。试试:

    J = imrotate( I, 90, 'nearest' );
    

    而不是

    J = imrotate( I, 90, nearest );
    

    第一个使用字符串 'nearest' 作为选项。后者期望nearest 是一个现有变量。

    更新:

    这是一个完整的示例(图片来自网络)。

    pkg load image
    I = imread('https://i.imgur.com/I7GUK.jpg');
    J = imrotate( I, -90, 'nearest' );
    subplot( 1, 2, 1 ); image( I ); axis square off;
    subplot( 1, 2, 2 ); image( J ); axis square off;
    

    【讨论】:

    • 我做出了改变。但是我在哪里可以看到旋转后的图像?
    • 您能解释一下用于显示图像的命令吗?
    • @Chaitra image 函数将矩阵显示为图像。 (这是你要问的吗?)
    猜你喜欢
    • 2020-07-03
    • 2012-07-02
    • 2018-03-22
    • 1970-01-01
    • 2014-02-27
    • 2015-10-07
    • 1970-01-01
    • 2021-02-02
    • 1970-01-01
    相关资源
    最近更新 更多