Pregunta

When I try to run an opencv code with a hog detector included, a get the following error.

Ive been using OpenCV for other things, and I've only gotten an error when including hog.

"Debug Assertion Failed"... Expression: _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)"

The code is the most simple one of hog I found from here: http://www.magicandlove.com/blog/2011/08/26/people-detection-in-opencv-again/

If I comment out this line it runs (just doesn't do the job obviously):

hog.setSVMDetector(cv::HOGDescriptor::getDefaultPeopleDetector());
¿Fue útil?

Solución

your project will have to use the very same c-runtime libs, that the opencv dlls were compiled against.

so, set "c++" -> "code generation" to "multithreaded dll" in your project.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top