5

I have a binary image with non-point objects.

Does anyone have any suggestions how to determine area of each Voronoi cell in Voronoi diagram (the goal is area distribution)?

Sample image

corey979
  • 23,947
  • 7
  • 58
  • 101
Yuriy
  • 53
  • 2

1 Answers1

13

There is a one-liner (if you have wide enough screen)

Histogram@ComponentMeasurements[#, "Area"][[;; , 2]] &@
   WatershedComponents@DistanceTransform@Import@"https://i.stack.imgur.com/k0EUJ.png"

enter image description here

ybeltukov
  • 43,673
  • 5
  • 108
  • 212