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

polygon_to_rbox3 average height #30

Closed
eugene123tw opened this issue Sep 3, 2019 · 1 comment
Closed

polygon_to_rbox3 average height #30

eugene123tw opened this issue Sep 3, 2019 · 1 comment

Comments

@eugene123tw
Copy link

I am wondering why the average height is compute as h = (norm(np.cross(dt, tl-br)) + norm(np.cross(dt, tr-bl))) / (2*(norm(dt)+eps)) in polygon_to_rbox3 function? Why didn't just compute like this (norm(tr - br) + norm(tl - bl))/2?

Original code reference: https://github.com/mvoelk/ssd_detectors/blob/master/utils/bboxes.py#L60

@mvoelk
Copy link
Owner

mvoelk commented Sep 4, 2019

If I remember correctly, it compensates better for distorted rectangles. As an example, you have an image with size 800x600 and oriented bounding boxes defined as polygons. After resizing the image to 512x512, the aspect ratio changes and you end up with distorted rectangles.

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

No branches or pull requests

2 participants