我想使用支持 CUDA 的 SIFT 库,但我正在使用 OpenCV 驱动程序从网络摄像头获取图像?Cuda 库使用 Devil Library 来处理图像数据类型。我应该将图像从 OpenCV 数据类型转换为 Devil 吗?或者我应该使用另一种方法从网络摄像头获取图像[与魔鬼兼容的数据类型]?
1 回答
I am not familiar with the DeviL but from the manual it states that it supports the following formats:
IL_COLOUR_INDEX
IL_RGB
IL_RGBA
IL_BGR
IL_BGRA
IL_LUMINANCE
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.