# [OpenNI-dev] Get Kinect to ignore floor

23 messages
12
Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Get Kinect to ignore floor

 Hi, I am working on a project where I am using the Kinect to plot a cloud of points, which I then apply feature recognition to. However at the moment I think the Kinect may be recording co-ordinates of the ground, which I would like to ignore. I thought all these points might be at a fixed negative y-value in the real world co-ordinates, but this doesn't seem to be the case. Has anyone got any ideas/had any experience with this? I have seen a a 'GetFloor' function mentioned but can't seem to find anything where it has been used to then ignore the floor? Thanks for your help! Emmi -- You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: [OpenNI-dev] Get Kinect to ignore floor

 You need a Scene Analyzer node to compute that:xn::SceneAnalyzer xn_scene;[...]    /// Create a Scene Analyzer node    nRetVal = xn_scene.Create(context);     if (nRetVal != XN_STATUS_OK)    {        cerr << "Failed to create scene analyzer: " << xnGetStatusString(                nRetVal) << endl;    }            XnPlane3D floorCoords;             XnPoint3D floorPoint;            xnGetFloor(xn_scene, &floorCoords);            floorPoint = floorCoords.ptPoint;            cout << floorCoords.vNormal.X << " " << floorCoords.vNormal.Y << " " << floorCoords.vNormal.Z << endl;             cout << floorCoords.ptPoint.X << " " << floorCoords.ptPoint.Y << " " << floorCoords.ptPoint.Z  << "\n" << endl;You get the floor as Normal + Point on the floor. CarmeloVELARDO www.velardo.org On Thu, Apr 21, 2011 at 5:35 PM, emmatsu wrote: Hi, I am working on a project where I am using the Kinect to plot a cloud of points, which I then apply feature recognition to. However at the moment I think the Kinect may be recording co-ordinates of the ground, which I would like to ignore. I thought all these points might be at a fixed negative y-value in the real world co-ordinates, but this doesn't seem to be the case. Has anyone got any ideas/had any experience with this? I have seen a a 'GetFloor' function mentioned but can't seem to find anything where it has been used to then ignore the floor? Thanks for your help! Emmi -- You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en. -- You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.
Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

 Hi Carmelo, Thanks for your very quick reply! Just to double check I understand you correctly, floorCoords.vNormal describes the angle/function of the floor line, and floorPoint (floorCoords.ptPoint) describes a start point somewhere along the floor? Thanks again On Apr 21, 4:42 pm, CARMELO VELARDO <[hidden email]> wrote: > You need a Scene Analyzer node to compute that: > > xn::SceneAnalyzer xn_scene; > > [...] > >     /// Create a Scene Analyzer node >     nRetVal = xn_scene.Create(context); >     if (nRetVal != XN_STATUS_OK) >     { >         cerr << "Failed to create scene analyzer: " << xnGetStatusString( >                 nRetVal) << endl; >     } > >             XnPlane3D floorCoords; >             XnPoint3D floorPoint; > >             xnGetFloor(xn_scene, &floorCoords); > >             floorPoint = floorCoords.ptPoint; > >             cout << floorCoords.vNormal.X << " " << floorCoords.vNormal.Y << > " " << floorCoords.vNormal.Z << endl; >             cout << floorCoords.ptPoint.X << " " << floorCoords.ptPoint.Y << > " " << floorCoords.ptPoint.Z  << "\n" << endl; > > You get the floor as Normal + Point on the floor. > > CarmeloVELARDO* > * > > *www.velardo.org* > > On Thu, Apr 21, 2011 at 5:35 PM, emmatsu <[hidden email]> wrote: > > Hi, > > I am working on a project where I am using the Kinect to plot a cloud > > of points, which I then apply feature recognition to. However at the > > moment I think the Kinect may be recording co-ordinates of the ground, > > which I would like to ignore. I thought all these points might be at a > > fixed negative y-value in the real world co-ordinates, but this > > doesn't seem to be the case. > > > Has anyone got any ideas/had any experience with this? I have seen a a > > 'GetFloor' function mentioned but can't seem to find anything where it > > has been used to then ignore the floor? > > > Thanks for your help! > > Emmi > > > -- > > You received this message because you are subscribed to the Google Groups > > "OpenNI" group. > > To post to this group, send email to [hidden email]. > > To unsubscribe from this group, send email to > > [hidden email]. > > For more options, visit this group at > >http://groups.google.com/group/openni-dev?hl=en. > > -- You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.
Open this post in threaded view
|
Report Content as Inappropriate

## Re: [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## Re: [OpenNI-dev] Re: Get Kinect to ignore floor

 $n_x (x-x_0)+ n_y(y-y_0)+ n_z(z-z_0)=0,\,$where ni represents the normal components. With some math you get in the end:nx X + ny Y + nz Z = (nx x0 + ny y0 + nz z0)this is just an equation that represent the floor.In order to discard the floor you should get the Y parameters correspondent to a given pair of X and Z. You should get some values of Y in a spaced grid and in macro areas remove all the points that have that Y value (which lay on the floor). I don't know how much precise this is probably they try to fit a model, even if my experience with PCL and RANSAC tells me they compute an approximation.(Anyone of Primesense can disclose something about?) CarmeloVELARDO www.velardo.org On Fri, Apr 22, 2011 at 11:17 PM, emmatsu wrote: Great, so in the above a would be floorCoords.vNormal.X, x would be floorCoords.ptPoint.X etc? Also do you have any idea how accurate this function actually is? Thanks! Emmi On Apr 22, 12:04 am, CARMELO VELARDO <[hidden email]> wrote: > Mmm, > > In a more formal mathematical (actually geometry) language > to define a plane you can use a form called Normal + Point. > > The Normal is just a vector at the origin that indicates the orientation of > the plane (yep, call it angle) > the point is just one point that lies in the specific plane. > > Fusing together both information you have the equation of the plane in the > canonic form > > ax + by + cz = d > > More info herehttp://goo.gl/p5FHV* > * > > On Thu, Apr 21, 2011 at 11:09 PM, emmatsu <[hidden email]> wrote: > > Hi Carmelo, > > Thanks for your very quick reply! Just to double check I understand > > you correctly, floorCoords.vNormal describes the angle/function of the > > floor line, and floorPoint (floorCoords.ptPoint) describes a start > > point somewhere along the floor? > > > Thanks again > > > On Apr 21, 4:42 pm, CARMELO VELARDO <[hidden email]> wrote: > > > You need a Scene Analyzer node to compute that: > > > > xn::SceneAnalyzer xn_scene; > > > > [...] > > > >     /// Create a Scene Analyzer node > > >     nRetVal = xn_scene.Create(context); > > >     if (nRetVal != XN_STATUS_OK) > > >     { > > >         cerr << "Failed to create scene analyzer: " << xnGetStatusString( > > >                 nRetVal) << endl; > > >     } > > > >             XnPlane3D floorCoords; > > >             XnPoint3D floorPoint; > > > >             xnGetFloor(xn_scene, &floorCoords); > > > >             floorPoint = floorCoords.ptPoint; > > > >             cout << floorCoords.vNormal.X << " " << floorCoords.vNormal.Y > > << > > > " " << floorCoords.vNormal.Z << endl; > > >             cout << floorCoords.ptPoint.X << " " << floorCoords.ptPoint.Y > > << > > > " " << floorCoords.ptPoint.Z  << "\n" << endl; > > > > You get the floor as Normal + Point on the floor. > > > > CarmeloVELARDO* > > > * > > > > *www.velardo.org* > > > > On Thu, Apr 21, 2011 at 5:35 PM, emmatsu <[hidden email]> > > wrote: > > > > Hi, > > > > I am working on a project where I am using the Kinect to plot a cloud > > > > of points, which I then apply feature recognition to. However at the > > > > moment I think the Kinect may be recording co-ordinates of the ground, > > > > which I would like to ignore. I thought all these points might be at a > > > > fixed negative y-value in the real world co-ordinates, but this > > > > doesn't seem to be the case. > > > > > Has anyone got any ideas/had any experience with this? I have seen a a > > > > 'GetFloor' function mentioned but can't seem to find anything where it > > > > has been used to then ignore the floor? > > > > > Thanks for your help! > > > > Emmi > > > > > -- > > > > You received this message because you are subscribed to the Google > > Groups > > > > "OpenNI" group. > > > > To post to this group, send email to [hidden email]. > > > > To unsubscribe from this group, send email to > > > > [hidden email]. > > > > For more options, visit this group at > > > >http://groups.google.com/group/openni-dev?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "OpenNI" group. > > To post to this group, send email to [hidden email]. > > To unsubscribe from this group, send email to > > [hidden email]. > > For more options, visit this group at > >http://groups.google.com/group/openni-dev?hl=en. > > -- You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en. -- You received this message because you are subscribed to the Google Groups "OpenNI" group. To post to this group, send email to [hidden email]. To unsubscribe from this group, send email to [hidden email]. For more options, visit this group at http://groups.google.com/group/openni-dev?hl=en.
Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## Re: [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## Re: [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## Re: [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## Re: [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## Re: [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate

## [OpenNI-dev] Re: Get Kinect to ignore floor

Open this post in threaded view
|
Report Content as Inappropriate