Ejemplo n.º 1
0
void
SSLRealVision::printBallInfo (const SSL_DetectionBall& ball)
{
  printf ("-Ball : CONF=%4.2f POS=<%9.2f,%9.2f> ", ball.confidence (), ball.x (), ball.y ());
  if (ball.has_z ())
  {
    printf ("Z=%7.2f ", ball.z ());
  }
  else
  {
    printf ("Z=N/A   ");
  }
  printf ("RAW=<%8.2f,%8.2f>\n", ball.pixel_x (), ball.pixel_y ());
}
Ejemplo n.º 2
0
void
SSLRealVision::cvtToBallState(ssl_msgs::BallState& ball_state, const SSL_DetectionBall& ball)
{
  if(ball.has_area())
    ball_state.area = ball.area();
  if(ball.has_confidence())
    ball_state.confidence = ball.confidence();
  if(ball.has_pixel_x())
    ball_state.pix_coord.x = ball.pixel_x();
  if(ball.has_pixel_y())
    ball_state.pix_coord.y = ball.pixel_y();
  if(ball.has_x())
    ball_state.position.x = ball.x();
  if (ball.has_y())
    ball_state.position.y = ball.y();
  if (ball.has_z())
    ball_state.position.z = ball.z();
}
Ejemplo n.º 3
0
UpdateBall::UpdateBall(const SSL_DetectionBall& p, double t1, double t2, int camId)
	: Update(t1, t2, camId),
	Point(p.x(), p.y()),
	pimpl(new UpdateBallImpl(p.has_z() ? p.z() : 0.0)) {}