Skip to content

Commit

Permalink
Merge pull request #572 from mprib/569-reinitialize-grid-tracker-hist…
Browse files Browse the repository at this point in the history
…ory-whenever-charuco-is-revised

Grid history getting reinitialized when charuco is updated
  • Loading branch information
mprib authored Dec 7, 2023
2 parents 2922641 + 2b408f3 commit 4d43761
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pyxy3d/controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,11 @@ def update_charuco(self, charuco: Charuco):
self.config.save_charuco(self.charuco)
self.charuco_tracker = CharucoTracker(self.charuco)


if hasattr(self, "intrinsic_stream_manager"):
logger.info("Updating charuco within the intrinsic stream manager")
self.intrinsic_stream_manager.update_charuco(self.charuco_tracker)


def load_extrinsic_stream_manager(self):
logger.info(f"Loading manager for streams saved to {self.workspace_guide.extrinsic_dir}")
Expand Down
4 changes: 3 additions & 1 deletion pyxy3d/intrinsic_stream_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def get_frame_count(self,port):
def update_charuco(self,charuco_tracker:CharucoTracker):
for stream in self.streams.values():
stream.tracker = charuco_tracker


for emitter in self.frame_emitters.values():
emitter.initialize_grid_capture_history()

def play_stream(self,port):
logger.info(f"Begin playing stream at port {port}")
Expand Down

0 comments on commit 4d43761

Please sign in to comment.