Monocular Human Position Estimator
All Classes Files Functions Pages
Public Member Functions | Public Attributes | List of all members
Detector Class Reference

Public Member Functions

 Detector ()
 Default constructor for Detector. More...
 
void set_camera_properties (std::string)
 Sets camera source and frame parameters. More...
 
void set_detection_object (cv::InputArray &)
 Sets the type of object to be detected. More...
 
cv::Mat detect_object ()
 Updates frame by performing hog detection. More...
 
void resize_bounding_box (cv::Rect *)
 Resizes the bounding box. More...
 
cv::Point2d get_centroid (cv::Rect)
 Computes centroid of bounding box. More...
 
cv::Point2d get_x_and_y (cv::Rect, double)
 Computes x and y co-ordinates of the object in the real world w.r.t camera frame. More...
 
 ~Detector ()
 Destructor for the Detector class.
 

Public Attributes

double fps
 
double focal_length
 
double cx
 
double cy
 
std::vector< cv::Rect > detections
 
cv::VideoCapture camera
 

Constructor & Destructor Documentation

◆ Detector()

Detector::Detector ( )

Default constructor for Detector.

Member Function Documentation

◆ detect_object()

cv::Mat Detector::detect_object ( )

Updates frame by performing hog detection.

Returns
cv::Mat Returns updated frame from camera

◆ get_centroid()

cv::Point2d Detector::get_centroid ( cv::Rect  detection)

Computes centroid of bounding box.

Returns
std::vector<cv::Point2d>

◆ get_x_and_y()

cv::Point2d Detector::get_x_and_y ( cv::Rect  detection,
double  z_distance 
)

Computes x and y co-ordinates of the object in the real world w.r.t camera frame.

Parameters
detectionResized detections
z_distanceDistance between the object and the camera.
Returns
std::vector<cv::Point2d>

◆ resize_bounding_box()

void Detector::resize_bounding_box ( cv::Rect *  boxPtr)

Resizes the bounding box.

Parameters
boxPtrPointer to cv::Rect object created after detections

◆ set_camera_properties()

void Detector::set_camera_properties ( std::string  source)

Sets camera source and frame parameters.

Parameters
source<string> file path

◆ set_detection_object()

void Detector::set_detection_object ( cv::InputArray &  svm_detector)

Sets the type of object to be detected.

Parameters
svm_detectordescriptor of type cv::HOGDescriptor

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