Skip to content

Conversation

@jonasfbraun
Copy link

see line numbers in old code:

apply_motion_field()
Line 65: simplified expression
In general, we might have to rework how this function deals with "frames" because it includes inherent assumptions.
The way this function is used right now is fine (only in motion_compensate()), but I tried using it outside of ofco and it does not do what would be expected if you want to only apply it to range of frames that does not start from frame 0
I will create an issue on that.

motion_compensate()
line 99&103: made it compatible to use with one channel only, e.g. for when I was recording the green channel only.
Additionally, I cleaned up how "frames" is is used here, because it was a bit confusing. In line 98, frames was already applied to the stack, so after that the variable frames should really just be range(len(stack1)). When adding a reference frame to the beginning of the stack, it should be that as well.
It was not a problem for most cases before, because the code was mostly using len(frames) and not accessing individual values, but it is cleaner this way, I think.
line 120: this did not work in case no external reference frame was supplied and frames does not start with 0

line 130: I included the option to use pool.imap() together with a progress bar. Since it takes so long, I really wanted to know how far in I am. If you think this is a good solution, we might as well use not only in the verbose mode.
The speed is comparable.

line 138: added progress bar to non-parallel mode.

line 163: not sure why this shows up as a change, because you had adapted this earlier
line 165: adapt to using one channel only

… Added progress bars for both parallel (in verbose mode) and non-parallel processing.
@jonasfbraun jonasfbraun requested a review from faymanns April 23, 2021 10:44
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.

2 participants