Function like template matching in OpenCV

Hi, Is it possible that we can do the same function as "template matching" in OpenCV, by using swift and vision framework? I don't want to go to object recognition in ML because of the accuracy issue.

Function like template matching in OpenCV
 
 
Q