1 Star 0 Fork 0

lgd/classical_surface_reconstruction

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
plot_time.py 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
lgd 提交于 2021-06-06 22:34 . submit
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()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/BingPSJ/classical_surface_reconstruction.git
git@gitee.com:BingPSJ/classical_surface_reconstruction.git
BingPSJ
classical_surface_reconstruction
classical_surface_reconstruction
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385