1 | initial version |
For example, cX1 and cY1 are coordinates of center of first box, cX2 and cY2 are coordinates of center of second box. You can find the distance:
distance = ((cX1 - cX2) ** 2 + (cY1 - cY2) ** 2) ** 0.5
If you know real sizes of boxes you can also compute distance in cm. But accuracy will be low.
2 | No.2 Revision |
For example, cX1 and cY1 are coordinates of center of first box, cX2 and cY2 are coordinates of center of second box. You can find the distance:
distance = ((cX1 (((cX1 - cX2) ** 2 2) + (cY1 ((cY1 - cY2) ** 2) 2)) ** 0.5
If you know real sizes of boxes you can also compute distance in cm. But accuracy will be low.