OpenGL(或OpenGL ES)中的图像拼接/纹理混合

发布于 2025-01-10 07:49:25 字数 493 浏览 2 评论 0原文

我有两个 YUV 图像 (YUV 420 SP),它们已作为纹理加载到片段着色器中。

这些纹理具有重叠区域。

现在,我尝试混合这两种纹理,以便重叠区域的亮度有任何明显差异。 (基本上缝合图像)

[Image]

  • 你能建议我如何混合/混合/缝合这两个图像的任何方法吗。
  • 我在 OpenCV 中遇到了 Alpha Masking 的概念。我不确定它如何适用于 OpenGL。另外,由于我使用的是 YUV 图像,这些图像作为纹理、R 和 RG 组件(用于 Y 和 UV)加载,并在片段着色器中进一步将其转换为 RGB 颜色空间。

注意:我现在不考虑任何几何对齐。我知道混合/缝合后图像看起来不太好,因为图像未正确定向或放置。我的问题只是关于如何处理重叠区域的光度/颜色对齐。

I've got two YUV images (YUV 420 SP), which have been loaded in fragment shader as textures.

These textures are having an overlapping area.

Now, I am trying to blend these two textures such that there should not be any difference visible in the brightness over the overlapping area. (Basically stitching the images)

[Image]

  • Can you suggest any method on how I can mix/blend/stitch these two images.
  • I have come across the concept of Alpha Masking in OpenCV. I am not sure how it is applicable in OpenGL. Also, since I am using YUV images, which are loaded as textures, as R and RG component (for Y and UV), and further converting it to RGB Color space in the fragment shader.

Note: I am not considering any geometrical alignment for now. I know after the blending/stitching the image will not quite good looking as the images are not oriented or placed properly. My question is only regarding the photometric/color alignment on how I can handle the overlapping area.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文