refactor integral channels
This commit is contained in:
@@ -511,6 +511,29 @@ public:
|
||||
int kind;
|
||||
};
|
||||
|
||||
// Create channel integrals for Soft Cascade detector.
|
||||
class CV_EXPORTS Channels
|
||||
{
|
||||
public:
|
||||
// constrictor form resizing factor.
|
||||
// Param shr is a resizing factor. Resize is applied before the computing integral sum
|
||||
Channels(const int shrinkage);
|
||||
|
||||
// Appends specified number of HOG first-order features integrals into given vector.
|
||||
// Param gray is an input 1-channel gray image.
|
||||
// Param integrals is a vector of integrals. Hog-channels will be appended to it.
|
||||
// Param bins is a number of hog-bins
|
||||
void appendHogBins(const cv::Mat gray, std::vector<cv::Mat>& integrals, int bins) const;
|
||||
|
||||
// Converts 3-channel BGR input frame in Luv and appends each channel to the integrals.
|
||||
// Param frame is an input 3-channel BGR colored image.
|
||||
// Param integrals is a vector of integrals. Computed from the frame luv-channels will be appended to it.
|
||||
void appendLuvBins(const cv::Mat frame, std::vector<cv::Mat>& integrals) const;
|
||||
|
||||
private:
|
||||
int shrinkage;
|
||||
};
|
||||
|
||||
// An empty cascade will be created.
|
||||
// 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.
|
||||
@@ -547,32 +570,6 @@ private:
|
||||
|
||||
CV_EXPORTS bool initModule_objdetect(void);
|
||||
|
||||
/**
|
||||
* \class IntegralChannels
|
||||
* \brief Create channel integrals for Soft Cascade detector.
|
||||
*/
|
||||
class CV_EXPORTS IntegralChannels
|
||||
{
|
||||
public:
|
||||
//! constrictor form resizing factor.
|
||||
//! Param shr is a resizing factor. Resize is applied before integral sum computing
|
||||
IntegralChannels(const int shr) : shrinkage(shr) {}
|
||||
|
||||
//! Appends specified number of hog first order feature integrals into given vector.
|
||||
//! Param gray is an input 1-chennel gray image.
|
||||
//! Param integrals is a vector of integrals. Computed from frame frame hog-channels will be appended to it.
|
||||
//! Param bins is a number of hog-bins
|
||||
void createHogBins(const cv::Mat gray, std::vector<cv::Mat>& integrals, int bins) const;
|
||||
|
||||
//! Converts 3-chennel BGR input frame to Luv and append each channel to the integrals.
|
||||
//! Param frame is an input 3-chennel BGR colored image.
|
||||
//! Param integrals is a vector of integrals. Computed from frame frame luv-channels will be appended to it.
|
||||
void createLuvBins(const cv::Mat frame, std::vector<cv::Mat>& integrals) const;
|
||||
|
||||
private:
|
||||
int shrinkage;
|
||||
};
|
||||
|
||||
//////////////// HOG (Histogram-of-Oriented-Gradients) Descriptor and Object Detector //////////////
|
||||
|
||||
// struct for detection region of interest (ROI)
|
||||
|
Reference in New Issue
Block a user