Browse Source

styleCop changes

Alexander Hendrich 10 years ago
parent
commit
1273140830
60 changed files with 1102 additions and 1050 deletions
  1. 7 7
      bbiwarg/BBWIWARG.cs
  2. 3 3
      bbiwarg/Images/ConfidenceImage.cs
  3. 4 4
      bbiwarg/Images/DepthImage.cs
  4. 11 9
      bbiwarg/Images/EdgeImage.cs
  5. 9 9
      bbiwarg/Input/InputHandling/FrameData.cs
  6. 10 30
      bbiwarg/Input/InputHandling/InputHandler.cs
  7. 24 0
      bbiwarg/Input/InputHandling/NewProcessedFrameEventArgs.cs
  8. 2 50
      bbiwarg/Input/InputProviding/InputProvider.cs
  9. 52 0
      bbiwarg/Input/InputProviding/NewFrameEventArgs.cs
  10. 1 1
      bbiwarg/Input/InputProviding/VideoInputProvider.cs
  11. 8 8
      bbiwarg/Output/DebugOutput/DebugImageCreator.cs
  12. 1 2
      bbiwarg/Output/DebugOutput/DebugWindow.Designer.cs
  13. 5 5
      bbiwarg/Output/DebugOutput/DebugWindow.cs
  14. 6 6
      bbiwarg/Output/DebugOutput/TouchEventVisualizer.cs
  15. 1 1
      bbiwarg/Output/GlassesOutput/GlassesWindow.Designer.cs
  16. 11 11
      bbiwarg/Output/GlassesOutput/GlassesWindow.cs
  17. 9 9
      bbiwarg/Output/OutputImage.cs
  18. 14 16
      bbiwarg/Parameters.cs
  19. 6 6
      bbiwarg/Recognition/FingerRecognition/Finger.cs
  20. 19 19
      bbiwarg/Recognition/FingerRecognition/FingerDetector.cs
  21. 3 3
      bbiwarg/Recognition/FingerRecognition/FingerSlice.cs
  22. 23 7
      bbiwarg/Recognition/FingerRecognition/FingerSliceTrail.cs
  23. 4 4
      bbiwarg/Recognition/FingerRecognition/FingerTracker.cs
  24. 5 5
      bbiwarg/Recognition/FingerRecognition/TrackedFinger.cs
  25. 8 8
      bbiwarg/Recognition/HandRecognition/Hand.cs
  26. 18 19
      bbiwarg/Recognition/HandRecognition/HandDetector.cs
  27. 5 5
      bbiwarg/Recognition/HandRecognition/HandTracker.cs
  28. 3 3
      bbiwarg/Recognition/HandRecognition/TrackedHand.cs
  29. 8 8
      bbiwarg/Recognition/PalmRecognition/Palm.cs
  30. 10 10
      bbiwarg/Recognition/PalmRecognition/PalmDetector.cs
  31. 5 5
      bbiwarg/Recognition/PalmRecognition/PalmTracker.cs
  32. 7 7
      bbiwarg/Recognition/PalmRecognition/TrackedPalm.cs
  33. 6 6
      bbiwarg/Recognition/TouchRecognition/Touch.cs
  34. 6 6
      bbiwarg/Recognition/TouchRecognition/TouchDetector.cs
  35. 2 2
      bbiwarg/Recognition/TouchRecognition/TouchEvent.cs
  36. 16 7
      bbiwarg/Recognition/TouchRecognition/TouchTracker.cs
  37. 4 4
      bbiwarg/Recognition/TouchRecognition/TrackedTouch.cs
  38. 1 1
      bbiwarg/Recognition/Tracking/Similarity.cs
  39. 1 1
      bbiwarg/Recognition/Tracking/TrackIDPool.cs
  40. 1 1
      bbiwarg/Recognition/Tracking/TrackableObject.cs
  41. 3 3
      bbiwarg/Recognition/Tracking/TrackedObject.cs
  42. 4 4
      bbiwarg/Recognition/Tracking/Tracker.cs
  43. 136 1
      bbiwarg/Settings.StyleCop
  44. 495 642
      bbiwarg/StyleCop.Cache
  45. 2 2
      bbiwarg/TUIO/OSC.NET/OSCMessage.cs
  46. 2 3
      bbiwarg/TUIO/TUIO/TuioServer.cs
  47. 7 7
      bbiwarg/TUIO/TuioCommunicator.cs
  48. 5 5
      bbiwarg/Utility/ConvexityDefect.cs
  49. 9 9
      bbiwarg/Utility/CoordinateConverter.cs
  50. 3 3
      bbiwarg/Utility/ImageSize.cs
  51. 9 15
      bbiwarg/Utility/Kalman2DPositionFilter.cs
  52. 9 9
      bbiwarg/Utility/Line2D.cs
  53. 10 4
      bbiwarg/Utility/LineSegment2D.cs
  54. 1 1
      bbiwarg/Utility/Logger.cs
  55. 1 1
      bbiwarg/Utility/Projection2DTo2D.cs
  56. 8 8
      bbiwarg/Utility/Quadrangle.cs
  57. 1 1
      bbiwarg/Utility/Timer.cs
  58. 19 11
      bbiwarg/Utility/Vector2D.cs
  59. 1 1
      bbiwarg/Utility/Vector3D.cs
  60. 38 12
      bbiwarg/bbiwarg.csproj

+ 7 - 7
bbiwarg/BBWIWARG.cs

@@ -1,14 +1,14 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Input.InputProviding;
-using bbiwarg.Output.DebugOutput;
-using bbiwarg.Output.GlassesOutput;
-using bbiwarg.TUIO;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Input.InputProviding;
+using BBIWARG.Output.DebugOutput;
+using BBIWARG.Output.GlassesOutput;
+using BBIWARG.TUIO;
 using System;
 using System.Linq;
 using System.Threading;
 using System.Windows.Forms;
 
-namespace bbiwarg
+namespace BBIWARG
 {
     /// <summary>
     /// Main class which creates and starts the input, tuio and window objects.
@@ -121,7 +121,7 @@ namespace bbiwarg
         /// <summary>
         /// Starts the program.
         /// </summary>
-        /// <param name="args"></param>
+        /// <param name="args">command line arguments</param>
         private static void Main(string[] args)
         {
             Console.SetWindowSize(Parameters.ConsoleWidth, Parameters.ConsoleHeight);

+ 3 - 3
bbiwarg/Images/ConfidenceImage.cs

@@ -1,9 +1,9 @@
-using bbiwarg.Utility;
+using BBIWARG.Utility;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System;
 
-namespace bbiwarg.Images
+namespace BBIWARG.Images
 {
     /// <summary>
     /// ConfidenceImage stores the raw confidence data read from the Camera as an <see cref="Image"/>.
@@ -35,7 +35,7 @@ namespace bbiwarg.Images
             Size = size;
             Image = new Image<Gray, Int16>(Size.Width, Size.Height, size.Width * 2, rawConfidenceData);
 
-            Mask = (Image.ThresholdBinary(new Gray(Parameters.ConfidenceImageMinThreshold), new Gray(1))).Convert<Gray, byte>();
+            Mask = Image.ThresholdBinary(new Gray(Parameters.ConfidenceImageMinThreshold), new Gray(1)).Convert<Gray, byte>();
         }
     }
 }

+ 4 - 4
bbiwarg/Images/DepthImage.cs

@@ -1,10 +1,10 @@
-using bbiwarg.Utility;
+using BBIWARG.Utility;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System;
 using System.Drawing;
 
-namespace bbiwarg.Images
+namespace BBIWARG.Images
 {
     /// <summary>
     /// DepthImage stores a processed version of the depth image read by the camera as an <see cref="Image"/>
@@ -27,13 +27,13 @@ namespace bbiwarg.Images
         public Int16 MinDepth { get; private set; }
 
         /// <summary>
-        /// image size of the deph image
+        /// image size of the depth image
         /// </summary>
         public ImageSize Size { get; private set; }
 
         /// <summary>
         /// Construct a DepthImage from the raw depth data, the image size and a confidenceImage.
-        /// Filters the image using confidenceImage and also thresholds and smoothes it.
+        /// Filters the image using confidenceImage and also applies thresholding and smoothing.
         /// </summary>
         /// <param name="rawDepthData">the raw depth data</param>
         /// <param name="size">the image size</param>

+ 11 - 9
bbiwarg/Images/EdgeImage.cs

@@ -1,10 +1,10 @@
-using bbiwarg.Utility;
+using BBIWARG.Utility;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System;
 using System.Drawing;
 
-namespace bbiwarg.Images
+namespace BBIWARG.Images
 {
     /// <summary>
     /// EdgeImage creates an edge image form a depth image and stores it as an <see cref="Image"/>
@@ -33,9 +33,11 @@ namespace bbiwarg.Images
         public EdgeImage(DepthImage depthImage)
         {
             Size = depthImage.Size;
-            Image = depthImage.Image.ConvertScale<byte>(255f / (depthImage.MaxDepth - depthImage.MinDepth), 0).
-                Canny(Parameters.EdgeImageCannyStartThreshold, Parameters.EdgeImageCannyLinkingThreshold, Parameters.EdgeImageCannySize).
-                ThresholdBinary(new Gray(0), new Gray(1));
+
+            Image = depthImage.Image.ConvertScale<byte>(255f / (depthImage.MaxDepth - depthImage.MinDepth), 0);
+            Image = Image.Canny(Parameters.EdgeImageCannyStartThreshold, Parameters.EdgeImageCannyLinkingThreshold, Parameters.EdgeImageCannySize);
+            Image = Image.ThresholdBinary(new Gray(0), new Gray(1));
+
             RoughImage = Image.Dilate(Parameters.EdgeImageRoughNumDilationIterations);
         }
 
@@ -44,7 +46,7 @@ namespace bbiwarg.Images
         /// </summary>
         /// <param name="edgeImage">the edge image</param>
         /// <param name="roughEdgeImage">dilated version of the edge image</param>
-        /// <param name="size">size of the dege image</param>
+        /// <param name="size">size of the edge image</param>
         public EdgeImage(Image<Gray, Byte> edgeImage, Image<Gray, Byte> roughEdgeImage, ImageSize size)
         {
             Size = size;
@@ -68,7 +70,7 @@ namespace bbiwarg.Images
         /// <param name="start">start position</param>
         /// <param name="direction">search direction</param>
         /// <param name="maxSearchSize">maximum number of steps in direction</param>
-        /// <returns></returns>
+        /// <returns>the positions of the next rough edge</returns>
         public Vector2D findNextRoughEdge(Vector2D start, Vector2D direction, int maxSearchSize = 0)
         {
             Vector2D maxGrow = (Size.MaxPixel - start) / direction;
@@ -125,7 +127,7 @@ namespace bbiwarg.Images
         /// <returns>true iff an edge is at the position</returns>
         public bool isEdgeAt(int x, int y)
         {
-            return (Image.Data[y, x, 0] > 0);
+            return Image.Data[y, x, 0] > 0;
         }
 
         /// <summary>
@@ -146,7 +148,7 @@ namespace bbiwarg.Images
         /// <returns>true iff an edge is at the position in the rough edge image</returns>
         public bool isRoughEdgeAt(int x, int y)
         {
-            return (RoughImage.Data[y, x, 0] > 0);
+            return RoughImage.Data[y, x, 0] > 0;
         }
 
         /// <summary>

+ 9 - 9
bbiwarg/Input/InputHandling/FrameData.cs

@@ -1,12 +1,12 @@
-using bbiwarg.Images;
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Recognition.HandRecognition;
-using bbiwarg.Recognition.PalmRecognition;
-using bbiwarg.Recognition.TouchRecognition;
-using bbiwarg.Utility;
+using BBIWARG.Images;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Recognition.HandRecognition;
+using BBIWARG.Recognition.PalmRecognition;
+using BBIWARG.Recognition.TouchRecognition;
+using BBIWARG.Utility;
 using System.Collections.Generic;
 
-namespace bbiwarg.Input.InputHandling
+namespace BBIWARG.Input.InputHandling
 {
     /// <summary>
     /// Data class which holds all data read an generated for one frame.
@@ -34,7 +34,7 @@ namespace bbiwarg.Input.InputHandling
         public List<Hand> DetectedHands { get; set; }
 
         /// <summary>
-        /// a list of plams detected in this frame
+        /// a list of palms detected in this frame
         /// </summary>
         public List<Palm> DetectedPalms { get; set; }
 
@@ -79,7 +79,7 @@ namespace bbiwarg.Input.InputHandling
         public List<Hand> TrackedHands { get; set; }
 
         /// <summary>
-        /// a list of plams which are tracked in this frame
+        /// a list of palms which are tracked in this frame
         /// </summary>
         public List<Palm> TrackedPalms { get; set; }
 

+ 10 - 30
bbiwarg/Input/InputHandling/InputHandler.cs

@@ -1,13 +1,13 @@
-using bbiwarg.Images;
-using bbiwarg.Input.InputProviding;
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Recognition.HandRecognition;
-using bbiwarg.Recognition.PalmRecognition;
-using bbiwarg.Recognition.TouchRecognition;
-using bbiwarg.Utility;
+using BBIWARG.Images;
+using BBIWARG.Input.InputProviding;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Recognition.HandRecognition;
+using BBIWARG.Recognition.PalmRecognition;
+using BBIWARG.Recognition.TouchRecognition;
+using BBIWARG.Utility;
 using System;
 
-namespace bbiwarg.Input.InputHandling
+namespace BBIWARG.Input.InputHandling
 {
     /// <summary>
     /// signature for the event that a new frame is finished processing
@@ -88,7 +88,7 @@ namespace bbiwarg.Input.InputHandling
         public ImageSize ImageSize { get; private set; }
 
         /// <summary>
-        /// event which occures, when a new frame is finished processing
+        /// event which occurs, when a new frame is finished processing
         /// </summary>
         public event NewProcessedFrameEventHandler NewProcessedFrameEvent;
 
@@ -175,7 +175,7 @@ namespace bbiwarg.Input.InputHandling
             touchDetector.detectTouches(frameData);
             Timer.stop("InputHandler.handleNewFrame::detectTouches");
 
-            //track touches
+            // track touches
             Timer.start("InputHandler.handleNewFrame::trackTouches");
             touchTracker.trackTouches(frameData);
             Timer.stop("InputHandler.handleNewFrame::trackTouches");
@@ -234,24 +234,4 @@ namespace bbiwarg.Input.InputHandling
             touchTracker = new TouchTracker(ImageSize);
         }
     }
-
-    /// <summary>
-    /// Encapsulates the arguments for the event of finishing to process a new frame.
-    /// </summary>
-    public class NewProcessedFrameEventArgs : EventArgs
-    {
-        /// <summary>
-        /// the data of the processed frame
-        /// </summary>
-        public FrameData FrameData { get; private set; }
-
-        /// <summary>
-        /// Creates a new NewProcessedFrameEventArgs with given frame data.
-        /// </summary>
-        /// <param name="frameData">frame data</param>
-        public NewProcessedFrameEventArgs(FrameData frameData)
-        {
-            FrameData = frameData;
-        }
-    }
 }

+ 24 - 0
bbiwarg/Input/InputHandling/NewProcessedFrameEventArgs.cs

@@ -0,0 +1,24 @@
+using System;
+
+namespace BBIWARG.Input.InputHandling
+{
+    /// <summary>
+    /// Encapsulates the arguments for the event of finishing to process a new frame.
+    /// </summary>
+    public class NewProcessedFrameEventArgs : EventArgs
+    {
+        /// <summary>
+        /// the data of the processed frame
+        /// </summary>
+        public FrameData FrameData { get; private set; }
+
+        /// <summary>
+        /// Creates a new NewProcessedFrameEventArgs with given frame data.
+        /// </summary>
+        /// <param name="frameData">frame data</param>
+        public NewProcessedFrameEventArgs(FrameData frameData)
+        {
+            FrameData = frameData;
+        }
+    }
+}

+ 2 - 50
bbiwarg/Input/InputProviding/InputProvider.cs

@@ -1,7 +1,7 @@
 using Iisu;
 using System;
 
-namespace bbiwarg.Input.InputProviding
+namespace BBIWARG.Input.InputProviding
 {
     /// <summary>
     /// signature for the event that the device started
@@ -48,7 +48,7 @@ namespace bbiwarg.Input.InputProviding
         protected IParameterHandle<float> fieldOfViewVertical;
 
         /// <summary>
-        /// paramter handle for the frame rate
+        /// parameter handle for the frame rate
         /// </summary>
         protected IParameterHandle<float> frameRate;
 
@@ -211,52 +211,4 @@ namespace bbiwarg.Input.InputProviding
                 nextFrame();
         }
     }
-
-    /// <summary>
-    /// Encapsulates the arguments of the event that a new frame is available.
-    /// </summary>
-    public class NewFrameEventArgs : EventArgs
-    {
-        /// <summary>
-        /// the id of the frame
-        /// </summary>
-        public int FrameID { get; private set; }
-
-        /// <summary>
-        /// the height of all images in the frame
-        /// </summary>
-        public int Height { get; private set; }
-
-        /// <summary>
-        /// pointer to the raw confidence data for the frame
-        /// </summary>
-        public IntPtr RawConfidenceData { get; private set; }
-
-        /// <summary>
-        /// pointer to the raw depth data for the frame
-        /// </summary>
-        public IntPtr RawDepthData { get; private set; }
-
-        /// <summary>
-        /// the with of all images in the frame
-        /// </summary>
-        public int Width { get; private set; }
-
-        /// <summary>
-        /// Constructs a NewFrameEventArgs.
-        /// </summary>
-        /// <param name="frameID">frame id</param>
-        /// <param name="width">width of all images</param>
-        /// <param name="height">height of all images</param>
-        /// <param name="rawDepthData">pointer to raw depth data</param>
-        /// <param name="rawConfidenceData">pointer to raw confidence data</param>
-        public NewFrameEventArgs(int frameID, int width, int height, IntPtr rawDepthData, IntPtr rawConfidenceData)
-        {
-            FrameID = frameID;
-            Width = width;
-            Height = height;
-            RawDepthData = rawDepthData;
-            RawConfidenceData = rawConfidenceData;
-        }
-    }
 }

+ 52 - 0
bbiwarg/Input/InputProviding/NewFrameEventArgs.cs

@@ -0,0 +1,52 @@
+using System;
+
+namespace BBIWARG.Input.InputProviding
+{
+    /// <summary>
+    /// Encapsulates the arguments of the event that a new frame is available.
+    /// </summary>
+    public class NewFrameEventArgs : EventArgs
+    {
+        /// <summary>
+        /// the id of the frame
+        /// </summary>
+        public int FrameID { get; private set; }
+
+        /// <summary>
+        /// the height of all images in the frame
+        /// </summary>
+        public int Height { get; private set; }
+
+        /// <summary>
+        /// pointer to the raw confidence data for the frame
+        /// </summary>
+        public IntPtr RawConfidenceData { get; private set; }
+
+        /// <summary>
+        /// pointer to the raw depth data for the frame
+        /// </summary>
+        public IntPtr RawDepthData { get; private set; }
+
+        /// <summary>
+        /// the with of all images in the frame
+        /// </summary>
+        public int Width { get; private set; }
+
+        /// <summary>
+        /// Constructs a NewFrameEventArgs.
+        /// </summary>
+        /// <param name="frameID">frame id</param>
+        /// <param name="width">width of all images</param>
+        /// <param name="height">height of all images</param>
+        /// <param name="rawDepthData">pointer to raw depth data</param>
+        /// <param name="rawConfidenceData">pointer to raw confidence data</param>
+        public NewFrameEventArgs(int frameID, int width, int height, IntPtr rawDepthData, IntPtr rawConfidenceData)
+        {
+            FrameID = frameID;
+            Width = width;
+            Height = height;
+            RawDepthData = rawDepthData;
+            RawConfidenceData = rawConfidenceData;
+        }
+    }
+}

+ 1 - 1
bbiwarg/Input/InputProviding/VideoInputProvider.cs

@@ -2,7 +2,7 @@
 using System;
 using System.Threading;
 
-namespace bbiwarg.Input.InputProviding
+namespace BBIWARG.Input.InputProviding
 {
     /// <summary>
     /// signature for the event that the movie has restarted

+ 8 - 8
bbiwarg/Output/DebugOutput/DebugImageCreator.cs

@@ -1,13 +1,13 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Recognition.HandRecognition;
-using bbiwarg.Recognition.PalmRecognition;
-using bbiwarg.Recognition.TouchRecognition;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Recognition.HandRecognition;
+using BBIWARG.Recognition.PalmRecognition;
+using BBIWARG.Recognition.TouchRecognition;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System.Drawing;
 
-namespace bbiwarg.Output.DebugOutput
+namespace BBIWARG.Output.DebugOutput
 {
     /// <summary>
     /// DebugImageCreator creates all debug images as <see cref="OutputImage"/> objects using the frame data.
@@ -30,7 +30,7 @@ namespace bbiwarg.Output.DebugOutput
         public OutputImage FingerImage { get; private set; }
 
         /// <summary>
-        /// image showing detected hands in diffrent colors
+        /// image showing detected hands in different colors
         /// </summary>
         public OutputImage HandImage { get; private set; }
 
@@ -119,7 +119,7 @@ namespace bbiwarg.Output.DebugOutput
                 FingerImage.drawText(f.MidPoint, f.TrackID.ToString(), Parameters.FingerIDColor);
             }
 
-            //border
+            // border
             FingerImage.drawBorder(Parameters.OutputImageBorderColor);
         }
 

+ 1 - 2
bbiwarg/Output/DebugOutput/DebugWindow.Designer.cs

@@ -1,4 +1,4 @@
-namespace bbiwarg.Output.DebugOutput
+namespace BBIWARG.Output.DebugOutput
 {
     partial class DebugWindow
     {
@@ -298,6 +298,5 @@
         private System.Windows.Forms.Label frameLabel;
         private Emgu.CV.UI.ImageBox touchImageBox;
 
-
     }
 }

+ 5 - 5
bbiwarg/Output/DebugOutput/DebugWindow.cs

@@ -1,10 +1,10 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Input.InputProviding;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Input.InputProviding;
 using System;
 using System.ComponentModel;
 using System.Windows.Forms;
 
-namespace bbiwarg.Output.DebugOutput
+namespace BBIWARG.Output.DebugOutput
 {
     /// <summary>
     /// A Windows Form which shows the debug images.
@@ -47,7 +47,7 @@ namespace bbiwarg.Output.DebugOutput
         /// <param name="inputProvider">input provider</param>
         /// <param name="inputHandler">input handle</param>
         /// <param name="name">the title of the window</param>
-        /// <param name="updateInterval">the update interval for the window in ms</param>
+        /// <param name="updateInterval">the update interval for the window in milliseconds</param>
         public DebugWindow(InputProvider inputProvider, InputHandler inputHandler, String name, int updateInterval)
         {
             InitializeComponent();
@@ -205,7 +205,7 @@ namespace bbiwarg.Output.DebugOutput
         }
 
         /// <summary>
-        /// Updates the gui elements.
+        /// Updates the GUI elements.
         /// </summary>
         private void updateGUI()
         {

+ 6 - 6
bbiwarg/Output/DebugOutput/TouchEventVisualizer.cs

@@ -1,13 +1,13 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.TouchRecognition;
-using bbiwarg.Utility;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.TouchRecognition;
+using BBIWARG.Utility;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Drawing;
 using System.Linq;
 
-namespace bbiwarg.Output.DebugOutput
+namespace BBIWARG.Output.DebugOutput
 {
     /// <summary>
     /// Provides an image showing touch events.
@@ -40,7 +40,7 @@ namespace bbiwarg.Output.DebugOutput
         private Object sync;
 
         /// <summary>
-        /// used to store the relative time at which the touch events occured
+        /// used to store the relative time at which the touch events occurred
         /// </summary>
         private Stopwatch timer;
 
@@ -187,7 +187,7 @@ namespace bbiwarg.Output.DebugOutput
         /// <summary>
         /// Removes old touch events and update times.
         /// </summary>
-        /// <param name="breakTime">every touch event which occured before breakTime is removed</param>
+        /// <param name="breakTime">every touch event which occurred before breakTime is removed</param>
         private void removeOldPositions(long breakTime)
         {
             List<int> ids = new List<int>(lastUpdates.Keys);

+ 1 - 1
bbiwarg/Output/GlassesOutput/GlassesWindow.Designer.cs

@@ -1,4 +1,4 @@
-namespace bbiwarg.Output.GlassesOutput
+namespace BBIWARG.Output.GlassesOutput
 {
     partial class GlassesWindow
     {

+ 11 - 11
bbiwarg/Output/GlassesOutput/GlassesWindow.cs

@@ -1,17 +1,17 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Input.InputProviding;
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Recognition.PalmRecognition;
-using bbiwarg.Utility;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Input.InputProviding;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Recognition.PalmRecognition;
+using BBIWARG.Utility;
 using System;
 using System.ComponentModel;
 using System.Drawing;
 using System.Windows.Forms;
 
-namespace bbiwarg.Output.GlassesOutput
+namespace BBIWARG.Output.GlassesOutput
 {
     /// <summary>
-    /// A Windows Form which displays a fullscreen window to be shown on augmented reality glasses.
+    /// A Windows Form which displays a full screen window to be shown on augmented reality glasses.
     /// </summary>
     public partial class GlassesWindow : Form
     {
@@ -82,7 +82,7 @@ namespace bbiwarg.Output.GlassesOutput
         /// <param name="inputHandler">input handler</param>
         /// <param name="name">title of the window</param>
         /// <param name="screen">the screen this window is shown on</param>
-        /// <param name="updateInterval">the update interval for the window in ms</param>
+        /// <param name="updateInterval">the update interval for the window in milliseconds</param>
         public GlassesWindow(InputProvider inputProvider, InputHandler inputHandler, String name, Screen screen, int updateInterval)
         {
             InitializeComponent();
@@ -108,7 +108,7 @@ namespace bbiwarg.Output.GlassesOutput
 
             KeyPreview = true;
 
-            //fullscreen
+            // fullscreen
             FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
             Location = screen.Bounds.Location;
             Size = screen.Bounds.Size;
@@ -127,7 +127,7 @@ namespace bbiwarg.Output.GlassesOutput
         /// <summary>
         /// Returns a random point in the glasses image.
         /// </summary>
-        /// <returns></returns>
+        /// <returns>a random point in the output image</returns>
         private Vector2D getRandomOutputPoint()
         {
             return outputSize.getAbsolutePoint(new Vector2D((float)rand.NextDouble(), (float)rand.NextDouble()));
@@ -226,7 +226,7 @@ namespace bbiwarg.Output.GlassesOutput
         }
 
         /// <summary>
-        /// Updates the gui elements.
+        /// Updates the GUI elements.
         /// </summary>
         private void updateGUI()
         {

+ 9 - 9
bbiwarg/Output/OutputImage.cs

@@ -1,11 +1,11 @@
-using bbiwarg.Utility;
+using BBIWARG.Utility;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
 
-namespace bbiwarg.Output
+namespace BBIWARG.Output
 {
     /// <summary>
     /// An <see cref="Image"/> which provides additional drawing functions.
@@ -103,7 +103,7 @@ namespace bbiwarg.Output
         /// <param name="lineSegment">line segment to draw</param>
         /// <param name="color">color used to draw the line segment</param>
         /// <param name="thickness">thickness of the line segment</param>
-        public void drawLineSegment(bbiwarg.Utility.LineSegment2D lineSegment, Color color, int thickness = 1)
+        public void drawLineSegment(Utility.LineSegment2D lineSegment, Color color, int thickness = 1)
         {
             Draw(new Emgu.CV.Structure.LineSegment2D(lineSegment.P1, lineSegment.P2), new Rgb(color), thickness);
         }
@@ -142,18 +142,18 @@ namespace bbiwarg.Output
 
             for (int i = 1; i < numCols; i++)
             {
-                drawLineSegment(new bbiwarg.Utility.LineSegment2D(a + i * relAB, d + i * relDC), gridColor);
+                drawLineSegment(new Utility.LineSegment2D(a + i * relAB, d + i * relDC), gridColor);
             }
 
             for (int i = 1; i < numRows; i++)
             {
-                drawLineSegment(new bbiwarg.Utility.LineSegment2D(a + i * relAD, b + i * relBC), gridColor);
+                drawLineSegment(new Utility.LineSegment2D(a + i * relAD, b + i * relBC), gridColor);
             }
 
-            drawLineSegment(new bbiwarg.Utility.LineSegment2D(a, b), borderColor);
-            drawLineSegment(new bbiwarg.Utility.LineSegment2D(b, c), borderColor);
-            drawLineSegment(new bbiwarg.Utility.LineSegment2D(c, d), borderColor);
-            drawLineSegment(new bbiwarg.Utility.LineSegment2D(d, a), borderColor);
+            drawLineSegment(new Utility.LineSegment2D(a, b), borderColor);
+            drawLineSegment(new Utility.LineSegment2D(b, c), borderColor);
+            drawLineSegment(new Utility.LineSegment2D(c, d), borderColor);
+            drawLineSegment(new Utility.LineSegment2D(d, a), borderColor);
         }
 
         /// <summary>

+ 14 - 16
bbiwarg/Parameters.cs

@@ -1,8 +1,8 @@
-using bbiwarg.Utility;
+using BBIWARG.Utility;
 using System;
 using System.Drawing;
 
-namespace bbiwarg
+namespace BBIWARG
 {
     /// <summary>
     /// type of input source
@@ -21,12 +21,12 @@ namespace bbiwarg
         #region console
 
         /// <summary>
-        /// height of the console in monospace characters
+        /// height of the console in mono space characters
         /// </summary>
         public static readonly int ConsoleHeight = 30;
 
         /// <summary>
-        /// with of the console in monospace characters
+        /// with of the console in mono space characters
         /// </summary>
         public static readonly int ConsoleWidth = 90;
 
@@ -49,7 +49,7 @@ namespace bbiwarg
         #region Logger
 
         /// <summary>
-        /// bitfield which specifies which subjects should be logged
+        /// bit field which specifies which subjects should be logged
         /// </summary>
         public static readonly LogSubject LoggerEnabledSubjects = LogSubject.None;
 
@@ -92,7 +92,7 @@ namespace bbiwarg
         public static readonly int GlassesWindowNumCalibrationPoints = 20;
 
         /// <summary>
-        /// the titel of the debug window
+        /// the title of the debug window
         /// </summary>
         public static readonly String GlassesWindowTitle = "BBIWARG - GlassesOutput";
 
@@ -134,7 +134,7 @@ namespace bbiwarg
         #region DepthImage
 
         /// <summary>
-        /// the depth range which is considered important (in mm)
+        /// the depth range which is considered important (in mm) (must be smaller than 255)
         /// </summary>
         public static readonly int DepthImageDepthRange = 200;
 
@@ -143,8 +143,6 @@ namespace bbiwarg
         /// </summary>
         public static readonly int DepthImageMedianSize = 5;
 
-        // <255
-
         #endregion DepthImage
 
         #region EdgeImage
@@ -235,7 +233,7 @@ namespace bbiwarg
         public static readonly int FingerOutMargin = 6;
 
         /// <summary>
-        /// the number of slices that are removed when the finger expansion starts in opposite direction (because inital slices don't have the correct direction)
+        /// the number of slices that are removed when the finger expansion starts in opposite direction (because initial slices don't have the correct direction)
         /// </summary>
         public static readonly int FingerRemoveNumSlicesForCorrection = 10;
 
@@ -288,7 +286,7 @@ namespace bbiwarg
         #region hand detection
 
         /// <summary>
-        /// maximum depth difference below which two sections of a hand which are seperated by a finger are considered to belong to the same hand
+        /// maximum depth difference below which two sections of a hand which are separated by a finger are considered to belong to the same hand
         /// </summary>
         public static readonly int HandExtendMaxDifference = 40;
 
@@ -313,7 +311,7 @@ namespace bbiwarg
         public static readonly float HandMaxSize = 0.6f;
 
         /// <summary>
-        /// minimum size of a hand realtive to the whole image
+        /// minimum size of a hand relative to the whole image
         /// </summary>
         public static readonly float HandMinSize = 0.01f;
 
@@ -345,7 +343,7 @@ namespace bbiwarg
         public static readonly float HandThumbDefectMinShortLongLengthRatio = 0.3f;
 
         /// <summary>
-        /// the minumum ratio of the thumb length to the length from the depth point to the outer short point of a convexity defect for possible thumb defects
+        /// the minimum ratio of the thumb length to the length from the depth point to the outer short point of a convexity defect for possible thumb defects
         /// </summary>
         public static readonly float HandThumbDefectMinThumbShortLengthRatio = 0.75f;
 
@@ -538,7 +536,7 @@ namespace bbiwarg
         #region TouchEventVisualizer
 
         /// <summary>
-        /// time in ms after which old touch events are removed from the touch event visualizer
+        /// time in milliseconds after which old touch events are removed from the touch event visualizer
         /// </summary>
         public static readonly int TouchEventVisualizerFadeOutTime = 1500;
 
@@ -678,7 +676,7 @@ namespace bbiwarg
         public static readonly Color PalmGridColor = Color.CornflowerBlue;
 
         /// <summary>
-        /// color used to draw the plam quadrangle
+        /// color used to draw the palm quadrangle
         /// </summary>
         public static readonly Color PalmQuadColor = Color.Blue;
 
@@ -692,7 +690,7 @@ namespace bbiwarg
         public static readonly Color HandCentroidColor = Color.Yellow;
 
         /// <summary>
-        /// colors used to draw the hands (ith element is a color which specifies the color channels used to draw the ith hand)
+        /// colors used to draw the hands (element is a color which specifies the color channels used to draw the hand)
         /// </summary>
         public static readonly Color[] HandColors = new Color[3] { Color.Red, Color.Blue, Color.Green };
 

+ 6 - 6
bbiwarg/Recognition/FingerRecognition/Finger.cs

@@ -1,11 +1,11 @@
-using bbiwarg.Recognition.HandRecognition;
-using bbiwarg.Recognition.TouchRecognition;
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Recognition.HandRecognition;
+using BBIWARG.Recognition.TouchRecognition;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using Emgu.CV;
 using System.Drawing;
 
-namespace bbiwarg.Recognition.FingerRecognition
+namespace BBIWARG.Recognition.FingerRecognition
 {
     /// <summary>
     /// The Finger class represents a Finger.
@@ -73,7 +73,7 @@ namespace bbiwarg.Recognition.FingerRecognition
         }
 
         /// <summary>
-        /// Reverses the finger (start<->end)
+        /// Reverses the finger (start to end)
         /// </summary>
         public void reverse()
         {

+ 19 - 19
bbiwarg/Recognition/FingerRecognition/FingerDetector.cs

@@ -1,10 +1,10 @@
-using bbiwarg.Images;
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Utility;
+using BBIWARG.Images;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Utility;
 using System;
 using System.Collections.Generic;
 
-namespace bbiwarg.Recognition.FingerRecognition
+namespace BBIWARG.Recognition.FingerRecognition
 {
     /// <summary>
     /// Detects fingers in the given depth and edge images. The finger detection searches for edges in the edge image and tries to find an initial finger slice. For each found finger slice, the finger detector tries to move along the finger direction to extend the finger slice trail. If the trail reaches its end, the finger detector removes the first few slices and starts the trail expansion in opposite direction. If the complete slice trail is long enough, the finger slices are sorted into correct order and the edges around the finger are removed to increase performance for the next finger detection.
@@ -12,7 +12,7 @@ namespace bbiwarg.Recognition.FingerRecognition
     internal class FingerDetector
     {
         /// <summary>
-        /// the coordinateConverter (used to calculate finger width (in milimeters))
+        /// the coordinateConverter (used to calculate finger width (in millimeters))
         /// </summary>
         private CoordinateConverter coordinateConverter;
 
@@ -92,22 +92,22 @@ namespace bbiwarg.Recognition.FingerRecognition
         }
 
         /// <summary>
-        /// Sorts the finger slices in correct order an checks if the finger is a valid finger (<see cref="isCrippleFinger(Finger)"/>). If it is valid the finger is added to the list of detected fingers. Afterwards the edges around the finger are removed to surpress a new finger search for the same finger.
+        /// Sorts the finger slices in correct order an checks if the finger is a valid finger (<see cref="isCrippleFinger(Finger)"/>). If it is valid the finger is added to the list of detected fingers. Afterwards the edges around the finger are removed to suppress a new finger search for the same finger.
         /// </summary>
         /// <param name="trail">the slice trail of the possible finger</param>
         private void createFingerFromTrail(FingerSliceTrail trail)
         {
-            //bring finger in correct direction Tip->Hand
+            // bring finger in correct direction Tip->Hand
             trail = orderTrailTipToHand(trail);
 
-            //create finger
+            // create finger
             Finger finger = new Finger(trail);
 
-            //add finger
+            // add finger
             if (!isCrippleFinger(finger))
                 fingers.Add(finger);
 
-            //remove edges around detected finger to improve performance
+            // remove edges around detected finger to improve performance
             edgeImageAdapted.removeEdgesInsidePolygon(finger.getContour(Parameters.FingerContourMargin).ToArray());
         }
 
@@ -163,7 +163,7 @@ namespace bbiwarg.Recognition.FingerRecognition
         /// </summary>
         /// <param name="position">the position somewhere in the middle of the possible finger</param>
         /// <param name="direction">the finger direction</param>
-        /// <param name="reversed">indicates wether start and end should be swapped</param>
+        /// <param name="reversed">indicates whether start and end should be swapped</param>
         /// <returns>the found finger slice or null</returns>
         private FingerSlice findFingerSliceFromMid(Vector2D position, Vector2D direction, bool reversed = false)
         {
@@ -249,21 +249,21 @@ namespace bbiwarg.Recognition.FingerRecognition
         /// <summary>
         /// Checks if a possible finger slice is located on a finger. To pass this test, the depth value at the mid has to be lower than on the outside (start and end).
         /// </summary>
-        /// <param name="slice">the possible finger slcie</param>
-        /// <returns>wether the slice is located on a finger</returns>
+        /// <param name="slice">the possible finger slice</param>
+        /// <returns>whether the slice is located on a finger</returns>
         private bool fingerSliceDepthTest(FingerSlice slice)
         {
             Int16 depthStart = depthImage.getDepthAt(slice.Start.moveWithinBound(depthImage.Size, slice.Direction.getInverse(), Parameters.FingerContourMargin));
             Int16 depthMid = depthImage.getDepthAt(slice.Mid);
             Int16 depthEnd = depthImage.getDepthAt(slice.End.moveWithinBound(depthImage.Size, slice.Direction, Parameters.FingerContourMargin));
-            return (depthStart > depthMid && depthMid < depthEnd);
+            return depthStart > depthMid && depthMid < depthEnd;
         }
 
         /// <summary>
         /// Gets the edge direction of the given edge point. The edge direction is either horizontal, vertical, diagonal (both) or null.
         /// </summary>
         /// <param name="edgePoint">the edge point</param>
-        /// <returns>the edge directon at the given point</returns>
+        /// <returns>the edge direction at the given point</returns>
         private Vector2D getEdgeDirection(Vector2D edgePoint)
         {
             int x = edgePoint.IntX;
@@ -277,10 +277,10 @@ namespace bbiwarg.Recognition.FingerRecognition
         }
 
         /// <summary>
-        /// Checks wether the finger has enough space around itself (fingers from a closed hand shouldn't bee detected).
+        /// Checks whether the finger has enough space around itself (fingers from a closed hand shouldn't bee detected).
         /// </summary>
         /// <param name="finger">the finger</param>
-        /// <returns>wether the finger has enough space around itself</returns>
+        /// <returns>whether the finger has enough space around itself</returns>
         private bool isCrippleFinger(Finger finger)
         {
             FingerSlice midSlice = finger.SliceTrail.MidSlice;
@@ -292,11 +292,11 @@ namespace bbiwarg.Recognition.FingerRecognition
             Int16 depthAtOut2 = depthImage.getDepthAt(out2);
             int minDepthDifference = Math.Min(Math.Abs(depthAtFinger - depthAtOut1), Math.Abs(depthAtFinger - depthAtOut2));
 
-            return (minDepthDifference < Parameters.FingerMaxCrippleDifference);
+            return minDepthDifference < Parameters.FingerMaxCrippleDifference;
         }
 
         /// <summary>
-        /// Sorts a slice trail in the corrent order, so that the start is at the finger tip and the end is at the hand. To guess the correct order the width of the first and last slice are compared.
+        /// Sorts a slice trail in the correct order, so that the start is at the finger tip and the end is at the hand. To guess the correct order the width of the first and last slice are compared.
         /// </summary>
         /// <param name="trail">the slice trail of the finger</param>
         /// <returns>the slice trail of the finger in correct order</returns>

+ 3 - 3
bbiwarg/Recognition/FingerRecognition/FingerSlice.cs

@@ -1,9 +1,9 @@
-using bbiwarg.Utility;
+using BBIWARG.Utility;
 
-namespace bbiwarg.Recognition.FingerRecognition
+namespace BBIWARG.Recognition.FingerRecognition
 {
     /// <summary>
-    /// A Finger consists of multiple FingerSlices, each one represented by a line preferrably orthogonal to the fingers direction.
+    /// A Finger consists of multiple FingerSlices, each one represented by a line preferably orthogonal to the fingers direction.
     /// </summary>
     public class FingerSlice
     {

+ 23 - 7
bbiwarg/Recognition/FingerRecognition/FingerSliceTrail.cs

@@ -1,10 +1,10 @@
-using bbiwarg.Utility;
+using BBIWARG.Utility;
 using Emgu.CV;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
 
-namespace bbiwarg.Recognition.FingerRecognition
+namespace BBIWARG.Recognition.FingerRecognition
 {
     /// <summary>
     /// Each Finger consists of multiple FingerSlices, a FingerSliceTrail is a collection of these slices.
@@ -17,7 +17,7 @@ namespace bbiwarg.Recognition.FingerRecognition
         private Vector2D fittedDirection;
 
         /// <summary>
-        /// indicates weter the variable fittedDirection is up to date (outdates if new slices are added)
+        /// indicates whether the variable fittedDirection is up to date (outdates if new slices are added)
         /// </summary>
         private bool fittedDirectionUpToDate;
 
@@ -27,7 +27,7 @@ namespace bbiwarg.Recognition.FingerRecognition
         private LineSegment2D lineSegment;
 
         /// <summary>
-        /// indicates wether the variable lineSegment is up to date (outdates if new start or end slices are added)
+        /// indicates whether the variable lineSegment is up to date (outdates if new start or end slices are added)
         /// </summary>
         private bool lineSegmentUpToDate;
 
@@ -39,12 +39,28 @@ namespace bbiwarg.Recognition.FingerRecognition
         /// <summary>
         /// the fitted direction through all slice's mid points [end to start]
         /// </summary>
-        public Vector2D FittedDirection { get { if (!fittedDirectionUpToDate) updateFittedDirection(); return fittedDirection; } }
+        public Vector2D FittedDirection
+        {
+            get
+            {
+                if (!fittedDirectionUpToDate)
+                    updateFittedDirection();
+                return fittedDirection;
+            }
+        }
 
         /// <summary>
         /// the line segment connecting the start slice's mid to the end slice's mid
         /// </summary>
-        public LineSegment2D LineSegment { get { if (!lineSegmentUpToDate) updateLineSegment(); return lineSegment; } }
+        public LineSegment2D LineSegment
+        {
+            get
+            {
+                if (!lineSegmentUpToDate)
+                    updateLineSegment();
+                return lineSegment;
+            }
+        }
 
         /// <summary>
         /// the middle slice
@@ -186,7 +202,7 @@ namespace bbiwarg.Recognition.FingerRecognition
         }
 
         /// <summary>
-        /// updtes the line segment (new line segment from end to start)
+        /// updates the line segment (new line segment from end to start)
         /// </summary>
         private void updateLineSegment()
         {

+ 4 - 4
bbiwarg/Recognition/FingerRecognition/FingerTracker.cs

@@ -1,8 +1,8 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 
-namespace bbiwarg.Recognition.FingerRecognition
+namespace BBIWARG.Recognition.FingerRecognition
 {
     /// <summary>
     /// Keeps track of fingers over a period of time.

+ 5 - 5
bbiwarg/Recognition/FingerRecognition/TrackedFinger.cs

@@ -1,9 +1,9 @@
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using System;
 using System.Collections.Generic;
 
-namespace bbiwarg.Recognition.FingerRecognition
+namespace BBIWARG.Recognition.FingerRecognition
 {
     /// <summary>
     /// Represents a finger that is tracked for several frames.
@@ -60,10 +60,10 @@ namespace bbiwarg.Recognition.FingerRecognition
         }
 
         /// <summary>
-        /// Indicates wether a newly detected finger should be reverse (direction differs from average direction of previous fingers).
+        /// Indicates whether a newly detected finger should be reverse (direction differs from average direction of previous fingers).
         /// </summary>
         /// <param name="detectedFinger">the detected finger</param>
-        /// <returns>wether the fingers direction matches to the direction of the previous fingers</returns>
+        /// <returns>whether the fingers direction matches to the direction of the previous fingers</returns>
         public bool shouldFingerBeReversed(Finger detectedFinger)
         {
             Vector2D meanDirection = Vector2D.mean(lastRawDirections);

+ 8 - 8
bbiwarg/Recognition/HandRecognition/Hand.cs

@@ -1,12 +1,12 @@
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Recognition.PalmRecognition;
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Recognition.PalmRecognition;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System.Collections.Generic;
 
-namespace bbiwarg.Recognition.HandRecognition
+namespace BBIWARG.Recognition.HandRecognition
 {
     /// <summary>
     /// Represents a Hand.
@@ -98,13 +98,13 @@ namespace bbiwarg.Recognition.HandRecognition
         }
 
         /// <summary>
-        /// Checks wether a given point is inside the hand.
+        /// Checks whether a given point is inside the hand.
         /// </summary>
         /// <param name="point">the point</param>
-        /// <returns>wether the point is inside the hand</returns>
+        /// <returns>whether the point is inside the hand</returns>
         public bool isInside(Vector2D point)
         {
-            return (Mask.Data[point.IntY, point.IntX, 0] != 0);
+            return Mask.Data[point.IntY, point.IntX, 0] != 0;
         }
 
         /// <summary>

+ 18 - 19
bbiwarg/Recognition/HandRecognition/HandDetector.cs

@@ -1,14 +1,14 @@
-using bbiwarg.Images;
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Utility;
+using BBIWARG.Images;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Utility;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
 
-namespace bbiwarg.Recognition.HandRecognition
+namespace BBIWARG.Recognition.HandRecognition
 {
     /// <summary>
     /// Finds Hands by iterating over all fingers and flooding them. Each filled region is considered to be one hand and each finger belongs to one hand. To improve the hand contours, the hand mask are filled with the defects caused by overlapping fingers.
@@ -58,7 +58,7 @@ namespace bbiwarg.Recognition.HandRecognition
         }
 
         /// <summary>
-        /// Creates the modified hand image. The image is a copy of the original depth image with a contour around each finger (to prevent floodfill from filling through fingers).
+        /// Creates the modified hand image. The image is a copy of the original depth image with a contour around each finger (to prevent flood fill from filling through fingers).
         /// </summary>
         private void createModifiedHandEdgeImage()
         {
@@ -73,7 +73,7 @@ namespace bbiwarg.Recognition.HandRecognition
         }
 
         /// <summary>
-        /// Merges two hands if they are seperatd by an overlapping finger or extends the hand mask through an overlapping finger.
+        /// Merges two hands if they are separated by an overlapping finger or extends the hand mask through an overlapping finger.
         /// </summary>
         private void extendOrMergeThroughOverlappingFingers()
         {
@@ -97,23 +97,23 @@ namespace bbiwarg.Recognition.HandRecognition
                         Int16 maxDepth = depthImage.MaxDepth;
                         if (midOut1InHand != midOut2InHand && depthAtMidOut1 != maxDepth && depthAtMidOut2 != maxDepth && Math.Abs(depthAtMidOut1 - depthAtMidOut2) < Parameters.HandExtendMaxDifference)
                         {
-                            Vector2D pHand, pHandExtension;
+                            Vector2D handPoint, handExtensionPoint;
                             if (midOut1InHand)
                             {
-                                pHand = midOut1;
-                                pHandExtension = midOut2;
+                                handPoint = midOut1;
+                                handExtensionPoint = midOut2;
                             }
                             else
                             {
-                                pHand = midOut2;
-                                pHandExtension = midOut1;
+                                handPoint = midOut2;
+                                handExtensionPoint = midOut1;
                             }
 
-                            //check if pHandExtension is in other hand (if so -> merge with hand)
+                            // check if pHandExtension is in other hand (if so -> merge with hand)
                             bool merge = false;
                             foreach (Hand mergeHand in hands)
                             {
-                                if (mergeHand.isInside(pHandExtension) && !mergedHands.Contains(mergeHand))
+                                if (mergeHand.isInside(handExtensionPoint) && !mergedHands.Contains(mergeHand))
                                 {
                                     mergeHands.Add(mergeHand);
                                     merge = true;
@@ -121,9 +121,9 @@ namespace bbiwarg.Recognition.HandRecognition
                                 }
                             }
 
-                            //if no merge, extend hand
+                            // if no merge, extend hand
                             if (!merge)
-                                extendToHand(hand, pHandExtension);
+                                extendToHand(hand, handExtensionPoint);
                         }
                     }
                     foreach (Hand mergeHand in mergeHands)
@@ -215,7 +215,7 @@ namespace bbiwarg.Recognition.HandRecognition
         }
 
         /// <summary>
-        /// Fixes overlapping fingers by merging two hands if they are seperated by a finger and/or fills holes caused by overlapping fingers.
+        /// Fixes overlapping fingers by merging two hands if they are separated by a finger and/or fills holes caused by overlapping fingers.
         /// </summary>
         private void fixOverlappingFingers()
         {
@@ -232,8 +232,7 @@ namespace bbiwarg.Recognition.HandRecognition
         {
             Image<Gray, byte> mask = new Image<Gray, byte>(depthImage.Size.Width + 2, depthImage.Size.Height + 2);
             MCvConnectedComp comp = new MCvConnectedComp();
-            CvInvoke.cvFloodFill(modifiedHandDepthImage, p, new MCvScalar(255), new MCvScalar(Parameters.HandFloodFillDownDiff),
-                new MCvScalar(Parameters.HandFloodFillUpDiff), out comp, Emgu.CV.CvEnum.CONNECTIVITY.FOUR_CONNECTED, Emgu.CV.CvEnum.FLOODFILL_FLAG.DEFAULT, mask);
+            CvInvoke.cvFloodFill(modifiedHandDepthImage, p, new MCvScalar(255), new MCvScalar(Parameters.HandFloodFillDownDiff), new MCvScalar(Parameters.HandFloodFillUpDiff), out comp, Emgu.CV.CvEnum.CONNECTIVITY.FOUR_CONNECTED, Emgu.CV.CvEnum.FLOODFILL_FLAG.DEFAULT, mask);
             return mask.Copy(new Rectangle(1, 1, depthImage.Size.Width, depthImage.Size.Height));
         }
 

+ 5 - 5
bbiwarg/Recognition/HandRecognition/HandTracker.cs

@@ -1,8 +1,8 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 
-namespace bbiwarg.Recognition.HandRecognition
+namespace BBIWARG.Recognition.HandRecognition
 {
     /// <summary>
     /// Keeps track of hands over a period of time.
@@ -43,7 +43,7 @@ namespace bbiwarg.Recognition.HandRecognition
         /// Creates a TrackedHand.
         /// </summary>
         /// <param name="detectedObject">the detected hand</param>
-        /// <returns>a Trackedhand</returns>
+        /// <returns>a tracked hand</returns>
         protected override TrackedHand createTrackedObject(Hand detectedObject)
         {
             return new TrackedHand(idPool.getNextUnusedID(), detectedObject, Parameters.HandTrackerNumFramesDetectedUntilTracked, Parameters.HandTrackerNumFramesLostUntilDeleted);

+ 3 - 3
bbiwarg/Recognition/HandRecognition/TrackedHand.cs

@@ -1,8 +1,8 @@
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using System;
 
-namespace bbiwarg.Recognition.HandRecognition
+namespace BBIWARG.Recognition.HandRecognition
 {
     /// <summary>
     /// Represents a hand that is tracked for several frames

+ 8 - 8
bbiwarg/Recognition/PalmRecognition/Palm.cs

@@ -1,9 +1,9 @@
-using bbiwarg.Recognition.HandRecognition;
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Recognition.HandRecognition;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using System;
 
-namespace bbiwarg.Recognition.PalmRecognition
+namespace BBIWARG.Recognition.PalmRecognition
 {
     /// <summary>
     /// The handedness of the palm.
@@ -26,7 +26,7 @@ namespace bbiwarg.Recognition.PalmRecognition
         public Vector2D FingersLower { get; private set; }
 
         /// <summary>
-        /// the position of the upper fingers (top right for left hand, top left for left hannd)
+        /// the position of the upper fingers (top right for left hand, top left for left hand)
         /// </summary>
         public Vector2D FingersUpper { get; private set; }
 
@@ -67,7 +67,7 @@ namespace bbiwarg.Recognition.PalmRecognition
         /// <param name="thumbDefect">The thumb defect.</param>
         /// <param name="handSide">The handedness.</param>
         /// <param name="wristUpper">The wrist upper position.</param>
-        /// <param name="fingersUpper">The fingers upper positition.</param>
+        /// <param name="fingersUpper">The fingers upper position.</param>
         /// <param name="fingersLower">The fingers lower position.</param>
         /// <param name="wristLower">The wrist lower position.</param>
         public Palm(Hand hand, ConvexityDefect thumbDefect, HandSide handSide, Vector2D wristUpper, Vector2D fingersUpper, Vector2D fingersLower, Vector2D wristLower)
@@ -86,7 +86,7 @@ namespace bbiwarg.Recognition.PalmRecognition
         }
 
         /// <summary>
-        /// Gets the relative position [0-1;0-1] from an absolue position.
+        /// Gets the relative position [0-1;0-1] from an absolute position.
         /// </summary>
         /// <param name="absolutePosition">the absolute position</param>
         /// <returns>the relative position</returns>
@@ -103,7 +103,7 @@ namespace bbiwarg.Recognition.PalmRecognition
         /// Checks if the position is inside the palm (with a tolerance)
         /// </summary>
         /// <param name="position">the absolute position</param>
-        /// <returns>wether the position is inside the palm</returns>
+        /// <returns>whether the position is inside the palm</returns>
         public bool isInside(Vector2D position)
         {
             return Quad.isInside(position, Parameters.PalmInsideTolerance);

+ 10 - 10
bbiwarg/Recognition/PalmRecognition/PalmDetector.cs

@@ -1,15 +1,15 @@
-using bbiwarg.Images;
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Recognition.HandRecognition;
-using bbiwarg.Utility;
+using BBIWARG.Images;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Recognition.HandRecognition;
+using BBIWARG.Utility;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
 
-namespace bbiwarg.Recognition.PalmRecognition
+namespace BBIWARG.Recognition.PalmRecognition
 {
     /// <summary>
     /// Detects palms by iterating over each hand, if the hand has exactly one finger (possible thumb) it calculates its convexity defects and checks if there is a convexity defect that matches the requirements for a thumb defect. If a thumb defect is found, the four palm points are generated and a new palm is created.
@@ -83,7 +83,7 @@ namespace bbiwarg.Recognition.PalmRecognition
         /// Gets the convexity Defects from a hand mask.
         /// </summary>
         /// <param name="hand">the hand</param>
-        /// <returns>the conveixty defects</returns>
+        /// <returns>the convexity defects</returns>
         private List<ConvexityDefect> findConvexityDefects(Hand hand)
         {
             List<ConvexityDefect> convexityDefects;
@@ -151,7 +151,7 @@ namespace bbiwarg.Recognition.PalmRecognition
         }
 
         /// <summary>
-        /// Gets the palm width by checking for the maximum orthogonal length withing the hand along multiple positions on the index finger (defect.inner<->defect.outerLong)
+        /// Gets the palm width by checking for the maximum orthogonal length within the hand along multiple positions on the index finger (defect.inner to defect.outerLong)
         /// </summary>
         /// <param name="hand">the hand</param>
         /// <param name="thumbDefect">the convexity defect of the thumb</param>
@@ -184,10 +184,10 @@ namespace bbiwarg.Recognition.PalmRecognition
         /// </summary>
         /// <param name="thumb">the possible thumb</param>
         /// <param name="convexityDefects">the convexity defects</param>
-        /// <returns></returns>
+        /// <returns>the thumb defect or null</returns>
         private ConvexityDefect findThumbDefect(Finger thumb, List<ConvexityDefect> convexityDefects)
         {
-            convexityDefects.Sort((cd1, cd2) => (cd2.Depth.CompareTo(cd1.Depth)));
+            convexityDefects.Sort((cd1, cd2) => cd2.Depth.CompareTo(cd1.Depth));
             foreach (ConvexityDefect defect in convexityDefects)
             {
                 if (defect.isPossibleThumbDefect(thumb))

+ 5 - 5
bbiwarg/Recognition/PalmRecognition/PalmTracker.cs

@@ -1,9 +1,9 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using System.Collections.Generic;
 
-namespace bbiwarg.Recognition.PalmRecognition
+namespace BBIWARG.Recognition.PalmRecognition
 {
     /// <summary>
     /// Keeps track of palms over a period of time.
@@ -39,7 +39,7 @@ namespace bbiwarg.Recognition.PalmRecognition
         /// <summary>
         /// Updates the tracked palms with the detected palms in the current frame and stores the (optimized) results in frameData.trackedPalms
         /// </summary>
-        /// <param name="frameData"></param>
+        /// <param name="frameData">the current frame</param>
         public void trackPalms(FrameData frameData)
         {
             trackObjects(frameData.DetectedPalms);

+ 7 - 7
bbiwarg/Recognition/PalmRecognition/TrackedPalm.cs

@@ -1,11 +1,11 @@
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using System;
 
-namespace bbiwarg.Recognition.PalmRecognition
+namespace BBIWARG.Recognition.PalmRecognition
 {
     /// <summary>
-    /// Represents a palm that ist tracked for several frames.
+    /// Represents a palm that is tracked for several frames.
     /// </summary>
     internal class TrackedPalm : TrackedObject<Palm>
     {
@@ -78,9 +78,9 @@ namespace bbiwarg.Recognition.PalmRecognition
         }
 
         /// <summary>
-        /// Updates the tracked palm with the given palm, logs the statechange, updates the palm point predictions and the optimized palm.
+        /// Updates the tracked palm with the given palm, logs the state change, updates the palm point predictions and the optimized palm.
         /// </summary>
-        /// <param name="detectedPalm"></param>
+        /// <param name="detectedPalm">the detected palm</param>
         public override void updateFrame(Palm detectedPalm)
         {
             base.updateFrame(detectedPalm);
@@ -111,7 +111,7 @@ namespace bbiwarg.Recognition.PalmRecognition
         /// <summary>
         /// Updates the optimized palm by creating a new palm with the predicted palm points
         /// </summary>
-        /// <param name="detectedPalm"></param>
+        /// <param name="detectedPalm">the detected palm</param>
         private void updateOptimizedPalm(Palm detectedPalm)
         {
             OptimizedPalm = new Palm(detectedPalm.Hand, detectedPalm.ThumbDefect, detectedPalm.HandSide, WristUpperPrediction, FingersUpperPrediction, FingersLowerPrediction, WristLowerPrediction);

+ 6 - 6
bbiwarg/Recognition/TouchRecognition/Touch.cs

@@ -1,12 +1,12 @@
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Recognition.PalmRecognition;
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Recognition.PalmRecognition;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 
-namespace bbiwarg.Recognition.TouchRecognition
+namespace BBIWARG.Recognition.TouchRecognition
 {
     /// <summary>
-    /// Represents a touch (Finger<->Palm)
+    /// Represents a touch (Finger touching a Palm)
     /// </summary>
     public class Touch : TrackableObject
     {

+ 6 - 6
bbiwarg/Recognition/TouchRecognition/TouchDetector.cs

@@ -1,15 +1,15 @@
-using bbiwarg.Images;
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.FingerRecognition;
-using bbiwarg.Recognition.PalmRecognition;
-using bbiwarg.Utility;
+using BBIWARG.Images;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.FingerRecognition;
+using BBIWARG.Recognition.PalmRecognition;
+using BBIWARG.Utility;
 using Emgu.CV;
 using Emgu.CV.Structure;
 using System;
 using System.Collections.Generic;
 using System.Drawing;
 
-namespace bbiwarg.Recognition.TouchRecognition
+namespace BBIWARG.Recognition.TouchRecognition
 {
     /// <summary>
     /// Detects touches by flood filling around a small area around each finger tip and counting the number of affected pixels. If the finger is touching or slightly hovering above something, the flood fill spreads into the touched object and the number of affected pixels is higher.

+ 2 - 2
bbiwarg/Recognition/TouchRecognition/TouchEvent.cs

@@ -1,4 +1,4 @@
-namespace bbiwarg.Recognition.TouchRecognition
+namespace BBIWARG.Recognition.TouchRecognition
 {
     /// <summary>
     /// The type of the touch event.
@@ -11,7 +11,7 @@
     }
 
     /// <summary>
-    /// Represents a touch event (typ+touch)
+    /// Represents a touch event (type+touch)
     /// </summary>
     public class TouchEvent
     {

+ 16 - 7
bbiwarg/Recognition/TouchRecognition/TouchTracker.cs

@@ -1,9 +1,9 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using System.Collections.Generic;
 
-namespace bbiwarg.Recognition.TouchRecognition
+namespace BBIWARG.Recognition.TouchRecognition
 {
     /// <summary>
     /// Keeps track of touches over a period of time and generates touch events
@@ -36,6 +36,10 @@ namespace bbiwarg.Recognition.TouchRecognition
             return (trackedTouch.FingerID == detectedTouch.Finger.TrackID) ? 1 : 0;
         }
 
+        /// <summary>
+        /// Gets all accumulated TouchEvents since the last flush.
+        /// </summary>
+        /// <returns>all accumulated touchEvents</returns>
         public List<TouchEvent> flushTouchEvents()
         {
             List<TouchEvent> flushedTouchEvents = touchEvents;
@@ -46,7 +50,7 @@ namespace bbiwarg.Recognition.TouchRecognition
         /// <summary>
         /// Updates the tracked touches, and stores the (optimized) touches in frameData.trackedTouches and the touch events in frameData.touchEvents.
         /// </summary>
-        /// <param name="frameData"></param>
+        /// <param name="frameData">the current frame</param>
         public void trackTouches(FrameData frameData)
         {
             trackObjects(frameData.DetectedTouches);
@@ -62,7 +66,7 @@ namespace bbiwarg.Recognition.TouchRecognition
         protected override TrackedTouch createTrackedObject(Touch detectedObject)
         {
             TrackedTouch tt = new TrackedTouch(idPool.getNextUnusedID(), detectedObject, Parameters.TouchTrackerNumFramesDetectedUntilTracked, Parameters.TouchTrackerNumFramesLostUntilDeleted);
-            tt.TouchEvent += touchEvent;
+            tt.TouchEvent += handleTouchEvent;
             return tt;
         }
 
@@ -81,7 +85,12 @@ namespace bbiwarg.Recognition.TouchRecognition
             return optimizedTouchs;
         }
 
-        private void touchEvent(object sender, TouchEvent e)
+        /// <summary>
+        /// Handles a new TouchEvent
+        /// </summary>
+        /// <param name="sender">the sender of the event</param>
+        /// <param name="e">the touch event</param>
+        private void handleTouchEvent(object sender, TouchEvent e)
         {
             touchEvents.Add(e);
         }

+ 4 - 4
bbiwarg/Recognition/TouchRecognition/TrackedTouch.cs

@@ -1,8 +1,8 @@
-using bbiwarg.Recognition.Tracking;
-using bbiwarg.Utility;
+using BBIWARG.Recognition.Tracking;
+using BBIWARG.Utility;
 using System;
 
-namespace bbiwarg.Recognition.TouchRecognition
+namespace BBIWARG.Recognition.TouchRecognition
 {
     /// <summary>
     /// signature of the touchEvent event
@@ -66,7 +66,7 @@ namespace bbiwarg.Recognition.TouchRecognition
         }
 
         /// <summary>
-        /// Updates the tracked touch, logs the state change, updates the optimized touch and the absolute position predicton and triggers touch events.
+        /// Updates the tracked touch, logs the state change, updates the optimized touch and the absolute position prediction and triggers touch events.
         /// </summary>
         /// <param name="detectedTouch">the detected touch</param>
         public override void updateFrame(Touch detectedTouch)

+ 1 - 1
bbiwarg/Recognition/Tracking/Similarity.cs

@@ -1,4 +1,4 @@
-namespace bbiwarg.Recognition.Tracking
+namespace BBIWARG.Recognition.Tracking
 {
     /// <summary>
     /// Encapsulates the similarity between a TrackedObject and a TrackableObject.

+ 1 - 1
bbiwarg/Recognition/Tracking/TrackIDPool.cs

@@ -1,6 +1,6 @@
 using System.Collections.Generic;
 
-namespace bbiwarg.Recognition.Tracking
+namespace BBIWARG.Recognition.Tracking
 {
     /// <summary>
     /// Generates unique IDs and keeps track of the currently used IDs.

+ 1 - 1
bbiwarg/Recognition/Tracking/TrackableObject.cs

@@ -1,4 +1,4 @@
-namespace bbiwarg.Recognition.Tracking
+namespace BBIWARG.Recognition.Tracking
 {
     /// <summary>
     /// A object that can be identified via a unique ID.

+ 3 - 3
bbiwarg/Recognition/Tracking/TrackedObject.cs

@@ -1,4 +1,4 @@
-namespace bbiwarg.Recognition.Tracking
+namespace BBIWARG.Recognition.Tracking
 {
     /// <summary>
     /// The possible tracking state values
@@ -13,7 +13,7 @@
     }
 
     /// <summary>
-    /// A tracked object is identified by severall TrackableObjects in different frames that have a high similiarity value and are considered to represent the same object over time.
+    /// A tracked object is identified by several TrackableObjects in different frames that have a high similarity value and are considered to represent the same object over time.
     /// </summary>
     /// <typeparam name="T">The type of the trackable object</typeparam>
     public abstract class TrackedObject<T> where T : TrackableObject
@@ -29,7 +29,7 @@
         private int numFramesLostUntilDeleted;
 
         /// <summary>
-        /// indicates wether the object has been tracked before
+        /// indicates whether the object has been tracked before
         /// </summary>
         private bool wasTrackedBefore;
 

+ 4 - 4
bbiwarg/Recognition/Tracking/Tracker.cs

@@ -1,8 +1,8 @@
-using bbiwarg.Utility;
+using BBIWARG.Utility;
 using System;
 using System.Collections.Generic;
 
-namespace bbiwarg.Recognition.Tracking
+namespace BBIWARG.Recognition.Tracking
 {
     /// <summary>
     /// Tracks multiple trackableObjects
@@ -48,7 +48,7 @@ namespace bbiwarg.Recognition.Tracking
         /// </summary>
         /// <param name="trackedObject">the tracked object</param>
         /// <param name="detectedObject">the detected trackable object</param>
-        /// <returns>the smiliarity [0-1]</returns>
+        /// <returns>the similarity [0-1]</returns>
         public abstract float calculateSimilarity(TrackedT trackedObject, T detectedObject);
 
         /// <summary>
@@ -88,7 +88,7 @@ namespace bbiwarg.Recognition.Tracking
         /// </summary>
         /// <param name="p1">the first position</param>
         /// <param name="p2">the second position</param>
-        /// <param name="maxRelativeDistance">the maximum distance [0-1] relative to the image size (maxAbsoluteDistance = maxRelativeDistance*imageSize.DiagonalLenght)</param>
+        /// <param name="maxRelativeDistance">the maximum distance [0-1] relative to the image size (maxAbsoluteDistance = maxRelativeDistance*imageSize.DiagonalLength)</param>
         /// <returns>the calculated similarity between the two positions</returns>
         protected float getPositionSimilarity(Vector2D p1, Vector2D p2, float maxRelativeDistance)
         {

+ 136 - 1
bbiwarg/Settings.StyleCop

@@ -1 +1,136 @@
-<StyleCopSettings Version="105" />
+<StyleCopSettings Version="105">
+  <GlobalSettings>
+    <CollectionProperty Name="RecognizedWords">
+      <Value>emgu</Value>
+      <Value>homography</Value>
+      <Value>iff</Value>
+      <Value>iisu</Value>
+      <Value>ip</Value>
+      <Value>kalman</Value>
+      <Value>tag</Value>
+      <Value>thresholding</Value>
+      <Value>trackable</Value>
+      <Value>tuio</Value>
+      <Value>xx</Value>
+      <Value>xy</Value>
+      <Value>yx</Value>
+      <Value>yy</Value>
+    </CollectionProperty>
+  </GlobalSettings>
+  <Analyzers>
+    <Analyzer AnalyzerId="StyleCop.CSharp.DocumentationRules">
+      <Rules>
+        <Rule Name="EnumerationItemsMustBeDocumented">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PropertySummaryDocumentationMustMatchAccessors">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ConstructorSummaryDocumentationMustBeginWithStandardText">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="FileMustHaveHeader">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.LayoutRules">
+      <Rules>
+        <Rule Name="ElementMustNotBeOnSingleLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="CurlyBracketsMustNotBeOmitted">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ClosingCurlyBracketMustBeFollowedByBlankLine">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.MaintainabilityRules">
+      <Rules>
+        <Rule Name="FieldsMustBePrivate">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ArithmeticExpressionsMustDeclarePrecedence">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.OrderingRules">
+      <Rules>
+        <Rule Name="UsingDirectivesMustBePlacedWithinNamespace">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="ElementsMustAppearInTheCorrectOrder">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.ReadabilityRules">
+      <Rules>
+        <Rule Name="PrefixLocalCallsWithThis">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="PrefixCallsCorrectly">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+        <Rule Name="UseBuiltInTypeAlias">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings />
+    </Analyzer>
+    <Analyzer AnalyzerId="StyleCop.CSharp.NamingRules">
+      <Rules>
+        <Rule Name="ElementMustBeginWithUpperCaseLetter">
+          <RuleSettings>
+            <BooleanProperty Name="Enabled">False</BooleanProperty>
+          </RuleSettings>
+        </Rule>
+      </Rules>
+      <AnalyzerSettings>
+        <CollectionProperty Name="Hungarian">
+          <Value>ip</Value>
+        </CollectionProperty>
+      </AnalyzerSettings>
+    </Analyzer>
+  </Analyzers>
+</StyleCopSettings>

File diff suppressed because it is too large
+ 495 - 642
bbiwarg/StyleCop.Cache


+ 2 - 2
bbiwarg/TUIO/OSC.NET/OSCMessage.cs

@@ -15,8 +15,8 @@ namespace OSC.NET
         protected const char STRING = 's';
         protected const char SYMBOL = 'S';
 
-        //protected const char BLOB	  = 'b';
-        //protected const char ALL     = '*';
+        // protected const char BLOB	  = 'b';
+        // protected const char ALL     = '*';
 
         protected string typeTag;
 

+ 2 - 3
bbiwarg/TUIO/TUIO/TuioServer.cs

@@ -1,9 +1,8 @@
-//using Ventuz.OSC;
-using OSC.NET;
+using OSC.NET;
 using System;
 using System.Collections.Generic;
 
-//using System.Runtime.InteropServices;
+// using System.Runtime.InteropServices;
 
 namespace TUIO
 {

+ 7 - 7
bbiwarg/TUIO/TuioCommunicator.cs

@@ -1,7 +1,7 @@
-using bbiwarg.Input.InputHandling;
-using bbiwarg.Recognition.PalmRecognition;
-using bbiwarg.Recognition.TouchRecognition;
-using bbiwarg.Utility;
+using BBIWARG.Input.InputHandling;
+using BBIWARG.Recognition.PalmRecognition;
+using BBIWARG.Recognition.TouchRecognition;
+using BBIWARG.Utility;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -9,7 +9,7 @@ using System.Net;
 using System.Net.Sockets;
 using TUIO;
 
-namespace bbiwarg.TUIO
+namespace BBIWARG.TUIO
 {
     /// <summary>
     /// TuioCommunicator sends generated touch events and palm grid coordinates to tuio clients using a <see cref="TuioServer"/>.
@@ -52,7 +52,7 @@ namespace bbiwarg.TUIO
         public static bool tryParseIPAddress(String ipIn, out String ipOut)
         {
             IPAddress ipAddress;
-            bool result = (IPAddress.TryParse(ipIn, out ipAddress) && ipAddress.AddressFamily == AddressFamily.InterNetwork);
+            bool result = IPAddress.TryParse(ipIn, out ipAddress) && ipAddress.AddressFamily == AddressFamily.InterNetwork;
             if (result)
                 ipOut = ipAddress.ToString();
             else
@@ -64,7 +64,7 @@ namespace bbiwarg.TUIO
         /// Tries to parse a port string.
         /// </summary>
         /// <param name="portIn">the port string to parse</param>
-        /// <param name="portOut">out parameter for the port as an Int16 if portIn is valid and undefined otherwise</param>
+        /// <param name="portOut">out parameter for the port if portIn is valid and undefined otherwise</param>
         /// <returns>true iff portIn is a valid port</returns>
         public static bool tryParsePort(String portIn, out Int16 portOut)
         {

+ 5 - 5
bbiwarg/Utility/ConvexityDefect.cs

@@ -1,7 +1,7 @@
-using bbiwarg.Recognition.FingerRecognition;
+using BBIWARG.Recognition.FingerRecognition;
 using Emgu.CV.Structure;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Stores data about and provides functions to work with convexity defects.
@@ -77,7 +77,7 @@ namespace bbiwarg.Utility
         /// <returns>true iff this defect is caused by finger</returns>
         public bool isCausedByFinger(Finger finger)
         {
-            return (OuterLineSegment.intersectsWith(finger.LineSegment));
+            return OuterLineSegment.intersectsWith(finger.LineSegment);
         }
 
         /// <summary>
@@ -92,10 +92,10 @@ namespace bbiwarg.Utility
             float thumbShortLengthRatio = thumb.LineSegment.Length / VectorShort.Length;
             float shortLongLengthRatio = VectorShort.Length / VectorLong.Length;
 
-            return (tipDistance <= Parameters.HandThumbDefectMaxDistanceToThumb &&
+            return tipDistance <= Parameters.HandThumbDefectMaxDistanceToThumb &&
                     handDistance <= Parameters.HandThumbDefectMaxDistanceToThumb &&
                     thumbShortLengthRatio <= Parameters.HandThumbDefectMaxThumbShortLengthRatio && thumbShortLengthRatio >= Parameters.HandThumbDefectMinThumbShortLengthRatio &&
-                    shortLongLengthRatio <= Parameters.HandThumbDefectMaxShortLongLengthRatio && shortLongLengthRatio >= Parameters.HandThumbDefectMinShortLongLengthRatio);
+                    shortLongLengthRatio <= Parameters.HandThumbDefectMaxShortLongLengthRatio && shortLongLengthRatio >= Parameters.HandThumbDefectMinShortLongLengthRatio;
         }
     }
 }

+ 9 - 9
bbiwarg/Utility/CoordinateConverter.cs

@@ -1,6 +1,6 @@
 using System;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Converts between 2d and 3d coordinates.
@@ -23,12 +23,12 @@ namespace bbiwarg.Utility
         private ImageSize imageSize;
 
         /// <summary>
-        /// tangens of fieldOfViewHorizontal / 2
+        /// horizontal ratio relative to depth
         /// </summary>
         private float relativeRatioHorizontal;
 
         /// <summary>
-        /// tanges of fieldOfViewVertical / 2
+        /// vertical ratio relative to depth
         /// </summary>
         private float relativeRatioVertical;
 
@@ -63,7 +63,7 @@ namespace bbiwarg.Utility
         /// Converts a position with a depth to a 3d position.
         /// </summary>
         /// <param name="x">x coordinate of the position</param>
-        /// <param name="y">y cooridnate of the position</param>
+        /// <param name="y">y coordinate of the position</param>
         /// <param name="depth">the depth</param>
         /// <returns>the 3d position</returns>
         public Vector3D convertCoordinate2Dto3D(float x, float y, float depth)
@@ -77,7 +77,7 @@ namespace bbiwarg.Utility
             float a = depth * depth;
             float b = (float)(Math.Pow(tanX, 2) + Math.Pow(tanY, 2));
 
-            float z3 = (float)(Math.Sqrt(0.5f * a + Math.Sqrt(0.25f * Math.Pow(a, 2) - b)));
+            float z3 = (float)Math.Sqrt(0.5f * a + Math.Sqrt(0.25f * Math.Pow(a, 2) - b));
             float x3 = tanX * z3;
             float y3 = tanY * z3;
 
@@ -85,11 +85,11 @@ namespace bbiwarg.Utility
         }
 
         /// <summary>
-        /// Converts the length of a 3d linesegment parallel to the camera at the given depth to the length of the linesegment in 2d.
+        /// Converts the length of a 3d line segment parallel to the camera at the given depth to the length of the line segment in 2d.
         /// </summary>
-        /// <param name="length">3d length of the linesegment</param>
-        /// <param name="depth">depth of the linesegment</param>
-        /// <returns>2d length of the linesegment</returns>
+        /// <param name="length">3d length of the line segment</param>
+        /// <param name="depth">depth of the line segment</param>
+        /// <returns>2d length of the line segment</returns>
         public float convertLength3Dto2D(float length, float depth)
         {
             float fullLengthX = (float)(2 * Math.Cos(fieldOfViewHorizontal / 2) * depth);

+ 3 - 3
bbiwarg/Utility/ImageSize.cs

@@ -1,4 +1,4 @@
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Manages the size of a image.
@@ -45,7 +45,7 @@
         /// <summary>
         /// Computes an absolute point in the image.
         /// </summary>
-        /// <param name="relativePoint">realtive point (x and y in [0,1])</param>
+        /// <param name="relativePoint">relative point (x and y in [0,1])</param>
         /// <returns>absolute point</returns>
         public Vector2D getAbsolutePoint(Vector2D relativePoint)
         {
@@ -56,7 +56,7 @@
         /// Computes a relative point in the image.
         /// </summary>
         /// <param name="absolutePoint">absolute point in the image</param>
-        /// <returns>realtive point (x and y in [0,1])</returns>
+        /// <returns>relative point (x and y in [0,1])</returns>
         public Vector2D getRelativePoint(Vector2D absolutePoint)
         {
             return new Vector2D(absolutePoint.X / Width, absolutePoint.Y / Height);

+ 9 - 15
bbiwarg/Utility/Kalman2DPositionFilter.cs

@@ -1,7 +1,7 @@
 using Emgu.CV;
 using Emgu.CV.Structure;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Filter used to smooth a series of 2d positions.
@@ -43,13 +43,6 @@ namespace bbiwarg.Utility
         /// </summary>
         public bool Initialized { get; private set; }
 
-        // state: x, y, v_x, v_y
-        //   x: current x position
-        //   y: current y position
-        // v_x: velocity in x direction
-        // v_y: velocity in y direction
-        // a_x: acceleration in x direction
-        // a_y: acceleration in y direction
         /// <summary>
         /// Creates a Kalman2DPositionFilter.
         /// </summary>
@@ -75,9 +68,7 @@ namespace bbiwarg.Utility
         /// <returns>the smoothed position</returns>
         public Vector2D getCorrectedPosition(Vector2D rawPosition)
         {
-            Matrix<float> rawPositionMatrix = new Matrix<float>(new float[,]
-            { {rawPosition.X},
-              {rawPosition.Y}});
+            Matrix<float> rawPositionMatrix = new Matrix<float>(new float[,] { { rawPosition.X }, { rawPosition.Y } });
 
             // prediction according to model
             kalman.Predict();
@@ -110,14 +101,17 @@ namespace bbiwarg.Utility
 
             // transition matrix
             Matrix<float> transitionMatrix = new Matrix<float>(new float[,]
-            { {1.0f, 0.0f},
-              {0.0f, 1.0f}});
+            {
+                { 1.0f, 0.0f },
+                { 0.0f, 1.0f }
+            });
             kalman.TransitionMatrix = transitionMatrix;
 
             // measurement matrix
             Matrix<float> measurementMatrix = new Matrix<float>(new float[,]
-            { {1.0f, 0.0f}, // first measurement = x
-              {0.0f, 1.0f}  // second measurement = y
+            {
+                { 1.0f, 0.0f }, // first measurement = x
+                { 0.0f, 1.0f }  // second measurement = y
             });
             kalman.MeasurementMatrix = measurementMatrix;
 

+ 9 - 9
bbiwarg/Utility/Line2D.cs

@@ -1,6 +1,6 @@
 using System;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Values for describing if something is on, above or below a line.
@@ -30,8 +30,8 @@ namespace bbiwarg.Utility
         /// <summary>
         /// Standard constructor which sets the essential attributes.
         /// </summary>
-        /// <param name="pointOnLine"><see cref="PointOnLine"/></param>
-        /// <param name="direction"><see cref="Direction"/></param>
+        /// <param name="pointOnLine">a point on the line</param>
+        /// <param name="direction">the direction of the line</param>
         public Line2D(Vector2D pointOnLine, Vector2D direction)
         {
             PointOnLine = pointOnLine;
@@ -78,9 +78,9 @@ namespace bbiwarg.Utility
         /// <returns>LineSide.above iff point is above this, LineSide.below iff point is below this, LineSide.onLine iff point is on this line</returns>
         public LineSide onSide(Vector2D point)
         {
-            float yPerX = Direction.Y / Direction.X;
-            float xDiff = point.X - PointOnLine.X;
-            float newY = PointOnLine.Y + yPerX * xDiff;
+            float ratio = Direction.Y / Direction.X;
+            float horizontalDifference = point.X - PointOnLine.X;
+            float newY = PointOnLine.Y + ratio * horizontalDifference;
             if (newY < point.Y) return LineSide.above;
             else if (newY > point.Y) return LineSide.below;
             else return LineSide.onLine;
@@ -90,15 +90,15 @@ namespace bbiwarg.Utility
         /// Projects a point on this line.
         /// </summary>
         /// <param name="point">point which is projected</param>
-        /// <returns>th point on the line with minimal distance to input point</returns>
+        /// <returns>the point on the line with minimal distance to input point</returns>
         public Vector2D projectToLine(Vector2D point)
         {
             float px = point.X, py = point.Y, dx = Direction.X, dy = Direction.Y, ox = PointOnLine.X, oy = PointOnLine.Y;
             float diffx = px - ox;
             float diffy = py - oy;
 
-            float diff_d = (diffx * dx + diffy * dy);
-            float d_d = (dx * dx + dy * dy);
+            float diff_d = diffx * dx + diffy * dy;
+            float d_d = dx * dx + dy * dy;
             float q = diff_d / d_d;
 
             float newX = ox + q * dx;

+ 10 - 4
bbiwarg/Utility/LineSegment2D.cs

@@ -1,6 +1,6 @@
 using System;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Class to represent a segment of a line, a line between two points.
@@ -33,13 +33,13 @@ namespace bbiwarg.Utility
         public Vector2D P2 { get; private set; }
 
         /// <summary>
-        /// Standard contructor which sets the essential attributes.
+        /// Standard constructor which sets the essential attributes.
         /// </summary>
         /// <param name="p1">first point of LineSegment<see cref="P1"/></param>
         /// <param name="p2">second point of LineSegment<see cref="P2"/></param>
         public LineSegment2D(Vector2D p1, Vector2D p2)
         {
-            //endpoints
+            // endpoints
             P1 = p1;
             P2 = p2;
 
@@ -115,9 +115,15 @@ namespace bbiwarg.Utility
         public bool intersectsWith(LineSegment2D ls)
         {
             Vector2D intersection = Line.getIntersection(ls.Line);
-            return (intersection != null && intersection.isInBox(P1, P2) && intersection.isInBox(ls.P1, ls.P2));
+            return intersection != null && intersection.isInBox(P1, P2) && intersection.isInBox(ls.P1, ls.P2);
         }
 
+        /// <summary>
+        /// Returns a <see cref="System.String" /> that represents this instance.
+        /// </summary>
+        /// <returns>
+        /// A <see cref="System.String" /> that represents this instance.
+        /// </returns>
         public override string ToString()
         {
             return (int)P1.X + "|" + (int)P1.Y + " --- " + (int)P2.X + "|" + (int)P2.Y;

+ 1 - 1
bbiwarg/Utility/Logger.cs

@@ -1,6 +1,6 @@
 using System;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// flags describing the different log subjects

+ 1 - 1
bbiwarg/Utility/Projection2DTo2D.cs

@@ -4,7 +4,7 @@ using System.Collections.Generic;
 using System.Drawing;
 using System.Text;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Computes and stores a homography matrix and provides functions to export it and project points.

+ 8 - 8
bbiwarg/Utility/Quadrangle.cs

@@ -1,9 +1,9 @@
 using System;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
-    /// Class to represent a quadrangle in 2 dimensions, a quagrangle is a geomatric shape composed of 4 arbitrary points.
+    /// Class to represent a quadrangle in 2 dimensions, a quadrangle is a geometric shape composed of 4 arbitrary points.
     /// </summary>
     public class Quadrangle
     {
@@ -18,7 +18,7 @@ namespace bbiwarg.Utility
         public Vector2D BottomRight { get; private set; }
 
         /// <summary>
-        /// all 4 points of the quadrangle in clockwise order, begining at the top left corner
+        /// all 4 points of the quadrangle in clockwise order, beginning at the top left corner
         /// </summary>
         public Vector2D[] Corners { get { return new Vector2D[4] { TopLeft, TopRight, BottomRight, BottomLeft }; } }
 
@@ -61,13 +61,13 @@ namespace bbiwarg.Utility
             c = BottomRight;
             d = BottomLeft;
 
-            float C = (a.Y - p.Y) * (d.X - p.X) - (a.X - p.X) * (d.Y - p.Y);
-            float B = (a.Y - p.Y) * (c.X - d.X) + (b.Y - a.Y) * (d.X - p.X) - (a.X - p.X) * (c.Y - d.Y) - (b.X - a.X) * (d.Y - p.Y);
-            float A = (b.Y - a.Y) * (c.X - d.X) - (b.X - a.X) * (c.Y - d.Y);
+            float vc = (a.Y - p.Y) * (d.X - p.X) - (a.X - p.X) * (d.Y - p.Y);
+            float vb = (a.Y - p.Y) * (c.X - d.X) + (b.Y - a.Y) * (d.X - p.X) - (a.X - p.X) * (c.Y - d.Y) - (b.X - a.X) * (d.Y - p.Y);
+            float va = (b.Y - a.Y) * (c.X - d.X) - (b.X - a.X) * (c.Y - d.Y);
 
-            float D = B * B - 4 * A * C;
+            float vd = vb * vb - 4 * va * vc;
 
-            float u = (-B - (float)Math.Sqrt(D)) / (2 * A);
+            float u = (-vb - (float)Math.Sqrt(vd)) / (2 * va);
 
             float p1x = a.X + (b.X - a.X) * u;
             float p2x = d.X + (c.X - d.X) * u;

+ 1 - 1
bbiwarg/Utility/Timer.cs

@@ -3,7 +3,7 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Text;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Stores and prints timing information for different code sections.

+ 19 - 11
bbiwarg/Utility/Vector2D.cs

@@ -2,7 +2,7 @@
 using System.Collections.Generic;
 using System.Drawing;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Class with represents a vector or a point in 2 dimensional space.
@@ -32,7 +32,15 @@ namespace bbiwarg.Utility
         /// <summary>
         /// length of the vector, computed in euclidean distance (2. norm)
         /// </summary>
-        public float Length { get { if (length == -1) length = (float)Math.Sqrt(X * X + Y * Y); return length; } }
+        public float Length
+        {
+            get
+            {
+                if (length == -1)
+                    length = (float)Math.Sqrt(X * X + Y * Y);
+                return length;
+            }
+        }
 
         /// <summary>
         /// X (first) component
@@ -120,8 +128,8 @@ namespace bbiwarg.Utility
         /// <summary>
         /// Multiplies this vector component-by-component with a scalar value.
         /// </summary>
-        /// <param name="scalar">multiplier</param>
-        /// <param name="vector">multiplicant</param>
+        /// <param name="scalar">the multiplier</param>
+        /// <param name="vector">the multiplicand</param>
         /// <returns>multiplied vector (product)</returns>
         public static Vector2D operator *(float scalar, Vector2D vector)
         {
@@ -131,8 +139,8 @@ namespace bbiwarg.Utility
         /// <summary>
         /// Multiplies this vector component-by-component with a scalar value.
         /// </summary>
-        /// <param name="vector">multiplicant</param>
-        /// <param name="scalar">multiplier</param>
+        /// <param name="vector">the multiplicand</param>
+        /// <param name="scalar">the multiplier</param>
         /// <returns>multiplied vector (product)</returns>
         public static Vector2D operator *(Vector2D vector, float scalar)
         {
@@ -176,7 +184,7 @@ namespace bbiwarg.Utility
         /// Sums a list of vectors (component-by-component).
         /// </summary>
         /// <param name="vectors">a list of vectors</param>
-        /// <returns>vector of sumed components</returns>
+        /// <returns>vector of summed components</returns>
         public static Vector2D sum(List<Vector2D> vectors)
         {
             Vector2D sumVector = new Vector2D(0, 0);
@@ -284,7 +292,7 @@ namespace bbiwarg.Utility
         /// <returns>true iff point is in box</returns>
         public bool isInBound(Vector2D topLeft, Vector2D bottomRight)
         {
-            return (X >= topLeft.X && X <= bottomRight.X && Y >= topLeft.Y && Y <= bottomRight.Y);
+            return X >= topLeft.X && X <= bottomRight.X && Y >= topLeft.Y && Y <= bottomRight.Y;
         }
 
         /// <summary>
@@ -299,7 +307,7 @@ namespace bbiwarg.Utility
             float maxX = Math.Max(corner1.X, corner2.X);
             float minY = Math.Min(corner1.Y, corner2.Y);
             float maxY = Math.Max(corner1.Y, corner2.Y);
-            return (minX <= X && X <= maxX && minY <= Y && Y <= maxY);
+            return minX <= X && X <= maxX && minY <= Y && Y <= maxY;
         }
 
         /// <summary>
@@ -309,13 +317,13 @@ namespace bbiwarg.Utility
         /// <returns>true iff the vectors point in opposite directions</returns>
         public bool isInOppositeDirection(Vector2D vector)
         {
-            return (getAngleBetween(vector) > Math.PI / 2);
+            return getAngleBetween(vector) > (Math.PI / 2);
         }
 
         /// <summary>
         /// Moves this vector along the direction vector factor times inside the imageSize, this point won't leave the image.
         /// </summary>
-        /// <param name="imageSize">the imagesize</param>
+        /// <param name="imageSize">the size of the image</param>
         /// <param name="direction">the move direction</param>
         /// <param name="factor">the move factor</param>
         /// <returns>a point inside the image</returns>

+ 1 - 1
bbiwarg/Utility/Vector3D.cs

@@ -1,6 +1,6 @@
 using System;
 
-namespace bbiwarg.Utility
+namespace BBIWARG.Utility
 {
     /// <summary>
     /// Class with represents a vector or a point in 3 dimensional space.

+ 38 - 12
bbiwarg/bbiwarg.csproj

@@ -7,7 +7,7 @@
     <ProjectGuid>{12271049-82D6-436D-A51E-E6614C8E9C50}</ProjectGuid>
     <OutputType>Exe</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>bbiwarg</RootNamespace>
+    <RootNamespace>BBIWARG</RootNamespace>
     <AssemblyName>bbiwarg</AssemblyName>
     <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
@@ -49,7 +49,7 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
   </PropertyGroup>
   <PropertyGroup>
-    <StartupObject>bbiwarg.BBIWARG</StartupObject>
+    <StartupObject>BBIWARG.BBIWARG</StartupObject>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Emgu.CV, Version=2.4.2.1777, Culture=neutral, PublicKeyToken=7281126722ab4438, processorArchitecture=MSIL">
@@ -83,13 +83,18 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Input\InputHandling\NewProcessedFrameEventArgs.cs" />
+    <Compile Include="Input\InputProviding\NewFrameEventArgs.cs" />
     <Compile Include="Output\GlassesOutput\GlassesWindow.cs">
       <SubType>Form</SubType>
     </Compile>
     <Compile Include="Output\GlassesOutput\GlassesWindow.Designer.cs">
       <DependentUpon>GlassesWindow.cs</DependentUpon>
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="TUIO\TUIO\TuioObject.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
     </Compile>
-    <Compile Include="TUIO\TUIO\TuioObject.cs" />
     <Compile Include="Utility\CoordinateConverter.cs" />
     <Compile Include="Utility\ImageSize.cs" />
     <Compile Include="Input\InputHandling\FrameData.cs" />
@@ -99,6 +104,7 @@
     </Compile>
     <Compile Include="Output\DebugOutput\DebugWindow.Designer.cs">
       <DependentUpon>DebugWindow.cs</DependentUpon>
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
     </Compile>
     <Compile Include="Recognition\TouchRecognition\TouchEvent.cs" />
     <Compile Include="Utility\Projection2DTo2D.cs" />
@@ -136,16 +142,34 @@
     <Compile Include="Recognition\Tracking\TrackedObject.cs" />
     <Compile Include="Recognition\Tracking\Tracker.cs" />
     <Compile Include="Recognition\Tracking\TrackIDPool.cs" />
-    <Compile Include="TUIO\OSC.NET\OSCBundle.cs" />
-    <Compile Include="TUIO\OSC.NET\OSCMessage.cs" />
-    <Compile Include="TUIO\OSC.NET\OSCPacket.cs" />
-    <Compile Include="TUIO\OSC.NET\OSCTransmitter.cs" />
+    <Compile Include="TUIO\OSC.NET\OSCBundle.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="TUIO\OSC.NET\OSCMessage.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="TUIO\OSC.NET\OSCPacket.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="TUIO\OSC.NET\OSCTransmitter.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="TUIO\TuioCommunicator.cs" />
-    <Compile Include="TUIO\TUIO\TuioContainer.cs" />
-    <Compile Include="TUIO\TUIO\TuioCursor.cs" />
-    <Compile Include="TUIO\TUIO\TuioPoint.cs" />
-    <Compile Include="TUIO\TUIO\TuioServer.cs" />
-    <Compile Include="TUIO\TUIO\TuioTime.cs" />
+    <Compile Include="TUIO\TUIO\TuioContainer.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="TUIO\TUIO\TuioCursor.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="TUIO\TUIO\TuioPoint.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="TUIO\TUIO\TuioServer.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
+    <Compile Include="TUIO\TUIO\TuioTime.cs">
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
+    </Compile>
     <Compile Include="Utility\ConvexityDefect.cs" />
     <Compile Include="Utility\Kalman2DPositionFilter.cs" />
     <Compile Include="Utility\Line2D.cs" />
@@ -193,9 +217,11 @@
   <ItemGroup>
     <EmbeddedResource Include="Output\DebugOutput\DebugWindow.resx">
       <DependentUpon>DebugWindow.cs</DependentUpon>
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
     </EmbeddedResource>
     <EmbeddedResource Include="Output\GlassesOutput\GlassesWindow.resx">
       <DependentUpon>GlassesWindow.cs</DependentUpon>
+      <ExcludeFromStyleCop>True</ExcludeFromStyleCop>
     </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>

Some files were not shown because too many files changed in this diff