-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopencvfuncs.h
More file actions
28 lines (20 loc) · 824 Bytes
/
opencvfuncs.h
File metadata and controls
28 lines (20 loc) · 824 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef OPENCVFUNCS_H
#define OPENCVFUNCS_H
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include "ball.h"
#include <iostream>
#include <sstream>
#include <string>
using namespace cv;
// Draws text with bottom left corner at (x,y)
void drawText(Mat& image, int x, int y, const std::string& text);
// Appends num to a string
std::string appendNumToText(std::string text, int num);
// Estimate FPS of video stream based on 120 frame capture
double measureFPS(VideoCapture& vid_stream);
// Given Background mask and a current frame, outputs foreground mask
Mat getForegroundMask(const Mat& background, const Mat& frame);
// Function that returns -1 if ball is in left goal, 1 if ball is in right goal, and 0 if ball is not in any
int ballInGoal(const Ball& ball, int cam_width);
#endif