Пример #1
0
        public void StartRegistration()
        {
            m_LPREngine = (LPREngine)m_AppData.LPREngine;
            m_LPREngine.OnNewFilteredPlateGroupEvent += new LPREngine.NewPlateEvent(NewLPRResultsEvent_OnNewPlateEvent);

            m_EmailService = (EmailServices)m_AppData.EmailServices;
            m_DVR          = (DVR)m_AppData.DVR;
        }
Пример #2
0
        public void OnFrameCaptured(VideoCapture videoCap, IntPtr pBuffer, int width, int height, int stride, PIXFMT pixelFormat, long timestamp, object customObject)
        {
            LPREngine engine = (LPREngine)customObject;

            engine.PutFrameImageBuffer(pBuffer, width, height, stride, pixelFormat, timestamp, 0);
            Bitmap bmp = DTKLPR4.CreateBitmapFromBuffer(pBuffer, width, height, stride, pixelFormat);

            SetFrame(bmp);
        }
Пример #3
0
        public void StartRegistration()
        {
            m_LPREngine = (LPREngine)m_AppData.LPREngine;

            for (int c = 0; c < m_NumberChannels; c++)
            {
                try
                {
                    m_CurrentImageQ[c] = new ThreadSafeQueue <FRAME>(3);
                    m_FrameGenerator.RegisterToConsumeChannel(m_ConsumerID, c, (FrameGenerator.NotificationOfNewFrameReady)NewImageCallBack);

                    m_CurrentPlateNumberQ[c] = new ThreadSafeQueue <FRAME>(3);
                    m_LPREngine.OnNewUnfilteredPlateEvent += new LPREngine.NewPlateEvent(m_LPREngine_OnNewPlateEvent); // get unfiltered plate readings for user display
                }

                catch (Exception ex) { m_Log.Trace(ex, ErrorLog.LOG_TYPE.FATAL); }
            }
        }
Пример #4
0
Файл: DVR.cs Проект: mutita/anpr
        public void StartRegistration()
        {
            try
            {
                for (int c = 0; c < m_NumSourceChannels; c++)
                {
                    m_PreMotionRecords[c] = new PRE_MOTION_RECORDS();
                    m_PreMotionRecords[c].MotionDetectedMovingFilesInProcess = false;
                    m_PreMotionRecords[c].PreMotionChannelSubDirCreated      = false;
                    m_PreMotionRecords[c].PendingMotionDetectionQ            = new ThreadSafeQueue <string>(m_NumberOfFramesToPrePostBuffer + 10);

                    m_FrameGenerator.RegisterToConsumeMotionDetectedFrames(m_ConsumerID, c, OnMotionDetection);
                    m_FrameGenerator.RegisterToConsumeChannel(m_ConsumerID, c, OnNewFrame);
                }

                m_LPREngine = (LPREngine)m_AppData.LPREngine;
                m_LPREngine.OnNewFilteredPlateGroupEvent += OnLPRNewRecord;
            }
            catch (Exception ex)
            {
                m_Log.Trace(ex, ErrorLog.LOG_TYPE.FATAL);
            }
        }
Пример #5
0
        private void CreateLPREngine(bool bVideo)
        {
            if (engine != null)
            {
                engine.Dispose();
            }

            // Set LPR settings
            //lprParams.MinCharHeight = (int)numMinCharHeight.Value;
            //lprParams.MaxCharHeight = (int)numMaxCharHeight.Value;
            //lprParams.Countries = txtCountryCodes.Text;
            //lprParams.FPSLimit = (int)numFPSLimit.Value;
            //lprParams.NumThreads = (int)numNumThreads.Value;
            //lprParams.RecognitionOnMotion = cbRecognitionOnMotion.Checked;
            //lprParams.BurnFormatString = txtBurnString.Text;
            //lprParams.BurnPosition = cmbBurnPos.SelectedIndex;

            // Create LPREngine object
            if (bVideo)
            {
                engine = new LPREngine(lprParams, true, OnLicensePlateDetected);
            }
            else
            {
                engine = new LPREngine(lprParams, false, null);
            }

            if (engine.IsLicensed == 1)
            {
                MessageBox.Show("The computer have not runtime license activated. The LPR will be disabled.\nPlease contact at [email protected] to request trial license.", "No License", MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
            if (engine.IsLicensed == 2)
            {
                MessageBox.Show("The runtime license do not allow more channels. The LPR will be disabled.", "No License", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }
Пример #6
0
 public void OnLicensePlateDetected(LPREngine engine, LicensePlate plate)
 {
     AddPlate(plate);
 }