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

<ul dir="auto">
<li>OpenCV =&gt; :4.1.0</li>
<li>Operating System / Platform =&gt; :Linux Ubuntu 18.04</li>
</ul>

<p dir="auto">and</p>
<ul dir="auto">
<li>OpenCV =&gt; :4.1.0</li>
<li>Operating System / Platform =&gt; :Windows 7</li>
</ul>

<h5 dir="auto">Detailed description</h5>

<p dir="auto">I have trained YOLO object detection via darknet and I could check result using<br>
<code class="notranslate">./darknet detector test cfg/obj.data cfg/yolo-obj.cfg yolo.weights data/test.jpg</code><br>
but when I want to use dnn module in OpenCV for showing result on input image(<code class="notranslate">160*30</code>), it failed. But it could show result correctly for larger images such <code class="notranslate">1280*760</code>.<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7418329/62410286-006ae380-b5f9-11e9-9fad-b8b6adda11c9.jpg"><img src="https://user-images.githubusercontent.com/7418329/62410286-006ae380-b5f9-11e9-9fad-b8b6adda11c9.jpg" alt="Input Image" style="max-width: 100%;"></a></p>
<p dir="auto">I think that, <code class="notranslate">blobfromimage</code> function crop upper region of this image and subsequently show incorrect results for input image.</p>
<p dir="auto">At last I show a sample of image that showed correctly by this module:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7418329/62410612-3f9b3380-b5fd-11e9-8f05-0352dabf99f4.jpg"><img src="https://user-images.githubusercontent.com/7418329/62410612-3f9b3380-b5fd-11e9-8f05-0352dabf99f4.jpg" alt="2" style="max-width: 100%;"></a></p>
<h5 dir="auto">Steps to reproduce</h5>
<ul dir="auto">
<li>OpenCV =&gt; Latest</li>
<li>Operating System / Platform =&gt; Ubuntu 16.04</li>
<li>Compiler =&gt; gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4)</li>
</ul>
<h5 dir="auto">Steps to reproduce</h5>
<p dir="auto">For some weird reason OpenCV is unable to save a CV_32FC1 type cv::Mat into a tiff. Below is the minimal example to duplicate this</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// doesn't work
cv::Mat test = cv::Mat(100, 100, CV_32FC1, cv::Scalar(128));
cv::imwrite(&quot;test.tif&quot;, test);"><pre class="notranslate"><code class="notranslate">// doesn't work
cv::Mat test = cv::Mat(100, 100, CV_32FC1, cv::Scalar(128));
cv::imwrite("test.tif", test);
</code></pre></div>
<p dir="auto">No file is written.</p>
<p dir="auto">However the different variations below all works properly</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="// works
cv::Mat test = cv::Mat(100, 100, CV_32FC3, cv::Scalar(128, 128, 128));
cv::imwrite(&quot;test.tif&quot;, test);

// works
cv::Mat test = cv::Mat(100, 100, CV_8UC3, cv::Scalar(128, 128, 128));
cv::imwrite(&quot;test.tif&quot;, test);

// works
cv::Mat test = cv::Mat(100, 100, CV_8UC1, cv::Scalar(128));
cv::imwrite(&quot;test.tif&quot;, test);

// works
cv::Mat test = cv::Mat(100, 100, CV_32FC1, cv::Scalar(128));
cv::imwrite(&quot;test.png&quot;, test);

// works
cv::Mat test = cv::Mat(100, 100, CV_32FC1, cv::Scalar(128));
cv::imwrite(&quot;test.jpg&quot;, test);"><pre class="notranslate"><code class="notranslate">// works
cv::Mat test = cv::Mat(100, 100, CV_32FC3, cv::Scalar(128, 128, 128));
cv::imwrite("test.tif", test);

// works
cv::Mat test = cv::Mat(100, 100, CV_8UC3, cv::Scalar(128, 128, 128));
cv::imwrite("test.tif", test);

// works
cv::Mat test = cv::Mat(100, 100, CV_8UC1, cv::Scalar(128));
cv::imwrite("test.tif", test);

// works
cv::Mat test = cv::Mat(100, 100, CV_32FC1, cv::Scalar(128));
cv::imwrite("test.png", test);

// works
cv::Mat test = cv::Mat(100, 100, CV_32FC1, cv::Scalar(128));
cv::imwrite("test.jpg", test);
</code></pre></div>
<p dir="auto">Why is it that CV_32FC1 Mat cannot be save as tiff?</p>