Exemplo n.º 1
0
        public PlateRecognitionResult Recognize(int parkID, int entranceID)
        {
            string dir = TempFolderManager.GetCurrentFolder();
            PlateRecognitionResult ret = new PlateRecognitionResult();

            try
            {
                //EntranceInfo entrance = ParkBuffer.Current.GetEntrance(entranceID);
                EntranceInfo entrance = ParkBuffer.Current.GetEntrance(parkID, entranceID);
                if (entrance != null)
                {
                    foreach (VideoSourceInfo video in entrance.VideoSources)
                    {
                        if (video.IsForCarPlate)
                        {
                            FrmSnapShoter frm  = FrmSnapShoter.GetInstance();
                            string        path = Path.Combine(dir, string.Format("{0}_{1}_{2}.jpg", "CarPlate", Guid.NewGuid().ToString(), video.VideoID));
                            if (frm.SnapShotTo(video, ref path, true, false))
                            {
                                ret = Recognize(path);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Ralid.GeneralLibrary.ExceptionHandling.ExceptionPolicy.HandleException(ex);
            }
            return(ret);
        }
Exemplo n.º 2
0
 public static FrmSnapShoter GetInstance()
 {
     if (_Instance == null)
     {
         _Instance = new FrmSnapShoter();
     }
     return(_Instance);
 }