Skip to content

Commit

Permalink
fix: Disable interlacing for all devices except OPENCV, since we need…
Browse files Browse the repository at this point in the history
… a perfect input to do our current method.
  • Loading branch information
alex-ong committed Aug 13, 2020
1 parent 6d4bfae commit b022086
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nestris_ocr/calibration/auto_calibrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 4 additions & 0 deletions nestris_ocr/capturing/deinterlacer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit b022086

Please sign in to comment.