cvLatentSvmDetectObjects returns empty sequence [closed]
Hello everyone!
I'm trying to execute the example code of LatentSVM included in 'samples/c/latentsvmp.cpp' of openCV 2.4.11 version, but when the function cvLatentSvmDetectObjects is called always return an empty sequence. I'm using the default configuration and files given, do you have the same problem?
detections = cvLatentSvmDetectObjects(image, detector, storage, 0.1f, numThreads);
Thanks for all!
try
cv::LatentSvmDetector::detect
orcv::dpm::DPMDetector::detect
. cvLatentSvmDetectObjects is deprecated C-APIHello! First of all thanks for reply :), I've tryed your solution but the problem is still there, I've realized that the sequence given by the method is maybe bad constructed, for example, if I have this code:
I've got that detections size is 0 before LatentSVM call, but if I try to count the size of detection after that the program crashes without log any information... What is happening?
Thanks again :).
please replace all the
*.h
bu*.hpp
in includes and allcvMethodName
bycv::methodName
. So you are not in need ofCvSeq*
, butstd::vector< cv::LatentSvmDetector::ObjectDetection >
; so this should look something like:more, it is normal to have 0 before detection, because you have nothing put inside the detections, so it is an empty vector/pointer.