PedestrainCounting
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BKGCutDetector Class Reference
Inheritance diagram for BKGCutDetector:
ImageDetector

Public Member Functions

 BKGCutDetector (Classifier *c, const Options &op)
 
virtual bool Detect (const cv::Mat &img, const IntegralImage *intImage, const Rect &subRegion, const cv::Mat &bkg=defaultBackground)
 
- Public Member Functions inherited from ImageDetector
 ImageDetector (Classifier *c, const Options &op)
 
void DrawDetection (cv::Mat &img)
 
void Clear ()
 

Protected Member Functions

Rect CreateROI (int x, int y, int roi_h, int roi_w, int edge_width, int height, int width)
 
- Protected Member Functions inherited from ImageDetector
bool IsEqual (const rect &r1, const rect &r2) const
 
bool IsOverlap (const rect &r, const rect &t) const
 

Protected Attributes

feat binaryThre
 
double invPerimeterThre
 
float minAreaRatio
 
float maxAreaRatio
 
- Protected Attributes inherited from ImageDetector
Classifierclassifier
 
feat scaleMin
 
feat scaleMax
 
feat scaleStep
 
int slideStep
 
int evidence
 
int modelHeight
 
int modelWidth
 
Pool< recttemp
 
Pool< int > roots
 
UnionFindunionFind
 

Additional Inherited Members

- Public Attributes inherited from ImageDetector
Pool< Rectdets
 

Member Function Documentation

Rect BKGCutDetector::CreateROI ( int  x,
int  y,
int  roi_h,
int  roi_w,
int  edge_width,
int  height,
int  width 
)
protected

Given a rectangle and the size of the original image, expand the rectangle by edge_width.

Parameters
xthe x coordinates of the upper-left corner.
ythe y coordinates of the upper-left corner.
roi_hthe height of the rectangle.
roi_wthe width of the rectangle.
edge_widthhow many pixels you want to expand?
height,widththe size of the original image.
Returns
Rect.
bool BKGCutDetector::Detect ( const cv::Mat &  img,
const IntegralImage intImage,
const Rect subRegion,
const cv::Mat &  bkg = defaultBackground 
)
virtual

Detect, return the resutl in a vector. Notice that sometimes we only want to detect in a subregion of the original image, in such case we have to give the origin parameter, which is the coordinates of the upper-left corner in the original image.

Parameters
imgthe image
intImagethe integral image
subRegionthe subRegion we want to detect
bkgbackground
Returns
true if everything is fine.

Reimplemented from ImageDetector.


The documentation for this class was generated from the following files: