protected override void OnFrame(Parsley.Core.BuildingBlocks.FrameGrabber fp, Emgu.CV.Image<Emgu.CV.Structure.Bgr, byte> img) 
    {
      Core.Bundle b = new Parsley.Core.Bundle();
      Core.BundleBookmarks bb = new Parsley.Core.BundleBookmarks(b);

      bb.Image = img;
      bb.LaserColor = Context.Setup.Laser.Color;
           
      if (!Context.Setup.ScanWorkflow.LaserLineAlgorithm.FindLaserLine(bb.Bundle)) return;
      if (!Context.Setup.ScanWorkflow.LaserLineFilterAlgorithm.FilterLaserLine(bb.Bundle)) return;

      SaveLaserData(bb.LaserPixel);
      foreach (System.Drawing.PointF p in bb.LaserPixel) {
        img[p.ToNearestPoint()] = new Emgu.CV.Structure.Bgr(System.Drawing.Color.Green);
      }
    }
Example #2
0
        protected override void OnFrame(Parsley.Core.BuildingBlocks.FrameGrabber fp, Emgu.CV.Image <Emgu.CV.Structure.Bgr, byte> img)
        {
            Core.Bundle          b  = new Parsley.Core.Bundle();
            Core.BundleBookmarks bb = new Parsley.Core.BundleBookmarks(b);

            bb.Image      = img;
            bb.LaserColor = Context.Setup.Laser.Color;

            if (!Context.Setup.ScanWorkflow.LaserLineAlgorithm.FindLaserLine(bb.Bundle))
            {
                return;
            }
            if (!Context.Setup.ScanWorkflow.LaserLineFilterAlgorithm.FilterLaserLine(bb.Bundle))
            {
                return;
            }

            SaveLaserData(bb.LaserPixel);
            foreach (System.Drawing.PointF p in bb.LaserPixel)
            {
                img[p.ToNearestPoint()] = new Emgu.CV.Structure.Bgr(System.Drawing.Color.Green);
            }
        }