Skip to content

Wrong Centroid calculus #2

Description

@ladrians

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,

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions