public void ConfigureStreams()
 {
     RS.SampleReader sampleReader = RS.SampleReader.Activate(manager.SenseManager);
     sampleReader.EnableStream(RS.StreamType.STREAM_TYPE_COLOR, 1920, 1080, 30);
     sampleReader.EnableStream(RS.StreamType.STREAM_TYPE_DEPTH, 640, 480, 60);
     sampleReader.EnableStream(RS.StreamType.STREAM_TYPE_IR, 640, 480, 60);
 }
Example #2
0
        public RealsenseManager(bool isDataOnly)
        {
            sm = RS.SenseManager.CreateInstance();
            if (!isDataOnly)
            {
                rgbReader   = RS.SampleReader.Activate(sm);
                depthReader = RS.SampleReader.Activate(sm);
                rgbReader.EnableStream(RS.StreamType.STREAM_TYPE_COLOR);
                depthReader.EnableStream(RS.StreamType.STREAM_TYPE_DEPTH);
                rgbReader.SampleArrived   += RgbReader_SampleArrived;
                depthReader.SampleArrived += DepthReader_SampleArrived;
            }
            // config hand


            handModule = HandModule.Activate(sm);
            handConfig = handModule.CreateActiveConfiguration();
            handConfig.TrackedJointsEnabled = true;
            handConfig.StabilizerEnabled    = true;
            handConfig.TrackingMode         = TrackingModeType.TRACKING_MODE_FULL_HAND;
            handConfig.ApplyChanges();
            handData = handModule.CreateOutput();

            handModule.FrameProcessed += HandModule_FrameProcessed;
        }