Opencv and python for auto cropping
<p>I want to crop images automatically.</p>

<p>I am using ImageMagick for this .</p>

<p>Command i am using </p>

<pre><code> convert  3.jpg  -fuzz 10%  -trim     trim.jpg
</code></pre>

<p><a href="https://i.stack.imgur.com/VgLED.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/VgLED.jpg" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/uvV00.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/uvV00.jpg" alt="enter image description here"></a></p>

<p>How do i fix this .</p>

<p>I think there is problem with fuzz factor which am setting .</p>