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

Wrong Centroid calculus #2

Open
ladrians opened this issue May 2, 2018 · 0 comments · May be fixed by #6
Open

Wrong Centroid calculus #2

ladrians opened this issue May 2, 2018 · 0 comments · May be fixed by #6

Comments

@ladrians
Copy link

ladrians commented May 2, 2018

Hello, thanks for publishing this node.
I noticed that the centroid of the detections are not correctly calculated. From the detect_ros.py#L143 it details

obj.bbox.center.x = int((dimensions[1] + dimensions [3])*image_height/2)
obj.bbox.center.y = int((dimensions[0] + dimensions[2])*image_width/2)

To "debug" it I manually added the following at the end of the "object_predict" method

cv2.circle (image_np,(obj.bbox.center.x,obj.bbox.center.y),5,(0,0,255), 5)

image_width and image_height are not correctly used, they should be switched. I mean

obj.bbox.center.x = int((dimensions[1] + dimensions[3])*image_width/2)
obj.bbox.center.y = int((dimensions[0] + dimensions[2])*image_height/2)

regards,

vinay0410 added a commit to vinay0410/tensorflow_object_detector that referenced this issue Oct 17, 2018
@vinay0410 vinay0410 linked a pull request Oct 17, 2018 that will close this issue
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 a pull request may close this issue.

1 participant