菜鸟教程小白 发表于 2022-12-12 22:15:37

ios - 在杯子上合并和包装 UIImage


                                            <p><p>我有两张图片,我想合并这两张图片,就像我有一张杯子的图片,第二张图片是任何图片。现在我想与它合并到杯子中,我怎么能做到这一点,就像放置在杯子上的图像必须先包裹起来,就像我从相机拍照然后将其粘贴到杯子中,但是我如何包裹那个图像!</p>

<p> <img src="/image/DD336.png" alt=""/> </p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>@Akhil:您问的是一个非常复杂的问题,超出了简单的 iOS 开发领域。如果您的问题具体是“将图像包装在杯子上”,那么可以将其处理为“将纹理应用于网格对象”,在这种情况下,您将希望使用 OpenGL ES,并具有预定义的模型(使用 UV 映射)将图像/纹理应用到。</p>

<p>此外,您可以使用 OpenGL 并执行网格网格转换(网格变形)——也就是说,您将在网格(具有(网格)分辨率)上拍摄图像,然后将所有点操作为创建翘曲效果。此外,GLKit 可能会在此过程中提供帮助,Core Image 也可能提供简单的解决方案。</p>

<p>如果您的问题是,我有一张随机图像,我想导出它的 3D 形状,然后将第二张图像应用到派生的形状并将它们合成在一起,这更加棘手,因为第一部分将更先进图像处理以确定原始对象/选择形状。</p>

<p>以下是一些附加信息:</p>

<ul>
<li>Apple 的 GLCameraRipple 示例代码:<a href="http://developer.apple.com/library/ios/#samplecode/GLCameraRipple/Introduction/Intro.html" rel="noreferrer noopener nofollow">http://developer.apple.com/library/ios/#samplecode/GLCameraRipple/Introduction/Intro.html</a> </li>
<li>关于图像变形的论文 (PDF):<a href="http://www.seas.upenn.edu/~cse399b/Lectures/CSE399b-07-warp-mesh.pdf" rel="noreferrer noopener nofollow">http://www.seas.upenn.edu/~cse399b/Lectures/CSE399b-07-warp-mesh.pdf</a> </li>
<li>用于图像变形的 OpenGL 引用:<a href="http://paulbourke.net/dataformats/meshwarp/" rel="noreferrer noopener nofollow">http://paulbourke.net/dataformats/meshwarp/</a> </li>
<li>GLKit 教程:<a href="http://maniacdev.com/ios-5-sdk-tutorial-and-guide/glkit/" rel="noreferrer noopener nofollow">http://maniacdev.com/ios-5-sdk-tutorial-and-guide/glkit/</a> </li>
<li>Core Image 教程:<a href="http://maniacdev.com/ios-5-sdk-tutorial-and-guide/core-image-example/" rel="noreferrer noopener nofollow">http://maniacdev.com/ios-5-sdk-tutorial-and-guide/core-image-example/</a> </li>
<li>南大关于图像变形的讲义 (PDF):<a href="http://www.csie.ntu.edu.tw/~cyy/courses/vfx/05spring/lectures/handouts/lec03_morphing_4up.pdf" rel="noreferrer noopener nofollow">http://www.csie.ntu.edu.tw/~cyy/courses/vfx/05spring/lectures/handouts/lec03_morphing_4up.pdf</a> </li>
<li>来自 StackOverflow 的相关信息:<a href="https://stackoverflow.com/questions/11614162/ios-images-in-a-bubble-effect" rel="noreferrer noopener nofollow">iOS images in a bubble effect</a> </li>
</ul>

<p>干杯,祝你好运!</p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 在杯子上合并和包装 UIImage,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/11737828/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/11737828/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 在杯子上合并和包装 UIImage