title: Blob detection with python opencv
body: <p>Anyone knows a way do detect blobs with python cv opencv lib? Initally I don't want use external lib as cvBlobs. </p>
  
  <p>I'm working on a license plate recognition and have some images processed like that <img src="https://i.stack.imgur.com/cVOU8.jpg" alt="enter image description here"></p>
  
  <p>and want separate the blobs to catch the plate.</p>
  
  <p>I've yet made it using AForge in C#:</p>
  
  <pre><code>BlobCounterBase bc = new BlobCounter();
  bc.FilterBlobs = true;
  bc.MinHeight = 5;
  bc.MinWidth = 5;
  
  bc.ProcessImage(bitmap);
  Blob[] blobs = bc.GetObjectsInformation();
  for (int i = 0, n = blobs.Length; i &lt; n; i++)
  {
      if (blobs.Length &gt; 0)
      {              
          bc.ExtractBlobsImage(bitmap, blobs[i], true);
          Bitmap copy = blobs[i].Image.ToManagedImage();
          Console.WriteLine(blobs[i].Rectangle.Size.ToString());
          copy.Save("C:/Users/Marcilio/Desktop/segmentacao/" + i + ".jpg");
      }
  }
  bitmap.Save("C:/Users/Marcilio/Desktop/foto2.jpg");
  </code></pre>
  
  <p>And now I need the equivalent to python's opencv.</p>