how to read images form folders directory
Mostra commenti meno recenti
hi, how to reasd images , say '*.png' images from folders in directory and produce output same as folder name.
Risposta accettata
Più risposte (2)
Image Analyst
il 22 Ott 2012
Modificato: Image Analyst
il 22 Ott 2012
0 voti
You may be interested in the FAQ http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F which has several code examples.
OK, that's totally different. You need a function called "ClassifyFruit" that takes an image and then returns the class number 1-5 depending on whether it's an apple, banana, peach, etc. Then use sprintf() to create the folder name, and mkdir to create it if you don't have it. Then create the full filename with sprintf and use imwrite to copy the image to that folder.
1 Commento
Tulips
il 29 Ott 2012
sawsan mahmood
il 21 Apr 2016
0 voti
hi , please I need help I have database of iris segmentation a folder contain 241 subfolders (named from 1 to 241) each of them contain 5 images (named from Img_1_1_1 to Img_1_1_5)and second subfolder's image named (Img_2_1_1 to Img_2_1_5) and so on ,please I need code to read the first image only from each subfolder and make same processing to them thanks
1 Commento
Image Analyst
il 21 Apr 2016
See my attached code. Change the file pattern to Img_1_1_1 and it will work.
Categorie
Scopri di più su File Operations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!