UWARG Computer Vision
object.h
Go to the documentation of this file.
1 
17 #ifndef OBJECT_H_INCLUDED
18 #define OBJECT_H_INCLUDED
19 
30 #include <opencv2/core/core.hpp>
31 #include <vector>
32 
33 class PixelObject;
34 
35 class Object {
36 public:
37  Object(std::string type);
38 
44  cv::Mat get_image();
45 
51  std::string get_type();
52 
58  cv::Point2f get_centroid();
59 
65  double get_area();
66 
72  double get_perimeter();
73 
79  cv::Scalar get_colour();
80 
86  cv::Point2f get_error();
87 
93  double get_error_angle();
94 
101  void add_object(Object * o);
102 
109  const std::vector<Object *> & get_objects();
110 private:
111 
115  cv::Mat image;
116 
120  double imageQuality;
121 
125  std::string type;
126 
130  cv::Point2f centroid;
131 
135  double area;
136 
140  double perimeter;
141 
145  cv::Scalar colour;
146 
150  cv::Point2f error;
151 
155  double errorAngle;
156 
161  std::vector<PixelObject *> pixelObjects;
162 };
163 
164 
165 #endif // TARGET_H_INCLUDED
Container class for storing information about identified targets in real-world measurements Adding Pi...
Definition: object.h:35
std::string get_type()
Getter for type field.
double get_error_angle()
Getter for error angle.
cv::Point2f get_centroid()
Getter for centroid.
Container class for storing information about interesting objects in photos or video frames using pix...
Definition: pixel_object.h:31
cv::Mat get_image()
Getter for Object image.
cv::Point2f get_error()
Getter for error.
const std::vector< Object * > & get_objects()
Getter for pixel Objects.
cv::Scalar get_colour()
Getter for colour.
double get_perimeter()
Getter for perimeter.
double get_area()
Getter for area.
void add_object(Object *o)
Adds given PixelObject to Object&#39;s storage and recalculate target information.