add getROISize
This commit is contained in:
parent
672cf1f445
commit
64d6e6a48d
@ -1572,7 +1572,7 @@ public:
|
|||||||
//! Param objects 4-channel matrix thet contain detected rectangles
|
//! Param objects 4-channel matrix thet contain detected rectangles
|
||||||
//! Param rejectfactor used for final object box computing
|
//! Param rejectfactor used for final object box computing
|
||||||
virtual void detectMultiScale(const GpuMat& image, const GpuMat& rois, GpuMat& objects,
|
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.
|
//! detect specific objects on in the input frame for all scales computed flom minScale and maxscale values.
|
||||||
//! asynchronous version.
|
//! asynchronous version.
|
||||||
@ -1583,7 +1583,9 @@ public:
|
|||||||
//! Param ndet retrieves number of detections
|
//! Param ndet retrieves number of detections
|
||||||
//! Param stream wrapper for CUDA stream
|
//! Param stream wrapper for CUDA stream
|
||||||
virtual void detectMultiScale(const GpuMat& image, const GpuMat& rois, GpuMat& objects,
|
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:
|
private:
|
||||||
struct Filds;
|
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( const string&, const float, const float) : filds(0) { throw_nogpu(); }
|
||||||
cv::gpu::SoftCascade::~SoftCascade() { throw_nogpu(); }
|
cv::gpu::SoftCascade::~SoftCascade() { throw_nogpu(); }
|
||||||
bool cv::gpu::SoftCascade::load( const string&, const float, const float) { throw_nogpu(); return false; }
|
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&, const int, int) const
|
||||||
void cv::gpu::SoftCascade::detectMultiScale(const GpuMat&, const GpuMat&, GpuMat&, int, GpuMat&, Stream)
|
|
||||||
{
|
{
|
||||||
throw_nogpu();
|
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
|
#else
|
||||||
|
|
||||||
#include <icf.hpp>
|
#include <icf.hpp>
|
||||||
@ -455,8 +461,8 @@ namespace {
|
|||||||
|
|
||||||
//================================== 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,
|
||||||
GpuMat& objects, const int /*rejectfactor*/, int specificScale)
|
GpuMat& objects, const int /*rejectfactor*/, int specificScale) const
|
||||||
{
|
{
|
||||||
// only color images are supperted
|
// only color images are supperted
|
||||||
CV_Assert(colored.type() == CV_8UC3);
|
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));
|
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);
|
// 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
|
#endif
|
Loading…
x
Reference in New Issue
Block a user