Skip to content

apps / winecellar / frontend / qt_kiosk / get_label.py

Path: apps/winecellar/frontend/qt_kiosk/get_label.py
Lane: apps
Executable: no/unknown

Purpose

(No module docstring. Add one — it becomes your API contract.)

Entry points

  • No __main__ guard detected

Key symbols

Classes

  • OcrDebug

Functions

  • _center_weighted_score(w, h, x, y, cw, ch)
  • _ensure_tesseract_available()
  • _lazy_import_cv()
  • _lazy_import_pytesseract()
  • _list_tesseract_langs()
  • _load_image_bgr(image_or_path)
  • _next_numeric_prefix(dir_path)
  • _orientation_case(path)
  • _save_debug_image(debug_dir, filename, bgr_img)
  • _score_ocr(text)
  • _tess(image, lang, psm)
  • _tesseract_cmd()
  • crop_center_x(img, cut_left_pct, cut_right_pct)
  • deskew_image(binary_img)
  • detect_label_roi(bgr_img, debug_dir)
  • get_label_info(image_or_path, debug_dir)
  • get_label_pixmap(filename, size)
  • ocr_label_text_multilang(preprocessed_img)
  • parse_label_text(text)
  • preprocess_label_for_ocr(image_or_path, debug_dir)
  • save_label_from_frame(frame)

Configuration & environment

  • (no env vars detected by regex)

Dependencies (imports)

  • PySide6.QtCore
  • PySide6.QtGui
  • __future__
  • config
  • dataclasses
  • pathlib
  • re
  • subprocess
  • typing

Operational notes (fill in)

  • Headless/interactive:
  • Systemd unit (if any):
  • Schedules/triggers:
  • Debug artifacts:
  • Failure modes: