我想读取在paths
中创建的每个图像,并使用vconcat
连接它们。我犯了这个错误
Traceback : in plt.imshow(im_v,cmap='inferno', aspect='auto', interpolation='nearest') TypeError: Image data of dtype object cannot be converted to float
同时运行以下代码。怎么解决呢
任何帮助都将不胜感激
if nSpectogram <3765:
for k in range (0,22):
paths=FirstPartPathOutput+SecondPartPathOutput+'/spec_'+isPreictal+'_'+str(nSpectogram+1)+'_'+str(k)
for f1 in paths:
img = cv2.imread(f1)
im_v=cv2.vconcat(img)
plt.imshow(im_v,cmap='inferno', aspect='auto', interpolation='nearest')
plt.axis('off')
plt.savefig(FirstPartPathOutput+SecondPartPathOutput+'/spec_'+isPreictal+'_'+str(nSpectogram+1)+'_'+str(k+1)+'.png')
目前没有回答
相关问题 更多 >
编程相关推荐