Items with no label
3335 Discussions

How to measure the actual latency in the Realsense D435 camera?

FelipeVW
Beginner
913 Views

Hi,

I am new so I am still grasping the details of the RealSense D435 camera. I am streaming frames through a C++ program with OpenCV. I set my camera to 720 x 1080 to a 30 frame rate and I was wondering how to meausure the actual frame per second value (or any kind of latency).

I used the chrono library, but I am not sur if there is a better way to do it, perhaps the realsense API handles it automatically.

If someone could suggest me another way to do it I would be deeply grateful.

 

Thank you for your time

auto timeStart = std::chrono::high_resolution_clock::now();   // Stream frames and do something   auto timeEnd = std::chrono::high_resolution_clock::now(); long long duration = std::chrono::duration_cast<std::chrono::milliseconds>(timeEnd - timeStart).count();   std::cout << "Latency value: " << duration << " in ms." << std::endl;

 

0 Kudos
0 Replies
Reply