训练OpenCV的透明背景 [英] Transparent background for training OpenCV

查看:351
本文介绍了训练OpenCV的透明背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在训练OpenCV使用 opencv_traincascade 检测对象。



a href =http://docs.opencv.org/doc/user_guide/ug_traincascade.html#positive-samples =nofollow> OpenCV文档,有一个选项可指定 -bgcolor -bgthresh 。从我的理解,这将设置这些像素清除和OpenCV将忽略他们。



我的问题:


  1. 这是正确的吗?

  2. 在绿色屏幕上拍摄我的物体并指定绿色作为背景颜色是有用的吗?


  3. 解决方案


    1. 是的

    2. 是 - >这样可以更轻松地选择背景颜色。

    3. 背景的数据将会丢失,但在大多数情况下是你想要的。否则,受过训练的数据可能会比对象重新生成背景。


    I'm working on training OpenCV to detect an object using opencv_traincascade.

    I see from the OpenCV documentation that there is an option to specify -bgcolorand -bgthresh for the positive images. From what I understand, this would set those pixels to clear and OpenCV would ignore them.

    My questions:

    1. Is this correct?
    2. Would it be useful to shoot my objects against a green screen and specify the green as the background color?
    3. Would anything be lost by doing that instead of shooting against a variety of backgrounds?

    解决方案

    1. Yes
    2. Yes -> This makes selecting the background color much, much easier.
    3. The data of the backgrounds will be lost, but in most cases this is what you want. Otherwise, the trained data might recnogise the background more than the object.

    这篇关于训练OpenCV的透明背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆