c# - Space represented by a single Kinect pixel at a given depth -


Actually I want to take a straight line between device points and to determine if anything stops it , But in my example, want to make the "laser line" configurable in relation to the distance above the field of view.

Now it is only so easy to get in-depth data at a given pixel point.

Various Depths INMM = DepthImagePixel.Depth;

And it is also easy to say that I want to focus on the 100th line of pixels from the top by doing something like this. (Int i = 0; i & lt; this._DepthPixels.Length; ++ i) //_DepthPixels.Length is clearly 307,200 for 640x480 (if (i & Gt; = 64000 and & amp; i & lt; = 64640) // second vertical pixel line {// Draw line or whatever}}

with something like this Ends.

Enter image details here

but For example, I want to block the line at 50 centimeters from the top of the viewing area at a depth of 3 meters. Now clearly I I understand that the depth increases so much because the area is represented but I am not getting any references or how I work to calculate this relationship.

So, given a given How to calculate the guided space Kinect sensor usage depth

Edit:

So if I understand correctly, / P>

  double D = 2; // 2 meters Rye double y = 100; Top double wars = 480 to 100px; // 480 pixels vertical resolution double vfov = 43; Kinect Double X = (2 * Monastery Sin (Math.PI * vfov / 360) * D * Y) / VS / 43 ° Vertical Area; // x = 0.30541768893691434/x = 100 pixels below the depth of 2 meters to see 30.5 centimeters from the top area  

  2 sin (PI VFOV / 360) DYX = -------------------------- VRES  

D : Distance - Orthogonal

Y : Distance of the line from the top of the image in pixels

VRES : vertical resolution of the image in pixels

VFOO : Digg Vertical field of view to re camera


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -