public ProcessorState( Ref<System.Drawing.Rectangle> crop, Ref<System.Drawing.Rectangle> crop_values, Ref<int> upper, Ref<int> lower, KinectData data_, short[] depth, byte[] depth_label_, byte[] rgb, byte[] bitmap_bits, Dictionary<Tuple<byte, byte, byte>, byte> nearest_cache_, Dictionary<byte, byte[]> label_color_, byte kBackgroundLabel, List<byte[]> centroid_colors_, List<byte> centroid_labels, Ref<bool> predict_on_enable_, Ref<bool>feature_extract_on_enable_, Ref<bool> overlay_start_, int kNoOverlay, int[] overlay_bitmap_bits_, int[] kEmptyOverlay, FeatureExtractionLib.FeatureExtraction feature, float[] predict_output_, int[] predict_labels_, List<IWebSocketConnection> all_sockets_, Filter.Step[] pipeline, HandGestureFormat hand_gesture_value_, RangeModeFormat range_mode_value_, int[] pool, byte[] bitmap_bits_copy, int radius, double density, int cluster_threshold_count) { this.crop = crop; this.crop_values = crop_values; this.upper = upper; this.lower = lower; this.data_ = data_; this.depth = depth; this.rgb = rgb; this.bitmap_bits_ = bitmap_bits; this.depth_label_ = depth_label_; this.bitmap_bits_copy_ = bitmap_bits_copy; this.nearest_cache_ = nearest_cache_; this.label_color_ = label_color_; this.kBackgroundLabel = kBackgroundLabel; this.centroid_colors_ = centroid_colors_; this.centroid_labels_ = centroid_labels; this.predict_on_enable_ = predict_on_enable_; this.feature_extract_on_enable_ = feature_extract_on_enable_; this.overlay_start_ = overlay_start_; this.kNoOverlay = kNoOverlay; this.overlay_bitmap_bits_ = overlay_bitmap_bits_; this.kEmptyOverlay = kEmptyOverlay; this.feature = feature; this.predict_output_ = predict_output_; this.predict_labels_ = predict_labels_; this.all_sockets_ = all_sockets_; this.pipeline = pipeline; this.hand_gesture_value_ = hand_gesture_value_; this.range_mode_value_ = range_mode_value_; this.pool_ = pool; this.radius_ = radius; this.density_ = density; this.cluster_threshold_count_ = cluster_threshold_count; }
// End. private void process(Filter.Step step) { Type type = typeof(Filter); // this prohibit debugging /* MethodInfo Filtermethod = type.GetMethod(step.ToString()); Filtermethod.Invoke(null, new object[]{state}); */ DateTime ExecutionStartTime; DateTime ExecutionStopTime; TimeSpan ExecutionTime; ExecutionStartTime = DateTime.Now; switch (step) { case Filter.Step.CopyColor: Filter.CopyColor(state); break; case Filter.Step.PaintWhite: Filter.PaintWhite(state); break; case Filter.Step.PaintGreen: Filter.PaintGreen(state); break; case Filter.Step.CopyDepth: Filter.CopyDepth(state); break; case Filter.Step.Crop: Filter.Crop(state); break; case Filter.Step.MatchColors: Filter.MatchColors(state); break; case Filter.Step.ShowOverlay: Filter.ShowOverlay(state); break; case Filter.Step.EnableFeatureExtract: Filter.EnableFeatureExtract(state); break; case Filter.Step.FeatureExtractOnEnable: Filter.FeatureExtractOnEnable(state); break; case Filter.Step.EnablePredict: Filter.EnablePredict(state); break; case Filter.Step.PerPixelClassificationOnEnable: Filter.PerPixelClassificationOnEnable(state); break; case Filter.Step.PoolingOnPerPixelClassification: Filter.PoolingOnPerPixelClassification(state); break; case Filter.Step.RestoreBitmap: Filter.RestoreBitmap(state); break; case Filter.Step.CheckpointCurrentBitmap: Filter.CheckpointCurrentBitmap(state); break; } ExecutionStopTime = DateTime.Now; ExecutionTime = ExecutionStopTime - ExecutionStartTime; Console.WriteLine("Use {0} ms for step: {1}", ExecutionTime.TotalMilliseconds.ToString(), step.ToString()); }
// End. private void process(Filter.Step step) { Type type = typeof(Filter); MethodInfo Filtermethod = type.GetMethod(step.ToString()); Filtermethod.Invoke(null, new object[]{state}); }