public ObjectSearchWorker() { camera = new Camera("ObjectSearch"); camera.Subscribe(); camera.CalibrateCamera(3); processor = new Processing(camera); }
public Processing(Camera camera) { cam = camera; cam.Subscribe(); rec = ObjectRecogniser.Instance; InitColors(); }
public MarkerRecogniser() { detector = Proxies.GetProxy<LandMarkDetectionProxy>(); detector.subscribe("MarkerRecogniser", 1000, 0F); memory = Proxies.GetProxy<MemoryProxy>(); Camera camera = new Camera("MarkerRecogniser"); camera.Subscribe(); camera.CalibrateCamera(3); camera.Unsubscribe(); }
/// <summary> /// Attempts to create an instance of a Camera class. /// </summary> public static Camera CreateCamera(string subID) { Camera camera = null; try { Logger.Log(typeof(Camera), "Creating camera..."); camera = new Camera(subID); Logger.Log(typeof(Camera), "Camera created."); } catch (UnavailableConnectionException) { Logger.Log(typeof(Camera), "Could not instantiate Camera, connection unavailable."); } return camera; }
/// <summary> /// If not linked to any camera, attempts to create one. /// Proceeds to subscribe to the camera's video-feed /// </summary> private void Activate() { active = false; if (camera == null) camera = Camera.CreateCamera(SUBSCRIBER_ID); if (camera != null) { camera.Subscribe(); cameraEnhancer.Target = camera; updater.Enabled = true; active = true; } }