自动缩放和旋转图像

发布于 2024-07-25 17:22:47 字数 591 浏览 6 评论 0原文

给定:

  • 同一主题的两张图像;
  • 图像具有相同的分辨率、颜色深度和文件格式;
  • 图像的大小和旋转不同; 以及
  • 两个与图像相关的 (x, y) 坐标列表。

我想知道:

  • 如何变换较大的图像,使其在视觉上与第二个图像对齐?
  • (可选。)获得准确变换所需的最少点数是多少?
  • (可选。)这些点需要相距多远才能获得准确的变换?

变换需要旋转、缩放,并且可能需要剪切较大的图像。 本质上,我想创建(或找到)一个执行以下操作的程序:

  1. 输入两个图像(例如 TIFF)。
  2. 单击小图像上的多个锚点。
  3. 单击大图像上的几个相应的锚点。
  4. 通过对齐锚点来变换大图像,使其映射到小图像。

这将有助于对齐同一恒星物体的图片。 (例如,将 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:

  1. Input two images (e.g., TIFFs).
  2. Click several anchor points on the small image.
  3. Click the several corresponding anchor points on the large image.
  4. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

别挽留 2024-08-01 17:22:47

这称为图像注册

Mathworks 对此进行了讨论,Matlab有这个能力,更多信息在Elastix手册

考虑:

This is called Image Registration.

Mathworks discusses this, Matlab has this ability, and more information is in the Elastix Manual.

Consider:

糖果控 2024-08-01 17:22:47

您可以使用 javax.imageioJava 高级成像 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.

假装不在乎 2024-08-01 17:22:47

对于 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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文