使用 C++在xcode中进行图像和视频处理
我正在研究图像和视频处理领域——特别是模式识别领域(物体、人等)。我希望使用编程语言将转换应用于图像和视频(更重要的是视频)。我正在考虑在 Xcode 中使用 C++ 来做到这一点。我想要构建的算法我想从网络获取数据(例如提交的视频) - 处理它们然后给出输出。我的问题有几个部分:
(1) C++ 是执行此操作的最佳语言吗?这可以用 Python 完成吗? (我猜 C++ 比 Python 更快,并且可能可以处理更大的文件/更强烈的算法)
(2)在 xcode 中为此设置项目的最佳方法是什么 - 它是直接的(A)命令行工具吗? “vanilla”项目还是我应该选择 (B) 目标 C 中的 Cocoa 应用程序? (我需要学习 Obj-C)
我的短期目标是编写一些简单的算法并看看它们如何在视频上工作。然后将其(在后端)连接到前端 Web GUI(这样我就可以将视频提交到我的代码中)。体积不会很大 - 但文件大小可能很大。
任何见解将不胜感激。
最大限度。
I am studying in the area of image and video processing - specifically in the field of pattern recognition (objects, people etc.). I wish to use a programming language to apply the transformation to images and video (more importantly video). I am thinking of using C++ in Xcode to do this. The algorithms I wanna build I want to take data from the web (e.g. submitted videos) - process them and then give an output. My question has several parts:
(1) Is C++ the best language to do this in? Can this be done in Python? (I'm guessing C++ is faster than Python and can probably handle larger files/more intense algos)
(2) What is the best way for setting up a project for this in xcode - is it a straight (A) Command-line tools "vanilla" project or should I go for (B) a Cocoa application in objective C? (I will need to learn Obj-C)
My short term objective is to write some simple alorithms and see how they work on video. Then to hook this up (at the back end) to a front end web GUI (so I can submit videos to my code). Volumes wont be huge - but file sizes may be substantial.
Any insight will be hugely appreciated.
Max.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
如果您选择使用 C++(对于这种情况似乎是错误的),您应该查看以下链接:
希望能有所帮助。
If you choose to use C++ (which seems sinsible for that scenario) you should check out these links:
Hope that helps somewhat.
我的建议是让一个在 python 中工作的原型,然后在你的算法工作后,使用 boost 的 python 集成用 C++ 重写性能密集型部分。
My advice is to get a prototype working in python, and then use boost's python integration to rewrite the performance intensive parts in C++ once you have your algorithm working.
如果您想专注于该领域,请立即使用 C++ 来处理算法部分 - 无论如何,您都必须学习如何有效地使用 C++。
关于项目类型 - 这并不重要,但如果您想稍后在应用程序周围包装一个漂亮的 GUI,则应该选择 Cocoa,如果不需要,则应该选择命令行应用程序。
对于使用 C++ 来说,它是无关紧要的,如果您注意一些警告,您可以在任何地方混合 C++ 源代码。 将 C++ 与 Objective-C 结合使用对此提供了一些见解。
If you want to specialize in this area, use C++ for the algorithmic parts right away - you will have to learn how to do to use C++ efficiently anyway.
Regarding the project type - it doesn't really matter, although you should choose Cocoa if you want to wrap a nice GUI around the application later and command line application if that is not needed.
For using C++ its irrelevant, you can mix in C++ sources anywhere if you watch out for some caveats. Using C++ With Objective-C gives some insight into that.
1) 如果您知道您将使用哪种语言,请学习它。 C++ 速度很快,但它是一门深度语言。幸运的是,它很受欢迎,您应该能够轻松找到有关它的帮助。选择权在于你;有您想使用的库吗?他们使用什么语言?我有偏见,但我会推荐 C++ 而不是 C(我意识到这不是你所要求的)。
2) a) 命令行工具:C++。这已经足够复杂了,不需要添加 Cocoa/Objective-C 和用户界面来增加复杂性。当您有了可行的算法后,将其添加到库中。还要记住创建测试用例。
1) If you know which language you would use, learn that. C++ is fast, but it is a deep language. Fortunately, it is popular, and you should be able to easily find help on it. The choice is up to you; are there any libraries you'd like to use? What language do they use? I am biased, but I would recommend C++ over C (I realize that is not what you asked).
2) a) Command Line Tool: C++. This will be complex enough, there is no need to add Cocoa/Objective-C and user interfaces into to complexity. When you have a working algorithm, add it to a library. Remember to create tests cases as well.