$ 0 0 A rectangle is drawn irrespective of the template found or not. How can I know taht a valid match for the template has been found?