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

<ul dir="auto">
<li>OpenCV =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
<li>Operating System / Platform =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
<li>Compiler =&gt; <g-emoji class="g-emoji" alias="grey_question" fallback-src="https://github.githubassets.com/images/icons/emoji/unicode/2754.png">❔</g-emoji></li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">The stereo_match.cpp code (<a href="https://github.com/opencv/opencv/blob/master/samples/cpp/stereo_match.cpp">https://github.com/opencv/opencv/blob/master/samples/cpp/stereo_match.cpp</a>) has a scaling issue that took me 2 days to track down. The computed disparity is a signed int16, and is scaled by a factor of 16 compared to the true disparity, as per the documentation. The disparity thus must be converted to float and divided by 16.0 before invoking reprojectImageTo3D(). As it is now, since this division is not done, the result of reprojectImageTo3D() is wrong, as is at 1/16-the the scale.</p>
<p dir="auto">Suggested fix:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Mat float_disp;
disp.convertTo(float_disp, CV_32F, 1.0f/16.0f);
reprojectImageTo3D(float_disp, xyz, Q, true);"><pre class="notranslate"><code class="notranslate">Mat float_disp;
disp.convertTo(float_disp, CV_32F, 1.0f/16.0f);
reprojectImageTo3D(float_disp, xyz, Q, true);
</code></pre></div>
<h5 dir="auto">Steps to reproduce</h5>
<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.6.0</li>
<li>Operating System / Platform =&gt; Windows 64 Bit</li>
<li>Compiler =&gt; Visual Studio 2019</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">When I load onnx model which was quantified by script from <a href="https://github.com/opencv/opencv_zoo/tree/master/tools/quantize">opencv_zoo</a> with the Intel <code class="notranslate">neural-compressor&gt;1.10.1</code>, it will cause an error. (This model can be run correctly by onnx_runtime)</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ERROR:0@80.629] global D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp (1021) cv::dnn::dnn4_v20220524::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 11 inputs and 1 outputs: [QLinearConcat]:(onnx_node!StatefulPartitionedCall/model/regressors/concat_quant) from domain='com.microsoft'
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1040: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20220524::ONNXImporter::handleNode'
&gt; Node [QLinearConcat@com.microsoft]:(onnx_node!StatefulPartitionedCall/model/regressors/concat_quant) parse error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:571: error: (-5:Bad argument) Blob StatefulPartitionedCall/model/regressors/concascale not found in const blobs in function 'cv::dnn::dnn4_v20220524::ONNXImporter::getBlob'"><pre class="notranslate"><code class="notranslate">[ERROR:0@80.629] global D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp (1021) cv::dnn::dnn4_v20220524::ONNXImporter::handleNode DNN/ONNX: ERROR during processing node with 11 inputs and 1 outputs: [QLinearConcat]:(onnx_node!StatefulPartitionedCall/model/regressors/concat_quant) from domain='com.microsoft'
Traceback (most recent call last):
  File "&lt;stdin&gt;", line 1, in &lt;module&gt;
cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:1040: error: (-2:Unspecified error) in function 'cv::dnn::dnn4_v20220524::ONNXImporter::handleNode'
&gt; Node [QLinearConcat@com.microsoft]:(onnx_node!StatefulPartitionedCall/model/regressors/concat_quant) parse error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\dnn\src\onnx\onnx_importer.cpp:571: error: (-5:Bad argument) Blob StatefulPartitionedCall/model/regressors/concascale not found in const blobs in function 'cv::dnn::dnn4_v20220524::ONNXImporter::getBlob'
</code></pre></div>
<p dir="auto">When I use Intel <code class="notranslate">neural-compressor==1.10.1</code>, the mdoel can be loaded.  Several models have this problem as well.</p>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">Demo model file: <a href="https://drive.google.com/file/d/1l0p2kP5ajE9sZfO8bFw1Z3pypEcvuWKH/view?usp=sharing" rel="nofollow">palm_detection_mediapipe_2022may-int8-quantized.onnx</a></p>
<p dir="auto">Python code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import cv2
net = cv2.dnn.readNetFromONNX(&quot;path/to/model&quot;)"><pre class="notranslate"><code class="notranslate">import cv2
net = cv2.dnn.readNetFromONNX("path/to/model")
</code></pre></div>
<h5 dir="auto">Issue submission checklist</h5>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I report the issue, it's not a question

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I checked the problem with documentation, FAQ, open issues,<br>
forum.opencv.org, Stack Overflow, etc and have not found any solution

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I updated to the latest OpenCV version and the issue is still there

</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> There is reproducer code and related data files: videos, images, onnx, etc

</li>
</ul>