fix retrieval of detections count
This commit is contained in:
@@ -313,7 +313,7 @@ namespace icf {
|
||||
dim3 block(32, 8);
|
||||
dim3 grid(fw, fh / 8, (scale == -1) ? downscales : 1);
|
||||
|
||||
uint* ctr = (uint*)counter.ptr();
|
||||
uint* ctr = (uint*)(counter.ptr(0));
|
||||
Detection* det = (Detection*)objects.ptr();
|
||||
uint max_det = objects.cols / sizeof(Detection);
|
||||
|
||||
|
@@ -541,7 +541,7 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat&
|
||||
flds.detect(specificScale, rois, objects, 0);
|
||||
|
||||
cv::Mat out(flds.detCounter);
|
||||
int ndetections = *(out.data);
|
||||
int ndetections = *(out.ptr<int>(0));
|
||||
|
||||
if (! ndetections)
|
||||
objects = GpuMat();
|
||||
|
Reference in New Issue
Block a user