forked from BITS-DIC/BITS-DIC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dic.h
49 lines (45 loc) · 1.35 KB
/
dic.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
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef DIC_H
#define DIC_H
#include <opencv2/opencv.hpp>
#include "disp.h"
class Dic
{
public:
Dic();
~Dic();
void setReferenceImage(cv::Mat);
void setROI(cv::Mat);
void setCurrentImages(int /* Number of images */,
cv::Mat * /* Pointer to array of images */);
int getCurrentImagesCount();
cv::Mat getCurrentImage(int);
cv::Mat getReferenceImage();
cv::Mat getImgGradX();
cv::Mat getImgGradY();
void performDicAnalysis();
private:
cv::Mat referenceImage;
cv::Mat *currentImages;
cv::Mat roi; /* Region of Interest */
cv::Mat refImgBcoeff;
cv::Mat refImgGradX; /* (d/dx) (f) */
cv::Mat refImgGradY; /* (d/dy) (f) */
int currentImagesCount; /* Number of current images */
cv::Mat *currImgsBcoeff;
cv::Mat *currImgsGradX;
cv::Mat *currImgsGradY;
void preCompute();
Disp plot_u;
Disp plot_v;
Disp plot_corrcoef;
/* Given image `img`, calculates and saves its-
* b coefficient matrix in `bcoeff`
* D/Dx gradient in `gradX`
* D/Dy gradient in `gradY`
*/
void computeBcoefGrad(cv::Mat img,
cv::Mat bcoeff,
cv::Mat gradX,
cv::Mat gradY);
};
#endif // DIC_H