コード例 #1
0
        // Process new frame
        public override void process_Frame2(VsImage lastFrame1, VsImage lastFrame2)
        {
            try
            {
                if (cvAlgo == null)
                {
                    width  = lastFrame1.Image.Width;
                    height = lastFrame1.Image.Height;
                    cvAlgo = new VsCvMatchImage(2, 1, width, height, cvDepth.Depth8U, 3);
                    cvAlgo.VsInit();
                    return;
                }

                cvAlgo.VsConfiguration(int.Parse(AnalyzerConfiguration["ThresholdStrong"].ToString()));
                lastFrame1.Image      = cvAlgo.VsProcess(lastFrame1.Image, lastFrame2.Image);
                lastFrame1.Result     = cvAlgo.VsResult();
                lastFrame1.IsAnalyzed = true;
                lastFrame1.IsDetected = true;
            }
            catch { }
        }
コード例 #2
0
ファイル: VsMatchImage.cs プロジェクト: tdhieu/openvss
		// Process new frame
        public override void process_Frame2(VsImage lastFrame1, VsImage lastFrame2)
        {
            try
            {
                if (cvAlgo == null)
                {
                    width = lastFrame1.Image.Width;
                    height = lastFrame1.Image.Height;
                    cvAlgo = new VsCvMatchImage(2, 1, width, height, cvDepth.Depth8U, 3);
                    cvAlgo.VsInit();
                    return;
                }

                cvAlgo.VsConfiguration(int.Parse(AnalyzerConfiguration["ThresholdStrong"].ToString()));
                lastFrame1.Image = cvAlgo.VsProcess(lastFrame1.Image, lastFrame2.Image);
                lastFrame1.Result = cvAlgo.VsResult();
                lastFrame1.IsAnalyzed = true;
                lastFrame1.IsDetected = true;
            }
            catch { }
    	}