Closest point to a given point

前端 未结 8 2490
终归单人心
终归单人心 2020-11-30 03:22

I have a set K of randomly selected pixels in a 2D image. For every other pixel in the image I need to find out which pixel in set K is closest to it (using the standard sqr

8条回答
  •  盖世英雄少女心
    2020-11-30 03:43

    The construction of Voronoi Diagrams is a branch of Computational Geometry. The construction of Delaunay Triangulations involves similar considerations. You may be able to adapt one of the following Delaunay algorithms to suit your needs.

    • Flip algorithms
    • Incremental
    • Divide and conquer
    • Sweepline

提交回复
热议问题