OpenCV tries to allocate a crazy amount of memory
Whenever I try to read this image (http://static.adit.io/image.tiff) with OpenCV, I get the following error:
OpenCV Error: Insufficient memory (Failed to allocate 18446744072949170176 bytes) in OutOfMemoryError, file /path/to/file/opencv-2.4.9/modules/core/src/alloc.cpp, line 52
I have seen this happen with other images too. What's going on?
I tried reading the image and its working fine for me, no errors. Could you be more specific as to what code are you using? If you are using IplImage I would strongly suggest you to go up with Mat image container. IplImage doesn't release the memory, but Mat is kind of a smart pointer, it allocates only when the image is being called and releases it immediately.