diff --git a/nestris_ocr/calibration/auto_calibrate.py b/nestris_ocr/calibration/auto_calibrate.py index ed55144..d9d937b 100644 --- a/nestris_ocr/calibration/auto_calibrate.py +++ b/nestris_ocr/calibration/auto_calibrate.py @@ -18,9 +18,10 @@ def fix_interlace_resize(rect): def auto_calibrate_raw(config): + # todo: ask the capture method for screen size, and capture full screen. captureAreas = ( - (0, 0, 4000, 2000), # 4k screens fullscreen - (0, 0, 1500, 1500), # reasonably sized screens + (0, 0, 2000, 1000), # 4k screens fullscreen + (0, 0, 1000, 1000), # reasonably sized screens ) capture = uncached_capture() interlace_settings = get_mode_res() diff --git a/nestris_ocr/capturing/deinterlacer.py b/nestris_ocr/capturing/deinterlacer.py index 0b231c3..f7885b0 100644 --- a/nestris_ocr/capturing/deinterlacer.py +++ b/nestris_ocr/capturing/deinterlacer.py @@ -51,6 +51,10 @@ def from_string(cls, value): def get_mode_res(): mode = InterlaceMode.from_string(config["capture.deinterlace_method"]) res = InterlaceRes.from_string(config["capture.deinterlace_res"]) + # hack: we should do some business logic elsewhere to disable de-interlacing + # on devices that don't support it? + if config["capture.method"] != "OPENCV": + mode = InterlaceMode.NONE return mode, res