CvSeq* objects = cvHaarDetectObjects(
&image,
this->cascade,
this->storage,
scale, // scale : Scale 1.3 means the next round scan will scale 30% bigger.
2, // neigbors : If objects less than 2-1, then the whole detection is invalid.
0, // flags : The only valid flag is 0 for now, means don't check the edges.
cvSize(20, 20) // min_size : The minium size of object.
);
我使用OpenCV进行对象检测,但我找不到任何界面来释放对象'存储器中。
答案 0 :(得分:1)
发布级联:
cvReleaseHaarClassifierCascade( &cascade );
发布memstorage:
cvReleaseMemStorage( &storage );
(所有这些都是使用c ++ api的一个很好的理由,不是吗?)