Get length in pixels between edges of two contours
Hi.
I'm using OpenCV 3.3.1 on Windows 7.
I want to get length (in pixels) between two contours.
Here are thresholded and original images (figure may rotated by different angles):
This is what I need to get:
I can find centers of this figures:
but I dont know how to find distance from center to edge...
Please give me advices.
UPDATE
Thanks @StevenPuttemans for idea, I tried to implement it, but during this time found one more important note that figure's position is changing and it may be rotated by random angle (sorry, I should note about it earlier):