Ask Your Question

OutOfMemoryError while training_descriptors

asked 2012-07-14 22:37:07 -0500

varun_jain786 gravatar image

updated 2012-07-16 02:44:46 -0500

Kirill Kornyakov gravatar image

Please help with the exception below:

Mat training_descriptors(1,extractor->descriptorSize(),extractor->descriptorType());
//Extract descriptor
//BELOW is the error line after almost 2500 image descriptor loaded


OpenCV Error: Insufficient memory (Failed to allocate 522777092 bytes) in OutOfMemoryError, file /tmp/pkg/OpenCV-2.4.1/modules/core/src/alloc.cpp, line 52
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2012-07-16 00:53:14 -0500

Niu ZhiHeng gravatar image

You may build your application with 64-bit OpenCV which allow you to use larger memory.

edit flag offensive delete link more


[varun_jain786] Thanks Niu. I tried that but when i built the project using x64 in visual studio, then got error of "module linked is not build in same format". Do i need to download seperate version of opencv?

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-17 02:00:44 -0500 )edit

[Niu ZhiHeng] You need to use x64 version OpenCV. You can either download the superpack or build from source code by yourself.

The 64-bit version of OpenCV built by VS2010 is in the directory of .\build\x64\vc10\

Before that you have to make sure you are using 64-bit Windows.

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-17 02:01:08 -0500 )edit

Question Tools


Asked: 2012-07-14 22:37:07 -0500

Seen: 1,524 times

Last updated: Jul 16 '12