Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion OpenNI c# Wrapper and wpf hand tracking (sample and doubts)

Received: by 10.90.65.2 with SMTP id n2mr1897727aga.21.1293628225810;
        Wed, 29 Dec 2010 05:10:25 -0800 (PST)
X-BeenThere: openni-dev@googlegroups.com
Received: by 10.90.17.22 with SMTP id 22ls2320718agq.2.p; Wed, 29 Dec 2010
 05:10:23 -0800 (PST)
MIME-Version: 1.0
Received: by 10.90.137.5 with SMTP id k5mr334834agd.9.1293628223204; Wed, 29
 Dec 2010 05:10:23 -0800 (PST)
Received: by w17g2000yqh.googlegroups.com with HTTP; Wed, 29 Dec 2010 05:10:23
 -0800 (PST)
Date: Wed, 29 Dec 2010 05:10:23 -0800 (PST)
X-IP: 193.164.0.63
User-Agent: G2/1.0
X-HTTP-Via: 1.1 sacramento.hsjoao.min-saude.pt:8080 (squid/2.5.STABLE6)
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64;
 Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR
 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E; AskTB5.6),gzip(gfe)
Message-ID: <6ed47c43-5d0c-4301-baf6-edd236abb3e3@w17g2000yqh.googlegroups.com>
Subject: OpenNI c# Wrapper and wpf hand tracking (sample and doubts)
From: Rui Marinho <skim...@gmail.com>
To: OpenNI <openni-dev@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1

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