Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 其它 > 资料存档
资料存档 资料存档
回复
 
主题工具 显示模式
旧 2019-12-10, 16:49   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
帖子 尝试研究图像压缩的倍频程错误

首先,我说我爱你。谢谢。

下一个业务订单:

octave-3.2.3:8> xin = imread('3Phone.png'); octave-3.2.3:9> colormap(gray(256)); octave-3.2.3:10> image(xin); error: invalid value for array property "cdata" error: set: expecting argument 2 to be a property name error: set: expecting argument 4 to be a property name error: set: expecting argument 6 to be a property name error: called from: error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/image/__img__.m at line 57, column 7 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/image/image.m at line 75, column 5 error: A(I): Index exceeds matrix dimension. error: called from: error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/plot/__go_draw_axes__.m at line 383, column 22 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/plot/__go_draw_figure__.m at line 92, column 3 error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/plot/gnuplot_drawnow.m at line 91, column 5 octave-3.2.3:10> 我在Mac OS X(雪豹)上使用Octave 3.2.3。这是显示已读取并存储的图像的非常基本的尝试。任何解决此问题的帮助将不胜感激。谢谢!


回答:
我的猜测是,当您阅读png文件时-确保它是灰度文件。否则,存在3个矩阵(RGB)。因此,您不能使用灰度色图。

如果2Phone.png是彩色图像,请尝试(至少这是我在Matlab中所做的):

xin = imread('3Phone.png'); image(xin(:, :, 1); colormap(gray(256)); 这将仅显示R矩阵。

更好的是使用RGB2Gray (当然,请使用等效的Octave)。



更多&回答...
poster 当前离线   回复时引用此帖
回复


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛禁用 表情符号
论坛启用 [IMG] 代码
论坛启用 HTML 代码



所有时间均为北京时间。现在的时间是 01:20


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.