feat: 解码器全面增强 — 多遍二值化 + 4点透视 + ECI/FNC1
Phase 1 — 二值化+检测增强: - decoder/image.rs 重写: 中位数→Otsu→Sauvola 三遍自适应阈值 - 新增 load_gray() 公共 API 供调用方自定义预处理 - 反色QR码自动检测(5点采样法) - 静区验证 + 包围盒(BoundingBox) + 解码置信度评分 - 定位图案比例偏差计算 Phase 2 — 4点透视变换+多QR码: - decoder/perspective.rs 重写: DLT求解3x3单应矩阵 - 用3个定位图案+推算第4点构建4点对应 - 双线性插值替换最近邻采样 - 多角度旋转回退(7个预设角度) - decode_all() 返回图像中所有QR码(按置信度降序) Phase 3 — ISO合规: - decoder/bch.rs: decode_format_info/version_info 返回汉明距离 - decoder/format.rs: 副本冲突时选汉明距离更小者 - decoder/mode_decode.rs: ECI指派号识别, FNC1/GS1检测(0101/1001) - 结构化追加(0011)头部提取: position/total/parity - DecodeResult 扩展: is_gs1, eci_designator, structured_append 验证: cargo check+clippy通过, 81+24测试全部通过
This commit is contained in:
@@ -16,6 +16,7 @@ rust-version.workspace = true
|
||||
[dependencies]
|
||||
encoding_rs = "0.8"
|
||||
image = { version = "0.25", default-features = false, features = ["png", "jpeg", "webp", "bmp"] }
|
||||
nalgebra = "0.34"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
thiserror = "2"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user