inital commit

This commit is contained in:
2023-06-28 23:59:50 +02:00
commit 438c9d726c
19 changed files with 2169 additions and 0 deletions

18
intelligentroi.h Normal file
View File

@ -0,0 +1,18 @@
#pragma once
#include <opencv2/imgproc.hpp>
#include "yolo.h"
class InteligentRoi
{
private:
int personId;
static bool compPointPrio(const std::pair<cv::Point2i, int>& a, const std::pair<cv::Point2i, int>& b, const cv::Point2i& center);
static void slideRectToPoint(cv::Rect& rect, const cv::Point2i& point);
static cv::Rect maxRect(const cv::Size2i& imageSize, std::vector<std::pair<cv::Point2i, int>> mustInclude = {});
public:
InteligentRoi(const Yolo& yolo);
cv::Rect getCropRectangle(const std::vector<Yolo::Detection>& detections, const cv::Size2i& imageSize);
};