Ask Your Question

Revision history [back]

click to hide/show revision 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.

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.