Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to conncet two images?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Image Analyst
am 15 Mai 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 Kommentare
Image Analyst
am 15 Mai 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
am 15 Mai 2015
[pathstr, name, ext] = fileparts(ThePickedFile);
corresponding_file = fullfile(pathstr, [name, '_contour' ext])
0 Kommentare
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!