hello i have manage to get a little sample of hand tracking on wpf
with the new c# wrapper, but i have some issues: first here is the
link to the sample
http://dl.dropbox.com/u/1966569/kinect/kinect.rar
Simply run, and wave to get your hand start tracking. it will create a
button that will move with your hand.
My questions are, when does the new hand is created, everytime someone
waves ? Should we uses the NITE api or will this api be as good as
Nite in terms of helping tracking only hands and gestures? what's up
with the SetSmoothing property? can we smooth the movement of the hand
so it doesn't move and every liltte change?
Other thing is i m not being able to get a image from the camera
running in wpf, i get some memory problems, i copy the winforms
sample, build the histogram and all, but in the winforms sample they
use something like overriding the onpaint and draw with e.grraphics,
since i wanted to update a image source in wpf , i need a bitmap
source so i have done a timer that when it ticks, it does somethign
like:
Dispatcher.Invoke(
System.Windows.Threading.DispatcherPriority.Normal,
new Action(
delegate()
{
this.imgteste.Source = loadBitmap(bitmap);
}
public static BitmapSource loadBitmap(System.Drawing.Bitmap source)
{
return
System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(source.GetHbitmap(),
IntPtr.Zero, Int32Rect.Empty,
System.Windows.Media.Imaging.BitmapSizeOptions.FromEmptyOptions());
}
it works for some seconds but then applciation stops because is out of
memory i think... can someone help me out in this.
My goal is to get some samples working in wpf with the best
performance possible doing simple things and post here in the comunity
to help others.
thanks
Rui