1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using System;
- using MathNet.Numerics.LinearAlgebra.Single;
- namespace bbiwarg.DataSource
- {
- public enum FingerStatus
- {
- Inactive,
- Detected,
- Tracked
- }
- public enum HandSide
- {
- Unknown,
- Left,
- Right
- }
- /*
- * Interface get data from a camera or a video file.
- * Completely independent of iisu.
- */
- interface IVideoDataSource
- {
- /*
- * Initializes the data source.
- */
- void init();
- /*
- * Starts the recording of data.
- */
- void start();
- /*
- * Stops the recording of data.
- */
- void stop();
- /*
- * Updates the data for the current frame.
- * Needs to be called before any method to read data.
- */
- void updateFrame();
- /*
- * Lets the data source process the next frame.
- */
- void releaseFrame();
- /*
- * Returns true iff new data is generated.
- * (e.g camera is running or video hasn't ended)
- */
- bool isActive();
- int getFrameRate();
- /**
- * The depth is given by the distance to the camera in millimeters.
- */
- DepthImage getDepthImage();
- ColorImage getColorImage();
- /*
- * all handIndices have to be 1 or 2
- */
- bool isHandOpen(uint handIndex);
- Vector getPalmPosition3D(uint handIndex);
- Vector getTipPosition3D(uint handIndex);
- Vector getForearmPosition3D(uint handIndex);
- Vector getPalmNormal3D(uint handIndex);
- FingerStatus[] getFingerStatus(uint handIndex);
- Vector[] getFingerTipPositions3D(uint handIndex);
- HandSide getHandSide(uint handIndex);
- }
- }
|