VVVV.Packs.Image /src/nodes/plugins/Image/OpenCV/src/Filters/FrameDelay.cs

Language C# Lines 43
MD5 Hash 48fbf19fcf27cc9db026542e94468662
Repository https://github.com/digitalwannabe/VVVV.Packs.Image.git View Raw File View Project SPDX
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#region using
using System.Collections.Generic;
using System.Drawing;
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;

using VVVV.PluginInterfaces.V2;
using VVVV.Utils.VMath;
using System;
using VVVV.Utils.VColor;
using VVVV.CV.Core;

#endregion

namespace VVVV.CV.Nodes
{
    [FilterInstance("FrameDelay", Author = "elliotwoods")]
	public class FrameDelayInstance : IFilterInstance
	{
		CVImage FBuffer = new CVImage();

		public override void Allocate()
		{
			FBuffer.Initialise(FInput.ImageAttributes);
		}

		public override void Process()
		{
			if (FInput.Allocated)
			{
				if (FBuffer.Allocated)
				{
					FOutput.Image.SetImage(FBuffer);
					FOutput.Send();
				}

				FBuffer.SetImage(FInput.Image);
			}
		}

	}
}
Back to Top