UWARG Computer Vision
Public Member Functions | Friends | List of all members
PixelObject Class Reference

Container class for storing information about interesting objects in photos or video frames using pixels as measurement. More...

#include <pixel_object.h>

Collaboration diagram for PixelObject:
Collaboration graph

Public Member Functions

 PixelObject (cv::Mat &crop, std::vector< cv::Point > &contour, cv::Point2d centroid, double area, double perimeter, cv::Scalar colour, cv::Point2d error, double errorAngle)
 
std::vector< cv::Point > & get_contour ()
 Getter for contour. More...
 
cv::Point2d get_centroid ()
 Getter for centroid. More...
 
double get_area ()
 Getter for area. More...
 
double get_perimeter ()
 Getter for perimeter. More...
 
cv::Scalar get_colour ()
 Getter for colour. More...
 
cv::Point2d get_error ()
 Getter for error. More...
 
double get_error_angle ()
 Getter for error angle. More...
 
Frameget_image ()
 Getter for image. More...
 
cv::Mat & get_cropped_image ()
 Getter for cropped image. More...
 

Friends

void Frame::add_object (PixelObject *o)
 add_object sets the PixelObject's frame pointer
 

Detailed Description

Container class for storing information about interesting objects in photos or video frames using pixels as measurement.

Member Function Documentation

double PixelObject::get_area ( )

Getter for area.

Returns
Area of the Object in pixels as it appears in its frame
cv::Point2d PixelObject::get_centroid ( )

Getter for centroid.

Returns
Pixel location of the Object in its frame
cv::Scalar PixelObject::get_colour ( )

Getter for colour.

Returns
Average colour of the interiour of the Object's contour
std::vector< Point > & PixelObject::get_contour ( )

Getter for contour.

Returns
locations of the vertices of the object
Mat & PixelObject::get_cropped_image ( )

Getter for cropped image.

Returns
Cropped image of the object associated with this Object
cv::Point2d PixelObject::get_error ( )

Getter for error.

Returns
2D error magnitude of the Object's location
double PixelObject::get_error_angle ( )

Getter for error angle.

Returns
Angle in radians between the direction of the error and the vertical
Frame * PixelObject::get_image ( )

Getter for image.

Returns
Frame associated with this Object
double PixelObject::get_perimeter ( )

Getter for perimeter.

Returns
Perimeter of the Object in pixels as it appears in its frame

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