-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathmain.cpp
43 lines (36 loc) · 974 Bytes
/
main.cpp
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
#include <cstdio>
#include <iostream>
#include <string>
#include <fstream>
#include <cstring>
#include <vector>
#include <opencv2/opencv.hpp>
#include "Demosaicing.hpp"
#include "GBTF.hpp"
using namespace std;
using namespace cv;
int main(){
// old raw files
int rows = 2464;
int columns = 3280;
/*
//new raw files
int rows = 3072;
int columns = 4096;
*/
string fileName = "NB_10MA.raw";
//string fileName = "./1/raw16_4096X3072.16_rggb_raw";
//string fileName = "./2/raw16_4096X3072.16_rggb_raw";
//string fileName = "./3/raw16_4096X3072.16_rggb_raw";
Mat dst;
for(int i = 1; i <= 4; i++){
for(int j = 1; j <= 4; j++){
Demosaicing(fileName, dst, rows, columns, i, j);
imwrite("cpp" + to_string((i-1)*4 + j) + ".bmp", dst);
}
}
cout << CV_VERSION << endl;
//cout << cv::getBuildInformation() << endl;
waitKey(0);
return 0;
}