0
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 进行对象检测,但我找不到任何接口来释放对象的内存。

4

1 回答 1

1

释放级联:

cvReleaseHaarClassifierCascade( &cascade );

释放内存:

cvReleaseMemStorage( &storage );

(所有这些都是使用 c++ api 的好理由,不是吗?)

于 2013-05-19T06:22:05.110 回答