<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/10462227/66182795-03418d80-e6a9-11e9-9a02-1978de83bbde.jpg"><img src="https://user-images.githubusercontent.com/10462227/66182795-03418d80-e6a9-11e9-9a02-1978de83bbde.jpg" alt="test" style="max-width: 100%;"></a><br>
detectAndDecode return NULL</p>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.0.0</li>
<li>Operating System / Platform =&gt; Windows 64 Bit</li>
<li>Compiler =&gt; Visual Studio 2015</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">current implementation refuses to find <em>any</em> QR code when presented with an image that contains more than one.</p>
<p dir="auto">it would be nice if it could do that.</p>
<h5 dir="auto">Steps to reproduce</h5>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import cv2 as cv
import numpy as np
im = cv.imread(&quot;qrcode.png&quot;)
det = cv.QRCodeDetector()
rv, pts = det.detect(im)
print(&quot;single:&quot;, rv) # True
rv, pts = det.detect(np.hstack([im, im])) # duplicate side by side
print(&quot;multiple:&quot;, rv) # False"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">cv2</span> <span class="pl-k">as</span> <span class="pl-s1">cv</span>
<span class="pl-k">import</span> <span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">np</span>
<span class="pl-s1">im</span> <span class="pl-c1">=</span> <span class="pl-s1">cv</span>.<span class="pl-en">imread</span>(<span class="pl-s">"qrcode.png"</span>)
<span class="pl-s1">det</span> <span class="pl-c1">=</span> <span class="pl-s1">cv</span>.<span class="pl-v">QRCodeDetector</span>()
<span class="pl-s1">rv</span>, <span class="pl-s1">pts</span> <span class="pl-c1">=</span> <span class="pl-s1">det</span>.<span class="pl-en">detect</span>(<span class="pl-s1">im</span>)
<span class="pl-en">print</span>(<span class="pl-s">"single:"</span>, <span class="pl-s1">rv</span>) <span class="pl-c"># True</span>
<span class="pl-s1">rv</span>, <span class="pl-s1">pts</span> <span class="pl-c1">=</span> <span class="pl-s1">det</span>.<span class="pl-en">detect</span>(<span class="pl-s1">np</span>.<span class="pl-en">hstack</span>([<span class="pl-s1">im</span>, <span class="pl-s1">im</span>])) <span class="pl-c"># duplicate side by side</span>
<span class="pl-en">print</span>(<span class="pl-s">"multiple:"</span>, <span class="pl-s1">rv</span>) <span class="pl-c"># False</span></pre></div>