將associate.py文件拷貝到數據集目錄下,並且打開終端輸入:
$ python associate.py rgb.txt depth.txt>associate.txt
可能出現問題1:
解決方法:
在桌面打開終端輸入:
$ sudo apt install python2-pip
$ pip install numpy
接着回到數據集目錄下,打開終端再次運行
$ python2 associate.py rgb.txt depth.txt>associate.txt
如果仍然提示以上錯誤,則輸入(在什麼路徑下執行都可以)
$ python2
$ import numpy
$ quit()
接着回到數據集目錄下,打開終端再次運行
$ python2 associate.py rgb.txt depth.txt>associate.txt
可能出現問題2(該問題僅會在使用python3時纔會出現):
解決方法:
需要將associate.py中第86行87行的
first_keys = first_list.keys()
second_keys = second_list.keys()
改爲
first_keys = list(first_list.keys())
second_keys = list(second_list.keys())
如遇其他類似問題1中出現的問題,只需把有python2的地方改爲python3即可