ajouts des masques IDCARD, NumberIDCARD, NAMESMASK

This commit is contained in:
2025-10-05 17:49:52 +02:00
parent aff55c4ff9
commit 0a2baa6c92
6 changed files with 138 additions and 5 deletions

34
Objects.cpp Normal file
View File

@@ -0,0 +1,34 @@
//
// Created by yann on 05/10/2025.
//
#include "Objects.h"
// Constructeur avec trois paramètres (2 Points et une couleur)
Objects::Objects(cv::Point top_left, cv::Point bottom_right, cv::Scalar color)
: top_left(top_left), bottom_right(bottom_right), color(color) {}
// Méthode pour dessiner un carré noir sur l'image
void Objects::draw(cv::Mat &image) {
// Dessiner un rectangle noir (avec -1 pour remplir le carré)
cv::rectangle(image, top_left, bottom_right, cv::Scalar(0), -1); // -1 signifie remplir le rectangle
}
// Getters pour les coordonnées du carré
cv::Point Objects::getTopLeft() const {
return top_left;
}
cv::Point Objects::getBottomRight() const {
return bottom_right;
}
// Setters pour les coordonnées du carré
void Objects::setTopLeft(cv::Point p) {
top_left = p;
}
void Objects::setBottomRight(cv::Point p) {
bottom_right = p;
}