在 3d 中使用核心图像
我有一个有效的Core Video
设置(通过QTKit
从USB摄像头捕获的帧),并且当前帧在3D空间中的任意平面上渲染为纹理NSOpenGLView 的子类。到目前为止一切顺利,但我想在这个框架上使用一些Core Image
过滤器。 我现在有了基本的代码设置,它像以前一样渲染我未处理的视频帧,但最终处理的输出 CIImage 被渲染为屏幕对齐的四边形到视图中。感觉就像是我的 3D 渲染上的图像。这就是我不想要的!
我正在寻找一种方法来使用 Core Image
处理我的视频帧(CVOpenGLTextureRef
),并以 3D 方式在我的平面上渲染生成的图像。 我是否必须使用离屏渲染(存储视口、设置新视口、模型视图和透视矩阵并渲染到 FBO 中)还是有更简单的方法?
提前致谢!
i have a working Core Video
setup (a frame captured from a USB camera via QTKit
) and the current frame is rendered as a texture on an arbitary plane in 3d space in a subclassed NSOpenGLView
. so far so good but i would like to use some Core Image
filter on this frame.
i now have the basic code setup and it renders my unprocessed video frame like before, but the final processed output CIImage
is rendererd as a screen aligned quad into the view. it feels like a image blitted over my 3d rendering. this is what i do not want!
i am looking for a way to process my video frame (a CVOpenGLTextureRef
) with Core Image
and just render the resulting image on my plane in 3d.
do i have to use offscreen rendering (store viewport, set new viewport and modelview and perspective matrices and render into a FBO) or is there any easier way?
thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试GPUImage!它易于使用,并且比 CoreImage 处理速度更快。它使用预定义或自定义着色器 (GLSL)
Try the GPUImage! It's easy to use, and faster than CoreImage processing. It uses predefined, or custom shaders (GLSL)