Correcting plane parameters with the fixed azimuth angles

208 Views Asked by At

I am trying to reconstruct specific 3d objects such as cubes, pyramids and so on. For this, i am using point cloud data and then fitting planar surfaces for the segmented point patches. Planes are obtained by doing Least sqaure adjustments. Then my objective is to intersect neighbouring planes and then to get intersection lines (line segments). Then from those lines, i wish to make a something like wireframe model.

But, when i get all the normal vectors (n1, ..n4 in this object) and then if i project them onto XY plane and calculated the azimuths of each plane, then they are not exactly changing by 90 degree but 92, 87…..

So, as i am looking for an accurate pyramid model, i think i should first adjust these planes in a way to having their azimuths exactly in 90 degree differences with adjacent plane. After that, i think i should intersect them, which will improve the accurate shape of the pyramid.

please refer following sample images enter image description here

Now, i want to know, how should i update my plane parameters in a way to reside their azimuth differences exactly in 90 degrees with other planes. In this case, should i change both (a, b, c) and d. where the plane equation is ax+by+cz+d=0.

Could you please give me equations and way to do this. thank you.

1

There are 1 best solutions below

5
On

Here's an idea. It is heuristic, rather than rigorous, but I expect it will work OK.

The only problem case is the pyramid, because you have four planes that will have to meet at a single point. So, let's focus on the pyramid case. Using your current fitting code, you can calculate four planes $P_1$, $P_2$, $P_3$, $P_4$. The problem is that these planes don't meet at a single point. The idea is to calculate an "average" apex point $A$, and modify the planes so that they pass through $A$.

So, let $A_1 = P_2 \cap P_3 \cap P_4$ be the intersection of the three planes $P_2$, $P_3$, $P_4$, let $A_2 = P_1 \cap P_3 \cap P_4$, $A_3 = P_1 \cap P_2 \cap P_4$, and $A_4 = P_1 \cap P_2 \cap P_3$. Then let $A = (A_1 + A_2 + A_3 + A_4)/4$ be the "average" apex.

Now adjust each plane to make it pass through the point $A$. So, take plane $P_1$, for example. Let $B$ and $C$ be the end-points of the bottom edge of this plane. You recompute $P_1$ to be the plane that passes through the three points $A$, $B$, $C$. Do the same sort of thing with the other three planes.

As I said, this is less than rigorous. A rigorous approach would be to write a fitting function that fits four planes simultaneously, subject to the constraint that they have some (unknown) single point in common. This can be done, but its much harder than the simple adjustment process I described.