Memory error for big size image

I try to use tf network to train a module (320240) and do some adjustment for motor, after that I try to save a image with big resolution (16001200), but always get memory error message. Is there any way to implement it?

Where are you trying to save the image? To the internal flash? Is there space on the flash disk?

Yes, I use JPEG compress format. So the space should be enough to save this image.

Which camera model are you using? Do you have enough space on the disk? Can you provide a script that causes the issue?