none
saving depth and/or skeleton data to file using kinect sdk v1 RRS feed

  • Question

  • I have not seen a v1 sample of this yet but how do I just save general depth data to a file? I wish to save depth data  in segments like pieces of a animation that is first. Then put the animation together in one file for precorded data purposes and compare this file to the depth data animation im recording live.

    The reason is i want to take the depth data for comparsion against other depth data so if the precorded data file on hard drive matchs the other one I can speak the word out for the signing letter the sign language participant is doing. But if anyone has any better ideas of then depth data or a easy way to do this with saved skeleton data I would be happy too.

    I found this on working with depth data but i don know how to work with skeleton data and save depth data to file: http://channel9.msdn.com/Series/KinectQuickstart/Working-with-Depth-Data

    The kinectdtw project on codeplex hasnt updated their project yet so I can record gestures yet.

    but I think i need to save as binary to file but other then that what should I be aware of? Ive seen other posts on doing this im just not forsure how to save it in an animated state like an animated gif file except just the depth data information in the v1 sdk but beta 2 posts are very clear but Im not for sure about v1.


    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda




    • Edited by The Thinker Friday, February 24, 2012 6:08 PM
    Friday, February 24, 2012 5:08 PM

All replies

  • Any ideas? I could just save the stream to file since i will be comparing file data to live streaming data but how would i do a simple stream save to file for depth as an animation type image?

    I know theirs going to be binary involved somewhere but how do save the depth image as an animation? For now just max the animation fixed to 30 seconds. I found out how to save as image i think from help files about depth but stil not as an animation.


    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda


    • Edited by The Thinker Friday, February 24, 2012 6:32 PM
    Friday, February 24, 2012 6:15 PM
  • I have this code i found out how to do after reading docs a little but how do I save it to an image file?

             Dim source As BitmapSource = BitmapSource.Create(640, 480, 96, 96,
        PixelFormats.Gray16, Nothing, PixelData, 640 * 2)
                Dim test As Image = New Image
                test.Source = source
    
                Dim encoder As JpegBitmapEncoder = New JpegBitmapEncoder

    Also, i wish to animate it from the source but have no clue how to tell it to save an animated jpeg file and then i want to compare that animated jpeg against lets say the live stream by reading it from file during my load event and just doing a data compare like reading the text on a page and seeing if it matchs except for binary data comparsion or like MD5 hash comparsion.

    I did find this but problem is still how to save each seperate image to file so i can use this code:

    http://www.hotscripts.com/forums/windows-net-programming/45884-creating-animated-gif-images-vb-net-2008-a.html

    I have what i have experimented with above and the depthImage.source is the image that display when the program is started and its fed to my image variable i just need to figure out how to save everything to file.


    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda


    • Edited by The Thinker Friday, February 24, 2012 7:31 PM
    Friday, February 24, 2012 6:58 PM
  • Heres some updated code that ive tryed but that froze my app and i havent got to do anything:

       

        Dim source As BitmapSource = BitmapSource.Create(640, 480, 96, 96,
        PixelFormats.Gray16, Nothing, PixelData, 640 * 2)
            
    
                Dim outstream As MemoryStream = New MemoryStream
                Dim enc As BitmapEncoder = New GifBitmapEncoder
    
                
                depthImage.Source = source
                'enc.Frames.Add(BitmapFrame.Create(depthImage.Source))
                'enc.Save(outstream)
                'Dim test As System.Drawing.Bitmap
                'test = New System.Drawing.Bitmap(outstream)
                'test.Save("c:\myfile.gif", System.Drawing.Imaging.ImageFormat.Gif)


    Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth. - "Sherlock holmes" "speak softly and carry a big stick" - theodore roosevelt. Fear leads to anger, anger leads to hate, hate leads to suffering - Yoda

    Friday, February 24, 2012 9:32 PM