Skip to content

Use box center as reference point everywhere - #23

Merged
vsaw merged 1 commit into
opendatacam:masterfrom
akretz:center_point
Jun 25, 2021
Merged

Use box center as reference point everywhere#23
vsaw merged 1 commit into
opendatacam:masterfrom
akretz:center_point

Conversation

@akretz

@akretz akretz commented Jun 24, 2021

Copy link
Copy Markdown
Contributor

Comment thread main.js
Comment on lines +142 to +143
x: parseFloat(detectionOfThisFrameArray[2]) + w / 2,
y: parseFloat(detectionOfThisFrameArray[3]) + h / 2,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we subtract the width and height instead of adding it? Or am I misunderstanding the coordinate system?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be correct that way. The format of the MOT17 input file is
<frame>, <id>, <bb_left>, <bb_top>, <bb_width>, <bb_height>, <conf>, <x>, <y>, <z>
so we're going from top left corner to center point, which means adding half of width and height.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, you're right! 👍

@vsaw

vsaw commented Jun 24, 2021

Copy link
Copy Markdown
Collaborator

This looks good to me but we will have to wait for @tdurand as I can't merge code in this repo :-)

@tdurand

tdurand commented Jun 25, 2021

Copy link
Copy Markdown
Member

now you do @vsaw , feel free to merge, thanks for the PR..

sorry I don't have the bandwith to review / process this week

@tdurand

tdurand commented Jun 25, 2021

Copy link
Copy Markdown
Member

@vsaw send me your npmjs.com account by email so you can release a new version on the package once merged..

@vsaw

vsaw commented Jun 25, 2021

Copy link
Copy Markdown
Collaborator

I tested it locally. Looks good (see attached video)

output.mp4

Will merge and release a new version of the tracker thank you @akretz for finding and fixing this bug!

@vsaw
vsaw merged commit 6739695 into opendatacam:master Jun 25, 2021
@akretz
akretz deleted the center_point branch June 28, 2021 07:41
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.

Update node-movings-things-tracker version in ODC once "Different box representation in tracker" is fixed

3 participants