Resize images in multiple directories

7 visualizaciones (últimos 30 días)
Brian Li
Brian Li el 2 de Mzo. de 2018
Respondida: Steve Eddins el 3 de Mzo. de 2018
Hello, I'm pretty new to matlab and I was hoping to get some help from the pros....
I have approximately 50 "parent" folders and files, within each the "parent" folder there is an "images" folder.
I'd like to resize all the images in the "images" folder automatically with a .m script that cycles through each parent folder. I know how to resize images in one folder, but I'm having trouble writing a script that goes through all of the "images" folder within the "parent" folder. Would really appreciate some pointers.
Thanks

Respuestas (2)

Steve Eddins
Steve Eddins el 3 de Mzo. de 2018
Consider using the Image Batch Processor App , introduced in R2015a. It can process the images for you, based on a function of your choosing, and it can also generate a function for you that does the batch processing.

Image Analyst
Image Analyst el 2 de Mzo. de 2018
See my attached demo that processes file in subfolders. Modify it to call imresize() and imwrite() in the look. Let me know if you need help.

Categorías

Más información sobre Images en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by