NewFrameEventArgs.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using Emgu.CV;
  3. using Emgu.CV.Structure;
  4. namespace BBIWARG.Input.InputProviding
  5. {
  6. /// <summary>
  7. /// Encapsulates the arguments of the event that a new frame is available.
  8. /// </summary>
  9. public class NewFrameEventArgs : EventArgs
  10. {
  11. /// <summary>
  12. /// the id of the frame
  13. /// </summary>
  14. public int FrameID { get; private set; }
  15. /// <summary>
  16. /// the height of all images in the frame
  17. /// </summary>
  18. public int Height { get { return DepthImageRaw.Height; } }
  19. public Image<Gray, UInt16> DepthImageRaw { get; private set; }
  20. /// <summary>
  21. /// the with of all images in the frame
  22. /// </summary>
  23. public int Width { get { return DepthImageRaw.Width; } }
  24. /// <summary>
  25. /// Constructs a NewFrameEventArgs.
  26. /// </summary>
  27. /// <param name="frameID">frame id</param>
  28. public NewFrameEventArgs(int frameID, Image<Gray, UInt16> depthImageRaw)
  29. {
  30. FrameID = frameID;
  31. DepthImageRaw = depthImageRaw;
  32. }
  33. }
  34. }