示例#1
0
 public ObjectSearchWorker()
 {
     camera = new Camera("ObjectSearch");
     camera.Subscribe();
     camera.CalibrateCamera(3);
     processor = new Processing(camera);
 }
示例#2
0
 public Processing(Camera camera)
 {
     cam = camera;
     cam.Subscribe();
     rec = ObjectRecogniser.Instance;
     InitColors();
 }
示例#3
0
        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();
        }
示例#4
0
 /// <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;
 }
示例#5
0
 /// <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;
     }
 }