移植opencv所需的文件
如果我要将 opencv 移植到另一种语言,我是否只需要移植 dist 的 include 文件夹中的文件,或者我是否需要移植除示例之外的所有内容。
If I were to port opencv to another language, would I only need to port the files in the include folder of the dist, or would I need to port everything except the examples.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的回答:是的,您需要移植所有内容。移植标头只会让您根据移植的标头编译(而不是链接)代码。
移植示例取决于您,但如果您不这样做,您如何知道一切正常?
更长的答案:您要移植到什么语言?如果是Python就没有必要,因为已经有Python接口了。您是否需要移植?您可以只使用 SWIG 之类的东西为您的语言编写包装器吗?端口已满几乎总是最坏的情况 - 尽量避免它。如果您在问题中包含更多细节(为什么要这样做、环境是什么等),那么您可能会得到一些替代建议。
Short answer: yes, you will need to port everything. Porting the headers will only get you as far as compiling (not linking) your code against the ported headers.
Porting the examples is up to you, but if you don't do it, how will you know everything is working?
Longer answer: what language are you porting to? If it's Python, there is no need, as there is already a Python interface. Do you need to port at all? Can you get away with just writing wrappers for your language using something like SWIG? A full port is almost always the worst case scenario -- try and avoid it. If you include a bit more detail in your question (why you're doing it, what the environment is, etc) then you may get some alternatives as advice.