[DllImport("kernel32.dll", EntryPoint = "RtlMoveMemory")] private static extern void CopyMemory(IntPtr Destination, IntPtr Source, int Length);
You may have to Invalidate() your picturebox after the update to get it to show.
On a side note, you should give WPF a try and use the WriteableBitmap class and just copy your native bytes to WriteableBitmap.BackBuffer using the above p/invoke. Take note on the Lock/unlock methods.
-Jer
declare it outside the for loop and overwrite it:
float alt = 0;
Int16* ptrFront = (Int16*)this.depthHandleFront.AddrOfPinnedObject();
(...) // for i=0 to 640*480
alt = Convert.ToSingle(ptrFront[i]);
I dont work with the c# wrapper, but the depth stream should contain
11bit values stored in a 16bit int buffer.
to calculate a distance in meters from it, you need a conversion
function like the one shown here:
http://nicolas.burrus.name/index.php/Research/KinectCalibration
"Transformation of raw depth values into meters"
what exactly do you want to do?