I'm working on a Kinect camera to get the depth data. So far my app works, i got out the 13 bits of depth info, excluded player data. Placed it on a 24bits RGB bitmap (i didnt like rgb656), well the mdf app looks great works fine, no problems in that area, no bit shift errors etc. (and no need for WPF to display it)
However.. I went on and wanted to verify it to real world measurements. I am using the orginal Microsoft SDK (i think thats 1.7 for windows 7).
And then i noticed that despite i do get the correct bits, the error rate is still to high for me to work with. See the table below where i put in Kinect and (real) world millimeter measurements using a (much cheaper) tape-measure tool to verify it
(Measurement is from frontal midpixel, its not under angle to an object)
kinect world err
800 800 0
894 900 6
987 1000 13
1082 1100 18
1179 1200 21
1271 1300 29
1366 1400 34
1459 1500 41
1550 1600 50
1647 1700 53
1730 1800 70
1831 1900 69
1924 2000 76
2014 2100 86
2112 2200 88
2207 2300 93
By some trial and error, i found that kinect depth data multiplied by 1,0063 does give a bit better results. Now although that it improves it a bit. I do wonder if there is some formula that would work better, because multiplying by 1,0063 is well ..pretty linear math, and perhaps this should be exponential, logarithmic, or ???. I just think the error rate isnt really linear.
Above data, i took manually (so likely it contains some small humman measurement errors because of that too) I'm looking for some math that could also provide the possible deviation plusminus. like the distance is 730mm and possibly 12mm above or below that.
I code in C#, i'm a starter and new here. And maybe this is not a straight question about C#, but its a bit a of coding dilemma, and i've seen other subjects here were people ask for the right formula's (wel coding is a lot of that). And there is a pretty strong kinect community here. Most likely one you here knows a better answer then my 1,0063
I can read about 12 coding languages, so if you know an answer in a different language its fine too. Things that dont help me, is use Aforge/OpenCV/xyz/Mathlab/etc Sure they are great but if i need only 1 function, then i prefer not to use them, as all other graphic stuff for this project i do in my own libraries. (because i find it cool to learn about these things)
---Update Not yet nailed it, but besides depth 1,0063 It seams that :
depth = kinectdept * ( kinectdepth - 800 ) * 0,069
comes pretty close too. Strangely the error rate as in above table quite closely seams
(realDepth-800)/16
But i need more samples to verify it as the human err is to large here.