Write loop for averaging every 20 images out of 5000
Show older comments
Hello and thanks in advance for any help!
I'm trying to come up with a loop to average every 20 images out of over 5000. In essence, I want to average images 1-20, 21-40, 41-60 etc. until the end, and then run code for image processing on those averaged images. The images are .jpg files, all of which are in the same folder. I have no idea on how to setup the loop and haven't had much success researching it online.
Any help is greatly appreciated!!
3 Comments
Azzi Abdelmalek
on 23 May 2014
How your files are named?
Rangley
on 27 May 2014
Image Analyst
on 27 May 2014
That's fine. The FAQ, as mentioned in my answer, will work fine. I recommend using the version that uses the dir() function if your files already exists that way you can be sure of processing all of the files that actually exist and not getting a filename that may not exist.
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!