Annotating and exporting boxes for Moveread
Project description
Moveread Boxes
Annotating and exporting boxes
Usage
import cv2 as cv
from scoresheet_models import models
import moveread.boxes as bxs
Grid Extraction
ann = bxs.exportable(
bxs.Annotations(grid_coords=bxs.Rectangle(tl=(0.05, 0.195), size=(0.935, 0.66))),
'fcde'
).unsafe()
boxes = bxs.export(fcde_sheet, ann)
# [cv.Mat(...), ...]
bxs.exportable(sheet, ann)
# Left(value=MissingAnnotations(detail='Model parameter required when relying on `grid_coords`'))
bxs.exportable(sheet, ann=Annotations())
# Left(value=MissingAnnotations(detail='No `grid_coords` provided'))
Contour Extraction
import robust_extraction as re
model = 'llobregat23'
res = re.descaled_extract(sheet, model)
ann = bxs.exportable(bxs.Annotations(box_contours=res.contours), model).unsafe()
boxes = bxs.export(res.corr_img, ann)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
moveread_boxes-0.1.8.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for moveread_boxes-0.1.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d47086e22874a4c17609f25eb5c206746be2d0b76238a629148d315ac5c11fb0 |
|
MD5 | f5bf6ce9caffff37be8d6f031c60d420 |
|
BLAKE2b-256 | 5bd97e57a1d81a4a9f5341bfb6beeeb2ce9226b5d7d3fc9c8ba229898a484a03 |