| 43 | // interface methods |
| 44 | public: |
| 45 | void process(cv::Mat & res, size_t currentFrameIndex) { |
| 46 | double progress = static_cast<double>(currentFrameIndex) / static_cast<double>(maxIndex); |
| 47 | int width = 50; |
| 48 | int chars = static_cast<int>(progress * width); |
| 49 | int spaces = width - chars; |
| 50 | |
| 51 | std::cout << "Progress: [" |
| 52 | << std::string(chars, '#') |
| 53 | << std::string(spaces, ' ') |
| 54 | << "] " |
| 55 | << trdrop::util::string_format("%3.2f", progress * 100) |
| 56 | << "%\r" |
| 57 | << std::flush; |
| 58 | } |
| 59 | |
| 60 | // private member |
| 61 | private: |
nothing calls this directly
no test coverage detected