@@ -0,0 +1,970 @@
+import logging%0Aimport sys%0Asys.path.append('../..')%0A%0Aimport numpy as np%0A%0Aimport cv2%0Afrom src.support.profiling import func_profiling%0Afrom src.image.imcv import ImageCV%0A%0ALOGGER = logging.getLogger(__name__)%0ADETECT_METHOD = %5Bcv2.TM_CCOEFF, cv2.TM_CCOEFF_NORMED, cv2.TM_CCORR,%5C%0A                 cv2.TM_CCORR_NORMED, cv2.TM_SQDIFF,cv2.TM_SQDIFF_NORMED%5D%0A%0Aclass TemplateDetector(object):%0A    %22%22%22%0A    Argument%0A        @template:  template image path%0A        @target:    the image path which you want to detect the template%0A    %22%22%22%0A    def __init__(self, template, target):%0A        super().__init__()%0A        self._template = ImageCV.get_edge_image(template)%0A        self._target = ImageCV.get_grayscale_image(target)%0A%0A%0Aif __name__ == '__main __':%0A    %22%22%22testing%22%22%22%0A    logging.basicConfig(%0A        level=logging.INFO,%0A        format='%25(asctime)s %25(filename)12s:L%25(lineno)3s %5B%25(levelname)8s%5D %25(message)s',%0A        datefmt='%25Y-%25m-%25d %25H:%25M:%25S',%0A        stream=sys.stdout%0A        )%0A

detector init