quantumjot / btrack

Bayesian multi-object tracking
https://btrack.readthedocs.io
MIT License
311 stars 50 forks source link

Extracting regionprops from multichannel image #186

Open nthndy opened 1 year ago

nthndy commented 1 year ago

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.

quantumjot commented 1 year ago

Feel free to do a PR!

quantumjot commented 1 year ago

Could be a good use case for: https://github.com/alan-turing-institute/pixelflow/issues/3