Ask Your Question

Revision history [back]

Insufficient memory loading moderately large images

Hello All,

I have to manipulate moderately large images, tiffs around 6kx6k 120meg to 12k by 12k and 400meg. I am able to load and manipulate them with Python Image Library and ImageMagick. When I go to load them in OpenCV however, I get the following error.

original_bgr = cv2.imread('59261I_small.TIF', 1 ) OpenCV Error: Insufficient memory (Failed to allocate 127332004 bytes) in unknown function, file ......\src\opencv\modules\core\src\alloc.cpp, line 52 Traceback (most recent call last): File "<stdin>", line 1, in <module> cv2.error: ......\src\opencv\modules\core\src\alloc.cpp:52: error: (-4) Failed to allocate 127332004 bytes

I'm running Python 2.7.5 32 bit, the latest opencv build, winpython and spyder, on 64 bit win 7. I have 128 gigs of ram, though I know I can't access that because of the 32 bit opencv.

Thanks for any suggestions you can provide.

Insufficient memory loading moderately large images

Hello All,

I have to manipulate moderately large images, tiffs around 6kx6k 120meg to 12k by 12k and 400meg. I am able to load and manipulate them with Python Image Library and ImageMagick. When I go to load them in OpenCV however, I get the following error.

original_bgr = cv2.imread('59261I_small.TIF', 1 ) OpenCV Error: Insufficient memory (Failed to allocate 127332004 bytes) in unknown function, file ......\src\opencv\modules\core\src\alloc.cpp, line 52 Traceback (most recent call last): File "<stdin>", line 1, in <module> cv2.error: ......\src\opencv\modules\core\src\alloc.cpp:52: error: (-4) Failed to allocate 127332004 bytes

I'm running Python 2.7.5 32 bit, the latest opencv build, winpython and spyder, on 64 bit win 7. I have 128 gigs of ram, though I know I can't access that because of the 32 bit opencv.

I am able to load smaller images with opencv just fine.

Thanks for any suggestions you can provide.