Fixed benchmark utilities to operate with updated detection interface

This commit is contained in:
Matt Hill
2016-03-14 23:03:34 -04:00
parent 4741299740
commit de51cd2995
3 changed files with 11 additions and 4 deletions

View File

@@ -134,7 +134,8 @@ int main( int argc, const char** argv )
else if (benchmarkName.compare("detection") == 0) else if (benchmarkName.compare("detection") == 0)
{ {
Config config(country); Config config(country);
Detector* plateDetector = createDetector(&config); PreWarp prewarp(&config);
Detector* plateDetector = createDetector(&config, &prewarp);
for (int i = 0; i< files.size(); i++) for (int i = 0; i< files.size(); i++)
{ {
@@ -166,7 +167,8 @@ int main( int argc, const char** argv )
alpr.config->setDebug(false); alpr.config->setDebug(false);
alpr.setDetectRegion(true); alpr.setDetectRegion(true);
Detector* plateDetector = createDetector(&config); PreWarp prewarp(&config);
Detector* plateDetector = createDetector(&config, &prewarp);
OCR ocr(&config); OCR ocr(&config);
vector<double> endToEndTimes; vector<double> endToEndTimes;

View File

@@ -4,6 +4,8 @@
#include "opencv2/highgui/highgui.hpp" #include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp" #include "opencv2/imgproc/imgproc.hpp"
#include "detection/detector_types.h"
#include "prewarp.h"
#include "alpr_impl.h" #include "alpr_impl.h"
#include "benchmark_utils.h" #include "benchmark_utils.h"

View File

@@ -20,12 +20,15 @@
#ifndef OPENALPR_DETECTOR_TYPES_H #ifndef OPENALPR_DETECTOR_TYPES_H
#define OPENALPR_DETECTOR_TYPES_H #define OPENALPR_DETECTOR_TYPES_H
namespace alpr
{
struct PlateRegion struct PlateRegion
{ {
cv::Rect rect; cv::Rect rect;
std::vector<PlateRegion> children; std::vector<PlateRegion> children;
}; };
}
#endif /* OPENALPR_DETECTOR_TYPES_H */ #endif /* OPENALPR_DETECTOR_TYPES_H */