This repository has been archived on 2021-03-01. You can view files and clone it, but cannot push or open issues or pull requests.
prpa/src/filterSample/count.cc
2012-07-15 00:07:53 +02:00

20 lines
390 B
C++

#include <string>
#include <thread>
#include "count.hh"
#include "opencv2/opencv.hpp"
void* Count::operator()(void* para)
{
static __thread int count = 1;
cv::Mat* mat = (cv::Mat*)para;
if (mat == nullptr)
return nullptr;
cv::putText(*mat, std::to_string(count), cv::Point { 5, 25 },
cv::FONT_HERSHEY_TRIPLEX, 1, cv::Scalar { 0, 255, 0 }, 1);
count++;
return mat;
}