windows live 测试

windows live 测试发布:

 

Code Snippet
  1. /************************************************************************/
  2. /* 显示图片                                                            */
  3. /************************************************************************/
  4. void showImage( Mat& _img, Mat& _mask, vector<Point>& _bgdPxls, vector<Point>& _fgdPxls )
  5. {
  6.     Mat res;
  7.     Mat binMask;
  8.     if( _mask.empty() )//若掩码为空
  9.         _img.copyTo( res );
  10.     else
  11.     {
  12.         getBinMask( _mask, binMask );
  13.         _img.copyTo( res, binMask );
  14.     }
  15.  
  16.     vector<Point>::const_iterator it;
  17.     for( it = _bgdPxls.begin(); it != _bgdPxls.end(); ++it )
  18.         circle( res, *it, 1, BLUE );
  19.     for( it = _fgdPxls.begin(); it != _fgdPxls.end(); ++it )
  20.         circle( res, *it, 1, RED );
  21.  
  22.     imshow( winName, res );
  23. }
posted on 2012-11-13 08:42  静竞  阅读(135)  评论(0编辑  收藏  举报