Ejemplo n.º 1
0
void ComputerVision::DisplayOutput(Mat frame, gpu::GpuMat hue, gpu::GpuMat sat, gpu::GpuMat val, gpu::GpuMat balloonyness, Mat debugOverlay) {
  struct timeval timea, timeb;

  gettimeofday(&timea, NULL);

#if (SHOW_FEED_WINDOW == 1)
  imshow("feed", frame);
#endif
#if (SHOW_OTHER_WINDOWS ==1)
  Mat hue_host, sat_host, val_host, balloonyness_host;
  hue.download(hue_host);
  sat.download(sat_host);
  val.download(val_host);
  balloonyness.download(balloonyness_host);
  imshow("hue", hue_host);
  imshow("sat", sat_host);
  imshow("val", val_host);
  imshow("balloonyness", balloonyness_host);
#endif
#if (SHOW_OUTPUT_WINDOW == 1)
  imshow("debugOverlay", debugOverlay);
#endif

  gettimeofday(&timeb, NULL);
  displayTime = GetTimeDelta(timea, timeb);
  Log("display frame time used:\t%ld\n", displayTime);
}
Ejemplo n.º 2
0
inline
Mat::Mat(const gpu::GpuMat& m)
    : flags(0), dims(0), rows(0), cols(0), data(0), refcount(0), datastart(0), dataend(0), datalimit(0), allocator(0), size(&rows)
{
    m.download(*this);
}