Want to speed up template matching in OpenCV python

related Want to speed up template matching in OpenCV python - Stack Overflow

as noted over there, your mistake is calling imread in every iteration. move it outside of the loop.