mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 23:30:50 +08:00
Added pipeline_data class
This commit is contained in:
13
src/openalpr/pipeline_data.cpp
Normal file
13
src/openalpr/pipeline_data.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#include "pipeline_data.h"
|
||||
|
||||
using namespace cv;
|
||||
using namespace std;
|
||||
|
||||
PipelineData::PipelineData(Mat colorImage, Rect regionOfInterest, Config* config)
|
||||
{
|
||||
this->colorImg = colorImage;
|
||||
cvtColor(this->colorImg, this->grayImg, CV_BGR2GRAY);
|
||||
|
||||
this->regionOfInterest = regionOfInterest;
|
||||
this->config = config;
|
||||
}
|
48
src/openalpr/pipeline_data.h
Normal file
48
src/openalpr/pipeline_data.h
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
#ifndef OPENALPR_PIPELINEDATA_H
|
||||
#define OPENALPR_PIPELINEDATA_H
|
||||
|
||||
#include "segmentation/segment.h"
|
||||
#include "segmentation/segmentationgroup.h"
|
||||
|
||||
class PipelineData
|
||||
{
|
||||
|
||||
public:
|
||||
PipelineData(cv::Mat colorImage, cv::Rect regionOfInterest, Config* config);
|
||||
virtual ~PipelineData();
|
||||
|
||||
// Inputs
|
||||
Config* config;
|
||||
|
||||
cv::Mat colorImg;
|
||||
cv::Mat grayImg;
|
||||
cv::Rect regionOfInterest;
|
||||
|
||||
|
||||
cv::Mat crop_gray;
|
||||
cv::Mat plate_mask;
|
||||
|
||||
// Outputs
|
||||
std::string region_code;
|
||||
float region_confidence;
|
||||
|
||||
float overall_confidence;
|
||||
|
||||
std::vector<cv::Mat> thresholds;
|
||||
|
||||
|
||||
// Plate Lines
|
||||
std::vector<LineSegment> horizontalLines;
|
||||
std::vector<LineSegment> verticalLines;
|
||||
|
||||
// Segmentation
|
||||
std::vector<Segment> segments;
|
||||
std::vector<SegmentationGroup> segmentGroups;
|
||||
|
||||
// OCR
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // OPENALPR_PIPELINEDATA_H
|
Reference in New Issue
Block a user