0
如何將cv2對象(更精確地包含這些對象的列表或np.array)(例如關鍵點(類型:cv2.KeyPoint
)或匹配項(類型:cv2.DMatch
))轉儲到磁盤上的文件以便稍後導入它們而不是在很多圖像(> 50'000)上重新運行時間消耗(在低端計算機上幾個小時甚至幾天)的算法?Python OpenCV將cv2對象轉儲到文件?
它不適用於(c)泡菜。 典型的錯誤是:
PicklingError: Can't pickle <type 'cv2.KeyPoint'>: it's not the same object as cv2.KeyPoint
或
PicklingError: Can't pickle <type 'cv2.DMatch'>: it's not the same object as cv2.DMatch
而且我找不到任何CV2或dump
保存/導出方法。
該腳本運行在Ubuntu的16.04和Windows 7