121      inimg.
require(
"input", w, 
h, V4L2_PIX_FMT_YUYV); 
 
  128      std::unique_lock<std::mutex> lck(itsOutMtx); 
 
  133          itsSaliency->process(inimg, 
true);
 
  136          int mx, my; 
intg32 msal; itsSaliency->getSaliencyMax(mx, my, msal);
 
  139          int const smlev = itsSaliency->smscale::get();
 
  140          int const smadj = smlev > 0 ? (1 << (smlev-1)) : 0; 
 
  141          unsigned int const dmx = (mx << smlev) + smadj;
 
  142          unsigned int const dmy = (my << smlev) + smadj;
 
  143          unsigned int const mapw = itsSaliency->salmap.dims.w, maph = itsSaliency->salmap.dims.h;
 
  145          unsigned int const gistw = w - 6 * mapw; 
 
  149          itsKF->set(dmx, dmy, w, 
h);
 
  150          float kfxraw, kfyraw; itsKF->get(kfxraw, kfyraw, 1.0F); 
 
  156          std::lock_guard<std::mutex> _(itsOutMtx);
 
  159          unsigned int offset = 0;
 
  169          unsigned char * d = outimg.
pixelsw<
unsigned char>() + 4*w*
h + 6*mapw;
 
  170          for (
unsigned int i = 0; i < maph; ++i) memcpy(d + i*w, itsSaliency->gist + i*gistw, gistw);
 
  177      itsSaliency->waitUntilDoneWithInput();
 
  181      cv::Mat gpuout(
h, w, CV_8UC4);
 
  182      itsFilter->process(grayimg, gpuout);
 
  185      outimg = outframe.get();
 
  187      outimg.
require(
"output", w, 
h * 4 + (
h >> itsSaliency->smscale::get()), V4L2_PIX_FMT_GREY);