-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
35 lines (24 loc) · 880 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
#include <iostream>
#include <fstream>
#include "RAW12PPM/RAW12.h"
#include "RAW12PPM/PPM.h"
#include "Debayer/Debayer.h"
int main() {
RAW12 raw12("../data/input.raw12", 4096, 3072);
std::cout << "Loaded RAW12 image into 8 bits buffer\n";
raw12.buffer_8bits_to_12bits();
std::cout << "Stored and alligned into a 12 bits buffer\n";
raw12.extract_channels();
std::cout << "Separated channels into red, green1, green2, blue\n";
Debayer debayer(raw12);
std::cout << "Debayered the RAW12 image\n";
debayer.debayer_RAW12(NEARESTNEIGHBOUR);
PPM ppm(debayer, raw12);
ppm.print_5X5();
ppm.write_pgm("../result/red.pgm", RED);
ppm.write_pgm("../result/green1.pgm", GREEN1);
ppm.write_pgm("../result/green2.pgm", GREEN2);
ppm.write_pgm("../result/blue.pgm", BLUE);
ppm.write_ppm("../result/colored_neigh_test.ppm");
return 0;
}