使用 64 位版本的 openCV+Emgu 而不是 32 位版本是否有性能优势?
我正在开发一个应用程序,用于处理 Point Grey 相机实时捕获的图像 (http://www.ptgrey.com /)。 Point Grey SDK 是一个 .net 包装器,可以是 32 位或 64 位。
然后,为了处理捕获的图像,我使用名为 Emgu CV 的 openCV 包装器 (http://www.emgu. com/),也有 32 位或 64 位版本。
现在,在 Vista64 上,我选择了 64 位版本的 FlyCapture(Point Grey 的 SDK)和 Emgu CV(安装中包含 openCV),希望能够最大限度地提高性能。
最近我一直想从 XNA 调用我的 FlyCapture+Emgu DLL 代码,不幸的是它只存在于 32 位中,我意识到我可能必须在 32 位中重新安装所有这些组件,因为我真的不想通过 IPC, ?
除了 32 位固有的内存空间明显限制之外,是否还会有我应该预料到的性能损失 那会有多戏剧性,为什么?
预先感谢您的任何建议或解释。
I am developing an application that processes images captured in real time by a Point Grey camera (http://www.ptgrey.com/).
The Point Grey SDK is a .net wrapper and can be either 32bit or 64bit.
Then to process the captured images, I'm using a wrapper for openCV called Emgu CV (http://www.emgu.com/) that comes in both 32bit or 64bit flavors as well.
Now, being on Vista64 I went for the 64bit versions of FlyCapture (Point Grey's SDK) and Emgu CV (which includes openCV in its install) hoping to maximize performance.
Recently I've been wanting to call my FlyCapture+Emgu DLL code from XNA, which unfortunately only exists in 32bit, and I realize that I may have to reinstall all those components in 32bit as I don't really want to go through IPC, remoting, etc.
Apart from the obvious limit to memory space inherent to 32bit, is there also a performance loss I should be expecting? How dramatic would that be and why ?
Thanks in advance for any advice or explanation.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
经过大量测试,结果表明,在使用 14 种不同典型 openCV 方法(平滑、图像、复制、图像格式转换等)
After much testing, it turns out that the x86 openCV + emgu combo performs 1.408 times slower than x64 on a test using a sequence of 14 different typical openCV methods (smoothing, image copying, image format conversion, etc.)
尝试一下看看!
我可以想到为什么它可以采取任何一种方式的原因(不太熟悉您正在使用的软件的详细信息)。
您的指针在 32 位进程中只有一半大,因此可以减少内存压力。 32 位软件已经存在了更长时间,并且可能得到了更好的优化。但另一方面,图像处理往往能够很好地响应 64 位进程提供的较大寄存器大小。
我怀疑性能会在相同的范围内,也许正负 20%。但你永远无法确定。如果你得到数量级的类型差异,我会很担心。
Try it and see!
I can think of reasons why it could go either way (not being very familiar with the software you're using in detail).
Your pointers are half as big in 32bit processes, so that reduces memory pressure. 32bit software has been around longer and may have been better optimized. But, on the other hand, image processing tends to respond well to the larger register size 64bit processes provide.
I would suspect performance will be in the same ball park, perhaps plus or minus 20%. But you can never be sure. If you get order of magnitude type differences, I'd be getting worried then.
我们有一个类似的情况(PT Gray 相机和我们的 C# 应用程序的 emgu openCV 包装器)。
还发现 emgu 在 x64 下甚至更快(win 7 与 win XP x86 相比)。首先,我认为 x64 在应用程序的其余部分上速度较慢,但那是在调试模式下。在发布模式下,性能相当。看起来VS2010(x64)下的调试版本比VS2008版本(x86)慢。
We have a simimair situation (PT Grey camera's & the emgu openCV wrapper for our C# application).
Found out too that emgu is even faster under x64 (win 7 compared with win XP x86). First I thought x64 was slower on the rest of my application, but that was in debug mode. In release mode the performance is comparable. It looks like the debug version under VS2010 (x64) is slower as the VS2008 version (x86).