Add the option to focus on a spcific person

This commit is contained in:
2024-06-07 14:04:48 +02:00
parent ccefb86c1a
commit 555efd4af6
3 changed files with 27 additions and 12 deletions

View File

@ -11,6 +11,13 @@ class FaceRecognizer
{
public:
struct Detection
{
int person;
float confidence;
cv::Rect rect;
};
class LoadException : public std::exception
{
private:
@ -33,7 +40,7 @@ private:
public:
FaceRecognizer(std::filesystem::path recognizerPath = "", const std::filesystem::path& detectorPath = "", const std::vector<cv::Mat>& referances = std::vector<cv::Mat>());
cv::Mat detectFaces(const cv::Mat& input);
std::pair<int, double> isMatch(const cv::Mat& input, bool alone = false);
Detection isMatch(const cv::Mat& input, bool alone = false);
bool addReferances(const std::vector<cv::Mat>& referances);
void setThreshold(double threashold);
double getThreshold();