1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
| #pragma once
| #include<opencv2/opencv.hpp>
|
|
| class Camera {
|
| public:
| bool isLoad = false;//是否加载
| cv::Mat stdMat;//摄像头移动标准对比图片
| bool initConfig(float threshold = 0.15, float crop_ratio = 0.1, float cellSize=5, float ratio = 0.04,int size=32);
| int detect(cv::Mat& image,cv::Mat& standard);
|
| private:
| std::vector<int> aHash(cv::Mat image);
| int Hamming_distance(std::vector<int> hash1,std::vector<int> hash2);
|
| float CropRatio=0;
| float Threshold = 0.15;
| float CellSize = 5;
| int Size = 32;
| int threshold0 = 100;
|
| };
|
|