移植opencv所需的文件

发布于 2024-10-08 11:22:44 字数 81 浏览 3 评论 0原文

如果我要将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

旧情别恋 2024-10-15 11:22:44

简短的回答:是的,您需要移植所有内容。移植标头只会让您根据移植的标头编译(而不是链接)代码。
移植示例取决于您,但如果您不这样做,您如何知道一切正常?

更长的答案:您要移植到什么语言?如果是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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文