gst_license_plate_recognition/include/structs.h
nqthai199@gmail.com df3dd9a705 first commit
2022-09-15 09:26:49 +07:00

73 lines
1.1 KiB
C++

#pragma once
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <iostream>
using namespace std;
const std::string SQUARE = "square";
const std::string LONG = "long";
const std::string NONE = "";
const std::string RED = "red";
const std::string BLUE = "blue";
const std::string WHITE = "white";
const std::string YELLOW = "yellow";
struct LicensePlateItem {
int sourceID;
int trackID;
int counterTrack = 0;
std::string mode = "";
cv::Mat imgLicensePlate;
};
struct DLable {
float pts[2][4] = {};
cv::Point2f tf;
cv::Point2f br;
int cl;
float prob;
};
struct Character {
cv::Rect box;
float centerX;
float centerY;
float prob;
std::string label;
};
struct PlateDetail
{
std::string ocr;
cv::Mat plate;
string mode;
string color;
bool isCheck = false;
};
struct ObjectDetect
{
cv::Rect_<float> box;
int label;
float conf;
std::string class_name;
};
struct Object
{
cv::Rect_<float> rect;
int label;
float prob;
std::string name;
};
struct GridAndStride
{
int grid0;
int grid1;
int stride;
};