perform projective transform
M = cv2.estimateRigidTransform(background_data[1], arena_data[1], False)
You should modify the code to this
# perform projective transform
M, inliers = cv2.estimateAffine2D(background_data[1], arena_data[1])
if M is None:
print("Transformation estimation failed.")