Skip to main content

A simple config watcher

Project description

📦 Detect_LCD_Params – Cấu hình tự động với YAML

Detect_LCD_Params là một class kế thừa từ BaseParams, hỗ trợ:

  • Khởi tạo thông số mặc định.
  • Tự động tạo và load file cấu hình .yaml.
  • Tự động cập nhật config khi file thay đổi (sử dụng watchdog).

🔧 Định nghĩa class

from simpleconfig import BaseParams

class Detect_LCD_Params(BaseParams):
    def __init__(self, app_name, module_name):
        # App name tự động được đặt thành tên file config, module name là module nhỏ trong file đó
        super().__init__(app_name, module_name)
        
        # Tham số cho adaptive threshold (cv2.adaptiveThreshold)
        self.C = 2
        self.block_size = 11
        
        # Tham số nối các vùng trắng
        self.kernel_size = 7
        self.expand_crop_bot = 0
        self.expand_crop_left = 0
        self.expand_crop_right = 0
        self.expand_crop_top = -3
        
        # Tỷ lệ diện tích vùng LCD hợp lệ
        self.min_LCD_area_ratio = 0.4
        self.max_LCD_area_ratio = 0.8
        
        # Tham số xử lý màu
        self.detect_threshold_color = 516
        self.range_process_color = 30

        # Tự động tạo hoặc load cấu hình từ file YAML
        self.create_or_load_yaml()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pbaseparams-1.0.1.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pbaseparams-1.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file pbaseparams-1.0.1.tar.gz.

File metadata

  • Download URL: pbaseparams-1.0.1.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pbaseparams-1.0.1.tar.gz
Algorithm Hash digest
SHA256 890092ebf16a355ce1c0dfc951b9ddd97d76dbac5e63c72b4b8a1e182a754f61
MD5 90fc93f5bd830e158720d39f8d720d39
BLAKE2b-256 58ab540414a1dabd5fefb1de1ee1769078219f519c3e699d4bc1cfd1df7f930d

See more details on using hashes here.

File details

Details for the file pbaseparams-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: pbaseparams-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pbaseparams-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1bc23543e08cd1d4f6b9ecd566f7904b6befb0a055f56ebaa73ffd9c5cf2fd92
MD5 960bb2e220a4d0f752cd053afbf6963c
BLAKE2b-256 29554d4e6dba13f32027e7189e7e496bfd7981dd953fdacfc13870820f0cceb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page