简体   繁体   English

[Paraview]-比较两个Vtk网格表面以计算变形距离

[英][Paraview]- Compare two Vtk mesh surface to calculate the deformation distance

I have a tof camera (pmd camboard nano), and my goal it's to between meshes calculate the distance from each other to calculate the deformation distance and the 3d position of specific points. 我有一个tof相机(pmd camboard nano),我的目标是在网格之间计算彼此之间的距离,以计算变形距离和特定点的3d位置。 What is the best method to make that? 做到这一点的最佳方法是什么? I try with ruler, and euclidian distance in matlab with the point source, but i want the calcultion to be more precise. 我尝试使用点源在Matlab中使用标尺和欧几里得距离,但我希望计算更加精确。

Here's a solution, assuming both datasets have exactly the same number of points and you are comparing point coordinates for points at the same index: 这是一个解决方案,假设两个数据集具有完全相同的点数,并且您正在比较具有相同索引的点的点坐标:

  1. Apply the Calculator filter on both the datasets separately with the expression coords . 使用表达式coords分别将Calculator过滤器应用于两个数据集。 This will create new datasets with Result array in the PointData that corresponds to the point locations for each of the datasets. 这将在PointData中与每个数据集的点位置相对应的Result数组中创建新的数据集。
  2. Select the two calculator filters and then apply the Python Calculator filter with expression set to sqrt(sum((inputs[0].PointData["Result"] - inputs[1].PointData["Result"])**2)) . 选择两个计算器过滤器,然后将表达式设置为sqrt(sum((inputs[0].PointData["Result"] - inputs[1].PointData["Result"])**2))Python Calculator过滤器应用sqrt(sum((inputs[0].PointData["Result"] - inputs[1].PointData["Result"])**2))

The resulting dataset will have a result array which is the euclidean distance between the two corresponding points. 结果数据集将具有结果数组,该结果数组是两个相应点之间的欧式距离。

To limit this calculation to specific points, you can use the Extract Selection or Threshold to extract smaller datasets with points of interest and then do the above. 要将计算限制在特定点上,可以使用“ Extract Selection或“ Threshold来提取具有关注点的较小数据集,然后执行上述操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM