Accessing User Data in Standalone App
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Zachary Kalmanson
am 24 Sep. 2022
Kommentiert: Zachary Kalmanson
am 27 Sep. 2022
I have created an app that I plan to compile as a standalone executable, but I have run into an issue regarding how to access user data. The app is an image processing algorithm that allows the user to analyze a folder of images on their computer. Originally I had the program add the user's folder to the matlab path using uigetdir, although this has run into issues once I compile the app. I know that modifying the path of a compiled app causes issues, so I am wondering how would I be able to read in a folder of images from the user's computer?
0 Kommentare
Akzeptierte Antwort
Turlough Hughes
am 24 Sep. 2022
You can store image paths in a property in your app (see imageFiles in the attached .mlapp file) and then use that to load the images.
3 Kommentare
Turlough Hughes
am 24 Sep. 2022
Assuming they're all png's (simply for the purpose of demonstration), you can write the following
app.imageFiles = dir(fullfile(userSelectedFolder,'**','*.png'))
This will scan down all the subfolders for png's.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!