Home Image-Pro General Discussions

Nearest neighbor analysis

I've watched the "Measure Object Distances" video, and was wondering if there was any way to evaluate distances between all objects.  I'm trying to do a nearest neighbor analysis to determine mixing efficacy, so the nearest neighbor distance between particles is critical.  Is there a more macro-friendly way do get this number than having to individually measure all the distances from each object and selecting the smallest?

Best Answer

  • Accepted Answer
    2018-03-29-110305

    JWKEMLING --

    I believe the TOOL that will help you the most is the VORONOI TOOL

    Please see the images below.

    I hope this information is helpful.

    -- MATT

    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

    Starting with AA as shown below


    Premier can open AA and then do a THRESHOLD / COUNT to generate MEASUREMENT FEATURES as shown in BB (see below) and then generate a VORONOI MAP for BB as shown in the BB_VORONOI (see below).  The FEATURE with the SMALLEST AREA was selected MANUALLY.


    The VORONOI TOOL was set and triggered on BB after the COUNT as shown below.


    The FEATURE MANAGER was used to transfer the MIN VORONOI AREA from the BB_VORONOI IMAGE to the AA IMAGE to show the DOT with the MIN CENTER TO CENTER DISTANCE to its neighbors.

Answers

  • Yes, it looks like using voronoi is the way I want to go, except that I need to use the voronoi measure set to "minimum distance" so that I get a diameter circle from edge to edge or center to center.  Thanks a lot of this.

    One question I do have about the end result: Why, if two particles are the nearest neighbor to each other, do I get slightly different circle distances in "minimum distance" mode.  For example, the two particles in the bottom right of AA, when I do an edge-to-edge voronoi and measure minimum distance, one particle gives me a circle diameter of 15.62 pixels, while the other gives 16.49 pixels?  When I do center-to-center, its 47.71 versus 48.83.  Shouldn't the centers be the same distance apart from both directions?
  • Minimum distance is calculated using Distance map algorithm, which is executed with pixel accuracy, so there might be some differences +-1 pixel.

    Yuri
  • 2018-03-29-140452

    JWKEMLING --

    I am glad that we were able to assist you in your use of the IMAGE-PRO PREMIER SOFTWARE.

    Please respond to the

         Did this answer the question?

    option here on the FORUM so the appropriate TAG gets put on POST / DISCUSSION.

    -- MATT

Sign In or Register to comment.