示例#1
0
void BaseFrame::tracked_objectCB(const tld_msgs::BoundingBoxConstPtr & msg)
{
    if(msg->width && msg->height)
        first_image = true;
    else
        first_image = false;

	QRectF rect(msg->x,msg->y,msg->width,msg->height);
	emit sig_tracked_object_changed(rect);
	emit sig_confidence_changed((int)(msg->confidence*100));
}
示例#2
0
void BaseFrame::tracked_object_callback(const tld_msgs::BoundingBoxConstPtr & msg)
{
	//The tld node sent a bounding box
	if(msg->width && msg->height && !baseFrameGraphicsView->get_correct_bb())
	{
		baseFrameGraphicsView->set_correct_bb(true);
		first_image = false;
	}
	//The tld node sent a bad bouding box
	else if((!msg->width || !msg->height) && baseFrameGraphicsView->get_correct_bb())
	{
		baseFrameGraphicsView->set_correct_bb(false);
		first_image = true;   
	}

	QRectF rect(msg->x,msg->y,msg->width,msg->height);
	emit sig_tracked_object_changed(rect);
	emit sig_confidence_changed((int)(msg->confidence*100));
}