Hello I have an image 3d.fig and i want to read the x and y and z coordinate how can I?

回答 (1 件)

Star Strider
Star Strider 2015 年 2 月 10 日

0 投票

I would use the openfig function to read and load it, and then the get function to access the various properties, such as 'XData', 'YData', and 'ZData'. See the documentation for details.

10 件のコメント

mohamad
mohamad 2015 年 2 月 10 日
I try this way but it couldn't solve the problem
Star Strider
Star Strider 2015 年 2 月 10 日
Telling me that ‘it couldn't solve the problem’ does not give me any useful information.
What did not work?
What code did you use? (Paste it in your next Comment, and use the [{}Code] button to format it.)
Were there any errors? If there were, please copy them in their entirety and paste them with your next Comment. Include the lines of your code the errors refer to.
It would also be helpful if you attached your .fig file to your original Question (or at least to your next Comment). Use the ‘paperclip’ or ‘staple’ icon to do that. That way, we can work with it to see what it contains, and may be able to help you get the information you want from it.
mohamad
mohamad 2015 年 2 月 10 日
編集済み: Star Strider 2015 年 2 月 11 日
open('3d_ssfs.fig');
im = frame2im(getframe(gcf));
that's what I used and it's work thank you for respond
Image Analyst
Image Analyst 2015 年 2 月 10 日
That does not look like it would retrieve the x, y, and z data, but whatever...as long as you think you got it working.....
mohamad
mohamad 2015 年 2 月 11 日
your right it doesn't work because when I make rotate to 3D , z goes different so is there any way can i by it catch the x and y and z coordinates
Star Strider
Star Strider 2015 年 2 月 11 日
Unless you attach '3d_ssfs.fig' so we can experiment with it, we cannot help further.
Good luck!
mohamad
mohamad 2015 年 2 月 11 日
this is the image which i want to get the x and y and z
Star Strider
Star Strider 2015 年 2 月 11 日
I loaded it but I cannot get any information at all out of it with respect to coordinate data. (I thought it was a plot. I can deal with them.)
I will leave it to Image Analyst to see if there is coordinate information in it. I can’t find it, in spite of ‘handle-diving’ as much as I can.
I will be interested in how to get information out of such a file.
mohamad
mohamad 2015 年 2 月 11 日
ok, that's the problem when you load it you won't get any information but when you put the cursor at the image it show to you that there is a data(x,y,z)how can i get this data from this image?
Star Strider
Star Strider 2015 年 2 月 11 日
The only solution I can come up with is to manually go to the ‘File’ menu in the figure GUI, choose ‘Save As’, and choose the ‘*.jpg’ option to save it as an image. All the data should be available to you then when you open it as an image. (There may be a way to do that programmatically, but I can’t find it in the documentation, at least not with your particular figure file.)

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeConvert Image Type についてさらに検索

質問済み:

2015 年 2 月 10 日

コメント済み:

2015 年 2 月 11 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by