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

<ul dir="auto">
<li>OpenCV =&gt; 4.1</li>
<li>Operating System / Platform =&gt; Windows 10 64Bit</li>
<li>Operating System / Platform =&gt; Ubuntu 18.04</li>
<li>Compiler =&gt; vs2015</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">I found that cv2.VideoCapture() costs different CPU utilization in Windows and in Ubuntu.<br>
I ran the following code in Windows and in Ubuntu respectively, it costs 25% CPU utilization in Windows and more than 80% CPU utilization costed in Ubuntu. Why it makes such big difference? Both OSs are run in a same machine, the only difference is the OS. So I guess is there some dependency libs I missed in the Ubuntu OS?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   cam = cv2.VideoCapture('rtmp://192.168.1.29:9935/live/0')
   while True:
           ret, frame = cam.read()
           frame = cv2.resize(frame, (960,540))"><pre class="notranslate"><code class="notranslate">   cam = cv2.VideoCapture('rtmp://192.168.1.29:9935/live/0')
   while True:
           ret, frame = cam.read()
           frame = cv2.resize(frame, (960,540))
</code></pre></div>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">Transferred from <a href="http://code.opencv.org/issues/3774" rel="nofollow">http://code.opencv.org/issues/3774</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="|| Dennis Evangelista on 2014-06-27 15:59
|| Priority: Normal
|| Affected: 2.4.0 - 2.4.8
|| Category: calibration, 3d
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Other / Mac OSX"><pre class="notranslate"><code class="notranslate">|| Dennis Evangelista on 2014-06-27 15:59
|| Priority: Normal
|| Affected: 2.4.0 - 2.4.8
|| Category: calibration, 3d
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Other / Mac OSX
</code></pre></div>
<h2 dir="auto">findCirclesGrid() finding duplicate points</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Sometimes, 

retval,corners = findCirclesGrid(image,size,flag=cv2.CALIB_CV_CLUSTER) 

returns retval=True and corners but where the corners have duplicate points.  We can detect the duplicate points by checking for the pairwise distances using scipy.spatial.distance.pdist.  Removing the CALIB_CV_CLUSTER makes the duplicate points go away but results in fewer pattern detections. 

If this is expected behavior, it might help to note this in the documentation; inadvertently having duplicate points really messes up our calibration."><pre class="notranslate"><code class="notranslate">Sometimes, 

retval,corners = findCirclesGrid(image,size,flag=cv2.CALIB_CV_CLUSTER) 

returns retval=True and corners but where the corners have duplicate points.  We can detect the duplicate points by checking for the pairwise distances using scipy.spatial.distance.pdist.  Removing the CALIB_CV_CLUSTER makes the duplicate points go away but results in fewer pattern detections. 

If this is expected behavior, it might help to note this in the documentation; inadvertently having duplicate points really messes up our calibration.
</code></pre></div>
<h2 dir="auto">History</h2>
<h5 dir="auto">Dmitry Retinskiy on 2014-09-17 09:56</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Ilya, could you check this?
Thanks.
-   Assignee set to Ilya Lysenkov
-   Status changed from New to Open"><pre class="notranslate"><code class="notranslate">Ilya, could you check this?
Thanks.
-   Assignee set to Ilya Lysenkov
-   Status changed from New to Open
</code></pre></div>