python中的OpenCV3中的CreateMemStorage()等价于什么? [英] What is the equivalent of CreateMemStorage() in OpenCV3 in python?
问题描述
我正在从opencv 2.4引用代码,并尝试迁移到opencv 3.1.我找不到完整的迁移指南.
I am referring code from opencv 2.4 and trying to migrate to opencv 3.1. I could not find a complete migration guideline.
推荐答案
CreateMemStorage, as well as many other function to manage dynamic C structures, are now obsolete. This was still present in OpenCV 2.4.12, but is removed in OpenCV 3.
他们指的是C api,它在5年前就被放弃了. 现在,您应该使用C ++ API.根据 OpenCV文档:
They refer to C api, which was abandoned something like 5 years ago. Now you should use C++ api. As reported from the OpenCV doc:
[
CreateMemStorage
和类似的功能来自] OpenCV 1.x API,用于创建可增长的序列和在CvMemStorage中分配的其他动态数据结构.如果您使用新的C ++, Python ,Java等接口,则不太可能需要此功能.使用std :: vector或其他高级数据结构.
[
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提供了过渡指南可能会有所帮助.
OpenCV provides a transition guide that can be helpful.
这篇关于python中的OpenCV3中的CreateMemStorage()等价于什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!