将 OpenCV 图像数据类型转换为 Devil 图像格式,反之亦然
我想使用支持 CUDA 的 SIFT 库,但我正在使用 OpenCV 驱动程序从网络摄像头获取图像? Cuda 库使用 Devil 库来处理图像数据类型。 我应该将图像从 OpenCV 数据类型转换为 Devil 吗?或者我应该使用另一种方法从网络摄像头获取图像[魔鬼兼容数据类型]?
I want to use a CUDA-enabled SIFT library but I am using the OpenCV driver to get images from the webcam? The Cuda library is using the Devil Library for image data types.
Should I transform the images from OpenCV data types to Devil? Or Should I use another method for getting images from the webcam[devil compatible data types]?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不熟悉 DeviL,但从手册中它指出它支持以下格式:
不同的位深度。
加载图像时,OpenCV 还支持大多数图像类型和位深度,并且它们之间的转换非常简单(请参阅 openCV 文档中的
convertTo()
函数)。使用网络摄像头可能更复杂。在不了解具体库的接口的情况下很难直接回答你的问题。如果图书馆接受特定形式的魔鬼图像,那么您可能必须以该形式提供它。 OpenCV 可能能够以所需的形式输出数据;如果没有,您可能需要自己编写代码来对其进行转换。
I am not familiar with the DeviL but from the manual it states that it supports the following formats:
of varying bit depths.
When loading images, OpenCV also supports most of these image types and bit depths and conversion between them is pretty straightforward (see the
convertTo()
function in the openCV documentation) . Using a webcam may be more complex.It is difficult to answer your question directly without knowing the interface of the specific library. If the library accepts a devil image in a specific form, then it is likely you will have to give it in that form. OpenCV will likely be able to output data in the required form; if not, you may have to write code to transform it yourself.