def test_draw_rect_wait2(self): il = ImageLocation() src_img_rgb = cv2.imread(WAIT2) tgt_img_rgb = cv2.imread(WAIT2_T, 0) pt = il._get_location_obj(src_img_rgb, tgt_img_rgb, 0.5) w, h = tgt_img_rgb.shape[::-1] draw = il.draw_rect(pt, w, h, src_img_rgb, OUT) self.assertEqual(draw, True)
def test_draw_rect(self): il = ImageLocation() src_img_rgb = cv2.imread(SRC) tgt_img_rgb = cv2.imread(TARGET, 0) pt = il._get_location_obj(src_img_rgb, tgt_img_rgb) w, h = tgt_img_rgb.shape[::-1] draw = il.draw_rect(pt, w, h, src_img_rgb, OUT) self.assertEqual(draw, True)