在 3d 中使用核心图像

发布于 2024-08-24 01:02:47 字数 431 浏览 3 评论 0原文

我有一个有效的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

心在旅行 2024-08-31 01:02:47

尝试GPUImage!它易于使用,并且比 CoreImage 处理速度更快。它使用预定义或自定义着色器 (GLSL)

Try the GPUImage! It's easy to use, and faster than CoreImage processing. It uses predefined, or custom shaders (GLSL)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文