From 858135f17e6f92a12ca6d3d0082a65577a269cee Mon Sep 17 00:00:00 2001 From: StarCells Date: Sat, 14 Nov 2026 14:55:34 +0800 Subject: [PATCH] =?UTF-8?q?README=EF=BC=9A=E5=8E=BB=E6=8E=89=E5=B7=B2?= =?UTF-8?q?=E5=9B=9E=E6=BB=9A=E7=9A=84=E9=A2=84=E5=A4=84=E7=90=86=E6=AE=B5?= =?UTF-8?q?=E8=90=BD=EF=BC=8C=E8=A1=A5=E4=B8=8A=E6=A0=87=E5=AE=9A=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=B8=8E=E6=96=B0=E7=9A=84=E6=A0=87=E5=AE=9A=E8=B7=AF?= =?UTF-8?q?=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 spectro_prep.py / geometry.json 相关说明(该功能已 revert) - 文件表加入 test_wavelength_calibration.py - 测试命令与环境变量示例改用 calibration_exports/ --- README.md | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index d6a29e4..f70e469 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,12 @@ Raspberry Pi HQ Camera(IMX477)RAW 光谱工具集:录制、回放、寻峰 | `hq_spectrum.py` | 核心库 + 实时播放器:PC1B 解码、CFA 分离、ROI、降维、预览、交互窗口 | | `hq_record.py` | 把相机 RAW 流录成 `recordings/<时间戳>/{frames.bin,frames.jsonl,meta.json}` | | `hq_average.py` | 多帧平均成一条新录制(降噪) | -| `spectro_core.py` | **共享核心**:模块加载、标定解析、几何(裁剪/反斜切)、基线/噪声/寻峰/拟合/双峰分解、CSV/JSON 输出 | -| `spectro_prep.py` | 预处理:定 ROI、测谱线倾角、反斜切,产出 `geometry.json` + 预览图 | +| `spectro_core.py` | **共享核心**:模块加载、标定解析、基线/噪声/寻峰/拟合/双峰分解、CSV/JSON 输出 | | `peak_finder.py` | 寻峰与峰信息导出:峰形图、峰形数据、像素坐标、RAW 像素块;`--pick` 交互选峰 | | `wavelength_calibration.py` | 用汞灯谱线标定 像素→波长,产出 `calibration_exports/` | | `wavelength_player.py` | 带已存标定的回放(波长轴、瀑布图) | | `PEAK_FINDER.md` / `WAVELENGTH_PLAYER.md` | 两个工具的详细说明 | -| `test_peak_finder.py` / `test_wavelength_player.py` | 单元测试(含真实录制的端到端用例) | +| `test_peak_finder.py` / `test_wavelength_calibration.py` / `test_wavelength_player.py` | 单元测试(含真实录制的端到端用例) | | `calibration_exports/` | 汞灯标定的输出目录(**本地生成,不入库**):`calibration.json`、残差、逐像素波长表 | ## 依赖 @@ -47,13 +46,6 @@ python3 wavelength_player.py --input recordings/hq_20261101_114417 \ --calibration calibration_exports/hq_20261101_114417_f0000/calibration.json ``` -预处理(裁剪 + 测倾斜 + 反斜切),其它工具用 `--roi ` 复用: - -```bash -python spectro_prep.py --input recordings/hq_20261101_114417 -python peak_finder.py --input recordings/hq_20261101_114417 --roi geometry/hq_20261101_114417/geometry.json -``` - 寻峰并导出(`--calibration` 只是**应用**已有的标定,不给就只输出像素坐标): ```bash @@ -81,14 +73,14 @@ python wavelength_calibration.py --peaks peak_exports/hq_20261101_114417_f0000/p ## 测试 ```bash -python -m unittest test_peak_finder test_wavelength_player -v +python -m unittest test_peak_finder test_wavelength_calibration test_wavelength_player -v ``` 端到端用例需要录制与标定;录制不在脚本附近时用环境变量指过去,否则自动跳过: ```powershell $env:PEAK_FINDER_TEST_RECORDING = "C:\Users\peng0\Dev\Light\recordings\hq_20261101_114417" -$env:PEAK_FINDER_TEST_CALIBRATION = "wavelength_calibration\calibration.json" +$env:PEAK_FINDER_TEST_CALIBRATION = "calibration_exports\hq_20261101_114417_f0000\calibration.json" ``` ## 仓库里不放什么