【问题标题】:Image Stitching methods to remove seams for stitched image图像拼接方法去除拼接图像的接缝
【发布时间】:2016-04-03 14:54:14
【问题描述】:

我使用 SURF 进行特征检测,然后使用 RANSAC。我得到的缝合图像有接缝。如何删除这些?

【问题讨论】:

  • 缝针?他们是直的吗?角?可变大小?随机?
  • 它们实际上在两个图像被缝合的点是有角度的。
  • 对不起。我现在对图像有一些问题。你能概括一下吗?

标签: image-processing panoramas image-stitching


【解决方案1】:

我实现了去除缝合眼睛视网膜图像的接缝。您可以在下面找到最终效果:

为此,我实现了this 论文第 138 页中描述的技术。您可以在下面找到执行此操作的伪代码并附上说明,完整源代码可在 my repository 上找到。

算法基于通过对重叠在该像素上的图像的像素值执行weighted average 来计算像素的最终值。权重基于像素到图像边缘的距离。如果像素越靠近其所属图像的中心,则越重要,权重越大。可以使用 OpenCV 实现的函数distanceTransform 计算像素到图像边缘的距离。这是距离变换对放置在最终马赛克上的其中一个眼睛的视网膜图像的影响:

您可以在下面找到伪代码:

// Images is an array of images that the program is stitching

// For every image (after transform) on final plane calculate distance transform
for (image in images) {
  // Calculate distance transform
  image.distanceTransform = distanceTransform(image)
}

// For every pixel in final mosaic, calulate its value by using weighted average
for (row in rows) {
  for (col in cols) {
    currentPixel = FinalMosaic(col, row)

    // Values for weighted average
    numeratorSum = 0
    denominatorSum = 0

    // Go through all images that can overlap at this pixel
    for (image in images) {
      // If image is not overlapping over this pixel just skip
      isOverlapping = image.isOverlapping(currentPixel)
      if (isOverlapping) {
        currentPixelWeight = image.distanceTransform.valueAt(currentPixel)
        numeratorSum += currentPixelWeight * currentPixel.value
        denominatorSum += currentPixelWeight
      }
    }

    if (denominatorSum != 0) {
      currentPixel.value = numeratorSum / denominatorSum
    }
  }
}

如果有什么不清楚的地方,请在 cmets 中写下问题,我会努力改进答案。

【讨论】:

    【解决方案2】:

    您能否告诉您最终得到的解决方案是什么,因为我无法理解如果我们将 2 个图像连接起来,我们将如何移除图像中的接缝线,并且我们在该点处获得两个图像之间的一条垂直接缝线他们加入的地方。

    【讨论】:

    • 这不是答案。
    猜你喜欢
    • 1970-01-01
    • 2011-08-26
    • 1970-01-01
    • 1970-01-01
    • 2012-09-03
    • 2017-02-17
    • 2011-12-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多