neuroinformatics-unit / movement

Python tools for analysing body movements across space and time
http://movement.neuroinformatics.dev
BSD 3-Clause "New" or "Revised" License
96 stars 8 forks source link

Fix centroid imported from VIA file into bboxes dataset #302

Closed sfmig closed 2 weeks ago

sfmig commented 2 weeks ago

Is your feature request related to a problem? Please describe. We talk about the centroid position of the bboxes in the docs, but what we are importing is actually the top left corner of the bounding box.

Describe the solution you'd like Transform the imported data to store the actual bbox centroid in the position data array

centroid = top_left + shape / 2

Describe alternatives you've considered We could change the documentation instead but storing the centroid seems more coherent with the rest of the tools we deal with, and is likely less jittery than the corners.

Additional context \