MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   MATLAB中imageinfo返回的对象的属性 (https://www.labfans.com/bbs/showthread.php?t=24110)

poster 2019-12-10 20:48

MATLAB中imageinfo返回的对象的属性
 
在MatLab R2010B中,如何引用函数调用imageinfo返回的对象中的字段?我是

代码示例:

imagePropObj = imageinfo('imageFile.tif'); 这会弹出一个窗口,显示图像文件的各种属性。然后我尝试使用访问Width属性

imagePropObj.Width 但是我得到了错误

??? Attempt to reference field of non-structure array. 我不确定自己在做什么错。请帮忙。谢谢。



[B]回答:[/B]

imageinfo将句柄返回到该图。那不是你想要的。我假设您实际上要使用[URL="http://www.mathworks.com/help/techdoc/ref/imfinfo.html"]IMFINFO[/URL] ,它确实返回带有字段“宽度”的结构。



[url=https://stackoverflow.com/questions/4157841]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 23:42

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