windows live 测试
windows live 测试发布:
Code Snippet
- /************************************************************************/
- /* 显示图片 */
- /************************************************************************/
- void showImage( Mat& _img, Mat& _mask, vector<Point>& _bgdPxls, vector<Point>& _fgdPxls )
- {
- Mat res;
- Mat binMask;
- if( _mask.empty() )//若掩码为空
- _img.copyTo( res );
- else
- {
- getBinMask( _mask, binMask );
- _img.copyTo( res, binMask );
- }
- vector<Point>::const_iterator it;
- for( it = _bgdPxls.begin(); it != _bgdPxls.end(); ++it )
- circle( res, *it, 1, BLUE );
- for( it = _fgdPxls.begin(); it != _fgdPxls.end(); ++it )
- circle( res, *it, 1, RED );
- imshow( winName, res );
- }