Administrator d82ac9a26a feat(portcv): 入库 Python 参考实现、配置体系与依赖清单 2 semanas atrás
..
README.md d82ac9a26a feat(portcv): 入库 Python 参考实现、配置体系与依赖清单 2 semanas atrás

README.md

标定记录(P0-5)

每台相机、每个机位一份记录,文件名建议 <站点>-<机位>.json:

configs/calib/ct01-front.json

不要手改已封存记录:sha256 覆盖除自身外全部字段,改一个数就校验失败 (CALIB_STALE)。需要改就重新生成并复核。

必填/建议字段

字段 必填 说明
site 是 站点/堆场编号
camera_id 是 相机或机位名(front/high/...)
calibrated_at 是 ISO-8601,带时区,如 2026-10-26T10:00:00+08:00
reviewer 建议 复核人;为空 → CALIB_STALE
method 建议 box_vertical_scale / fisheye / total_station
px_per_m 建议 与运行配置 evidence_v2.px_per_m 对照,偏差 >10% → 漂移
box_height_m 建议 与 evidence_v2.box_height_m 对照,偏差 >0.02 m → 漂移
intrinsics 建议 fx/fy/cx/cy/dist
extrinsics 建议 安装高度/俯仰/偏航
roi 可选 归一化多边形
sha256 自动 由脚本写入

生成/校验

# 生成(当前时间,自动 sha256)
python scripts/calib_record.py create --site CT01 --camera front `
  --reviewer "张工" --method box_vertical_scale `
  --px-per-m 115.6 --box-height 2.591 `
  --out configs/calib/ct01-front.json

# 校验(过期/哈希/复核/漂移;退出码 1 = CALIB_STALE)
python scripts/calib_record.py check configs/calib/ct01-front.json `
  --max-age-days 180 --px-per-m 115.6 --box-height 2.591

运行配置里指定记录后,runner / portcv_run 启动时自动评估;不通过则 flags bit11 CALIB_STALE=1,并在启动日志(以及 --check-config 输出)给出原因串。默认 calibration.hold_on_stale=true:标定不可信时同时清 RESULT_VALID/STABLE。 详见 docs/calibration.md。