IInputProvider.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using MathNet.Numerics.LinearAlgebra.Single;
  7. using bbiwarg.Images;
  8. namespace bbiwarg.InputProviders
  9. {
  10. public enum DetectionStatus
  11. {
  12. Inactive,
  13. Detected,
  14. Tracked
  15. }
  16. public enum HandSide
  17. {
  18. Unknown,
  19. Left,
  20. Right
  21. }
  22. interface IInputProvider
  23. {
  24. void init();
  25. void start();
  26. void stop();
  27. void updateFrame();
  28. void releaseFrame();
  29. float getFrameRate();
  30. float getHFOV();
  31. float getVFOV();
  32. int getConfidenceThreshold();
  33. void setConfidenceThreshold(int value);
  34. bool isActive();
  35. DepthImage getDepthImage();
  36. ConfidenceImage getConfidenceImage();
  37. UVImage getUVImage();
  38. ColorImage getColorImage();
  39. /*
  40. * all handIndices have to be 1 or 2
  41. */
  42. bool isHandOpen(uint handIndex);
  43. Vector getPalmPosition3D(uint handIndex);
  44. Vector getPalmPosition2D(uint handIndex);
  45. Vector getTipPosition3D(uint handIndex);
  46. Vector getForearmPosition3D(uint handIndex);
  47. Vector getPalmNormal3D(uint handIndex);
  48. DetectionStatus[] getFingerStatus(uint handIndex);
  49. DetectionStatus getHandStatus(uint handIndex);
  50. Vector[] getFingerTipPositions3D(uint handIndex);
  51. Vector[] getFingerTipPositions2D(uint handIndex);
  52. HandSide getHandSide(uint handIndex);
  53. }
  54. }