ykcheungab
73b1fa7fa4
docs: correct the _perf path references after the bench moved
...
The `_perf/` measurement bench was gitignored and had never been committed, so
23 of the 27 scripts cited by the perf documents were already lost. The 11
surviving files (4 scripts, cfg_dm1.json, 5 result JSONs, the 53 MB MJPG clip)
have been moved to D:\orisys_ws\docs\performance\perf-measurements\ and the
scripts patched to resolve their defaults next to themselves. The directory has
been removed from this repo.
These three files said the scripts were deleted, which was only half true:
they are moved, and the four surviving ones still run. Repointed:
- src/orisys/sensor.py: the FILTER_PRESETS comment now names the real location
(comment only; FILTER_PRESETS itself is unchanged).
- docs/filters.md and examples/filters/README.md: the same correction for the
latency/noise measurement provenance.
No behaviour change.
2026-09-27 21:49:26 +08:00
ykcheungab
e2ac36269c
added ruff code reivew
2026-09-27 19:21:55 +08:00
ykcheungab
0e903792bd
fix test sample s1.mp4 missing
2026-09-20 11:46:03 +08:00
ykcheungab
2e7b65298b
fixed test_signal_processing error
2026-09-20 11:36:30 +08:00
ykcheungab
e2b906a640
fix preflight config path check
2026-09-20 11:20:47 +08:00
ykcheungab
05b2354d0d
update to 0.5.3
2026-09-20 11:01:33 +08:00
ykcheungab
1cf78c9d71
fixed calibration data not loading due to path
2026-09-20 11:00:33 +08:00
ykcheungab
14fbfec62e
remove hand.py, replaced by pipeline.py
2026-09-14 13:55:30 +08:00
ykcheungab
11962cdc34
配置没写的滤波键等于"关",不再回落到会滤波的默认值 - What: DEFAULT_FORCE_MEDIAN_WINDOW 3 -> 1、DEFAULT_FLOW_EMA_ALPHA 0.5 -> 1.0(DEFAULT_FORCE_LOWPASS_HZ 本就是 0.0),并把注释改成"配置文件没写的键就是关,而不是我们觉得合理的那一档"——原因写在注释里:否则设备会去滤一个没人要求滤的测量,而文件里没有任何线索;实测的延迟/降噪数据保留在注释中,作为 balanced/low_noise 预设的依据。docs/filters.md 第 2 节增加"缺省 = 关"这一条并说明没有 filters 段的配置什么都不滤,预设表里 balanced 的用途由"默认建议"改为"建议起步档"(它不再是默认值)。examples/filters/README.md 补一句"整段删掉等价于 off"。tests/test_filter_presets.py 新增 test_a_config_with_no_filters_block_filters_nothing:把 box bundle 的 filters 段整段删掉后构造真实 Sensor,断言 filters_state() 报 ema 1.0 / median 1 / cutoff 0.0 且 any_stage_applied 为 False。 - Why: 上一版只把"非法值"改成回落到关,但"键根本不写"仍会走 DEFAULT_* 从而把 EMA 0.5 + 中值 3 打开——这与"配置自描述、文件说什么就跑什么、出厂默认全关"矛盾,且现实里存在大量没有 filters 段的手写配置(例如 _perf/cfg_res_280x300.json),它们会在无人察觉的情况下继续滤波。缺省开是这条链上最后一个隐藏默认值。 - Verification: 删掉 filters 段后实测 filters_state() = (1.0, 1, 0.0) 且 any_stage_applied=False,出厂 box/mini/finger 三份同样为全关;pytest tests/test_filter_presets.py + tests/test_calibration.py → 33 passed;SDK 全量 336 passed / 15 skipped(唯一失败仍是需要 1200 帧而样例只有 577 帧的 longrun 测试);app 侧 studio 85 项与 shared 142 项测试、ui_check 554 项检查在升级后的 0.5.2 下全绿。 - Not in this change: 出厂 bundle 的三个显式值未动(本来就全关);_perf 的两个校验脚本不在仓库内,已就地补上显式 filters 段(balanced)以保持"开 vs 关"对照仍有意义;app 侧 wrapper/齿轮/CSV 17 列未动。
2026-09-14 10:53:33 +08:00
ykcheungab
ae5bf0c208
断开连接不再因无头 OpenCV 抛错 - What: Sensor.disconnect() 里的 cv2.destroyAllWindows() 包上 try/except cv2.error:无头构建(opencv-python-headless)没有 highgui,destroyAllWindows 会抛 "The function is not implemented",此前会让 finally 里 disconnect() 的调用方(测试、采集退出路径)拿到一个与传感器无关的异常。 - Why: 跑 SDK 测试时发现 tests/test_calibration.py::test_sensor_cal_path_v2_applies_to_read_info 与 test_set_calibration_swaps_curve 在本机(cv2 4.14.0 headless)稳定失败,断言本身都过了,报错在 finally 的 disconnect() 第 1098 行;这不是滤波改动引入的,但会一直污染每次验证,且 SDK 明确支持无头/CI 使用(backend="cpu"、external-frame 模式)。 - Verification: 修前该模块 7 failed / 13 passed(含上述两个既有测试),修后 20 passed;SDK 全量 335 passed / 15 skipped(唯一失败为需要 1200 帧而 data/sample/s1_480p.mp4 只有 577 帧的 longrun 测试)。 - Not in this change: 未改 disconnect() 的其他分支;未引入 highgui 依赖探测,只在真正调用失败时忽略。
2026-09-14 10:44:13 +08:00
ykcheungab
35190562e5
标定指纹改读生效值并按测量/读数分组 - What: calibration.py 新增 FILTER_MEASUREMENT_KEYS(flow_ema_alpha)与 FILTER_READOUT_KEYS(中值窗口、低通截止/阶数/采样率/rate_auto)、filters_fingerprint()(把 Sensor.filters_state() 归一化成 {measurement, readout, preset, source}:非法值丢弃、来源没写的键不出现而不是补默认、空映射返回 {} 表示"无记录")、filter_mismatches()(按组判读差异)与 _filters_from_config / _flat_filters_from(扁平旧格式与 preset 展开的兼容解析,显式键优先);pipeline_from_sensor_json() 新增 filters_state= 关键字——传了生效值就用生效值,否则读文件的 filters 段并标注 source="sensor.json.filters",返回结构化 filters 键,删除原先会凭空补出 0.5/3/10 的扁平键与 enabled 覆盖逻辑;Calibration.to_dict() 写 meta.filters(同时保留扁平键供旧读者按名取用);parse() 把 filters 读回 pipeline(此前 to_dict 写进 meta 的滤波键在读回时被整段丢弃,指纹实际是"只写不读");check() 改用 filter_mismatches 分开报告——measurement 组差异进 warnings 且措辞含 not comparable,readout 组差异进新增字段 CheckResult.notes(只记录、不拦截);build(extra_meta=…) 把 filters 与扁平滤波键折进结构化组。tests/test_calibration.py 新增 11 项测试(分组、preset 展开与显式键优先、enabled:false 全关、非法值为空而非默认、写入-读回往返、旧扁平文档读回、生效值压过文件、四个预设逐档核对)。docs/filters.md 新增第 7 节。 - Why: 用户决策 B 要求"Sensor.filters_state() 作为唯一生效值出口,calibration.py 指纹与 session.json 都读它、不读配置文件,指纹分 measurement/readout 两组";动手时确认旧实现三个问题叠加:来源错(读文件、被 filters.enabled 覆盖、文件没写就补默认 0.5/3/10),写进 meta 的指纹在读回时被丢弃,check() 因此永远比不出滤波差异——审计链是断的,不是不精确。 - Verification: SDK 全量 pytest 335 passed / 15 skipped,唯一失败 test_vnormal_longrun_no_outlier_jumps 需要 1200 帧而 data/sample/s1_480p.mp4 只有 577 帧(环境/数据,与本改动无关);external-frame 模式逐预设构造真实 Sensor,filters_fingerprint(filters_state()) 得 off(1.0,1,0.0) / low_latency(1.0,3,0.0) / balanced(0.5,3,0.0) / low_noise(0.3,3,10.0);写入→读回往返后 measurement/readout/preset 完整保留且 to_dict 幂等;旧扁平 meta 文档仍读回同一指纹;.repro/verify_cal_filters.py 50 项全绿。 - Not in this change: 未动 app(app 的 meta_from_sensor_json 只取 4 个键,不受影响);未升级 venv 内 SDK;examples/filters 的四个机器可读预设片段与 app 侧 wrapper/齿轮/CSV 17 列未动。
2026-09-14 10:43:58 +08:00
ykcheungab
0beb36a1af
滤波预设与生效值出口:FILTER_PRESETS + filters_state() + force_triplets() - What: 新增 FILTER_PRESETS(off/low_latency/balanced/low_noise,数值取自 _perf 的延迟表,low_noise 含 10 Hz 低通)与 available_filter_presets() 供 UI 取用;配置可写 filters.preset 且显式键优先于预设值;新增 Sensor.filters_state()(preset + measurement 组 flow_ema_alpha/flow_ema_applied/hhd_downsample/dis_mode + readout 组中值与低通的窗口/截止/阶数/采样率/是否 auto/是否生效 + sample_rate_source + any_stage_applied + source="sensor.filters_state")作为唯一"生效值"出口;新增 Sensor.force_triplets() 一次返回 {filtered:{raw,newton}, unfiltered:{raw,newton}},并在 _apply_force_filter 中于链后、标定前保存 _force_filtered_raw(修正:此前滤波后的 raw 计数没有保存,force_triplets 的 filtered.raw 实际返回的是输入);reset() 清空未滤波缓存。 - Why: 用户要求配置自描述(A)并把"生效值"作为审计唯一依据(B),同时要保留滤波前数据以便"两个 buffer、两个单位都保留";顺带证实并修掉了 filtered.raw 指向输入这一标签错误。 - Verification: external-frame 模式逐预设构造真实 Sensor 打印 filters_state:off/low_latency/balanced/low_noise 分别为 (ema 1.0 off, median 1 off, lp 0.0 off) / (1.0 off, 3 on, 0.0 off) / (0.5 on, 3 on, 0.0 off) / (0.3 on, 3 on, 10.0 on);注入 10,10,10,999,10,10 观察力三元组,filtered.raw 在尖峰帧为 10.0、unfiltered.raw 为 999.0,证明中值生效且未滤波 buffer 完整;compileall 通过。 - Not in this change: calibration.py 指纹尚未改读 filters_state(),examples/filters 与 docs/filters.md 未加,venv 里的 SDK 未升级(app 行为不变,仍硬编码 10 Hz 低通),app 侧 wrapper/齿轮/CSV 17 列未动。
2026-09-14 10:35:51 +08:00
ykcheungab
1adb1c30f0
滤波配置自描述:去掉覆盖式总开关,每级按自己的值生效 - What: sensor.py 删除 filters.enabled 这个覆盖层——flow_ema_alpha / force_median_window / force_lowpass_cutoff_hz 现在各自按值生效(0<α<1 才滤、≤1 关中值、≤0 关低通),非法值一律回落到"关"而不再回落到"默认开"(原实现里非法取值的 except 分支会把 cutoff 变回 10 Hz);enabled 仅作废弃别名保留(显式 false = 三级全关)并在 verbose 时提示弃用,true 不再有覆盖作用;_filters_enabled 改为派生量(任一级在滤才为真)供旧调用方查询。三份 sensors/{box,mini,finger}/sensor.json 的 filters 段改为自描述且默认全关(flow_ema_alpha 1.0 / force_median_window 1 / force_lowpass_cutoff_hz 0.0 / order 2 / sample_rate "auto")。 - Why: 用户问"flow_ema_alpha 是不是受 filter_enabled 控制、这样合适吗",查证后确认三级都被同一总开关覆盖,且出厂配置写 enabled:false 却仍列着 0.5/3,导致文件说的与设备实际跑的不一致(审计/指纹会误报);同时 flow_ema_alpha 位于 HHD 之前、改变的是测量本身,与中值/低通这类读数滤波性质不同,不应被一个开关捆绑。 - Verification: 用 SDK 的 external-frame 模式逐个 bundle 构造真实 Sensor 并读取解析结果:box/mini/finger 均为 ema=1.0、median=1、cutoff=0.0、lowpass_on=False、any_stage=False;三份 JSON 解析通过;compileall 通过;SDK 内 _filters_enabled 仅剩派生定义一处引用。 - Not in this change: 未动采集路径与 read_info/force_triplets(第 2 步),未动 calibration.py 指纹(第 2 步),未升级 venv 里的 SDK(第 5 步)——因此 app 当前行为不变(它仍在运行时硬编码 lowpass_cutoff_hz=10,压过本配置),"默认关"要到 app 改用 FilterSettings.apply_to(sensor) 后才在界面体现。
2026-09-14 10:26:39 +08:00
ykcheungab
514874e2f4
added 5 sensors multi-stream support, 5 finger reach > 100 fps stable using .mp4 video
2026-09-13 12:18:27 +08:00
ykcheungab
0d5d8ff70d
update filter, flow ema 0.5 + med 3
2026-09-12 19:36:36 +08:00
ykcheungab
9537cf91a1
added preflight check
2026-09-12 15:49:28 +08:00
ykcheungab
96f4428230
added calibration data handling functions
2026-09-10 21:47:36 +08:00
ykcheungab
ad680b77dc
0.5.1
2026-09-02 21:47:51 +08:00
ykcheungab
5be2d9759a
hotfix/camera not connected error
2026-09-02 21:37:40 +08:00
ykcheungab
8a4be5f8f2
update to 0.5.0
2026-08-26 20:20:37 +08:00
ykcheungab
577e3fe528
update pip install .copy manifest for developments
2026-08-26 20:04:40 +08:00
ykcheungab
d59e1cb7fb
fix path errors
2026-08-26 19:22:37 +08:00
ykcheungab
ab97efe039
refractor stitcher class into module
2026-08-23 16:24:53 +08:00
ykcheungab
8a7760f12b
refractor capture to a module
2026-08-23 15:53:02 +08:00
ykcheungab
1ceb0d9ca4
organize settings to dedicated sensors folder, json + assets
2026-08-23 12:21:24 +08:00
ykcheungab
44bcc19426
update docs and downstream sync
2026-08-18 11:00:57 +08:00
ykcheungab
2e09c9360e
included low pass filter in package and add to plot_data example
2026-08-17 22:11:17 +08:00
ykcheungab
3117ddd5b9
organize exampels according to products
2026-08-03 15:52:15 +08:00
ykcheungab
ee3ef3e961
fix numba stiching blend error and add numpy blend fallback
2026-07-18 15:38:21 +08:00
ykcheungab
11a747a771
added camera search and select, auto preference saving and version tag to 0.4.2
2026-07-15 15:08:59 +08:00
ykcheungab
a9c26fd1fb
Merge branch 'feature/finger_docs' into dev
2026-07-14 20:07:43 +08:00
ykcheungab
30f9deb5b2
dd02 setting tune + change Class name from UVUnrollFrameProcessor to FrameUnwarper
2026-07-14 20:00:40 +08:00
zhangyijian
3d1039b52c
Merge pull request 'Feature/dd02 0703' ( #3 ) from feature/dd02-0703 into dev
...
Reviewed-on: http://100.106.67.31:3000/orisys-tech/orisys-sdk/pulls/3
2026-07-09 14:14:38 +08:00
ykcheungab
c77a64ffe7
update version tag to 0.4.1
2026-07-09 13:59:19 +08:00
ykcheungab
8c5a20b5cb
fix/update dd02 asset to 0703 version
2026-07-09 13:55:27 +08:00
cheng
68b6dadff4
Merge remote-tracking branch 'origin/dev' into feature/ffc
2026-07-02 16:54:28 +08:00
cheng
edc6e42191
Update FFC files
2026-07-02 16:53:08 +08:00
ykcheungab
42e2264f06
fix dd01 slow stitching due to disabled numba
2026-07-01 21:53:04 +08:00
cheng
28f4663a5f
添加光照一致化ffc程序
2026-07-01 17:48:52 +08:00
ykcheungab
7feae9550e
update exe GUI build
2026-06-21 12:01:34 +08:00
ykcheungab
258948bcb7
added mesh surface arrows
2026-06-19 21:22:28 +08:00
ykcheungab
3fd9b839a9
GUI for finger v1
2026-06-18 22:18:19 +08:00
ykcheungab
f19f092b64
split example visualizaiton pipeline
2026-06-18 13:47:16 +08:00
ykcheungab
fbee1c37ed
tuned pipeline to 60 fps
2026-06-14 20:58:46 +08:00
ykcheungab
30bebcd439
integrated finger process pipeline on remapped 2d image
2026-06-14 17:48:30 +08:00
ykcheungab
667bdf1961
update using angle-based unwarp for display but projection for printing
2026-06-11 17:07:39 +08:00
ykcheungab
8a50492465
update dd02 3d viewer v1
2026-06-02 12:15:36 +08:00
ykcheungab
7224fea411
Merge branch 'stable'
2026-05-14 21:02:23 +08:00
ykcheungab
9cd7f75c88
refractor HHD
2026-05-10 19:04:20 +08:00
ykcheungab
d38ce82059
clean up folder
2026-05-10 17:41:39 +08:00