Webcam Tracker
V1.0
Using openCV and an Arduino Uno
|
Displays the output of the serial communication. Member of GUI classes Graphic group. More...
#include <Console.h>
Classes | |
struct | STYLE |
Console style information. More... | |
Public Member Functions | |
Console () | |
Default constructor. | |
Console (cv::Size size) | |
Constructor. More... | |
void | setSize (cv::Size size) |
sets the size of the Matrix More... | |
void | addMessage (string message) |
adds a message to de message deque More... | |
cv::Mat | draw () |
Draws the serial communication messages to the image. More... | |
Private Member Functions | |
cv::Scalar | messageColor (std::string str) |
returns color based on the message text More... | |
Private Attributes | |
const cv::Scalar | backGroundColor = cv::Scalar(0, 0, 0) |
Color of the console background. | |
cv::Mat | img |
Image matrix of the Console. | |
cv::Size | size |
Size of the image matrix. | |
deque< string > | messages |
all messages from console | |
struct Console::STYLE | style |
Console style information. | |
Displays the output of the serial communication. Member of GUI classes Graphic group.
Console::Console | ( | cv::Size | size | ) |
Constructor.
Creates a empty image, with hight and width set by size and fills it with a color.
size | Hight and width of the image matrix |
|
private |
returns color based on the message text
str | string containing the message |
void Console::setSize | ( | cv::Size | size | ) |
sets the size of the Matrix
functionality is equal to Console(CV::Size size);
size | Hight and width of the image matrix |
void Console::addMessage | ( | string | message | ) |
adds a message to de message deque
message | string containing the message |
cv::Mat Console::draw | ( | ) |
Draws the serial communication messages to the image.
Loops over al messages and draws them with a height offset of 5 pixels between each message.