public DetectorEntity(WebcamEntity webcamEntity, IAssetManager assetManager, I2DRenderUtilities renderUtilities) { _webcamEntity = webcamEntity; _assetManager = assetManager; _renderUtilities = renderUtilities; _defaultFont = _assetManager.Get <FontAsset>("font.Default"); _colorsToDetect = new List <ColorToDetect> { new ColorToDetect { Color = new Color(1f, 0f, 0f), Name = "Red" }, new ColorToDetect { Color = new Color(0f, 1f, 0f), Name = "Green" }, new ColorToDetect { Color = new Color(0f, 0f, 1f), Name = "Blue" }, new ColorToDetect { Color = new Color(1f, 1f, 0f), Name = "Yellow" } }; _currentIndex = 0; _currentColor = _colorsToDetect[_currentIndex]; GlobalSensitivity = 1 / 10000000f * 25f; _thread = new Thread(ProcessorThread); _thread.IsBackground = true; _thread.Start(); }
public BoardRendererEntity( BoardAnalyzerEntity analyzerEntity, WebcamEntity webcamEntity, IGraphicsBlit graphicsBlit, IAssetManager assetManager, TextBox alphaTextBox) { _analyzerEntity = analyzerEntity; _webcamEntity = webcamEntity; _graphicsBlit = graphicsBlit; _alphaTextBox = alphaTextBox; _warpFromPolygonEffect = assetManager.Get<EffectAsset>("effect.WarpFromPolygon"); }
public DetectorEntity(WebcamEntity webcamEntity, IAssetManager assetManager, I2DRenderUtilities renderUtilities) { _webcamEntity = webcamEntity; _assetManager = assetManager; _renderUtilities = renderUtilities; _defaultFont = _assetManager.Get<FontAsset>("font.Default"); _colorsToDetect = new List<ColorToDetect> { new ColorToDetect {Color = new Color(1f, 0f, 0f), Name = "Red"}, new ColorToDetect {Color = new Color(0f, 1f, 0f), Name = "Green"}, new ColorToDetect {Color = new Color(0f, 0f, 1f), Name = "Blue"}, new ColorToDetect {Color = new Color(1f, 1f, 0f), Name = "Yellow"} }; _currentIndex = 0; _currentColor = _colorsToDetect[_currentIndex]; GlobalSensitivity = 1/10000000f*25f; _thread = new Thread(ProcessorThread); _thread.IsBackground = true; _thread.Start(); }