public Button RecognizeOneButton(Bitmap source, Rectangle rect, string filePath, int id) { var seq = new FiltersSequence(); var card = new Button(source); //Create Card Object card.Rect = rect; seq.Clear(); seq.Add(Grayscale.CommonAlgorithms.BT709); seq.Add(new OtsuThreshold()); source = seq.Apply(source); card.Tip = ScanButtonTip(source); //Scan Rank of non-face card //if (card.Tip == ButtonTip.NOT_RECOGNIZED) //{ // if (!string.IsNullOrEmpty(filePath)) // { // while (File.Exists(filePath + id + ".bmp")) // id++; // top.Save(filePath + id + ".bmp", ImageFormat.Bmp); // } //} return card; }
public void Add(Button button) { this.List.Add(button); }