我正在引用 opencv 2.4 的代码并尝试迁移到 opencv 3.1。我找不到完整的迁移指南。
最佳答案
CreateMemStorage ,以及许多其他用于管理动态 C 结构的函数,现在都已过时。这在 OpenCV 2.4.12 中仍然存在,但在 OpenCV 3 中被删除。
他们指的是 C api,大约 5 年前就被废弃了。 现在你应该使用 C++ api。据OpenCV doc报道:
[
CreateMemStorage
and similar functions are from] OpenCV 1.x API for creating growable sequences and other dynamic data structures allocated in CvMemStorage. If you use the new C++, Python, Java etc interface, you will unlikely need this functionality. Use std::vector or other high-level data structures.
OpenCV 提供了一个 transition guide这可能会有所帮助。
关于python-2.7 - Python 中 OpenCV3 中的 CreateMemStorage() 等效于什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35810518/