Example #1
0
        public void GetRuntime()
        {
            Dictionary<string, object> d = new Dictionary<string, object>();
              d["runtime"] = new Base.Runtime();

              Assert.DoesNotThrow(new TestDelegate(() => d.GetRuntime()));
        }
Example #2
0
        public void Execute(Dictionary<string, object> b)
        {
            while (_hc == null) {
            bool query_result = b.GetInteractor().Query("Please specify a correct cascade file", this);
            bool should_cancel = b.GetRuntime().StopRequested;

            if (!query_result || should_cancel) {
              b.GetRuntime().RequestStop();
              return;
            }
              }

              Image<Bgr, byte> i = b.GetImage("source");
              Image<Gray, byte> gray = i.Convert<Gray, byte>();

              foreach(MCvAvgComp comp in gray.DetectHaarCascade(_hc)[0]) {
            i.Draw(comp.rect, new Bgr(Color.Red), 4);
              }
        }
Example #3
0
        public void Execute(Dictionary<string, object> bundle)
        {
            // If you have a long running operation, make sure
              // to stay responsive cancellation events.

              while (true) {
            // Test if a stop request is pending
            if (bundle.GetRuntime().StopRequested) {
              return;
            }

            System.Threading.Thread.Sleep(50);
              }
        }
Example #4
0
File: Video.cs Project: qida/qcv
 /// <summary>
 /// Execute the video filter.
 /// </summary>
 /// <remarks>If looping of the video is disabled, this filter will
 /// request a stop of the runtime once it has completed producing
 /// all frames of the video.</remarks>
 /// <param name="b">Bundle of information</param>
 public override void Execute(Dictionary<string, object> b)
 {
     Image<Bgr, byte> i = this.Frame();
       b[this.Name] = i;
       if (i == null) {
     b.GetRuntime().RequestStop();
       }
 }
Example #5
0
 // Execute filter
 public void Execute(Dictionary<string, object> bundle)
 {
     System.Console.WriteLine("Hello World!");
       bundle.GetRuntime().RequestStop();
 }
Example #6
0
 public void Execute(Dictionary<string, object> b)
 {
     b["result"] = 14.0;
     b.GetRuntime().RequestStop();
 }
Example #7
0
File: logging.cs Project: qida/qcv
        public void Execute(Dictionary<string, object> bundle)
        {
            _logger.Info("Hello World!");

              bundle.GetRuntime().RequestStop();
        }