示例#1
0
 def test_findTemplate(self):
     img = cv2.imread("gabarito2.png")
     dt = Omr(img)
     res = dt.Find_Templates(img)
     self.assertEqual(res, 1)
示例#2
0
 def test_quantTemplate(self):
     img = cv2.imread("c_resposta.png")
     dt = Omr(img)
     res = dt.Quant_Templates(img)
     self.assertEquals(len(res), 1)
示例#3
0
 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)
示例#4
0
 def test_questions(self):
     img = cv2.imread("gabarito2.png")
     dt = Omr(img)
     res = dt.DetectQuestions(img)
     self.assertEqual(len(res), 75)
示例#5
0
 def test_detect_ret(self):
     img = cv2.imread("HEXAG.jpg")
     om = Omr(img)
     res = om.DetectQuestions_ret(img)
     self.assertEqual(len(res), 305)
示例#6
0
 def test_detect_cir(self):
     img = cv2.imread("gabarito2.png")
     om = Omr(img)
     res = om.DetectQuestions_cir(img)
     self.assertEqual(len(res), 75)
示例#7
0
 def test_barcodes(self):
     img = cv2.imread("test2.png")
     om = Omr(img)
     barc = om.barcodes(img)
     #print(len(barc))
     self.assertEquals(len(barc), 2)