比较或对齐3D对象 [英] Compare or align 3D objects

查看:53
本文介绍了比较或对齐3D对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个3D矩阵.每个像素都是灰度值.

I have two 3D matrices. Each pixel is a gray scale value.

第一个3D矩阵是参考形状.例如想象嘴巴的3D模型.

The first 3D matrix is a reference shape. e.g. imagine a 3D model of a mouth.

第二个3D矩阵是参考形状的近似子部分.例如想像一颗牙齿.该小节是近似的,因为它来自另一张嘴.请注意,该部分可能会稍微倾斜.

The second 3D matrix is an approximate subsection of the reference shape. e.g. imagine a tooth. The subsection is approximate as it is from a different mouth. Note the subsection could be slightly oblique.

面临的挑战是确定参考矩阵内小节的坐标是什么.在上面的口腔示例中进行扩展,面临的挑战是确定第二个3D矩阵最准确地代表什么牙齿.

The challenge is to identify what are the coordinates of the subsection inside the reference matrix. Expanding on the mouth example above, the challenge is to identify what tooth the second 3D matrix most accurately represents.

输出可能是3D像素位置和方向值.

The output could be a 3D pixel location and an orientation value.

推荐答案

通常,您希望将子矩阵B与参考矩阵A的每个可能的子矩阵进行比较(以使其具有相同的大小) ,作为矩阵B),然后找到最相似的片段.

In general, you want to compare your subsection matrix B with every possible subsection matrix of the reference matrix A (so that it has the same size, as a matrix B) and find the most similar piece.

通过比较,我指的是差异的估计,例如如果B_i是矩阵A的一部分,则可以计算:

By comparison, I mean the estimation of the difference, e.g. if B_i is some subsection of matrix A, you can calculate:

 d_i=sum(sum(sum((B_i-B).^2)));

在那之后,您需要找到最小的$ d_i $.如果使用大矩阵A(NxNxN)和B(MxMxM),则可能有(N-M)^3个可能的子矩阵B_i,其大小与矩阵B相同.该算法将非常昂贵.

After that, you need to find the minimum of $d_i$. If you are working with big matrices A(NxNxN) and B(MxMxM), there are (N-M)^3 possible submatrices B_i with the same size as matrix B. The algorithm will be quite expensive.

但是,有一种使用卷积的替代实现.您可以查看颗粒图像测速算法,确实与您的问题相似.

However, there is an alternative implementation using convolutions. You can take a look at the Particle Image Velocimetry algorithm, that is really similar to your problem.

这篇关于比较或对齐3D对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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