title: OpenCV - Discretize an array into multi-resolutions, put points on it and count its distribution scores (binning?)
body: <p>I'm not sure what this technique called, before going ahead and implement this myself, I wonder does opencv/scipy/pytorch/etc already has such algorithm implemented? This image below visualize what's happening, it's usually used in Struture-from-Motion (SfM). Basically, it calculates how uniform is the distribution of the points in multi-resolution grid cells.</p>
  <p>I notice that opencv has SfM module, but I don't see any for such calculations specifically.</p>
  <p><a href="https://i.stack.imgur.com/NV9Yr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NV9Yr.png" alt="enter image description here" /></a></p>