-
Notifications
You must be signed in to change notification settings - Fork 0
/
fingerprint.h
36 lines (24 loc) · 986 Bytes
/
fingerprint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef ALGORITHM_H
#define ALGORITHM_H
#include "external/CImg.h"
#include <vector>
#include <QImage>
#include <QDebug>
namespace fingerprint {
using namespace cimg_library;
constexpr int BLK_SIZE = 16;
constexpr int NORM_M0 = 100;
constexpr int NORM_V0 = 100;
typedef std::vector<std::vector<bool>> BLOCK_VALIDITY;
void ToBW(QImage& image);
QImage Convert(const CImg<unsigned char>& img);
QImage Convert(const CImg<float>& img);
CImg<unsigned char> Convert(const QImage& img);
int Filter3x3(BLOCK_VALIDITY& data, int x, int y);
CImg<unsigned char> Normalize(CImg<unsigned char>& img, BLOCK_VALIDITY& data);
CImg<float> Orientation(CImg<unsigned char>& img, BLOCK_VALIDITY& data);
CImg<float> GetGaborKernel(int size, float phi, float pixDistance);
float FrequencyEstimate(CImg<float> img);
CImg<float> GaborTransform(CImg<float>& normalized,CImg<unsigned char>& normalizedChar, CImg<float>& Phi,BLOCK_VALIDITY& validity);
}
#endif //