Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in stitching step in 2D tracking #34

Closed
yukeli1993 opened this issue Feb 20, 2023 · 1 comment
Closed

Error in stitching step in 2D tracking #34

yukeli1993 opened this issue Feb 20, 2023 · 1 comment

Comments

@yukeli1993
Copy link

When doing stitching step after 2D_tracking steps, error comes out as:

given inputs -
params file name: params_file.yml
action: stitching

starting at 60 trajectories
with 63.7 samples per trajectory on average

searching for candidates to connect:
Traceback (most recent call last):
File "workflow.py", line 1028, in
wf = workflow(fname, action)
File "workflow.py", line 93, in init
self.do_stitching()
File "workflow.py", line 926, in do_stitching
ts.stitch_trajectories()
File "C:\ProgramData\Anaconda3\lib\site-packages\myptv\traj_stitching_mod.py", line 368, in stitch_trajectories
self.calc_dij()
File "C:\ProgramData\Anaconda3\lib\site-packages\myptv\traj_stitching_mod.py", line 161, in calc_dij
v = gradient(x, axis=0)
File "<array_function internals>", line 6, in gradient
File "C:\ProgramData\Anaconda3\lib\site-packages\numpy\lib\function_base.py", line 1065, in gradient
"Shape of array too small to calculate a numerical gradient, "
ValueError: Shape of array too small to calculate a numerical gradient, at least (edge_order + 1) elements are required.

I guess it may relate to the disagreement between 3D and 2D stitching or improper setting parameters. Here I set them as:

stitching:
trajectory_file: trajectories_2D
max_time_separation: 3
max_distance: 5
save_name: trajecotries_stitched

@yukeli1993
Copy link
Author

Solved
Sorry, it is my fault. The trajectories_file should be smoothed_trajectories.

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

No branches or pull requests

1 participant