如何拼接数字图像中的一些物体?
我正在寻找一些算法来连接对象,例如,将苹果组合成数字图像中的树以及Matlab中的一些演示。请给我看一些相关材料。感谢您的阅读和帮助我!
I'm looking for some algorithm to joint objects, for example, combine an apple into a tree in digital image and some demo in Matlab. Please show me some materials of that. Thanks for reading and helping me!!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定我是否理解你的问题,但如果你想要做一些图像重叠,就像 Photoshop 图层一样,你可以使用一些图像特征,通过该特征来确定透明度。
例如,考虑使用两个 RGB 图像。图像 A 将与图像 B 重叠。为此,我们将使用图像 B 的亮度来确定透明度 (255 = 100%)。
强度=像素/255;
NewPixel = (PixelA * (1 - 强度)) + (PixelB * 强度);
由于强度是一个百分比,并且每个像素都乘以该百分比的补数,因此所得总和永远不会溢出超过 255(最大灰度级)
。您还可以更改此算法,以便在不同的位置将图像 A 重叠到 B 上。我假设图像 B 坐标 (0, 0) 将与图像 A 坐标 (0, 0) 重叠。
但我再次不确定这是否是您正在寻找的。
I not sure if I undertand your question, but if you are looking to do some image overlaping, as does photoshop layers, you can use some image characteristics to, through that characteristc, determine the degree of transparency.
For example, consider using two RGB images. Image A will be overlapped by image B. To do it, we'll use image B brightness to determine transparency degree (255 = 100%).
Intensity = pixel / 255;
NewPixel = (PixelA * (1 - Intensity)) + (PixelB * Intensity);
As intensity is a percentage and each pixel is multiplied by the complement of this percentage, the resulting sum will never overflow over 255 (max graylevel)
You can also change this algorithm in order to overlap Image A over B, in a different place. I'm assuming here the image B coordinate (0, 0) will overlap image A coordinate (0, 0).
But once again, I'm not sure if this is what you are looking for.