Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

@mvuori's answer is good, but it can give bad results if the grid has an important angle (~45°) with the picture axis.

Another idea would be to get the list of the neighboring blobs for each blob (i.e. the blobs whose distance is smaller than a threshold). Then check the angles between the current blob and its neighbors (atan(dy/dx)). If there are neighbors in every direction, then it's somewhere in the middle. If its neighbors are in a half-plane, it's on the edges. If the neighbors are in a quarter plane, it is a corner blob.