问题描述
我想阅读每个在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,interpolation='nearest')
plt.axis('off')
plt.savefig(FirstPartPathOutput+SecondPartPathOutput+'/spec_'+isPreictal+'_'+str(nSpectogram+1)+'_'+str(k+1)+'.png')
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)