コード例 #1
0
        // Ctr
        public KinectRecorder(KinectRecordOptions options, CoordinateMapper mapper,
        float colorFocalLength, float depthFocalLength, Stream stream)
        {
            Options = options;

              recordStream = stream;
              writer = new BinaryWriter(recordStream);

              var coordParams = mapper.ColorToDepthRelationalParameters;
              int count = coordParams.Count;
              byte[] array = new byte[count];
              coordParams.CopyTo(array, 0);
              writer.Write(count);
              writer.Write(array);
              writer.Write(colorFocalLength);
              writer.Write(depthFocalLength);

              writer.Write((int)Options);

              if ((Options & KinectRecordOptions.Color) != 0) {
            colorRecoder = new ColorRecorder(writer);
              }
              if ((Options & KinectRecordOptions.Depth) != 0) {
            depthRecorder = new DepthRecorder(writer);
              }
              if ((Options & KinectRecordOptions.Skeletons) != 0) {
            skeletonRecorder = new SkeletonRecorder(writer);
              }

              previousFlushDate = DateTime.Now;
        }
コード例 #2
0
        // Ctr
        public KinectRecorder(KinectRecordOptions options, CoordinateMapper mapper,
                              float colorFocalLength, float depthFocalLength, Stream stream)
        {
            Options = options;

            recordStream = stream;
            writer       = new BinaryWriter(recordStream);

            var coordParams = mapper.ColorToDepthRelationalParameters;
            int count       = coordParams.Count;

            byte[] array = new byte[count];
            coordParams.CopyTo(array, 0);
            writer.Write(count);
            writer.Write(array);
            writer.Write(colorFocalLength);
            writer.Write(depthFocalLength);

            writer.Write((int)Options);

            if ((Options & KinectRecordOptions.Color) != 0)
            {
                colorRecoder = new ColorRecorder(writer);
            }
            if ((Options & KinectRecordOptions.Depth) != 0)
            {
                depthRecorder = new DepthRecorder(writer);
            }
            if ((Options & KinectRecordOptions.Skeletons) != 0)
            {
                skeletonRecorder = new SkeletonRecorder(writer);
            }

            previousFlushDate = DateTime.Now;
        }
コード例 #3
0
ファイル: KinectRecorder.cs プロジェクト: Hitchhikrr/harley
        // Ctr
        public KinectRecorder(KinectRecordOptions options, Stream stream)
        {
            Options = options;

            recordStream = stream;
            writer = new BinaryWriter(recordStream);

            writer.Write((int)Options);

            if ((Options & KinectRecordOptions.Color) != 0)
            {
                colorRecoder = new ColorRecorder(writer);
            }
            if ((Options & KinectRecordOptions.Depth) != 0)
            {
                depthRecorder = new DepthRecorder(writer);
            }
            if ((Options & KinectRecordOptions.Skeletons) != 0)
            {
                skeletonRecorder = new SkeletonRecorder(writer);
            }

            previousFlushDate = DateTime.Now;
        }
コード例 #4
0
ファイル: KinectRecorder.cs プロジェクト: sopankhosla/harley
        // Ctr
        public KinectRecorder(KinectRecordOptions options, Stream stream)
        {
            Options = options;

            recordStream = stream;
            writer       = new BinaryWriter(recordStream);

            writer.Write((int)Options);

            if ((Options & KinectRecordOptions.Color) != 0)
            {
                colorRecoder = new ColorRecorder(writer);
            }
            if ((Options & KinectRecordOptions.Depth) != 0)
            {
                depthRecorder = new DepthRecorder(writer);
            }
            if ((Options & KinectRecordOptions.Skeletons) != 0)
            {
                skeletonRecorder = new SkeletonRecorder(writer);
            }

            previousFlushDate = DateTime.Now;
        }