简体   繁体   English

非常规网格的双三次插值?

[英]Bicubic Interpolation for Non-regular grids?

I am working on a project where I have a set of known measurements (x,y,z,a) and an input (z,a).我正在做一个项目,我有一组已知的测量值 (x,y,z,a) 和一个输入 (z,a)。 I need to be able to interpolate the (x,y,z) so that I can get a list of possible (x,y) coordinates from a given z.我需要能够对 (x,y,z) 进行插值,以便从给定的 z 中获取可能的 (x,y) 坐标列表。

I was looking at bicubic interpolation, but I can only find examples pertaining to regular grids, and my (x,y) pairs are most certainly not regular.我正在研究双三次插值,但我只能找到与规则网格有关的示例,而且我的 (x,y) 对肯定不是规则的。

Basically I am looking for some guidance on algorithms/models to achieve this goal.基本上我正在寻找一些关于算法/模型的指导来实现这个目标。 I am considering a triangulated irregular network, which is attractive because it breaks down into planes which are easy to determine the (x,y) from a given Z. But I would like a little more finesse.我正在考虑一个三角形的不规则网络,它很有吸引力,因为它分解成易于从给定 Z 确定 (x,y) 的平面。但我想要更多的技巧。

I know it sounds like homework, its not.我知道这听起来像家庭作业,它不是。

Efficiency is not a concern.效率不是问题。

Thanks!谢谢!

I actually ended up using Delauney Triangulation to break down the fields into 3 dimensional X,Y,Z surfaces with an Identifier.实际上,我最终使用 Delauney Triangulation 将字段分解为带有标识符的 3 维 X、Y、Z 表面。 Then given a set of (Identity,Z) pairs I form a field line from each surface, and from these lines compute the polygon formed from the shortest edges between lines.然后给定一组 (Identity,Z) 对,我从每个表面形成一条场线,并从这些线计算由线之间的最短边形成的多边形。 This gives me an area of potential x,y coordinates.这给了我一个潜在的 x,y 坐标区域。

Take a look at Kd-tree .看看Kd-tree These first take a set of scattered points in 2d or 3d or 10d, then answers queries like "find the 3 points nearest P".这些首先获取 2d 或 3d 或 10d 中的一组散点,然后回答诸如“找到最接近 P 的 3 个点”之类的查询。

Are your queries za pairs?你的查询是za的吗? For example, given a bunch of colored pins on a map, a table of xy size color , one could put all the [xy] in a kd tree, then ask for pins near a given x0 y0 .例如,给定 map 上的一堆彩色引脚,一个xy size color ,可以将所有[xy]放在 kd 树中,然后在给定的x0 y0附近询问引脚。
Or, one could put all the [size color[ in a tree, then ask for pins with a similar size and color.或者,可以将所有[size color[放在一棵树中,然后要求具有相似尺寸和颜色的别针。 (Note that most kd-tree implementations use the Euclidean metric, so sqrt( (size - size2)^2 + (color - color2)^2 ) should make sense.) (请注意,大多数 kd-tree 实现使用欧几里得度量,所以 sqrt( (size - size2)^2 + (color - color2)^2 ) 应该是有意义的。)

In Python, I highly recommend scipy.spatial.cKDTree .在 Python 中,我强烈推荐scipy.spatial.cKDTree

See also SO questions/tagged/kdtree .另请参阅 SO questions/tagged/kdtree

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

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