只使用平移和旋转将一组2d点对齐 [英] align one set of 2d points with another using only translation and rotation

查看:156
本文介绍了只使用平移和旋转将一组2d点对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在OpenCV工作,但我不认为有这个功能。我可以找到寻找仿射变换的函数,但仿射变换包括缩放,我只想考虑旋转+平移。想象一下,我在2d中有两组点 - 假设每组有50分。



例如设A = {x1,y1,x2,y2,...,x50,y50}

set B = {x1',y1',x2',y2' ,...,x50',y50'}



我想找到最接近映射集合A到集合B上的旋转和平移组合。我想我会将最接近定义为最小化A中点与BIe中相应点之间的平均距离,使(x1,y1)和(x1',y1')之间的平均距离最小化等。

我想我可以用蛮力测试所有可能的翻译和旋转,但这样做效率会非常低。有没有人知道更简单的方法?



谢谢!

解决方案

问题在接近矩阵的奇异值分解(点对之间的距离)方面具有非常优雅的解决方案。这个名字是正交Procrustes问题,在希腊传说关于提供旅行家床,这将适合任何人。



解决方案来自找到一个给定(不一定正交)矩阵的最近正交矩阵。

I'm working in OpenCV but I don't think there is a function for this. I can find a function for finding affine transformations, but affine transformations include scaling, and I only want to consider rotation + translation.

Imagine I have two sets of points in 2d - let's say each set has exactly 50 points.

E.g. set A = {x1, y1, x2, y2, ... , x50, y50}

set B = {x1', y1', x2', y2', ... , x50', y50'}

I want to find the rotation and translation combination that gets closest to mapping set A onto set B. I guess I would define "closest" as minimises the average distance between points in A and corresponding points in B. I.e., minimises the average distance between (x1, y1) and (x1', y1'), etc.

I guess I could use brute force testing all possible translations and rotations but this would be extremely inefficient. Does anyone know a simpler way?

Thanks!

解决方案

This problem has a very elegant solution in terms of singular value decomposition of the proximity matrix (distances between pairs of points). The name of this is the orthogonal Procrustes problem, after the Greek legend about a fellow who offered travellers a bed that would fit anyone.

The solution comes from finding the nearest orthogonal matrix to a given (not necessarily orthogonal) matrix.

这篇关于只使用平移和旋转将一组2d点对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆