Apply homogeneous transform to line parameters

38 Views Asked by At

I have a 2D range scanner mounted on a robot. This scanner is tilted around its x and y axes (meaning its scanning plane is not horizontal) with some unknown small angles. I initialize those roll and pitch angles to some arbitrary values (ri, pi) at the beginning and put my robot in front of three orthogonal walls (U shaped) and get something like this:

enter image description here

The blue point cloud shows what the scanner is supposed to see from the angles I initialized it to (ri, pi). Knowing the pitch and roll, I estimate the coordinates of those points in the coordinate frame defined by the horizontal plane at z = 0. Then I just consider the x and y components of those points (as seen with the white points, corresponding to an orthogonal projection on the horizontal plane). If my initial hypotheses about the laser angles (ri, pi) were correct, two of those lines formed by the white dots will be parallel to each other and orthogonal to a third line, which can be verified by running some line estimation algorithms (eg. RANSAC) and comparing the line slopes. What I do now is a kind of brute-force approach by testing all the possible ri and pi angles at some range (-pi/10, +pi/10 for example). The problem is that line detection is quite slow. I would like to run the line detection once at the beginning on the blue dots, and then work directly on those lines by transforming them the way I described above (coordinate transform followed by an orthogonal projection). How could I do that?