-
Notifications
You must be signed in to change notification settings - Fork 1
/
Program.cs
47 lines (44 loc) · 1.36 KB
/
Program.cs
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
using System;
using image_compressing;
using System.Drawing;
namespace neuro_alg
{
class Program
{
static void Main(string[] args)
{
string[] samples =
{
"305 453.jpg",
"350 453.jpg",
"467 604.jpg",
"588 761.jpg",
"668 864.gif",
"736 952.jpg",
"768 993.jpg",
"791 1024.jpg",
"815 1056.jpg",
"869 1125.png",
"1000 1293.jpg",
"1200 1552.jpg",
"1280 1656.jpg"
};
int iterations = 10;
double average_MSE;
for (int j = 0; j < samples.Length; j++)
{
average_MSE = 0;
for (int i = 0; i < iterations; i++)
{
NeuralCompressing.Compress(samples[j]);
NeuralCompressing.Decompress("compressed.nkr", "tree.nkr", "clasters.nkr");
average_MSE += NeuralCompressing.GetMSE((Bitmap)Image.FromFile(samples[j]), (Bitmap)Image.FromFile("final.bmp"));
}
average_MSE /= iterations;
Console.WriteLine(average_MSE);
Console.WriteLine(new String('-', 60));
}
Console.ReadKey();
}
}
}