title: Edge detection using OpenCV (Canny)
body: <p>I'm trying to detect rectangles using OpenCV. However, sometimes this is getting pretty difficult after running the Canny method, because two of the edges are usually being erased out. I've tried many different sets of thresholds and blurring it before applying Canny, but I haven't got major positive results yet. Currently, I'm not blurring the image, so this is pretty much what I'm doing:</p>
  
  <pre><code>Mat imgSource = Highgui.imread(filepath);
  Imgproc.Canny(imgSource, imgSource, 300, 600, 5, true); 
  </code></pre>
  
  <p>Example:</p>
  
  <p><a href="http://imagizer.imageshack.us/a/img822/8776/27i9j.jpg">original http://imagizer.imageshack.us/a/img822/8776/27i9j.jpg</a>
  <a href="http://imagizer.imageshack.us/a/img841/9868/wkc95.jpg">Canny http://imagizer.imageshack.us/a/img841/9868/wkc95.jpg</a></p>
  
  <p>Then, I'm trying OpenCV's findContours method to detect the rectangle, it works 80% of the time, how can I improve it?</p>