title: SimpleBlobDetector in opencv does not detect anything
body: <p>I'm using OpenCV 3.1 to do some blob detection using SimpleBlobDetector but I'm having no luck and no tutorial has been able to solve this. My environment is XCode on x64.</p>
  
  <p>I'm starting out with this image:
  <a href="https://i.stack.imgur.com/eL6R2.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eL6R2.jpg" alt="enter image description here"></a></p>
  
  <p>Then I'm turning it into greyscale:
  <a href="https://i.stack.imgur.com/lFEgm.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lFEgm.jpg" alt="enter image description here"></a></p>
  
  <p>Finally I turn it into a binary image and doing the blob detection on this:
  <a href="https://i.stack.imgur.com/y1IfN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y1IfN.jpg" alt="enter image description here"></a></p>
  
  <p>I've included "iostream" and "opencv2/opencv.hpp".</p>
  
  <pre><code>using namespace cv;
  using namespace std;
  
  Mat img_rgb;
  Mat img_gray;
  Mat img_keypoints;    
  Ptr&lt;SimpleBlobDetector&gt; detector = SimpleBlobDetector::create();
  
  vector&lt;KeyPoint&gt; keypoints;
  
  img_rgb = imread("summertriangle.jpg");
  
  //Convert to greyscale
  cvtColor(img_rgb, img_gray, CV_RGB2GRAY);
  
  imshow("Grey Scale", img_gray);
  
  // Start by creating the matrix that will allocate the new image
  Mat img_bw(img_gray.size(), img_gray.type());
  
  // Apply threshhold to convert into binary image and save to new matrix
  threshold(img_gray, img_bw, 100, 255, THRESH_BINARY);
  
  // Extract cordinates of blobs at their centroids, save to keypoints variable.
  detector-&gt;detect(img_bw, keypoints);
  cout &lt;&lt; "The size of keypoints vector is: " &lt;&lt; keypoints.size();
  </code></pre>
  
  <p>The keypoints vector is always empty. Nothing I've tried works. </p>