![]() |
Companion
1.0.0
Companion is an object recognition framework written with OpenCV.
|
#include <Frame.h>


Public Member Functions | |
| Frame (cv::Point topLeft, cv::Point topRight, cv::Point bottomLeft, cv::Point bottomRight, cv::Scalar color=cv::Scalar(0.0, 255.0, 0.0, 255.0), int thickness=4) | |
| virtual | ~Frame ()=default |
| virtual void | Draw (cv::Mat image) |
| virtual void | Ratio (int cWidth, int cHeight, int nWidth, int nHeight) |
| virtual int | OriginX () |
| virtual int | OriginY () |
| virtual void | MoveOrigin (int x, int y) |
| virtual void | Color (const cv::Scalar &color) |
| virtual cv::Rect | CutArea () |
| virtual const cv::Scalar & | Color () const |
| virtual int | Thickness () const |
| virtual void | Thickness (int thickness) |
| void | TopLeft (const cv::Point &topLeft) |
| void | TopRight (const cv::Point &topRight) |
| void | BottomLeft (const cv::Point &bottomLeft) |
| void | BottomRight (const cv::Point &bottomRight) |
| const cv::Point & | TopLeft () const |
| const cv::Point & | TopRight () const |
| const cv::Point & | BottomLeft () const |
| const cv::Point & | BottomRight () const |
Implementation class for a drawable frame.
| Companion::Draw::Frame::Frame | ( | cv::Point | topLeft, |
| cv::Point | topRight, | ||
| cv::Point | bottomLeft, | ||
| cv::Point | bottomRight, | ||
| cv::Scalar | color = cv::Scalar(0.0, 255.0, 0.0, 255.0), |
||
| int | thickness = 4 |
||
| ) |
Constructor to create a drawable frame.
| topLeft | Top left position. |
| topRight | Top right position. |
| bottomLeft | Bottom left position. |
| bottomRight | Bottom right position. |
| color | Color of the frame. |
| thickness | Thickness of the frame. |
|
virtualdefault |
Destructor.
| void Companion::Draw::Frame::BottomLeft | ( | const cv::Point & | bottomLeft | ) |
Set bottom left corner of the frame.
| bottomLeft | Bottom left corner. |
| const cv::Point & Companion::Draw::Frame::BottomLeft | ( | ) | const |
Get bottom left corner of the frame.
| void Companion::Draw::Frame::BottomRight | ( | const cv::Point & | bottomRight | ) |
Set bottom right corner of the frame.
| bottomRight | Bottom right corner. |
| const cv::Point & Companion::Draw::Frame::BottomRight | ( | ) | const |
Get bottom right corner of the frame.
|
virtual |
|
virtual |
|
virtual |
Get cut area around this frame.
Implements Companion::Draw::Drawable.
|
virtual |
Draw this frame to the given image.
| image | Image on which to draw the object. |
Implements Companion::Draw::Drawable.
|
virtual |
Move the frame's origin.
| x | Relative distance to move the origin on the x axis. |
| y | Relative distance to move the origin on the y axis. |
Implements Companion::Draw::Drawable.
|
virtual |
Obtain the origin's x coordinate.
Implements Companion::Draw::Drawable.
|
virtual |
Obtain the origin's y coordinate.
Implements Companion::Draw::Drawable.
|
virtual |
Scale this frame from the current image size to a new image size.
| cWidth | Current image width. |
| cHeight | Current image height. |
| nWidth | New image width. |
| nHeight | New image height. |
Implements Companion::Draw::Drawable.
|
virtual |
Get thickness of the frame, if 0 no frame will be drawn.
Implements Companion::Draw::Drawable.
|
virtual |
Set thickness of the frame.
| thickness | Frame thickness. |
Implements Companion::Draw::Drawable.
| void Companion::Draw::Frame::TopLeft | ( | const cv::Point & | topLeft | ) |
Set top left corner of the frame.
| topLeft | Top left corner. |
| const cv::Point & Companion::Draw::Frame::TopLeft | ( | ) | const |
Get top left corner of the frame.
| void Companion::Draw::Frame::TopRight | ( | const cv::Point & | topRight | ) |
Set top right corner of the frame.
| topRight | Top right corner. |
| const cv::Point & Companion::Draw::Frame::TopRight | ( | ) | const |
Get top right corner of the frame.
1.8.15