Ask Your Question

Revision history [back]

gpu::HOGDescriptor works for small image, but not larger image

I have a small image (800x534) and a large image (1920x1080). I have some simple code that creates a gpu::HOGDescriptor, uploads the image to the GPU, and then runs hog.detectMultiScale. With the small image, it works fine. However, with the large image, I get

OpenCV Error: Gpu API call (out of memory) in mallocPitch, file /home/doriad/src/opencv-2.4.6.1/modules/core/src/gpumat.cpp, line 1415 terminate called after throwing an instance of 'cv::Exception' what(): /home/doriad/src/opencv-2.4.6.1/modules/core/src/gpumat.cpp:1415: error: (-217) out of memory in function mallocPitch

I have a Quadro NVS 420 card, so there should be plenty of memory. In fact, before the upload() call I have

Free memory: 115802112

and after: Free memory: 106459136

which makes sense. Can anyone explain what is going on internally that would take 100 MB of GPU memory for a 1920x1080 image?