When supplying btrack.utils.segmentation_to_objects with a multichannel image, an error is raised regarding the conversion of the regionprops table into dictionary format.
This is because regionprops is confused by use_weighted_centroid and tries to record a value for each channel for every property, when it should only be doing that for the image intensity values.
So this error can be fixed by just setting this parameter to False.
I added an explainer in the docstring here, not sure if you'd like me to do a pr:
https://github.com/nthndy/BayesianTracker/blob/bdf6667a301ecdaf15da37a916aadf23c4ac620a/btrack/_localization.py#L151
Lmk if you'd rather a proper fix, like a error raise or something.
When supplying
btrack.utils.segmentation_to_objects
with a multichannel image, an error is raised regarding the conversion of theregionprops
table into dictionary format. This is becauseregionprops
is confused byuse_weighted_centroid
and tries to record a value for each channel for every property, when it should only be doing that for the image intensity values. So this error can be fixed by just setting this parameter to False. I added an explainer in the docstring here, not sure if you'd like me to do a pr: https://github.com/nthndy/BayesianTracker/blob/bdf6667a301ecdaf15da37a916aadf23c4ac620a/btrack/_localization.py#L151 Lmk if you'd rather a proper fix, like a error raise or something.