使用OpenGL绘制OpenCV [英] Drawing in OpenCV with OpenGL
问题描述
OpenCV库在编译时支持GPU和OpenGL,允许使用OpenGL显示图像。例如, video_reader.cpp
(位于gpu示例中)使用OpenGL直接从 cv :: gpu :: GpuMat
。
OpenCV library, when compiled with GPU and OpenGL support, allows for displaying images with OpenGL. For example, video_reader.cpp
(located in gpu samples) uses OpenGL to render display graphics directly from cv::gpu::GpuMat
.
cv::gpu::GpuMat d_frame;
namedWindow("OpenGL", WINDOW_OPENGL);
cv::gpu::VideoReader_GPU d_reader(fname);
d_reader.dumpFormat(std::cout);
if (!d_reader.read(d_frame))
break;
cv::imshow("GPU", d_frame);
这是一个非常有用的功能。但是,在在线文档中没有记录。例如,对于 namedWindow
标志 WINDOW_OPENGL
未列在文档中。在哪里可以找到OpenCV相关功能的文档?
This is a very useful feature. However, it is not documented in the documentation on-line. For example, for namedWindow
the flag WINDOW_OPENGL
is not listed in the docs. Where can I find the documentation for OpenGL -related functionality of OpenCV?
推荐答案
文档不是很完整的2.4.5。我认为没有任何文档比您在 http://docs.opencv.org 上看到的文档更多。
The documentation is not very complete for 2.4.5. I don't think there is any more documentation than what you see on http://docs.opencv.org.
有较旧的文档,例如 http: //opencv.willowgarage.com/documentation/cpp/ for 2.1,但我没有找到它所需要的标志的文档。
There are older documentation, such as http://opencv.willowgarage.com/documentation/cpp/ for 2.1, but I didn't find it having the documentation for the flag that you wanted.
这篇关于使用OpenGL绘制OpenCV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!