First time here? Check out the FAQ!
answered 2018-08-14 05:31:55 -0600
your img_template is 1 channel, greyscale, while your img_rotated has 3 channels. so, it should work with:
img_template
img_rotated
img_rotated = imutils.rotate(img_gray, rect[2])