Exemple #1
0
        public PC2(string speedOutlet = null) : base()
        {
#if DEBUG
            this.speedOutlet = speedOutlet;
            streamWriter     = new StreamWriter("detected.txt");
#endif

            ImageProcessesList.Add(new ImageProcess(1541 / 1720f, 1601 / 1720f, 962d / 1080, 1002d / 1080, ImageScaleType.OriginalSize, 60));
            ImageProcessesList.Last().NewFrameArrivedEvent += SpeedDetectionEvent;
        }
Exemple #2
0
        public HLA(string bulletOutlet = null, string bloodOutlet = null) : base()
        {
            this.bulletOutlet = bulletOutlet;
            this.bloodOutlet  = bloodOutlet;

            ImageProcessesList.Add(new ImageProcess(98 / 1920f, 450 / 1920f, 892 / 1080f, 980 / 1080f, ImageScaleType.OriginalSize, FrameRate: 10));
            ImageProcessesList.Last().NewFrameArrivedEvent += BloodDetectorEvent;

            ImageProcessesList.Add(new ImageProcess(1580 / 1920f, 1710 / 1920f, 890 / 1080f, 985 / 1080f, ImageScaleType.OriginalSize, FrameRate: 60));
            ImageProcessesList.Last().NewFrameArrivedEvent += BulletInGunEvent;

            //ImageProcessesList.Add(new ImageProcess(1796 / 1920f, 1859 / 1920f, 986 / 1080f, 1015 / 1080f, ImageScaleType.OriginalSize, FrameRate: 3));
            //ImageProcessesList.Last().NewFrameArrivedEvent += BulletInBackpackEvent;
        }
Exemple #3
0
        public PC2(string speedOutlet = null) : base()
        {
            this.speedOutlet = speedOutlet;

            // Instantiate an image processor
            ImageProcessesList.Add(
                new ImageProcess(
                    1720 / 1920f, 1780 / 1920f, //W
                    940d / 1080, 980d / 1080,   //H
                    ImageScaleType.OriginalSize,
                    60                          // Frame per second
                    )
                );
            // Apply image processing callback to the image processor
            ImageProcessesList.Last().NewFrameArrivedEvent += SpeedDetectionEvent;
        }
Exemple #4
0
        public BF1(string bulletOutlet = null, string bloodOutlet = null, string hitOutlet = null) : base()
        {
            this.bulletOutlet = bulletOutlet;
            this.bloodOutlet  = bloodOutlet;
            this.hitOutlet    = hitOutlet;
            ImageProcessesList.Add(new ImageProcess(0.5 - 0.105, 0.5 + 0.105, 0.5 - 0.185, 0.5 + 0.185, ImageScaleType.OriginalSize, FrameRate: 60));
            ImageProcessesList.Last().NewFrameArrivedEvent += DamageIndicatorDetectionEvent;

            ImageProcessesList.Add(new ImageProcess(1689 / 1920f, 1867 / 1920f, 1018 / 1080f, 1020 / 1080f, ImageScaleType.OriginalSize, FrameRate: 60));
            ImageProcessesList.Last().NewFrameArrivedEvent += BloodDetectorEvent;

            ImageProcessesList.Add(new ImageProcess(0.89, 0.922, 0.865, 0.93, ImageScaleType.OriginalSize, FrameRate: 60)); // 1920*1080
            ImageProcessesList.Last().NewFrameArrivedEvent += BulletCountEvent;

            //ImageProcessesList.Add(new ImageProcess(1598 / 1728f, 1628 / 1728f, 978 / 1080f, 998 / 1080f, ImageScaleType.OriginalSize, FrameRate: 3));
            //ImageProcessesList.Last().NewFrameArrivedEventt += GrenadeCount_BF1_NewFrameArrivedEvent;
        }
Exemple #5
0
 public GR(string speedOutlet = null) : base()
 {
     prevMat = new Mat();
     ImageProcessesList.Add(new ImageProcess(0.2f, 0.8f, 0.2f, 0.8f, ImageScaleType.OriginalSize, 60));
     ImageProcessesList.Last().NewFrameArrivedEvent += OpticalFlowEvent;
 }