代码拉取完成,页面将自动刷新
import numpy
import matplotlib.pyplot as plt
import os
poi_time = {}
af_time = {}
ss_time = {}
with open('./output/ReconstructionTime.txt', 'r') as timefile:
theline = timefile.readline()
while theline != '':
theline = theline.split(' ')
recon_type = theline[0]
recon_num = theline[1]
recon_time = float(theline[2])
if recon_type == 'poi':
poi_time[recon_num] = recon_time
if recon_type == 'adf':
af_time[recon_num] = recon_time
if recon_type == 'sas':
ss_time[recon_num] = recon_time
theline = timefile.readline()
OriginalShape = './dataset/Planes/'
PoiOutputSurfaces = './output/surfaces/poisson/'
poi_recons_name = os.listdir(PoiOutputSurfaces)
# cause the number of successful poisson recons are the least, use it as index
poi_recons_num = []
for name in poi_recons_name:
poi_recons_num.append(name[:-4])
poi_time_y = []
af_time_y = []
ss_time_y = []
for recon_num in poi_recons_num:
poi_time_y.append(poi_time[recon_num])
af_time_y.append(af_time[recon_num])
ss_time_y.append(ss_time[recon_num])
mean_poi = numpy.mean(poi_time_y)
mean_af = numpy.mean(af_time_y)
mean_ss = numpy.mean(ss_time_y)
plt.xlabel('Date #')
plt.ylabel('Time(s)')
x = list(range(len(poi_recons_num)))
plt.plot(x, poi_time_y, label='Poisson, Mean = '+str(round(mean_poi,2)))
plt.plot(x, af_time_y, label='Advancing Front, Mean = '+str(round(mean_af,2)))
plt.plot(x, ss_time_y, label='Scale Space, Mean = '+str(round(mean_ss,2)))
plt.legend()
plt.show()
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。