自动缩放和旋转图像
给定:
- 同一主题的两张图像;
- 图像具有相同的分辨率、颜色深度和文件格式;
- 图像的大小和旋转不同; 以及
- 两个与图像相关的 (x, y) 坐标列表。
我想知道:
- 如何变换较大的图像,使其在视觉上与第二个图像对齐?
- (可选。)获得准确变换所需的最少点数是多少?
- (可选。)这些点需要相距多远才能获得准确的变换?
变换需要旋转、缩放,并且可能需要剪切较大的图像。 本质上,我想创建(或找到)一个执行以下操作的程序:
- 输入两个图像(例如 TIFF)。
- 单击小图像上的多个锚点。
- 单击大图像上的几个相应的锚点。
- 通过对齐锚点来变换大图像,使其映射到小图像。
这将有助于对齐同一恒星物体的图片。 (例如,将 1855 年的手绘图片映射到哈勃在 2000 年拍摄的照片。)
非常感谢您提供任何算法(最好是 Java 或类似的伪代码)、想法或相关开源软件包的链接。
Given:
- two images of the same subject matter;
- the images have the same resolution, colour depth, and file format;
- the images differ in size and rotation; and
- two lists of (x, y) co-ordinates that correlate the images.
I would like to know:
- How do you transform the larger image so that it visually aligns to the second image?
- (Optional.) What are the minimum number of points needed to get an accurate transformation?
- (Optional.) How far apart do the points need to be to get an accurate transformation?
The transformation would need to rotate, scale, and possibly shear the larger image. Essentially, I want to create (or find) a program that does the following:
- Input two images (e.g., TIFFs).
- Click several anchor points on the small image.
- Click the several corresponding anchor points on the large image.
- Transform the large image such that it maps to the small image by aligning the anchor points.
This would help align pictures of the same stellar object. (For example, a hand-drawn picture from 1855 mapped to a photograph taken by Hubble in 2000.)
Many thanks in advance for any algorithms (preferably Java or similar pseudo-code), ideas or links to related open-source software packages.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这称为图像注册。
Mathworks 对此进行了讨论,Matlab有这个能力,更多信息在Elastix手册。
考虑:
This is called Image Registration.
Mathworks discusses this, Matlab has this ability, and more information is in the Elastix Manual.
Consider:
您可以使用 javax.imageio 或Java 高级成像 API,用于一次旋转、剪切和缩放图像你知道你想用它们做什么。
you can use the javax.imageio or Java Advanced Imaging api's for rotating, shearing and scaling the images once you found out what you want to do with them.
对于 C++ 实现(没有 GUI),请尝试旧的 KLT (Kanade-Lucas-Tomasi) 跟踪器。
http://www.ces.clemson.edu/~stb/klt/
For a C++ implementation (without GUI), try the old KLT (Kanade-Lucas-Tomasi) tracker.
http://www.ces.clemson.edu/~stb/klt/