[Simulated Kinect] Do not detect points on far clipping plane

Typically: "How do I... ", "How can I... " questions
Post Reply
ravi
Posts: 85
Joined: 24 Oct 2016, 08:00

[Simulated Kinect] Do not detect points on far clipping plane

Post by ravi » 10 Jul 2018, 11:14

I am using simulated Kinect inside V-REP to capture point cloud. I noticed following unwanted behaviors with this Kinect-
  • It has detected points on far clipping plane (it is a free space, so there shouldn't be any points)
  • The far clipping plane is not exactly plane. instead, it is a curved surface.
Please see a screenshot of the scene. Notice the red colored points detected by Kinect in the figure below-
https://www.dropbox.com/s/2adxnv95crgyb ... d.png?dl=0

Why such unwanted behaviors?

The points on a point cloud represent a kind of surface, so there shouldn't be any points on free space. How to stop Kinect to detect points on far clipping plane? Please note that my goal is to generate a similar point cloud which we can get from the real Kinect sensor.

PS: The scene file can be downloaded from the link below-
https://www.dropbox.com/s/d5vxje4z25fxe ... d.ttt?dl=0

-
Thanks

coppelia
Site Admin
Posts: 6736
Joined: 14 Dec 2012, 00:25

Re: [Simulated Kinect] Do not detect points on far clipping plane

Post by coppelia » 13 Jul 2018, 17:17

Hello,

you are free to modify that behaviour. In the current code, the points that do not detect anything are clipped to a maximum distance from the sensor. You could modify the code to following:

Code: Select all

                    if u[w+3]<2.5 then
                        local p={u[w+1],u[w+2],u[w+3]}
                        sim.addDrawingObjectItem(points,sim.multiplyVector(m,p))
                    end
i.e. it will discard points that are farther away than 2.5 meters from the vertical plane the vision sensor lies in.

Cheers

Post Reply