Skip to content

Conversation

@alexlib
Copy link
Contributor

@alexlib alexlib commented Jun 21, 2025

  • thanks to Hi-D we reviewed a bit the original code from 3dptv and found the ptv.c https://github.com/3dptv/3dptv/blob/master/src_c/ptv.c that wasn't modernized and cythonized
  • this branch converted this file into track3d.c and added its binding following the tracker.{pyx,pxd} concepts
  • both liboptv and py_bind tests pass
  • this is a faster 3D tracker that might be helpful in some cases, it does not require 3D->2D projection and cannot do what Jochen Willneff's track.c is doing for dense cases, but it is faster because it works directly in 3D

@alexlib alexlib requested a review from Copilot June 21, 2025 18:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR modernizes the legacy ptv.c code into a new track3d.c implementation with Cython bindings while adding 3D tracking support and corresponding tests. Key changes include:

  • Adding new 3D tracking routines and Cython binding methods in tracker.pyx and tracker.pxd.
  • Introducing new unit tests for 3D tracking in both Python (py_bind/test/) and C (liboptv/tests/check_track3d.c).
  • Updating CMake configuration and versioning to integrate the new track3d module.

Reviewed Changes

Copilot reviewed 30 out of 31 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
py_bind/test/test_tracker.py Added new tests for 3D tracking functionality using forward steps.
py_bind/test/test_burgers.py Introduced similar 3D tracking tests specific to the Burgers case.
py_bind/optv/tracker.pyx Added step_forward_3d and full_forward_3d methods for 3D tracking.
liboptv/src/track3d.c New C implementation for 3D tracking integrating track3d_loop logic.
liboptv/tests/check_track3d.c New test suite for verifying 3D tracking results.
CMakeLists.txt files in both liboptv/src and liboptv/tests Updated to compile and link against the new track3d module.
Comments suppressed due to low confidence (1)

liboptv/src/track3d.c:65

  • [nitpick] Consider renaming 'count1' to a more descriptive identifier such as 'link_count' to improve code readability.
    int count1 = 0;  // Count of links established in level 1

alexlib and others added 2 commits June 21, 2025 21:45
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alexlib alexlib merged commit 2c0a98e into OpenPTV:master Jun 21, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant