1
This commit is contained in:
@@ -622,7 +622,10 @@ class FetchParamsWorker(QThread):
|
||||
pass
|
||||
params["device"] = {"serial_number": sn}
|
||||
|
||||
tmp = Path(tempfile.gettempdir()) / f"orbbec_params_{sn}_{params['color']['width']}x{params['color']['height']}.json"
|
||||
tmp = Path(tempfile.gettempdir()) / (
|
||||
f"SN{sn}_RGB{params['color']['width']}x{params['color']['height']}@{params['color']['fps']}"
|
||||
f"_D{params['depth']['width']}x{params['depth']['height']}@{params['depth']['fps']}.json"
|
||||
)
|
||||
tmp.write_text(json.dumps(params, indent=2, ensure_ascii=False), encoding="utf-8")
|
||||
self.params_ready.emit(params, str(tmp))
|
||||
except Exception as exc:
|
||||
@@ -1277,6 +1280,24 @@ class MainWindow(QMainWindow):
|
||||
f"[参数获取] RGB {params['color']['width']}x{params['color']['height']} "
|
||||
f"/ Depth {params['depth']['width']}x{params['depth']['height']}"
|
||||
)
|
||||
# 在日志区打印参数详情
|
||||
c = params["color"]
|
||||
d = params["depth"]
|
||||
ci = c["intrinsic"]
|
||||
di = d["intrinsic"]
|
||||
ext = params["extrinsic"]
|
||||
R = np.array(ext["rot"]).reshape(3, 3)
|
||||
t = np.array(ext["transform"])
|
||||
self._append_d2c_log("--- Camera Parameters ---")
|
||||
self._append_d2c_log(f" RGB : {c['width']}x{c['height']} @ {c['fps']}fps {c['format']}")
|
||||
self._append_d2c_log(f" fx={ci['fx']:.4f} fy={ci['fy']:.4f} cx={ci['cx']:.4f} cy={ci['cy']:.4f}")
|
||||
self._append_d2c_log(f" Depth : {d['width']}x{d['height']} @ {d['fps']}fps {d['format']}")
|
||||
self._append_d2c_log(f" fx={di['fx']:.4f} fy={di['fy']:.4f} cx={di['cx']:.4f} cy={di['cy']:.4f}")
|
||||
self._append_d2c_log(f" scale={d['scale']:.6f} mm/unit")
|
||||
self._append_d2c_log(f" Extrinsic R : {R[0].tolist()}")
|
||||
self._append_d2c_log(f" {R[1].tolist()}")
|
||||
self._append_d2c_log(f" {R[2].tolist()}")
|
||||
self._append_d2c_log(f" Extrinsic t : {t.tolist()} (mm)")
|
||||
self._fetch_worker = None
|
||||
|
||||
def _resolve_params_file(self) -> str | None:
|
||||
|
||||
Reference in New Issue
Block a user