title: Emgucv Houghlines length of line
body: <p>I`am using EmguCV houghines with edge detector app for detection of ablation rods (rod from wood with red and white stripes), and I need to know, how I get line length in pixels, like: <em>line one is 50px long</em>.</p>
  
  <p>Sample of code</p>
  
  <pre><code>class HoughTransform
  {
      private Image&lt;Gray, Byte&gt; _sourceImage;
      private Image&lt;Gray, Byte&gt; _linesImage;
      private Image&lt;Gray, Byte&gt; _resultImage;
  
      public HoughTransform()
      {
  
      }
  
      public void applyTransform()
      {
          try
          {
              _linesImage = _sourceImage.CopyBlank();
              LineSegment2D [] lines = _sourceImage.HoughLinesBinary(1, Math.PI/ 0.0, 50, 100, 1)[0];
              foreach(LineSegment2D line in lines)
              {
                  _linesImage.Draw(line,new Gray(200), 5);
              }
              _resultImage = _linesImage;
          }
          catch(Exception e)
          {
              MessageBox.Show(e.ToString());
          }
      }
  </code></pre>