How to read images from folder in online matlab
Afficher commentaires plus anciens
I have 6000 images to train a model, in a folder in C drive. How to load these images to online matlab?
Réponses (1)
Harsh Parikh
le 5 Juin 2020
2 votes
Hi Keerthi,
MATLAB Online usually does not have a direct access to the local system you are working on.
The following are the ways to use MATLAB Drive:
- Opening in a browser: MATLAB Drive Online
- Installing MATLAB Drive Connector in the local system: MATLAB Drive Connector
Since, you have a directory with 6000 of files, go for the second option.
- Download MATLAB Drive Connector from the link mentioned above.
- Go through the installation steps you encounter while installing the connector.
- Sign in through your MathWorks account.
- After the installation, you will have a folder in your local system which will work as MATLAB Drive folder.
- Now, you can use this folder as any regular folder of your local system, however any file created/modified in that folder will be on MATLAB Drive and will be synced across all the devices which access MATLAB Drive through your account.
With the above approach, you will not have to hassle through the pain of uploading and downloading files through any Web Interface.
The folder will remain in your local system, as well as on MathWorks Cloud and works seamlessly across all your devices.
5 commentaires
xingxingcui
le 28 Oct 2021
It would be good if matlab online could support reading local files in the future, because even using "MATLAB Drive Connector" to synchronize thousands of images to matlab drive is very painful, tens of thousands of images take up a lot of drive space and synchronization is time-consuming.
Walter Roberson
le 28 Oct 2021
I do not think that is likely to happen. MATLAB Online only has whatever access to local drives that javascript sent to the browser has, but for security reasons, javascript only has access to files when there is individual user action to make the file available. The file browsers to select what to upload are not just user choice interfaces: they are also mediating permission; javascript is not permitted to access any file that user did not select through the user choice interfaces.
xingxingcui
le 28 Oct 2021
Modifié(e) : xingxingcui
le 28 Oct 2021
It would also be nice if matlab online gave the user authorization by prompting when reading local files.
(I don't know javascript very well, so my question is a bit superficial)
Similarly, MATLAB Online uses a usb camera, it would give the user a prompt.
Walter Roberson
le 28 Oct 2021
It would have to prompt for each of the 10000 files.
Haroun Rababaah
le 19 Déc 2023
@Walter Roberson: prompting for an img dir is done once, then the system can read all imgs in that dir.
Catégories
En savoir plus sur File Operations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!