Basically I'm trying to measure the displacemtent of the template along of the next image. I extract the roi of the image at t0
, then I apply matchTemplate
function on the image at t1
and finally use the euclidean distance. Here is that part of the code:
#template first point[50:100, 150:200]
x1 = 150
y1 = 50
#top_left point of template matching
x2 = 149
y2 = 53
euc_dist = np.sqrt((x2 - x1) ** 2 + (y2 - y1) ** 2)
Is this a pythonic way to do? I think that is a little bit complicated approximation.