关于 c :openCV grabcut GC_INIT_WITH_MASK 第一次迭代 | 珊瑚贝

openCV grabcut GC_INIT_WITH_MASK first iteration


他,
如何使用掩码初始化第一个 Grabcut?就我而言,每次我遇到此错误时: (-215) !bgdSamples.empty()


它并不完美,但结果很干净,图像边缘没有矩形。

  • 第一个使用 rect 的 Grabcut init
  • 使用 GC_PR_FGD/BGD 作为颜色在图像周围画一个更大的矩形

    1
    2
    3
    4
    int xyCord = 1;
    int size = 2*xyCord;
        rectangle(GrabCut::mask, Point(xyCord,xyCord),Point(GrabCut::image.colssize,GrabCut::image.rowssize),Scalar(GC_PR_FGD),30);
        rectangle(GrabCut::mask, Point(xyCord,xyCord), Point(GrabCut::image.colssize,GrabCut::image.rowssize),Scalar(GC_PR_BGD),30);
  • 第二个带掩码的 Grabcut init


  • 来源:https://www.codenong.com/26041887/

    微信公众号
    手机浏览(小程序)

    Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

    Warning: get_headers(): Failed to enable crypto in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57

    Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_8923.jpg): failed to open stream: operation failed in /mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line 57
    0
    分享到:
    没有账号? 忘记密码?