2
* Copyright (c) 2015 OpenALPR Technology, Inc.
3
* Open source Automated License Plate Recognition [http://www.openalpr.com]
5
* This file is part of OpenALPR.
7
* OpenALPR is free software: you can redistribute it and/or modify
8
* it under the terms of the GNU Affero General Public License
9
* version 3 as published by the Free Software Foundation
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Affero General Public License for more details.
16
* You should have received a copy of the GNU Affero General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#ifndef OPENALPR_HISTOGRAM_H
21
#define OPENALPR_HISTOGRAM_H
23
#include "opencv2/imgproc/imgproc.hpp"
37
// Returns the lowest X position between two points.
38
int getLocalMinimum(int leftX, int rightX);
39
// Returns the highest X position between two points.
40
int getLocalMaximum(int leftX, int rightX);
42
int getHeightAt(int x);
44
std::vector<std::pair<int, int> > get1DHits(int yOffset);
48
std::vector<int> colHeights;
51
void analyzeImage(cv::Mat inputImage, cv::Mat mask, bool use_y_axis);
53
int detect_peak(const double *data, int data_count, int *emi_peaks,
54
int *num_emi_peaks, int max_emi_peaks, int *absop_peaks,
55
int *num_absop_peaks, int max_absop_peaks, double delta,
60
#endif //OPENALPR_HISTOGRAM_H