how to convert .tif to matlab.fig file?

Dear All,
I know this is a very stupid question but I am not a matlab user and have no idea how to do it. My request is how to convert a .tif file to matlab.fig file? please help!
best, ferhat

 Accepted Answer

Ferhat - just read the image in using imread and then use image or imshow to display the image in a figure. Something like
myImg = imread('someImage.tif');
imshow(myImg);
Try the above and see what happens!

7 Comments

Thanks for the answer! I submitted an article to one of the journal and they wanted me to convert all my tif files to matlab.fig, so today I started to learn matlab basics :). I am trying to do what you suggested but nothing happens :), i think I am doing something wrong. I have R2012a version of Matlab installed our department computer, there should be an easy way for dummies like me :)
Try using image instead, or elaborate on what you mean by nothing happens.
Ferhat's answer moved here
ok, I found the problem, my tiff files are too big, and matlab cannot recognize that big files, is it possible?
How big are the files? Can you attach one to this question?
Ferhat's answer moved here
Hi, biggest file is around 2mb, not that big actually, I attached what I see on the screen. Seems like there is a technical problem with the picture.
Ferhat's answer moved here
it gives same error for each figures,
>> I = imread('Figure 1.tif');
>> imshow(I)
Error using imageDisplayValidateParams>validateCData (line 117) Unsupported dimension.
Error in imageDisplayValidateParams (line 31) common_args.CData = validateCData(common_args.CData,image_type);
Error in imageDisplayParseInputs (line 79) common_args = imageDisplayValidateParams(common_args);
Error in imshow (line 198) [common_args,specific_args] = ...
Ferhat - if you wish to further the dialog, please add comments to this answer rather than creating answers of your own.
Once you have read the file - but before you have called imshow - type the following in the Command Window
whos I
so that we can get an idea of the size and the dimension of the image. The latter is important as the error message is indicating that the dimension is unsupported. Also, try the following too
info = imfinfo('Figure 1.tif')
Please copy and paste the results from both of the above statements as comments to this answer.

Sign in to comment.

More Answers (0)

Categories

Find more on Environment and Settings in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!