chili-epfl / chilitags

Robust Fiducial Markers for Augmented Reality And Robotics
http://chili.epfl.ch/software
123 stars 57 forks source link

[sample/detect-from-file] Display total time #65

Closed severin-lemaignan closed 8 years ago

severin-lemaignan commented 9 years ago

Note that the time is printed on std::cerr, which ensure that detect_from_file output can still be piped into another process as previously.

While here, read the source image directly in grayscale

qbonnard commented 9 years ago

Who are you and what did you do with Séverin ? the Séverin I knew loved the one-line example too much to do that. Also, he wouldn't measure the timing of something with a cout in the middle. What happened ?

severin-lemaignan commented 9 years ago

Tsss... First, I'm the Severin who actually uses chilitags to do stuff (like checking if a raspberry pi could be any useful with chilitags), and this Severin always end up adding those 5 lines to display a rough estimate of the time taken to detect tags. I do not care about the cout in the middle: it accounts for almost nothing (except if you have 1 000 000 tags on your image, but even in this case, cout is likely the last of your concerns).

BTW and FYI, 8 ms on my laptop becomes 286 ms on the raspberry pi...

qbonnard commented 9 years ago

I'm not familiar enough with system calls, but my impression was that a cout was incredibly expensive. What about $ time detect-from-file kikooo.jpg then?

severin-lemaignan commented 9 years ago

What about $ time detect-from-file kikooo.jpg

This seems reasonable, except that I do not want to measure the time taken to read the image.