<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; 3.4.2</li>
<li>Operating System / Platform =&gt; Any</li>
<li>Compiler =&gt; Any</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">Is there any developer discussion about not only including OpenVino's inference engine, but making it the default back-end when it is included? I went to enable this back end and ended up swimming in legal documents using scary terms about patent rights and such. So, I'm trying to figure out where the developer discussion about this took place to maybe help me understand the legal implications of leaning on apparently proprietary and patent-encumbered dependencies.</p>
<p dir="auto">I wasn't sure whether to discuss this here or on the answer site, but just in case, I've opened the same discussion <a href="http://answers.opencv.org/question/197273/license-discussion-around-including-intel-reference-engine/" rel="nofollow">there as well</a>.</p>
<p dir="auto">Please feel free to close this out if the answers site is the better site.</p>

<h5 dir="auto">Steps to reproduce</h5>
<ul dir="auto">
<li>Try to enable Intel inference engine.</li>
<li>Start a gofundme to go back to school for the next decade to become a lawyer in order to determine how much of your soul the engine requires, how many of your descendants it includes, or if you'll be filing for bankruptcy soon.</li>
</ul>
<p dir="auto">Hi, all<br>
I'm trying to detect if the camera is unplugged, I tried to use the result of <code class="notranslate">VideoCaputre::grab()</code>, <code class="notranslate">VideoCaputre::retrieve()</code> and <code class="notranslate">VideoCaputre::isOpened()</code>, but not work. The return values are both true when I unplug the camera. Here is the program:</p>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include &lt;iostream&gt;
#include &lt;signal.h&gt;
#include &lt;unistd.h&gt;
#include &lt;exception&gt;

#include &lt;opencv2/opencv.hpp&gt;

bool running;
cv::VideoCapture camera;

void clear(int signo)
{
    std::cout &lt;&lt; std::endl;
    std::cout &lt;&lt; &quot;faceDetect exit.....&quot; &lt;&lt; std::endl;

    running = false;
    camera.release();

    std::cout &lt;&lt; &quot;done!\n&quot; &lt;&lt; std::endl;
    exit(0);
}

int main()
{
    cv::Mat rawImage, bImage;

    signal(SIGINT, clear);
    signal(SIGTERM, clear);

    camera.open(1);
    if(!camera.isOpened())
    {
        std::cout &lt;&lt; &quot;Error, camera is not connected!&quot; &lt;&lt; std::endl;
    }

    running = true;
    int result;
    while(running)
    {
        result = camera.isOpened();
        std::cout &lt;&lt; &quot;isOpened: &quot; &lt;&lt; result &lt;&lt; &quot;    &quot;;

        result = camera.grab();
        std::cout &lt;&lt; &quot;Grab: &quot; &lt;&lt; result &lt;&lt; &quot;    &quot;;

        result = camera.retrieve(rawImage);
        std::cout &lt;&lt; &quot;Retrieve: &quot; &lt;&lt; result &lt;&lt; &quot;    &quot;;

        result = rawImage.empty();
        std::cout &lt;&lt; &quot;isEmpty: &quot; &lt;&lt; result &lt;&lt; std::endl;
        cv::imshow(&quot;la&quot;, rawImage);

        cv::waitKey(100);
    }
    return 0;
}"><pre class="notranslate">#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>iostream<span class="pl-pds">&gt;</span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>signal.h<span class="pl-pds">&gt;</span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>unistd.h<span class="pl-pds">&gt;</span></span>
#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>exception<span class="pl-pds">&gt;</span></span>

#<span class="pl-k">include</span> <span class="pl-s"><span class="pl-pds">&lt;</span>opencv2/opencv.hpp<span class="pl-pds">&gt;</span></span>

<span class="pl-k">bool</span> running;
cv::VideoCapture camera;

<span class="pl-k">void</span> <span class="pl-en">clear</span>(<span class="pl-k">int</span> signo)
{
    std::cout &lt;&lt; std::endl;
    std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>faceDetect exit.....<span class="pl-pds">"</span></span> &lt;&lt; std::endl;

    running = <span class="pl-c1">false</span>;
    camera.<span class="pl-c1">release</span>();

    std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>done!<span class="pl-cce">\n</span><span class="pl-pds">"</span></span> &lt;&lt; std::endl;
    <span class="pl-c1">exit</span>(<span class="pl-c1">0</span>);
}

<span class="pl-k">int</span> <span class="pl-en">main</span>()
{
    cv::Mat rawImage, bImage;

    <span class="pl-c1">signal</span>(SIGINT, clear);
    <span class="pl-c1">signal</span>(SIGTERM, clear);

    camera.<span class="pl-c1">open</span>(<span class="pl-c1">1</span>);
    <span class="pl-k">if</span>(!camera.<span class="pl-c1">isOpened</span>())
    {
        std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>Error, camera is not connected!<span class="pl-pds">"</span></span> &lt;&lt; std::endl;
    }

    running = <span class="pl-c1">true</span>;
    <span class="pl-k">int</span> result;
    <span class="pl-k">while</span>(running)
    {
        result = camera.<span class="pl-c1">isOpened</span>();
        std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>isOpened: <span class="pl-pds">"</span></span> &lt;&lt; result &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>    <span class="pl-pds">"</span></span>;

        result = camera.<span class="pl-c1">grab</span>();
        std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>Grab: <span class="pl-pds">"</span></span> &lt;&lt; result &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>    <span class="pl-pds">"</span></span>;

        result = camera.<span class="pl-c1">retrieve</span>(rawImage);
        std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>Retrieve: <span class="pl-pds">"</span></span> &lt;&lt; result &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>    <span class="pl-pds">"</span></span>;

        result = rawImage.<span class="pl-c1">empty</span>();
        std::cout &lt;&lt; <span class="pl-s"><span class="pl-pds">"</span>isEmpty: <span class="pl-pds">"</span></span> &lt;&lt; result &lt;&lt; std::endl;
        <span class="pl-c1">cv::imshow</span>(<span class="pl-s"><span class="pl-pds">"</span>la<span class="pl-pds">"</span></span>, rawImage);

        <span class="pl-c1">cv::waitKey</span>(<span class="pl-c1">100</span>);
    }
    <span class="pl-k">return</span> <span class="pl-c1">0</span>;
}</pre></div>
<h3 dir="auto">result:</h3>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0"><pre class="notranslate">isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0</pre></div>
<p dir="auto">when I unplug the camera:</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0"><pre class="notranslate">isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0
VIDIOC_DQBUF: No such device
isOpened: 1    Grab: 1    Retrieve: 1    isEmpty: 0</pre></div>
<p dir="auto">Did I use wrong way to get status of camera??</p>