Coding4Fun Kinect Toolkit

       This project requires the Kinect for Windows SDK.  If you want to learn how to use theKinect for Windows SDK, head over to theChannel 9 and their quick start series. This toolkit contains both a WinForm and WPF version.

Current Coding4Fun Kinect Toolkit:

WPF:

Depth Data Extension Methods:

  • ImageFrame.ToBitmapSource()
    • returns BitmapSource
  • int[].ToBitmapSource()
    • returns BitmapSource
  • int[].ToBitmapSource(int width, int height, int minimumDistance, Color highlightColor)
    • returns BitmapSource
  • ImageFrame.ToDepthArray()
    • returns int[]
  • int[].GetMidpoint(int startX, int startY, int endX, int endY, int minimumDistance)
    • returns Point
  • BitmapSource.Save(string fileName, ImageFormat format)
    • returns nothing

Skeleton Data Extension Methods:

  • Joint.ScaleTo(int width, int height)
    • Scales a Joint's Position to the maximum width and height specified
  • Joint.ScaleTo(int width, int height, float maxSkeletonX, float maxSkeletonY)
    • Scales a Joint's Position to the maximum width and height specified

Controls:

  • Hover Button

WinForm:

Depth Data Extension Methods:

  • ImageFrame.ToBitmap()
    • returns Bitmap
  • int[].ToBitmap()
    • returns Bitmap
  • int[].ToBitmap(int width, int height, int minimumDistance, Color highlightColor)
    • returns Bitmap
  • ImageFrame.ToDepthArray()
    • returns int[]
  • int[].GetMidpoint(int startX, int startY, int endX, int endY, int minimumDistance)
    • returns Point
  • Bitmap.Save(string fileName, ImageFormat format)
    • returns nothing

Skeleton Data Extension Methods:

  • Joint.ScaleTo(int width, int height)
    • Scales a Joint's Position to the maximum width and height specified
  • Joint.ScaleTo(int width, int height, float maxSkeletonX, float maxSkeletonY)
    • Scales a Joint's Position to the maximum width and height specified

Sample usage:

void sensor_ColorFrameReady(AllFramesReadyEventArgs e)
{
	using (ColorImageFrame colorFrame = e.OpenColorImageFrame())
	{
		if (colorFrame == null)
		{
			return; 
		}

		//set image
		ColorImage.Source = colorFrame.ToBitmapSource(); 

		if (_saveColorFrame)
		{
			//save image

			colorFrame.ToBitmapSource().Save(DateTime.Now.ToString("yyyyMMddHHmmss") + "_color.jpg", ImageFormat.Jpeg);
		}
	}            
}

void sensor_DepthFrameReady(AllFramesReadyEventArgs e)
{
	using (DepthImageFrame depthFrame = e.OpenDepthImageFrame())
	{
		if (depthFrame == null)
		{
			return; 
		}

		//turn raw data into an array of distances; 
		var depthArray = depthFrame.ToDepthArray();

		MidPointDistanceViaGetDistanceText.Text = depthFrame.GetDistance(depthFrame.Width/2, depthFrame.Height/2).ToString();

		//image
		DepthImageWithMinDistance.Source = depthArray.ToBitmapSource(depthFrame.Width, depthFrame.Height,
																	_minDistance, Colors.Red);

		//image
		DepthImage.Source = depthFrame.ToBitmapSource();

		if (_saveDepthFrame)
		{
			_saveDepthFrame = false;
			depthFrame.ToBitmapSource().Save(DateTime.Now.ToString("yyyyMMddHHmmss") + "_depth.jpg", ImageFormat.Jpeg);
		}
	}
}

With KinectKit you can:

  • capture and map color, depth, and skeleton data,
  • record and playback audio,
  • integrate movement tracking with speech technology,
  • enumerate and control Microsoft Kinect sensors, and
  • develop applications with your favorite programming language: C++Builder, C++, Delphi, Java, and .NET Framework. 

Within Chant Developer Workbench, you can:

  • Enumerate Microsoft Kinect sensors,
  • Render color, depth, and skeleton data,
  • Trace sensor events, and
  • Test application sensor management functions. 
Movement Management Component Architecture

The KinectKit component library includes a movement management class that provides you a simple way to track and map movement with Microsoft Kinect sensors.

The movement management class, ChantKM, enables you to start and stop color, depth, skeleton, and audio data collection with Microsoft Kinect sensors. Your application can also use the KinectSensor and adjunct classes to manage low-level functions if desired.

With the ChantKM class, you can detect movement, process color, depth, and skeleton data, and record audio to a file. Your application uses the ChantKM class to manage the activities for interacting with the Microsoft Kinect sensor on behalf of your application. The ChantKM class manages the resources and interacts directly with the Natural User Interface API (NAPI) runtime.

Your application receives status notifications through event callbacks.

Speech recognition and synthesis are supported with the SpeechKit ChantSR and ChantTTS classes. See SpeechKit for more information about integrating speech technology.


The ChantKM class encapsulates the NAPI functions to make the process of tracking movement with Microsoft Kinect sensors simple and efficient for your application.

The ChantKM class simplifies the process of managing Microsoft Kinect sensors by handling the low-level activities directly with the sensor.

You instantiate a ChantKM class object before you want to start tracking movement within your application. You destroy the ChantKM class object and release its resources when you no longer want to track movement within your application


http://channel9.msdn.com/coding4fun/kinect/KinectKit-a-commercial-library-to-help-speed-your-Kinect-for-Windows-SDK-application-development
http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=c4fkinect&DownloadId=336481&FileTime=129725745401400000&Build=19612

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值