0

I have asked this question in stackoverflow but haven't received any replies yet. I am guessing this is because the nature of the question is mostly mathematical.

I have a list of data, which corresponds the physical distance (in cm) measured from a depth camera (Kinect). The field of view is 70.6 degrees horizontal. I am using the point-cloud data, and assign each point-cloud z value as a distance in the 2D plane.

The problem is that the actual drawn points are curved (most likely due to the fact that the camera is itself curved) and need to be be adjusted in order to match the actual physical dimensions.

I am showing a comparison between a laser sensor (which has no problem), and the camera (which has a curve). The data points in the first picture (from centre of the image towards the top) show the wall and an obstacle in the centre.

laser points

In the case of the camera, the same points appear to be curved (e.g., the wall is curved) meaning that the distance points do not match the physical dimensions.

RGB-D ppoints

Both sensors are physically aligned, so the only assumption I can make is that the distance values must be adjusted to compensate for the curve of the sensor?

Is there a way for me to adjust the distance values for that curve, and make the points match the physical dimensions?

EDIT

I've uploaded the kinect.data here and the equivalent laser.data here. In both cases a row represents a reading in time. Laser is more frequent(100Hz) whereas kinect is less frequent (10hz). The position of the robot is the same as shown before (the black dot in the middle of the room).

EDIT 2

I've plotted the distance points (attached below) and I'm starting to think that there might be no problem with the data, but that the point-cloud data already accounts for the curvature of the sensor.

kinect distance plot

This is shown in the picture above, where the distance is flat and not curved. However the laser distances below is curved. Yet when the ICP/SLAM deals with it, it understands that the data is spread over an angle of 270 degrees, and thus uses it accordingly?

laser distance plot

Alex
  • 145
  • Just a little clarification needed: I have a list of points, which should be a line, however when drawn, they form a curve." - they are $2D$ points in which case I suspect you require a straight line, ie $y=ax + b$? –  Apr 06 '17 at 10:58
  • @Bacon its all relevant, obviously the sensor may indeed detect curves or other shapes. But for the reference frame shown in the picture above, they should be a straight line, e.g, y = ax +b. I do not know the curve of the sensor, only its field of view (unless those properties are related - which I don't know either). If I solve for y using that reference frame, would that suffice? – Alex Apr 06 '17 at 12:16
  • To be honest, I don't really understand what the actual problem is, so it is really hard for me (and probably not only me) to help. Could you please add some more detail to your question explaining a little better what you are looking for? It indeed seems more like a math problem which shouldn't be too hard to solve, but without knowing the actual problem, it doesn't make sense to give suspecting advice. Also feel free to contact me via email for a more detailed personal discussion. – sranthrop Apr 06 '17 at 17:38
  • @sranthrop hi, of course. I'll make an edit and try to explain it better – Alex Apr 06 '17 at 20:34
  • Ok, I'm starting to understand now what the problem is. Do you have some data to play around with? For example a list of both the points measured by the laser and the points measured by the camera? Just send them via email. It seems like a projection problem which shouldn't be too hard to get rid of. – sranthrop Apr 06 '17 at 22:10
  • @sranthrop Hi, yes I have a list of data, but the sensor data does not necessarily match. In one case it is raw data from the laser sensor, whereas in the later case it is point-cloud from the camera. I can upload it somewhere in a matrix form if you prefer :-) – Alex Apr 07 '17 at 14:06
  • @sranthrop I've uploaded a sample of the data, thanks for helping! – Alex Apr 07 '17 at 14:47
  • Hey, I think both data are fine and give the distance from the laser/camera to the walls and obstacles. Imagine a red dot from the laser moving a long the wall while measuring. Note that the laser measures in a wider angle from left to right and gives the distance to the wall. Starting at an angle of around -100°, the red dot moves to the middle of the wall, where the distance is minimal. That's why the second plot is decresing a little at first. Then the red dot moves to the left corner, distance increases, which results in an increasing plot, and so on. For me, the camera does the same... – sranthrop Apr 08 '17 at 09:14
  • ...thing, but it starts much later, at an angle of -35.3°. The first plot also shows a decreasing distance between 0 and 200, doesn't it? – sranthrop Apr 08 '17 at 09:18
  • However, the resulting values do not match... The camera gives lower distances than the laser. Do you know why? – sranthrop Apr 08 '17 at 09:28
  • Ok, I tried to use your data to reconstruct your very first plots. The laser.data indeed contains the distances to walls and the obstactle, and I could reconstruct your very first plot. The same methode, however, didn't work with the camera.data file. What exactly are these values? It cannot be the distances though... You wrote that it is a point-cloud from the camera. What does that mean? Is it like a list of $(x,y)$ points representing the wall in 2d-space? – sranthrop Apr 08 '17 at 09:59
  • @sranthrop first of all, many thanks for your help! I've finally figured it out; the kinect data represents points in the 3D space, whereas the laser data represents distances; as such those are not the same data-types, and therefore when I plot the laser data I get the sensor curvature, whereas when I plot the pointcloud I get the mapped environment. So, all I have to do pressumably is insert the pointcloud directly into the map, and not use it as distance data like I'm using the laser data. I think this makes more sense, sorry about my confusion; I will close the question if needed. – Alex Apr 09 '17 at 13:02
  • At least I came to the same conclusion: The camera data cannot be distances :) Glad you solved it. For any further questions, don't hesitate to open another question. – sranthrop Apr 09 '17 at 13:29

0 Answers0