add getROISize

pull/158/head
marina.kolpakova 12 years ago
parent 672cf1f445
commit 64d6e6a48d
  1. 6
      modules/gpu/include/opencv2/gpu/gpu.hpp
  2. 21
      modules/gpu/src/softcascade.cpp

@ -1572,7 +1572,7 @@ public:
//! Param objects 4-channel matrix thet contain detected rectangles
//! Param rejectfactor used for final object box computing
virtual void detectMultiScale(const GpuMat& image, const GpuMat& rois, GpuMat& objects,
int rejectfactor = 1, int specificScale = -1);
int rejectfactor = 1, int specificScale = -1) const;
//! detect specific objects on in the input frame for all scales computed flom minScale and maxscale values.
//! asynchronous version.
@ -1583,7 +1583,9 @@ public:
//! Param ndet retrieves number of detections
//! Param stream wrapper for CUDA stream
virtual void detectMultiScale(const GpuMat& image, const GpuMat& rois, GpuMat& objects,
int rejectfactor, GpuMat& ndet, Stream stream);
int rejectfactor, GpuMat& ndet, Stream stream) const;
cv::Size getRoiSize() const;
private:
struct Filds;

@ -49,12 +49,18 @@ cv::gpu::SoftCascade::SoftCascade() : filds(0) { throw_nogpu(); }
cv::gpu::SoftCascade::SoftCascade( const string&, const float, const float) : filds(0) { throw_nogpu(); }
cv::gpu::SoftCascade::~SoftCascade() { throw_nogpu(); }
bool cv::gpu::SoftCascade::load( const string&, const float, const float) { throw_nogpu(); return false; }
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat&, const GpuMat&, GpuMat&, const int, int) { throw_nogpu();}
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat&, const GpuMat&, GpuMat&, int, GpuMat&, Stream)
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat&, const GpuMat&, GpuMat&, const int, int) const
{
throw_nogpu();
}
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat&, const GpuMat&, GpuMat&, int, GpuMat&, Stream) const
{
throw_nogpu();
}
cv::Size cv::gpu::SoftCascade::getRoiSize() const { throw_nogpu(); return cv::Size();}
#else
#include <icf.hpp>
@ -455,8 +461,8 @@ namespace {
//================================== synchronous version ============================================================//
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat& /*rois*/,
GpuMat& objects, const int /*rejectfactor*/, int specificScale)
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat& rois,
GpuMat& objects, const int /*rejectfactor*/, int specificScale) const
{
// only color images are supperted
CV_Assert(colored.type() == CV_8UC3);
@ -555,10 +561,15 @@ void cv::gpu::SoftCascade::detectMultiScale(const GpuMat& colored, const GpuMat&
objects = GpuMat(objects, cv::Rect(0, 0, ndetections * sizeof(Detection), 1));
}
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat&, const GpuMat&, GpuMat&, int, GpuMat&, Stream)
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat&, const GpuMat&, GpuMat&, int, GpuMat&, Stream) const
{
// cudaStream_t stream = StreamAccessor::getStream(s);
}
cv::Size cv::gpu::SoftCascade::getRoiSize() const
{
return cv::Size(Filds::FRAME_WIDTH / 4, Filds::FRAME_HEIGHT / 4);
}
#endif
Loading…
Cancel
Save