title: angle detection in fingerprint image with c#
body: <p>I have project about fingerprint classification with c# and in one part compute angle.
  in this part my project give no answer and hang and dont have any action .
  to compute angle first compute sobelx and sobely filter and then compute angle with arctan
  please help me</p>
  
  <pre><code>// calcute angle***************
  public void computeAngle()
  {
      sobelx();
      sobely();
      angleIMG = new double[imgsx.Width, imgsx.Height];
      try
      {
          for(int i=10 ; i&lt;=200 ; i++)
          {
              for (int j = 10; j &lt;= 150; j++)
              {
                  if (Oy(i, j) != 0.0)
                  {
                      angleIMG[i, j] = Math.Atan(Ox(i, j) / Oy(i, j)) / 2 + Math.PI / 2;
                      textBox1.Text += Math.Abs(angleIMG[i, j]).ToString();
                  }
                  else
                  {
                      angleIMG[i, j] = 0.0;
                  }
              }
              textBox1.Text = "\n";
          }
      }
      catch (Exception e1)
      {
          MessageBox.Show(e1.Message);
      }
  
      //get Ox(i,j)****************
      public double Ox(int i, int j)
      {
          double wx=0.0;
          for (int u = i - 1; u &lt;= i + 1; u++)
          {
              for (int v = i - 1; v &lt;= i + 1; v++)
              {
                  Color cw = imgsx.GetPixel(u, v);
                  Color cw1 = imgsy.GetPixel(u, v);
                  wx =wx+ 2*( cw.R * cw1.R);
              }
          }
          return wx;
      }
      //get Oy(i,j)****************
      public double Oy(int i, int j)
      {
          double wy = 0.0;
          for (int u = i - 1; u &lt;= i + 1; u++)
          {
              for (int v = i - 1; v &lt;= i + 1; v++)
              {
                  Color cw=imgsx.GetPixel(u, v);
                  Color cw1=imgsy.GetPixel(u, v);
                  wy =wy+ Math.Pow (cw.R,2 )- Math.Pow(cw1.R,2);
              }
          }
          return wy;
      }
  </code></pre>