def test_findTemplate(self): img = cv2.imread("gabarito2.png") dt = Omr(img) res = dt.Find_Templates(img) self.assertEqual(res, 1)
def test_quantTemplate(self): img = cv2.imread("c_resposta.png") dt = Omr(img) res = dt.Quant_Templates(img) self.assertEquals(len(res), 1)
def test_sort(self): img = cv2.imread('gabarito2.png') dt = Omr(img) res = dt.sort_contours(img) #print(len(res)) self.assertEqual(len(res), 2)
def test_questions(self): img = cv2.imread("gabarito2.png") dt = Omr(img) res = dt.DetectQuestions(img) self.assertEqual(len(res), 75)
def test_detect_ret(self): img = cv2.imread("HEXAG.jpg") om = Omr(img) res = om.DetectQuestions_ret(img) self.assertEqual(len(res), 305)
def test_detect_cir(self): img = cv2.imread("gabarito2.png") om = Omr(img) res = om.DetectQuestions_cir(img) self.assertEqual(len(res), 75)
def test_barcodes(self): img = cv2.imread("test2.png") om = Omr(img) barc = om.barcodes(img) #print(len(barc)) self.assertEquals(len(barc), 2)