def load_heatmaps(self, name):
heatmaps = []
for step in range(self.step_total):
try:
file_name = '../../'+self.data_base+'/'+name+'/'+self.env_id+'_'+str(step)+'.jpg'
temp = cv2.imread(file_name, cv2.CV_LOAD_IMAGE_GRAYSCALE)
temp = cv2.resize(temp,(self.heatmap_width, self.heatmap_height))
temp = temp / 255.0
heatmaps += [temp]
except Exception,e:
print Exception,":",e
continue
print('load heatmaps: '+name+' done, size: '+str(np.shape(heatmaps)))
return heatmaps
评论列表
文章目录