using c# wpf application , send depth data to txt file
-
Tuesday, September 06, 2011 4:03 AM
I am using the same sample of working with depth data, where we can display depth image with color,
I do not now how to send all the distance value to .txt file, I want to have this matrix then I can search all the depth image data and display new image contain only the objects appear on the same disance, So I need to know the depth for just one oject not everywhere in the image, any help , please?
- Moved by Leo Liu - MSFT Tuesday, September 13, 2011 12:39 AM Moved for better support. (From:Visual C# General)
All Replies
-
Wednesday, September 07, 2011 9:43 PM
-
Thursday, September 08, 2011 4:02 AMHi rami82,
Could you provide some more info about your requirement? As we could not figure out which category your problem belongs to.
Have a nice day,
Leo Liu [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Thursday, September 08, 2011 5:57 AM
You have image so can no longer be a text file. The binary file might help.
http://msdn.microsoft.com/en-us/library/system.io.binarywriter.aspx
chanmm
chanmm- Marked As Answer by Leo Liu - MSFT Monday, September 12, 2011 5:40 AM
- Unmarked As Answer by rami82 Monday, September 12, 2011 11:45 PM
-
Monday, September 12, 2011 11:35 PM
Thanks guys for your replay, appreciated!!
I used kinect with c# wpf application. I have depth image, I am wondering if I can:
1- save this depth value (distances) to txt file
2- is there any way to get the distance for just one object appear in field of view
Thanks,
rami82
Rami -
Tuesday, September 13, 2011 1:00 AMOwner
rami82,
is your question 1 the same as the question you asked in this thread: http://social.msdn.microsoft.com/Forums/en-US/kinectsdknuiapi/thread/e4385c60-d0c2-4d44-b23c-ac5202aff37e, or are there additional complications you've run into?
As far as question 2, no, there is no way to only get distance for an arbitrary object to appear in field of view. For depth information for a single human body being tracked, this information is in fact available if you use DepthAndPlayerIndex image stream. For arbitrary objects, however, you would need to do your own image processing over the raw depth data provided by Kinect SDK and segment the image into "pixels that belong to your object of interest" vs "pixels that DON'T belong to your object of interest".
Eddy
I'm here to help -
Wednesday, September 14, 2011 2:50 AM
Yes Eddy, it is the same one. I still can't solve it , i tried many times to remove the loops but nothing appear in text file. and once i put it in the for loop I have the same distance number repeated many time, you give me some hints, appreciated but I still can't fix it. I try to search for any book ; using kinect with c# but nothing still published. I need more ducments and samples because I am new in C# and many kinect library code not known for me.
Thanks,
Rami
Rami -
Thursday, September 15, 2011 10:43 PMOwner
I have posted a more detailed answer to the other thread. The problem you were running into was not about Kinect SDK usage, though, but about programming in general: saving data to a file. Please be aware that you are using other people's time when you post in a forum, so use that time appropriately or people will not be happy with you.
Eddy
I'm here to help- Marked As Answer by Eddy Escardo-Raffo [MSFT]Microsoft Employee, Owner Thursday, September 15, 2011 10:44 PM



