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

BUGFIX: Modified reconstruct_background to access correct frame range #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wingillis
Copy link

A bug in reconstruct_background has a bug in it, where reconstructing the background in each batch neuron using a frame range of batch_neuron.reconstruct_background([1 size(C_raw, 2)]); will cause the same background to be reconstructed from the first batch neuron, for every batch neuron. This bug fix allows each batch neuron to sample from the correct frame range to reconstruct the background.

See line 1265 in Sources2D.m

Please disregard all the white-space changes, that's an artifact of my code editor.

@zhoupc
Copy link
Owner

zhoupc commented Mar 5, 2018

thanks, @wingillis ! good catch.
I think we also have to consider the 'ELSE' case in the IF statement (line 1263). There is always a shift in relative to obj.frame_range(1) and we should correct this shift for extracting obj.C, & obj.f.

I sent another pull request for fixing the bug https://github.com/zhoupc/CNMF_E/pull/24/files. I will merge it to the master branch if you think it fixes the bug. thanks for your great feedback.

Best,
Pengcheng

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.

None yet

2 participants