コード例 #1
0
 public ObjectSearchWorker()
 {
     camera = new Camera("ObjectSearch");
     camera.Subscribe();
     camera.CalibrateCamera(3);
     processor = new Processing(camera);
 }
コード例 #2
0
ファイル: Processing.cs プロジェクト: boschbc/NaoRobot
 public Processing(Camera camera)
 {
     cam = camera;
     cam.Subscribe();
     rec = ObjectRecogniser.Instance;
     InitColors();
 }
コード例 #3
0
ファイル: MarkerRecogniser.cs プロジェクト: boschbc/NaoRobot
        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
ファイル: Camera.cs プロジェクト: boschbc/NaoRobot
 /// <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
ファイル: LiveCamera.cs プロジェクト: boschbc/NaoRobot
 /// <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;
     }
 }