25 lines
372 B
C++
25 lines
372 B
C++
#ifndef CBINARIZATION_H
|
|
#define CBINARIZATION_H
|
|
|
|
#include <QImage>
|
|
#include <QColor>
|
|
|
|
using namespace std;
|
|
|
|
class CBinarization
|
|
{
|
|
public:
|
|
CBinarization(QString imgPath);
|
|
|
|
QImage* grayScaleImg();
|
|
int Otsu(QImage* img);
|
|
QImage* process(QImage* img);
|
|
int threshold;
|
|
|
|
private:
|
|
QImage* _img;
|
|
|
|
vector<int> Histogram(QImage* img);
|
|
};
|
|
#endif
|