-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
const and references, and some indentation
- Loading branch information
1 parent
bd77933
commit b2e13e0
Showing
11 changed files
with
65 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
// Author: Michela Schibuola | ||
|
||
#ifndef BALL_H | ||
#define BALL_H | ||
|
||
#include <opencv2/core/types.hpp> | ||
#include <opencv2/core/matx.hpp> | ||
#include <opencv2/core/mat.hpp> | ||
#include "category.h" | ||
|
||
#ifndef BALL_H | ||
#define BALL_H | ||
|
||
class Ball | ||
{ | ||
cv::Rect bbox_; | ||
Category category_; | ||
cv::Rect bbox_prec_; | ||
class Ball { | ||
cv::Rect bbox_; | ||
Category category_; | ||
cv::Rect bbox_prec_; | ||
|
||
public: | ||
Ball(cv::Rect bbox, Category category, cv::Rect bbox_prec) : bbox_(bbox), category_(category), bbox_prec_(bbox_prec) {} | ||
//TODO: bbox_prec = -1, -1 for first frame? | ||
Ball(cv::Rect bbox, Category category) : bbox_(bbox), category_(category), bbox_prec_(cv::Rect(-1, -1, 0, 0)) {} | ||
public: | ||
Ball(cv::Rect bbox, Category category, cv::Rect bbox_prec) : bbox_(bbox), category_(category), | ||
bbox_prec_(bbox_prec) { | ||
} | ||
//TODO: bbox_prec = -1, -1 for first frame? | ||
Ball(cv::Rect bbox, Category category) : bbox_(bbox), category_(category), bbox_prec_(cv::Rect(-1, -1, 0, 0)) { | ||
} | ||
|
||
cv::Rect getBbox() const; | ||
Category getCategory() const; | ||
cv::Rect getBbox_prec() const; | ||
cv::Point2f getBBoxCenter(); | ||
cv::Point2f getBboxCenter_prec(); | ||
cv::Rect getBbox() const; | ||
Category getCategory() const; | ||
cv::Rect getBbox_prec() const; | ||
cv::Point2f getBBoxCenter() const; | ||
cv::Point2f getBboxCenter_prec() const; | ||
|
||
void setBbox(cv::Rect bbox); | ||
void setCategory(Category category); | ||
void setBbox_prec(cv::Rect bbox_prec); | ||
void setBbox(cv::Rect bbox); | ||
void setCategory(Category category); | ||
void setBbox_prec(cv::Rect bbox_prec); | ||
}; | ||
|
||
#endif // BALL_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// Author: | ||
|
||
#include <opencv2/opencv.hpp> | ||
#include <iostream> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters