-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpsnr.cpp
More file actions
34 lines (29 loc) · 673 Bytes
/
Copy pathpsnr.cpp
File metadata and controls
34 lines (29 loc) · 673 Bytes
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
#include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <cstring>
#include <cstdio>
#include <algorithm>
#include <fstream>
#include <sstream>
#include "header.h"
#include "structs.h"
#include <strings.h>
HEAD header_org;
HEAD header_rcv;
Metric *metric;
using namespace std;
int main(int argc, char const *argv[])
{
header_org.hb=1;
header_org.wb=1;
header_rcv.wb=1;
header_rcv.hb=1;
Images original("images/i.bmp",&header_org,true);
Images rcv("images/k.bmp", &header_rcv,true);
metric = new MetricPsnr();
double val = metric->calculate(original,rcv,true,&header_org);
cout << "PSNR: " << val << "\n";
return 0;
}