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
# 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
sparams-5.0.0.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sparams-5.0.0.tar.gz.
File metadata
- Download URL: sparams-5.0.0.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35569fec87ddcd82e6613f1b28b950c3bf1ff00d60fd3d9ea51e4e9f0b39d08a
|
|
| MD5 |
4dc41c50c22388eebce5b74d20020e07
|
|
| BLAKE2b-256 |
987d68e97acc2aadec90b6cbdc384c31b7d73290cf22f38f7c20f20bdf9c7dd6
|
File details
Details for the file sparams-5.0.0-py3-none-any.whl.
File metadata
- Download URL: sparams-5.0.0-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f73ada254c56e2a54f0ec433787c3c0db4f285dd94528ed55efdf831df5c2375
|
|
| MD5 |
6bfa43c730a60bf12e821b183e4ed69b
|
|
| BLAKE2b-256 |
dc6eed012621b4343b861f5584d0d43156d457f08c1c11446172d8547c95b93b
|