Each image has size 2085x1811x3 and is stored with 3*eight bits per pixel, then each image requires 11 megabytes of memory. There are more than two thousand of them, so you will need at least 23 gigbytes of memory to store them all. Does your computer have twenty-three gigabytes of main memory? Remember that computer memory (RAM, etc) is NOT the same as the harddrive capacity!
If you only need the grayscale then the total reduces down to 7.6 GB.
If you do not have this much memory then you have two choices:
- Buy more memory.
- change your algorithm so that you do not need to store all of the data (e.g. process one image at a time, subsample/resize, etc).
Best Answer