Skip to content

Bug fix vector_frames size in optical_flow.py#71

Open
FMarmoreo wants to merge 3 commits intoNeuralEnsemble:masterfrom
APE-group:PR_to_NE/bugfix/smoothing_in_optical_flow
Open

Bug fix vector_frames size in optical_flow.py#71
FMarmoreo wants to merge 3 commits intoNeuralEnsemble:masterfrom
APE-group:PR_to_NE/bugfix/smoothing_in_optical_flow

Conversation

@FMarmoreo
Copy link
Contributor

Bug fix vector_frames size in optical_flow.py since the last frame of zeros in the initialization of vector_frames is not filled by the horn-schunck algorithm that runs in range frames[:-1]. This, in particular, introduces errors also in smooth_frames function.

Copy link
Collaborator

@rgutzen rgutzen left a comment

Choose a reason for hiding this comment

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

Thanks for noting that the last vector frame is not calculated and filled. vector_frames should however keep the same dimensions as frames. So, instead the last frame could be explicitly filled with nan-values.

@cosimolupo
Copy link
Contributor

@rgutzen why is it important for vector_frames to have the same shape as frames? Is this feature explicitly or implicitly used somewhere downstream in the code?

@cosimolupo cosimolupo added this to the v0.3.0 milestone Jun 26, 2024
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.

3 participants