#include "video_proc_index.h" _VP_indexer::_VP_indexer(){ m_llFrameCounter = 0; }; _VP_indexer::~_VP_indexer(){ }; void _VP_indexer::process( cv::Mat *Frame ){ char IndexStr[20]; m_llFrameCounter++; snprintf( IndexStr, 20, "%lld", m_llFrameCounter ); int baseline=0; int fontFace = CV_FONT_HERSHEY_PLAIN; double fontScale = 1; int thickness = 1; cv::Size textSize = cv::getTextSize( IndexStr, fontFace, fontScale, thickness, &baseline ); baseline += thickness; int W = Frame->cols; int H = Frame->rows; rectangle( *Frame, cv::Point( W - textSize.width - 6, 3 ), cv::Point( W-3, textSize.height + 6 ), cv::Scalar( 0, 0, 0 ), CV_FILLED ); putText( *Frame, IndexStr, cv::Point( W - textSize.width - 3, textSize.height + 3 ), fontFace, fontScale, cv::Scalar( 0, 255, 255 ), thickness ); };