问题标签 [image-registration]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
53 浏览

matlab - 如何使用 Alpha 通道执行图像配准

我有两张图片,想对这两张图片进行特征检测并匹配这些特征。我的问题是第二张图像是第一张图像的一部分,缺少像素。这些缺失的像素会导致像素强度的强烈不连续性,从而导致特征检测器将所有特征放置在此边界,如下所示:

在此处输入图像描述

因此,特征匹配程序失败,因为(我认为)这些特征的描述符包含原始图像中不存在的缺失像素强度。因此,我希望特征检测器排除这些特征,而是在“有效”像素区域内搜索。有人有想法吗?

否则,也许在像素强度上使用模式匹配可能是一种强有力的选择,但我找不到有效的实现方式(特别是考虑到两个图像可能相对于彼此旋转)。

[编辑] 这是两张图片:

在此处输入图像描述 原始图像

0 投票
0 回答
97 浏览

android - 尝试执行图像对齐时出现意外结果 | 图像注册 | 开放式简历 | 安卓

我尝试使用适用于我的一个测试用例的 OpenCV for android 实现图像对齐,但它无法在另一个测试用例上运行。

测试用例 #1 - 我的代码适用于:

给定两个图像,例如Scene ImageObject Image

我希望输出对象图像与场景图像对齐。查看最终输出

测试用例 #2 - 我的代码不起作用:

给定图像、场景图像对象图像

我得到了这个特征匹配结果,并将作为warpPerspective的输出。

我的问题是,谁能告诉我为什么我无法在第二个测试用例中对齐图像。

0 投票
1 回答
181 浏览

opencv - 图像配准的边缘/结构匹配

我正在处理LWIR 和 RGB 图像之间的图像配准。我能够从两个图像中提取边缘。 RGB_Edges , LWIR_Edges

现在,我想匹配这些图像的边缘来计算单应性。我尝试使用模板匹配(OpenCV)分别将 RGB 的每个边缘与 LWIR 图像匹配,但没有成功。

因此,任何人都可以建议一些方法来处理两个图像的边缘/结构,这有助于计算单应性吗?

我将非常感谢任何建议/帮助。

谢谢。

0 投票
1 回答
40 浏览

matlab - 在图像上插入新的控制点

我正在尝试使用 B-Splines 作为变形模型进行自动非刚性图像配准,但我遇到了一些问题:

  1. 最初,我放了几个控制点(5x5),时间长了,效果不错,但是处理时间让人望而却步。
  2. 我已经阅读了很多关于图像配准的文章(例如 Rueckert 等人,1999 年),为了提高性能,作者使用了多级 B 样条变形,但算法对我来说并不完全清楚。
  3. 这篇文章中,作者提出了一组公式(第 4.2 节)来增加控制点的数量而不改变 B-Spline 的形状,但是我的实现并没有返回我所期望的(例如,我期望应用这个新的10x10 控制点变换和具有相同的 5x5 变换)。

这是我的 MATLAB 实现:

我究竟做错了什么?

0 投票
1 回答
430 浏览

algorithm - 如何找到图像处理算法的计算复杂度

我试图找到关于像素数的算法的计算复杂度,我需要遵循什么程序。该算法基于图像配准。

0 投票
0 回答
173 浏览

matlab - 将几何变换矩阵应用于坐标

我想将几何变换矩阵应用于坐标列表:

例如,我有两个图像:A 和 B。我使用 MATLAB 应用程序“Registration estimator”将 A(运动图像)注册到 B(固定图像),得到一个变换矩阵 T。

现在我有一个图像 A 上的坐标列表,我想获得已注册图像上的转换坐标。我应该怎么办?直接将坐标与变换矩阵相乘似乎不起作用。

比如我图片A是200*300像素,图片B是210*290像素。如果我直接将变换矩阵乘以图像A中的坐标,则计算出的坐标也对应于A的坐标系而不是B的坐标系。我想要的是B的坐标系下的坐标。

0 投票
2 回答
1218 浏览

module - 如何在 spyder anaconda 中安装模块?

我正在尝试在 Spyder Anaconda 中运行一些代码。我认为这就像在代码中看到的导入它一样简单,但我收到一条错误消息:

ModuleNotFoundError:没有名为“image_registration”的模块

我知道这意味着 image_registration 不包含在 Spyder 已经拥有的内容中,但我不知道如何添加它。

0 投票
1 回答
659 浏览

python - 图像配准/对齐和转换如何在像素级别上工作?

我知道图像配准/对齐的基本流程或过程,但是当 2 个图像被配准/对齐时,在像素级别会发生什么,即转换为固定图像的运动图像的相似像素保持不变,但像素会发生什么?不匹配,它们是平均值还是其他?

以及如何估计正确的转换技术,即我如何知道是否应用平移、缩放、旋转等以及应用多少(即旋转的度数值、平移值等)?

此外,在初始步骤中,如何识别和匹配相似的像素值?

我已经实现了https://simpleitk.readthedocs.io/en/master/Examples/ImageRegistrationMethod1/Documentation.html中给出的 python 代码

输入图像是前列腺 MRI 扫描:

固定图像 运动图像 输出 图像 控制台输出

可以在右上角和左上角的输出图像中看到差异。但我无法解释控制台输出以及事情在内部的实际工作方式。

如果我对这件事有深入的解释,那将非常有帮助。谢谢你。

0 投票
1 回答
7861 浏览

python - Python 在“sys.exit (1)”上引发异常“SystemExit: 1”

我正在从这个链接 https://simpleitk.readthedocs.io/en/master/Examples/ImageRegistrationMethod1/Documentation.html运行 simpleitk 的 python 示例

在 spyder anaconda 中。

我已经通过 anaconda Prompt 安装了软件包 simpleitk,system,os 。

在运行此代码时,它给我以下错误用法:E:/registration/simpleitk.py 发生异常,使用 %tb 查看完整的回溯。

系统退出:1

C:\Users\aBC\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\interactiveshell.py:3275:用户警告:要退出:使用“退出”、“退出”或 Ctrl-D。warn("要退出:使用 'exit'、'quit' 或 Ctrl-D。", stacklevel=1)

我怎样才能纠正这个错误?

0 投票
1 回答
1039 浏览

python - How to estimate a sub-pixel shift between images with non uniform translation/rotation

I have several images which are fully overlapping the same scene. But there is a small shift between all the images, something like 1px or less, so a sub-pixel shift. Let's say it's the problem (1): how can I estimate this sub-pixel shift between 2 images (actually, I know how and I write the code about this below). I used python here.

In addition to problem (1), there is the problem (2) which is about a non uniform shift on the full image. Let's give image A and image B, on the top left, image A is shifted about 1px from image B in x and y axis but, on the center, image A is shifted in 0.5px from image B also in x and y axis. The shift between image A and B is not uniform among the total surface of the image. The problem is how can I estimate this non-uniform shift, let's nammed it a shifted surface, for all the pixels for all images (taking one as reference) (I have a solution also for this question, I will explain it below).

Finally, problem (3) is about to shift the image with the estimated shift surface (calculated on (2)). I know how to shift an image to 0.5 px on X-axis and 1.2 px on Y-axis for example. But I don't know how to shift an array with a specific shift for each pixel.

My solutions:

Problem (1): This problem can be solved using a cross-correlation in fourrier space. A function already existe in the scipy library : register_translation reference here, I just need to give two images as parameters and the float precision I want.

Problem (2): Remember, the shift is not uniform among all the surface of the image. What I did, is basically, on window of 500x500 px, the shift is uniform and can be easily estimated from problem (1). So, I calculated the shift among all the surface of the image with window of 500x500px and a step of 100px. I have thus now, the non uniform shift estimated as shown below non-uniform shift estimated. I can then, interpolate a surface from this ponctual estimated shift, which will give me an estimated shift for each pixel of the image. To do that, I have to interpolate a surface with the same resolution of the image. I did it, using numpy.griddata. Here is the result for both components (x and y) x and y components of the non-uniform shift interpolated. I have thus, estimated the non uniform shift among all the surface of the image.

Problem (3): I now want to apply this shift to all the image. I don't know how to do that. To shift an image at sub-pixel, you can use a function from scipy.ndimage nammed fourier_shift that you can find here but you can only give a single shift for all the image. Here, I want to give a shift for each pixel of the image.

Do you guys have any ideas to solve the problem (3) ? Also, if you think that there is a simpliest way to solve Problem 1 and 3, it can still be usefull ! For information, I have 7 images of 16000x26000px, so it take some time to solve Problem (2) as I do.