Tuesday, April 19, 2011

Clustering Settings

There are some settings in the class CCT.NUI.Core.Clustering.ClusterDataSourceSettings that you might have to adjust to your needs:
  • ClusterCount
    Maximum number of clusters. This should be as low as possible (Default is 2 ~ two hands)
  • LowerBorder
    Number of rows (in pixels) on the lower border that are not processed. My kinect is on my desk and usually I have stuff on it that gets in the way on the bottom part of the image. You can set it to 0 if you want to process the full y range
  • PointModulo
    Clustering gets more expensive the more points there are to distribute. This setting lets you configure to use less points (default is 5, this means only every 25th point is used: x and y coordinates % 5 == 0)
  •  MinimumDepthThreshold
    Only points farther than this are used in clustering (default is 500 millimeters)
  •  MaximumDepthThreshold
    Only points closer than this are used in clustering (default is 800 millimeters)
  •  MinimalPointsForClustering
    Minimal number of points that are within the threshold for the clustering to work (default is 50)
  •  MinimalPointsForValidCluster
    Minimal number of points that are in a cluster for the cluster to be valid (default is 10)
  •  MergeMinimumDistanceToCluster There are always ClusterCount clusters formed. Clusters are merged if the distance between the points that are closest to the center of the other cluster is smaller than this value
  •  MergeMaximumClusterCenterDistances
    There are always ClusterCount clusters formed. Clusters are merged if their centers are closer than this value

2 comments:

  1. Hi, Stefan. The hand seemed to be detected with the background about 20cm away. I want to detect the finger close to, even touch to the desktop. How can I do that?

    ReplyDelete
  2. Hi Jet

    Most devices have a limit on how close they return usable data. The Kinect is limited to 80cm with the Kinect SDK, with OpenNI it's 50cm. The new Kinect4Windows can get down to 40cm in the near mode.

    Or is the user between the screen and the kinect in your case? Something like this? http://www.youtube.com/watch?v=4zXtV66cFDY

    You could set the minimum and maximum threshold properties so the maximum would be where the screen is (not including it) and the minimum somewhere closer. And I guess you'd also have to turn off mirroring in this case.

    - Stefan

    ReplyDelete