Views
No views yet
$ pip install -r requirements.txtStructure/ scanner = Scanner("Structure/Scanner-Detector.pth", config_)1 org = cv2.imread(fname)
2 org_gray = cv2.cvtColor(org, cv2.COLOR_RGB2GRAY)
3 org_resize = cv2.resize(org_gray, (256, 256), interpolation = cv2.INTER_AREA) mask = scanner.ScanView(org_resize)1 paper, approx = ExtractPaper(org_gray, mask)
2 org = DrawBox(org, approx) paper = EnhacePaper(paper)