-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.cpp
More file actions
33 lines (26 loc) · 697 Bytes
/
demo.cpp
File metadata and controls
33 lines (26 loc) · 697 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
#include "headers/image.h"
#include "headers/kernel.h"
#include "headers/process.h"
#include <string>
using namespace std;
void demo() {
Image im;
im.load("imgs/img5.pgm");
int i = 5;
for (auto kern_type :
{Mean_Blur, Gausian_Blur, Vertical_Sobel, Horizontal_Sobel}) {
Convulution gd(kern_type);
Image n(im.width(), im.height());
gd.process(im, n);
BrightnessFilter f(1.9, 0);
f.process(n, im);
Drawing dr;
int randX = rand() % 500, randY = rand() % 500, randR = rand() % 80;
dr.DrawCircle(im, Point(randX, randY), randR, 255);
string path = "imgs/results/convul" + to_string(i++) + ".pgm";
im.save(path);
}
}
int main(){
demo();
}