title: houghLines doesn't detect the right lines. How to correct this?
body: <h1>Work done</h1>
  
  <p>I try to detect and read a license plate with these steps: <br><br>
  1) Detect a quadrilateral by using houghlines (already got this problem with this step, sorry) <br> 
  2) Correct the perspective of this quadrilateral to a rectangle <br>
  3) Perform OCR on this rectangle <br></p>
  
  <p>You can see the visual problem/effect of my code <a href="http://snag.gy/8H4No.jpg" rel="nofollow">here</a>. <br>
  The code itself can be found <a href="http://pastebin.com/q4KhhhyZ" rel="nofollow">here</a>.</p>
  
  <p><em>disclaimer:</em> I use Emgu CV for this, but if someone is kind enough to answer me, I don't want to bother him or her to give me an answer for this wrapper specifically.</p>
  
  <pre><code>public string loadImage()
          {
              OpenFileDialog ofd = new OpenFileDialog();
              ofd.ShowDialog();
              String s = ofd.FileName.Normalize();
              return s;
          }
  
  public void processImage()
          {
              String s = loadImage();
              Image&lt;Gray, Byte&gt; img = new Image&lt;Gray, byte&gt;(s);
              Console.WriteLine("read file @" + s);
  
              Image&lt;Gray, Byte&gt; tinyGrayImg = img.Resize(0.25, INTER.CV_INTER_NN);
              CvInvoke.cvShowImage("original gray", tinyGrayImg);
              Console.WriteLine("converted " + s + " to grayscale");
  
              Image&lt;Gray, Byte&gt; canny = new Image&lt;Gray, byte&gt;(CvInvoke.cvGetSize(tinyGrayImg));
              CvInvoke.cvCanny(tinyGrayImg, canny, 97, 225, 3);
              CvInvoke.cvShowImage("canny", canny);
              Console.WriteLine("applied Canny to " + s);
  
              try
              {
                  MemStorage mem = new MemStorage();
                  Image&lt;Bgr, byte&gt; linesImg = canny.Convert&lt;Bgr, byte&gt;();
                  IntPtr lines = CvInvoke.cvHoughLines2(canny, mem.Ptr, HOUGH_TYPE.CV_HOUGH_PROBABILISTIC, 1, Math.PI /   180, 70, 30, 10);
                  Seq&lt;LineSegment2D&gt; segments = new Seq&lt;LineSegment2D&gt;(lines, mem);
                  LineSegment2D[] segArray = segments.ToArray();
  
                  for (int i = 0; i &lt; segArray.Length; i++)
                  {
                      linesImg.Draw(segArray[i], new Bgr(Color.Red), 1);
                  }
                  CvInvoke.cvShowImage("lines", linesImg);
              }
              catch (Exception e)
              {
                  MessageBox.Show(e.Message);
              }
  </code></pre>
  
  <h1>Problem</h1>
  
  <p>As you can see in the attached image (I don't have enough karma for direct adding images) the HOUGH_PROBABILISTIC filter does not work as I expected and I have no idea why the edges of the license plate aren't recognised. Any idea how to reach my goal is welcome. </p>