Community Forum
ANVEL Licensing Options

Object bounding box projection

  • How would you recommend going about projecting a bounding box around a vehicle onto the 2D main camera image? I'm interested in calculating coordinates of bounding boxes around vehicles and other objects.
    Note: not talking about rendering anything, just calculating.

  • Hello @rr,

    To start, you will need the position and orientation of the camera object along with the axis aligned bounding box (AABB) of the vehicle in question. The GetGeometries string command will return the AABB, and you can use the API function GetPoseAbs to retrieve the camera pose.

    Using the pose of the camera, convert the AABB from ANVEL's coordinate frame to the camera's coordinate frame. Then, project the bounding box coordinates (In the camera's coordinate frame) into your 2D pixel space. See here

    We have used openCV in the past to accomplish this 2d projection. See here

  • Thank you! More specifically - what would be my camera matrix for the main world view camera?

  • Just to clarify: you linked the camera projection lecture and the opencv page, which outline the overall process, which I'm already familiar with. But I'm still somewhat confused as to how to generate the intrinsic camera matrix for the main world view camera in ANVEL. Could you post it here?