How to resize many images and putting them back in a folder for using them in "image category classification"?
4 views (last 30 days)
Show older comments
Jerome Humbert
on 22 Jan 2018
Commented: Jerome Humbert
on 22 Jan 2018
In doing image category classification I need to resize many images . Until now I use "BatchImageResizer" app which is very easy to work with.However the size of images proposed is limited and I would like to use Matlab to do the job I want. Until now I have successfully resized my images in 300X400 uint8 format in a structure.Ok, from there I would like to save the whole batch in a folder, each image being labelled properly in jpg format.Is there a function or procedure to do this without spending time in doing the saving individually. Thank you in advance.
0 Comments
Accepted Answer
Image Analyst
on 22 Jan 2018
It sounds like the utility resizes the images but does not name them correctly, if that's what you mean by "labelled". You can do both resizing and renaming if you use the FAQ: http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F. At the center of the loop call imresize(), then call sprintf() to make up a new filename for the output file, then call imwrite() to write the resized array out to disk with the new output filename.
More Answers (0)
See Also
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!