<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; cv2.__version__
'4.5.1'
&gt;&gt;&gt; cv2.minAreaRect(np.array([[1,1],[1,10],[10,10],[10,1]]))
((5.5, 5.5), (9.0, 9.0), 90.0)"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; cv2.__version__
'4.5.1'
&gt;&gt;&gt; cv2.minAreaRect(np.array([[1,1],[1,10],[10,10],[10,1]]))
((5.5, 5.5), (9.0, 9.0), 90.0)
</code></pre></div>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt;&gt; cv2.__version__
'4.2.0'
&gt;&gt;&gt; cv2.minAreaRect(np.array([[1,1],[1,10],[10,10],[10,1]]))
((5.5, 5.5), (9.0, 9.0), -90.0)"><pre class="notranslate"><code class="notranslate">&gt;&gt;&gt; cv2.__version__
'4.2.0'
&gt;&gt;&gt; cv2.minAreaRect(np.array([[1,1],[1,10],[10,10],[10,1]]))
((5.5, 5.5), (9.0, 9.0), -90.0)
</code></pre></div>
<p dir="auto">Shouldn't the angle information returned be [-90,0)?   4.5.1 is different from 4.2.0</p>
<h5 dir="auto">System information (version)</h5>

<ul dir="auto">
<li>OpenCV =&gt; branch <code class="notranslate">3.4</code></li>
<li>Operating System / Platform =&gt; Ubuntu 18.04</li>
<li>Compiler =&gt; g++ 7.4.0</li>
</ul>
<h5 dir="auto">Detailed description</h5>

<p dir="auto">This issue aims at discussing and inviting suggestions for supporting <code class="notranslate">string</code> data type in <code class="notranslate">Constant</code> layer. Currently, <code class="notranslate">getMatFromTensor</code> only supports few data types from <a href="https://github.com/onnx/onnx/blob/master/docs/Operators.md#type-constraints-20">this list</a>.</p>
<p dir="auto">Also, see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="551165928" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/16370" data-hovercard-type="issue" data-hovercard-url="/opencv/opencv/issues/16370/hovercard?comment_id=578788207&amp;comment_type=issue_comment" href="https://github.com/opencv/opencv/issues/16370#issuecomment-578788207">#16370 (comment)</a></p>
<h5 dir="auto">Steps to reproduce</h5>

<p dir="auto">Code,</p>
<div class="highlight highlight-source-c++ notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#include&lt;opencv2/dnn.hpp&gt;
#include&lt;vector&gt;
#include&lt;iostream&gt;

int main()
{
    const std::string model = &quot;model.onnx&quot;;
    cv::dnn::Net net = cv::dnn::readNet( model ); // error
}"><pre class="notranslate">#<span class="pl-k">include</span><span class="pl-s"><span class="pl-pds">&lt;</span>opencv2/dnn.hpp<span class="pl-pds">&gt;</span></span>
#<span class="pl-k">include</span><span class="pl-s"><span class="pl-pds">&lt;</span>vector<span class="pl-pds">&gt;</span></span>
#<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">int</span> <span class="pl-en">main</span>()
{
    <span class="pl-k">const</span> std::string model = <span class="pl-s"><span class="pl-pds">"</span>model.onnx<span class="pl-pds">"</span></span>;
    cv::dnn::Net net = <span class="pl-c1">cv::dnn::readNet</span>( model ); <span class="pl-c"><span class="pl-c">//</span> error</span>
}</pre></div>
<p dir="auto"><code class="notranslate">model.onnx</code> available <a href="https://github.com/opencv/opencv/files/4074830/model.zip">here</a>.</p>
<p dir="auto">Apply the commits in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="554708915" data-permission-text="Title is private" data-url="https://github.com/opencv/opencv/issues/16424" data-hovercard-type="pull_request" data-hovercard-url="/opencv/opencv/pull/16424/hovercard" href="https://github.com/opencv/opencv/pull/16424">#16424</a> before executing the above code. You will be able to see an error conveying that the tensor is empty and will be thrown by <code class="notranslate">getMatFromTensor</code>.</p>