GPU interface for soft cascade
This commit is contained in:
@@ -1532,6 +1532,49 @@ public:
|
||||
int detectMultiScale(const GpuMat& image, GpuMat& objectsBuf, Size maxObjectSize, Size minSize = Size(), double scaleFactor = 1.1, int minNeighbors = 4);
|
||||
};
|
||||
|
||||
// ======================== GPU version for soft cascade ===================== //
|
||||
|
||||
class CV_EXPORTS SoftCascade
|
||||
{
|
||||
public:
|
||||
//! An empty cascade will be created.
|
||||
SoftCascade();
|
||||
|
||||
//! Cascade will be created from file for scales from minScale to maxScale.
|
||||
//! Param filename is a path to xml-serialized cascade.
|
||||
//! Param minScale is a minimum scale relative to the original size of the image on which cascade will be applyed.
|
||||
//! Param minScale is a maximum scale relative to the original size of the image on which cascade will be applyed.
|
||||
SoftCascade( const string& filename, const float minScale = 0.4f, const float maxScale = 5.f);
|
||||
|
||||
//! cascade will be loaded from file "filename". The previous cascade will be destroyed.
|
||||
//! Param filename is a path to xml-serialized cascade.
|
||||
//! Param minScale is a minimum scale relative to the original size of the image on which cascade will be applyed.
|
||||
//! Param minScale is a maximum scale relative to the original size of the image on which cascade will be applyed.
|
||||
bool load( const string& filename, const float minScale = 0.4f, const float maxScale = 5.f);
|
||||
|
||||
virtual ~SoftCascade();
|
||||
|
||||
//! return vector of bounding boxes. Each box contains one detected object
|
||||
virtual void detectMultiScale(const GpuMat& image, const GpuMat& rois, GpuMat& objects,
|
||||
int rejectfactor = 1, Stream stream = Stream::Null()); // ToDo store objects in GPU mem
|
||||
|
||||
protected:
|
||||
enum { BOOST = 0 };
|
||||
enum
|
||||
{
|
||||
FRAME_WIDTH = 640,
|
||||
FRAME_HEIGHT = 480,
|
||||
TOTAL_SCALES = 55,
|
||||
CLASSIFIERS = 5,
|
||||
ORIG_OBJECT_WIDTH = 64,
|
||||
ORIG_OBJECT_HEIGHT = 128
|
||||
};
|
||||
|
||||
private:
|
||||
struct Filds;
|
||||
Filds* filds;
|
||||
};
|
||||
|
||||
////////////////////////////////// SURF //////////////////////////////////////////
|
||||
|
||||
class CV_EXPORTS SURF_GPU
|
||||
|
Reference in New Issue
Block a user