I want to read image name to be an string
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I = imread ("28-30-50-30.jpg");
after I ran this function I will get the image in variable "I",
but I want to read name of this picture ("28-30-50-30.jpg") in string to do the next step in strsprit().
How can I do it??
4 Commenti
Stephen23
il 8 Gen 2020
Modificato: Stephen23
il 8 Gen 2020
As you already noted in your question, I is an image. It is a numeric array. It is not a string, nor a character array, and it cannot be applied to functions that require strings or character arrays.
It is not clear what you expect to achieve.
Risposta accettata
KSSV
il 8 Gen 2020
imgNames = dir('*.jpg') ;
N = length(imgNames) ;
for i = 1:N
img = imgNames(i).name
end
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Convert Image Type in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!