Exemple #1
0
 public CaptchaBreaker(Image image1, string text3, string text1, string text2)
 {
     int num;
     this._objNNList = new NeuralNetworkList();
     this._strResult = "";
     ImageEnhancer enhancer = new ImageEnhancer(image1);
     ImageArrayList imageListByGreyColor = new ImageArrayList();
     int num4 = 0;
     int num3 = 0;
     int num2 = 0;
     text1 = text1.Replace("Step: ", "");
     text2 = text2.Replace("Step: ", "");
     int num5 = 0;
     num4 = (int) Math.Round(Conversion.Val(CommonFunction.substring(text2, 0, "TGC: ", "\r\n", ref num5).Trim()));
     num5 = 0;
     num3 = (int) Math.Round(Conversion.Val(CommonFunction.substring(text2, 0, "SW: ", "\r\n", ref num5).Trim()));
     num5 = 0;
     num2 = (int) Math.Round(Conversion.Val(CommonFunction.substring(text2, 0, "SH: ", "\r\n", ref num5).Trim()));
     this._objNNList.LoadNetworkListFromFile(text3);
     enhancer.ProcessFromStringOrderList(text1);
     imageListByGreyColor = enhancer.GetImageListByGreyColor(num4);
     imageListByGreyColor.ProcessFromStringOrderList(text2);
     int num6 = imageListByGreyColor.get_ImageArrayList().Count - 1;
     for (num = 0; num <= num6; num++)
     {
         imageListByGreyColor.get_ImageArrayList()[num].StretchToSize(num3, num2);
     }
     this._strResult = "";
     int num7 = imageListByGreyColor.get_ImageArrayList().Count - 1;
     for (num = 0; num <= num7; num++)
     {
         this._strResult = this._strResult + this._objNNList.RecogCharacter(imageListByGreyColor.get_ImageArrayList()[num]);
     }
 }
Exemple #2
0
 public ImageArrayList GetImageListByGreyColor(int num1)
 {
     ImageArrayList list2 = new ImageArrayList();
     int num3 = this._intWidth - 1;
     for (int i = 0; i <= num3; i++)
     {
         int num4 = this._intHeight - 1;
         for (int j = 0; j <= num4; j++)
         {
             if (this._intSourceArray[i, j] == num1)
             {
                 AreaFiller filler = new AreaFiller(ref this._intSourceArray, i, j);
                 list2.get_ImageArrayList().Add(filler.OutputAsImageArray());
             }
         }
     }
     return list2;
 }