stereo-charuco-pipeline 0.1.1__py3-none-any.whl → 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -489,14 +489,24 @@ class OverlayRenderer:
489
489
 
490
490
  class CalibrationUIAdvanced(tk.Tk):
491
491
 
492
- def __init__(self, config_path: Optional[Path] = None):
492
+ def __init__(self, config_path: Optional[Path] = None,
493
+ project_dir: Optional[Path] = None,
494
+ on_complete: Optional[Callable[[], None]] = None):
493
495
  super().__init__()
494
- self.title("Stereo Calibration - Advanced (Live Detection)")
495
- self.geometry("1280x820")
496
- self.configure(bg="#2b2b2b")
497
496
 
498
497
  self._load_config(config_path)
499
498
 
499
+ # Dynamic project directory (overrides config-derived path)
500
+ self._project_dir: Optional[Path] = Path(project_dir) if project_dir else None
501
+ self._on_complete = on_complete
502
+
503
+ if self._project_dir:
504
+ self.title(f"Stereo Calibration - Advanced - {self._project_dir.name}")
505
+ else:
506
+ self.title("Stereo Calibration - Advanced (Live Detection)")
507
+ self.geometry("1280x820")
508
+ self.configure(bg="#2b2b2b")
509
+
500
510
  # State
501
511
  self._state = "idle" # idle | preview | recording | processing
502
512
  self._cam: Optional[CameraRecorder] = None
@@ -740,14 +750,17 @@ class CalibrationUIAdvanced(tk.Tk):
740
750
 
741
751
  # Session dir under raw_output/
742
752
  ts = datetime.now().strftime("%Y%m%d_%H%M%S")
743
- from .paths import tool_root as _tool_root; tool_root = _tool_root()
744
- if self.config.output_base:
745
- out_base = Path(self.config.output_base)
746
- if not out_base.is_absolute():
747
- out_base = tool_root / out_base
748
- project_root = out_base.parent
753
+ if self._project_dir:
754
+ project_root = self._project_dir
749
755
  else:
750
- project_root = tool_root
756
+ from .paths import tool_root as _tool_root; tool_root = _tool_root()
757
+ if self.config.output_base:
758
+ out_base = Path(self.config.output_base)
759
+ if not out_base.is_absolute():
760
+ out_base = tool_root / out_base
761
+ project_root = out_base.parent
762
+ else:
763
+ project_root = tool_root
751
764
  raw_output_dir = project_root / "raw_output"
752
765
  self._session_dir = raw_output_dir / f"calib_session_{ts}"
753
766
  self._session_dir.mkdir(parents=True, exist_ok=True)
@@ -809,14 +822,17 @@ class CalibrationUIAdvanced(tk.Tk):
809
822
  # ── post-process ────────────────────────────────────────────────
810
823
  def _post_process(self):
811
824
  try:
812
- from .paths import tool_root as _tool_root; tool_root = _tool_root()
813
- if self.config.output_base:
814
- out_base = Path(self.config.output_base)
815
- if not out_base.is_absolute():
816
- out_base = tool_root / out_base
817
- project_root = out_base.parent
825
+ if self._project_dir:
826
+ project_root = self._project_dir
818
827
  else:
819
- project_root = tool_root
828
+ from .paths import tool_root as _tool_root; tool_root = _tool_root()
829
+ if self.config.output_base:
830
+ out_base = Path(self.config.output_base)
831
+ if not out_base.is_absolute():
832
+ out_base = tool_root / out_base
833
+ project_root = out_base.parent
834
+ else:
835
+ project_root = tool_root
820
836
 
821
837
  # Output to both intrinsic and extrinsic
822
838
  intrinsic_dir = project_root / "calibration" / "intrinsic"
@@ -1003,9 +1019,11 @@ def main():
1003
1019
  import argparse
1004
1020
  ap = argparse.ArgumentParser(description="Advanced Stereo Calibration UI")
1005
1021
  ap.add_argument("--config", type=str, default=None)
1022
+ ap.add_argument("--project-dir", type=str, default=None)
1006
1023
  args = ap.parse_args()
1007
1024
  path = Path(args.config) if args.config else None
1008
- app = CalibrationUIAdvanced(path)
1025
+ proj = Path(args.project_dir) if args.project_dir else None
1026
+ app = CalibrationUIAdvanced(path, project_dir=proj)
1009
1027
  app.mainloop()
1010
1028
 
1011
1029
 
recorder/cli.py CHANGED
@@ -47,12 +47,12 @@ def main():
47
47
  print(f" New: {context.is_new}")
48
48
  print(f" Needs calibration: {context.needs_calibration}")
49
49
 
50
- # Stage 2: Calibration UI (if needed)
50
+ # Stage 2: Advanced Calibration UI (if needed)
51
51
  if context.needs_calibration:
52
- print("\nOpening Calibration Recording UI...")
53
- from .calibration_ui import CalibrationUI
52
+ print("\nOpening Advanced Calibration Recording UI...")
53
+ from .calibration_ui_advanced import CalibrationUIAdvanced
54
54
 
55
- calib_app = CalibrationUI(
55
+ calib_app = CalibrationUIAdvanced(
56
56
  config_path=config_path,
57
57
  project_dir=context.project_dir,
58
58
  on_complete=lambda: None,
@@ -73,19 +73,19 @@ def main():
73
73
 
74
74
 
75
75
  def calibrate_only():
76
- """Calibration UI standalone."""
76
+ """Advanced Calibration UI standalone."""
77
77
  logging.basicConfig(level=logging.INFO, format="%(levelname)s %(name)s: %(message)s")
78
78
 
79
- parser = argparse.ArgumentParser(description="Stereo Calibration UI")
79
+ parser = argparse.ArgumentParser(description="Stereo Calibration UI (Advanced)")
80
80
  parser.add_argument("--config", type=str, default=None)
81
81
  parser.add_argument("--project-dir", type=str, default=None)
82
82
  args = parser.parse_args()
83
83
 
84
84
  config_path = _resolve_config(args.config)
85
85
 
86
- from .calibration_ui import CalibrationUI
86
+ from .calibration_ui_advanced import CalibrationUIAdvanced
87
87
 
88
- app = CalibrationUI(
88
+ app = CalibrationUIAdvanced(
89
89
  config_path=config_path,
90
90
  project_dir=Path(args.project_dir) if args.project_dir else None,
91
91
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stereo-charuco-pipeline
3
- Version: 0.1.1
3
+ Version: 0.2.0
4
4
  Summary: Stereo ChArUco 3D motion capture pipeline with auto-calibration
5
5
  Project-URL: repository, https://github.com/pythoner0921/stereo-charuco-3d-pipeline
6
6
  Requires-Python: <3.13,>=3.10
@@ -1,9 +1,9 @@
1
1
  recorder/__init__.py,sha256=uVaF6VHhg-JlMfpey8mbT_EMMEwyzFdGeoF69lIE3nY,2659
2
2
  recorder/auto_calibrate.py,sha256=aRA9LRkQRLzWQy-oL9qJZWN1BBM54SVezBgQd-oztp0,18318
3
3
  recorder/calibration_ui.py,sha256=xh-qQkxir2TprzvbRObd3CQKbAJVhyeNtQXtuMKyv78,40224
4
- recorder/calibration_ui_advanced.py,sha256=C5hey8QZYPTzXb2549-8th5voXOFvjdU7S63Y2wPD5E,40480
4
+ recorder/calibration_ui_advanced.py,sha256=cHg7T99lpQtChX8OiIR_C2oUmd1OrQB3s3daLW0uAp8,41344
5
5
  recorder/camera.py,sha256=Q9C12QYNwD-6typOWVK3-bIiNC3r6NVaxCv9s381wyY,1392
6
- recorder/cli.py,sha256=wGj9zdStCpmdVgBR1RQ6q0BDz0l4QVBhdlxHSzleiB0,3839
6
+ recorder/cli.py,sha256=BSLjwbrzDzwpFweM7sbskCBI4OtpkSHxTNsMht3G0Nc,3927
7
7
  recorder/config.py,sha256=dN2khzDYT7Bbawo3X9aNRbgTrCykVfX4R1z8yMcetxM,2158
8
8
  recorder/ffmpeg.py,sha256=wmUXlPqVBo6K8S5mrGad2_aqVTqrgv0cTNtpc3D1918,3397
9
9
  recorder/paths.py,sha256=7AoEKZb_NlvCRkv_A1UERC6bF_AalALaVDVPuLQpito,2671
@@ -13,7 +13,7 @@ recorder/smart_recorder.py,sha256=JBQspi44uk8QgAPUmO3r3j9_mEiO01GMp4j6jx1Qeyo,16
13
13
  recorder/ui.py,sha256=Kw5ci9l9JimJ5Uf1HuKk_Upik3rO3AcAsPn-XrKcNSM,4329
14
14
  recorder/viz_3d.py,sha256=hfrWKRm0sHGdcij2kuc57hgYpqXpBBkmHUCAmzfKXJ4,6956
15
15
  recorder/configs/default.yaml,sha256=itVzn19PZQ90h0FtTQ5sfKA-nPgiVxlss8tZZbbQYnA,544
16
- stereo_charuco_pipeline-0.1.1.dist-info/METADATA,sha256=k5EwUGRTBq-t5I8gKI4KTKr2RdpcjGpyMi_qRwealO0,746
17
- stereo_charuco_pipeline-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
18
- stereo_charuco_pipeline-0.1.1.dist-info/entry_points.txt,sha256=f7I33mf6XwGP_dwaqCjRIFKGi8ZyePBb52rdylR7d54,144
19
- stereo_charuco_pipeline-0.1.1.dist-info/RECORD,,
16
+ stereo_charuco_pipeline-0.2.0.dist-info/METADATA,sha256=OiqVVnNFJqLZ6oDLgc3mmhsL_Wx3cg-JDeLfZUHcd5c,746
17
+ stereo_charuco_pipeline-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
18
+ stereo_charuco_pipeline-0.2.0.dist-info/entry_points.txt,sha256=f7I33mf6XwGP_dwaqCjRIFKGi8ZyePBb52rdylR7d54,144
19
+ stereo_charuco_pipeline-0.2.0.dist-info/RECORD,,