View my account

How to find the angle of the camera by given four coordinates?


1 comment

  • MartyG

    Hi Zisoglou  If you have a D435i camera with an IMU component then you can get the rotation of the camera using a C++ example program called rs-motion  

    The documentation states that "The angles in the z and x axis are computed from acclerometer data, using trigonometric calculations.  Note that motion around Y axis cannot be estimated using accelerometer".


    void process_accel(rs2_vector accel_data)
    // Holds the angle as calculated from accelerometer data
    float3 accel_angle;
    // Calculate rotation angle from accelerometer data
    accel_angle.z = atan2(accel_data.y, accel_data.z);
    accel_angle.x = atan2(accel_data.x, sqrt(accel_data.y * accel_data.y + accel_data.z * accel_data.z));


    If you need to calculate device pose on a 400 Series camera model without an IMU, a RealSense team member states that the Depth Quality Tool works out the angle without an IMU by using a plane fit. 

    Comment actions Permalink

Please sign in to leave a comment.