-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathplot.py
More file actions
41 lines (35 loc) · 966 Bytes
/
plot.py
File metadata and controls
41 lines (35 loc) · 966 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
35
36
37
38
39
40
41
import matplotlib.pyplot as plt
import csv
"""
Plot ESF, PSF, MTF
"""
x = []
y = []
a = []
b = []
m = []
n = []
with open('/home/vayalala/workspace2/OpenCLExercise3_Sobel/ValuesESF.csv','r') as csvfile:
plots = csv.reader(csvfile, delimiter=',')
for row in plots:
x.append(float(row[0]))
y.append(float(row[1]))
plt.plot(x, y, label='ESF')
plt.legend()
plt.show()
with open('/home/vayalala/workspace2/OpenCLExercise3_Sobel/ValuesPSF.csv','r') as csvfile:
plots = csv.reader(csvfile, delimiter=',')
for row in plots:
a.append(float(row[0]))
b.append(float(row[1]))
plt.plot(a, b, label='PSF')
plt.legend()
plt.show()
with open('/home/vayalala/workspace2/OpenCLExercise3_Sobel/ValuesMTF.csv','r') as csvfile:
plots = csv.reader(csvfile, delimiter=',')
for row in plots:
m.append(float(row[0]))
n.append(float(row[1]))
plt.plot(m, n, label='MTF')
plt.legend()
plt.show()