public frmMain() { InitializeComponent(); running = true; previewOn = cbFrameFetcher.Checked; cameraImage = new CameraImage(); ThreadPool.QueueUserWorkItem(new WaitCallback(DisplayVideoFrames)); }
public VideoRenderingController(frmMain mainForm, CameraStateManager stateManager, FrameAnalysisManager analysisManager) { m_MainForm = mainForm; this.stateManager = stateManager; this.analysisManager = analysisManager; running = true; previewOn = true; m_DisplayIntensifyMode = Settings.Default.DisplayIntensifyMode; m_DisplayInvertedMode = Settings.Default.UseInvertedDisplayMode; m_DisplayHueIntensityMode = Settings.Default.UseHueIntensityDisplayMode; m_MainForm.tsmiHueIntensity.Checked = m_DisplayHueIntensityMode; m_MainForm.tsmiInverted.Checked = m_DisplayInvertedMode; m_MainForm.tsmiOff.Checked = m_DisplayIntensifyMode == DisplayIntensifyMode.Off; m_MainForm.tsmiLo.Checked = m_DisplayIntensifyMode == DisplayIntensifyMode.Lo; m_MainForm.tsmiHigh.Checked = m_DisplayIntensifyMode == DisplayIntensifyMode.Hi; cameraImage = new CameraImage(); ThreadPool.QueueUserWorkItem(new WaitCallback(DisplayVideoFrames)); }
public string Initialize(OcrConfiguration ocrConfig, int imageWidth, int imageHeight) { this.ocrConfig = ocrConfig; for (int i = 0; i < ocrConfig.Alignment.CharPositions.Count; i++) { int leftPos = ocrConfig.Alignment.CharPositions[i]; var ocredChar = new OcredChar(i, leftPos, ocrConfig.Alignment.CharWidth, ocrConfig.Alignment.CharHeight); ocredChar.PopulateZones(ocrConfig.Zones); ocredCharsOdd.Add(ocredChar); ocredChar = new OcredChar(i, leftPos, ocrConfig.Alignment.CharWidth, ocrConfig.Alignment.CharHeight); ocredChar.PopulateZones(ocrConfig.Zones); ocredCharsEven.Add(ocredChar); } zoneChecker = new OcrZoneChecker( ocrConfig, ocrConfig.Alignment.Width, ocrConfig.Alignment.Height, ocrConfig.Zones, ocrConfig.Alignment.CharPositions); charRecognizer = new OcrCharRecognizer( ocrConfig.Zones, ocrConfig.CharDefinitions); cameraImage = new CameraImage(); testContext = new StateContext(); generateDebugImages = false; return null; }