mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 01:12:47 +08:00
Moved detection to its own folder
This commit is contained in:
@@ -23,10 +23,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "opencv2/objdetect/objdetect.hpp"
|
|
||||||
#include "opencv2/imgproc/imgproc.hpp"
|
|
||||||
#include "opencv2/core/core.hpp"
|
|
||||||
#include "opencv2/ml/ml.hpp"
|
|
||||||
|
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
#include "support/timing.h"
|
#include "support/timing.h"
|
||||||
@@ -38,28 +34,28 @@ struct PlateRegion
|
|||||||
std::vector<PlateRegion> children;
|
std::vector<PlateRegion> children;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RegionDetector
|
|
||||||
|
class Detector
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RegionDetector(Config* config);
|
Detector(Config* config);
|
||||||
virtual ~RegionDetector();
|
virtual ~Detector();
|
||||||
|
|
||||||
bool isLoaded();
|
bool isLoaded();
|
||||||
std::vector<PlateRegion> detect(cv::Mat frame);
|
std::vector<PlateRegion> detect(cv::Mat frame);
|
||||||
std::vector<PlateRegion> detect(cv::Mat frame, std::vector<cv::Rect> regionsOfInterest);
|
virtual std::vector<PlateRegion> detect(cv::Mat frame, std::vector<cv::Rect> regionsOfInterest);
|
||||||
|
|
||||||
private:
|
protected:
|
||||||
Config* config;
|
Config* config;
|
||||||
|
|
||||||
float scale_factor;
|
|
||||||
cv::CascadeClassifier* plate_cascade;
|
|
||||||
|
|
||||||
bool loaded;
|
bool loaded;
|
||||||
|
float scale_factor;
|
||||||
std::vector<PlateRegion> doCascade(cv::Mat frame, std::vector<cv::Rect> regionsOfInterest);
|
|
||||||
|
|
||||||
std::vector<PlateRegion> aggregateRegions(std::vector<cv::Rect> regions);
|
std::vector<PlateRegion> aggregateRegions(std::vector<cv::Rect> regions);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // OPENALPR_REGIONDETECTOR_H
|
#endif // OPENALPR_REGIONDETECTOR_H
|
Reference in New Issue
Block a user