43 lines
821 B
C++

#ifndef PERSIONMODELDETECTOR_H
#define PERSIONMODELDETECTOR_H
#include <memory>
#include <QImage>
#include <QRectF>
#include <QString>
#include <QVector>
class PersionModelDetector
{
public:
struct Detection
{
int classId = -1;
QString label;
double confidence = 0.0;
QRectF boundingBox;
};
struct Analysis
{
QVector<Detection> detections;
};
PersionModelDetector();
~PersionModelDetector();
PersionModelDetector(const PersionModelDetector&) = delete;
PersionModelDetector& operator=(const PersionModelDetector&) = delete;
bool Analyze(const QImage& frame,
Analysis& result,
QString& errorMessage);
private:
class Impl;
std::unique_ptr<Impl> m_impl;
};
#endif // PERSIONMODELDETECTOR_H