remove debug code
This commit is contained in:
parent
1b9bccb856
commit
0424e2c8d2
@ -463,15 +463,6 @@ bool cv::gpu::SoftCascade::load( const string& filename, const float minScale, c
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define USE_REFERENCE_VALUES
|
|
||||||
namespace {
|
|
||||||
char *itoa(long i, char* s, int /*dummy_radix*/)
|
|
||||||
{
|
|
||||||
sprintf(s, "%ld", i);
|
|
||||||
return s;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//================================== synchronous version ============================================================//
|
//================================== synchronous version ============================================================//
|
||||||
|
|
||||||
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat& rois,
|
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat& rois,
|
||||||
@ -488,22 +479,6 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat&
|
|||||||
|
|
||||||
Filds& flds = *filds;
|
Filds& flds = *filds;
|
||||||
|
|
||||||
#if defined USE_REFERENCE_VALUES
|
|
||||||
cudaMemset(flds.hogluv.data, 0, flds.hogluv.step * flds.hogluv.rows);
|
|
||||||
|
|
||||||
cv::FileStorage imgs("/home/kellan/testInts.xml", cv::FileStorage::READ);
|
|
||||||
char buff[33];
|
|
||||||
|
|
||||||
for(int i = 0; i < Filds::HOG_LUV_BINS; ++i)
|
|
||||||
{
|
|
||||||
cv::Mat channel;
|
|
||||||
imgs[std::string("channel") + itoa(i, buff, 10)] >> channel;
|
|
||||||
|
|
||||||
// std::cout << "channel " << i << std::endl << channel << std::endl;
|
|
||||||
GpuMat gchannel(flds.hogluv, cv::Rect(0, 121 * i, 161, 121));
|
|
||||||
gchannel.upload(channel);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
GpuMat& plane = flds.plane;
|
GpuMat& plane = flds.plane;
|
||||||
GpuMat& shrunk = flds.shrunk;
|
GpuMat& shrunk = flds.shrunk;
|
||||||
cudaMemset(plane.data, 0, plane.step * plane.rows);
|
cudaMemset(plane.data, 0, plane.step * plane.rows);
|
||||||
@ -512,8 +487,6 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat&
|
|||||||
int fh = Filds::FRAME_HEIGHT;
|
int fh = Filds::FRAME_HEIGHT;
|
||||||
|
|
||||||
GpuMat gray(plane, cv::Rect(0, fh * Filds::HOG_LUV_BINS, fw, fh));
|
GpuMat gray(plane, cv::Rect(0, fh * Filds::HOG_LUV_BINS, fw, fh));
|
||||||
|
|
||||||
//cv::gpu::cvtColor(colored, gray, CV_RGB2GRAY);
|
|
||||||
cv::gpu::cvtColor(colored, gray, CV_BGR2GRAY);
|
cv::gpu::cvtColor(colored, gray, CV_BGR2GRAY);
|
||||||
|
|
||||||
//create hog
|
//create hog
|
||||||
@ -564,7 +537,6 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat&
|
|||||||
GpuMat sum(flds.hogluv, cv::Rect(0, (fh + 1) * i, fw + 1, fh + 1));
|
GpuMat sum(flds.hogluv, cv::Rect(0, (fh + 1) * i, fw + 1, fh + 1));
|
||||||
cv::gpu::integralBuffered(channel, sum, flds.integralBuffer);
|
cv::gpu::integralBuffered(channel, sum, flds.integralBuffer);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (specificScale == -1)
|
if (specificScale == -1)
|
||||||
flds.detect(rois,objects, 0);
|
flds.detect(rois,objects, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user