title: Simpleblobdetector finds way to many keypoints
body: <p>When using OpenCV I would like to find a laserpointer pointed at the ground with live images. Right now, for testing purposes, I am using still images to test the OpenCV algorithm. At the moment I succeeded finding the laser in multiple testimages. Here is my problem. When trying to find the x and y coordinates I get some really strange results. The simpleblobdetector finds around 18*e^many keypoints. Strange, as the image only has a resolution of 640X480 pixels. My code and some output are posted below. Does anyone know why I get so many keypoints and how to fix it, so that I can extract the coordinates?</p>
  
  <pre><code>// Read image
  Mat im = imread(argv[1], IMREAD_COLOR);
  cout &lt;&lt; im.cols &lt;&lt; "      " &lt;&lt; im.rows &lt;&lt; endl;
  Mat filtered;
  inRange(im, Scalar(0, 0, 0), Scalar(255, 255, 216), filtered);
  imshow("Filtered image", filtered);
  
  
  // Simpleblobdetector parameters.
  SimpleBlobDetector::Params params;
  params.filterByArea = true;
  params.filterByCircularity = false;
  params.filterByColor = false;
  params.filterByConvexity = false;
  params.filterByInertia = false;
  params.minArea = 50;
  params.maxArea = 100;
  
  // Set up the detector with default parameters.
  Ptr&lt;SimpleBlobDetector&gt; detector = SimpleBlobDetector::create(params);
  
  // Detect blobs.
  std::vector&lt;KeyPoint&gt; keypoints;
  detector-&gt;detect(filtered, keypoints);
  cout &lt;&lt; "There are " &lt;&lt; keypoints.size() &lt;&lt; " BLOBs found." &lt;&lt; endl;
  
  // Draw detected blobs as red circles.
  // DrawMatchesFlags::DRAW_RICH_KEYPOINTS flag ensures the size of the circle corresponds to the size of blob
  Mat im_with_keypoints;
  drawKeypoints(im, keypoints, im_with_keypoints, Scalar(0, 0, 255), DrawMatchesFlags::DRAW_RICH_KEYPOINTS);
  
  // De locatie van de keypoints weergeven in de console.
  for (int i = 0; i &lt; keypoints.size(); i++)
  {
      cout &lt;&lt; "The X-cooridnate is: " &lt;&lt; keypoints.at(i).pt.x &lt;&lt; endl;
      cout &lt;&lt; "The Y-coordinate is: " &lt;&lt; keypoints.at(i).pt.y &lt;&lt; endl;
  }
  
  // Show blobs
  imshow("keypoints", im_with_keypoints);
  waitKey(0);
  
  return 0;
  </code></pre>
  
  <p>This is the ouput:
  <a href="https://i.stack.imgur.com/lu81K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lu81K.png" alt="Without trying to print the coordinates in the console"></a>
  <a href="https://i.stack.imgur.com/Dzz5x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dzz5x.png" alt="With tying to print the BLOB coordinates"></a></p>