Ask Your Question
0

OutOfMemoryError while training_descriptors

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

varun_jain786 gravatar image

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

Kirill Kornyakov gravatar image

Please help with the exception below:

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

Exception:

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
0

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

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

Comments

[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 -0600 )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 -0600 )edit

Question Tools

Stats

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

Seen: 2,038 times

Last updated: Jul 16 '12