How to crop and resize images?
5 views (last 30 days)
Show older comments
I have a folder containing 100 frames. The frames contain human face. I want to crop and resize all the frames so that I could get only faces and the background is eliminated. Then, I want to store all the cropped and resized images in a folder named- "preFrames". I am new to MATLAB. Please provide the code with some explanation.
0 Comments
Answers (1)
Swarooph
on 20 Oct 2016
2 Comments
Swarooph
on 20 Oct 2016
Edited: Swarooph
on 20 Oct 2016
If you are new to MATLAB I strongly encourage you to learn MATLAB programming basics by accessing the MATLAB Onramp free course . Apart from covering FOR loops, it also talks about various things such as indexing etc. which will prove to be very useful when you are working with images.
Take a look at the face detection example in the documentation here to see how to do automatic face detection instead of manual cropping.
The general documentation can be found here where you can search for different things that you might have questions about to look at examples and read about concepts.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!