Info
Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
How to conncet two images?
    2 visualizzazioni (ultimi 30 giorni)
  
       Mostra commenti meno recenti
    
Hi!
I would like to know is there a way to connect two images. So when user picks the image (e.g mar-001-100) from one directory I would like to work with image from another directory (e.g mar-001-100-contour). So I want to connect these two images. In that way I can work with second image and display to user first image.
0 Commenti
Risposte (2)
  Image Analyst
      
      
 il 15 Mag 2015
        Yes. I don't know how your user picked the image, but if it was from a listbox (hopefully because that's the most convenient for your user), you know the folder1 and base filename. If you made the user use uigetfile() then you can get the base filename and folder1 from there. So you can either get the base filename from the 'Value' and 'String' property of the listbox, or from the return argument of uigetfile. Now, you must know the folder name of the second folder you want to use, so you simply use that one when you construct the full filename with fullfile():
fullFileName2 = fullfile(folder2, baseFileName);
Then use that however you need to.
2 Commenti
  Image Analyst
      
      
 il 15 Mag 2015
				I'm not sure I understand why what I said won't work. Just use fullfile() with whatever folder you want to construct new filenames.
  Walter Roberson
      
      
 il 15 Mag 2015
        [pathstr, name, ext] = fileparts(ThePickedFile);
corresponding_file = fullfile(pathstr, [name, '_contour' ext])
0 Commenti
Questa domanda è chiusa.
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


