Montage appears not to work

6 vues (au cours des 30 derniers jours)
Jason
Jason le 17 Juin 2014
Commenté : Jason le 18 Juin 2014
Hi. I have a directory with 28 images in of format that I want to montage. I have read the help and searched on line, but still i cannnot get it to work.
fileFolder='C\Temp2'
dirOutput = dir(fullfile(fileFolder,'*.tif'));
fileNames = {dirOutput.name};
figure
montage(fileNames, 'Size', [4 7]);
The naming of the images is illustrated below.
Can anyone suggest how to get it to work. the error message is "FILENAMES must be a cell array of strings."
could I also ask if there is a way to use the montage function but in a zigzag manner?
thanks Jason
  4 commentaires
Jason
Jason le 18 Juin 2014
Sean, heres the response:
fileFolder =
C\Temp2
Name Size Bytes Class Attributes
fileNames 0x0 0 cell
and the response from iscellstr is "1".
_ * * Image analyst * * _ , by Zig zag I mean the layout follows an "s" shape. i.e. if the first row of 7 images goes from left to right, then the 2nd row of images goes from right to left, then the third from left to right and so on.
thanks
Jason
Jason le 18 Juin 2014
I found my mistake - missing Colon!!
fileFolder='C\Temp2'
should be fileFolder='C:\Temp2'
I would still like to know how to zigzag.

Connectez-vous pour commenter.

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by