if (m_notificationq.size() <= m_config.m_tolerableDelay)
{
SharedIplImage pImg;
pImg = pWorkNf->videoFrame.pImg;
cv::Mat src(pImg);
struct timeval tv, tv1, tv2;
gettimeofday(&tv,NULL);
auto box_list = pDetector->detect(src);
gettimeofday(&tv1,NULL);
auto diff = tv1.tv_sec*1000 + tv1.tv_usec/1000 - (tv.tv_sec*1000 + tv.tv_usec/1000);
cout << "VideoObjectDetectionThread diff : " << diff << endl;
for(auto& b: box_list)
{
cout << "VideoObjectDetectionThread Mat; Object type: " << b.obj_id << ", x: " << b.x << ", y: " <<
b.y << ", w: " << b.w << ", h: " << b.h << ", prob: " << b.prob<< ", obj_id: " << b.obj_id<< ", track_id: " << b.track_id<< ", frames_counter: " << b.frames_counter<< endl;
//Rect rect(b.x, b.y, b.w, b.h);//左上坐标(x,y)和矩形的长(x)宽(y)
//cv::rectangle(matImage,cvPoint(20,200),cvPoint(200,300),Scalar(255,0,0),1,1,0);
cv::rectangle(src,Rect(b.x, b.y, b.w, b.h),Scalar(255,23,0),1,1,0);
char buff[20];
int dx = 2;
int dy = 15;
float fontSize = 0.4;
sprintf(buff , "id%d", b.obj_id);
putText(src,buff,Point(b.x + dx,b.y + dy),FONT_HERSHEY_SIMPLEX,fontSize,Scalar(0,0,255),1,2);
sprintf(buff , "x%dy%dw%dh%d", b.x, b.y, b.w, b.h);
putText(src,buff,Point(b.x + dx,b.y + dy*2),FONT_HERSHEY_SIMPLEX,fontSize,Scalar(0,0,255),1,3);
sprintf(buff , "p%f ", b.prob);
putText(src,buff,Point(b.x + dx,b.y + dy*3),FONT_HERSHEY_SIMPLEX,fontSize,Scalar(0,0,255),1,3);
//在IplImage*类型的图上绘制矩形,选择cvRectangle()
//cvRectangle(iplImage,cvPoint(20,200),cvPoint(200,300),Scalar(0,255,255),1,1,0);
}
imwrite("./ttCV_3311RGB2BGR416.jpg", src);