Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identity matrix when point clouds are planar? #32

Open
Makogan opened this issue Jan 19, 2023 · 4 comments
Open

Identity matrix when point clouds are planar? #32

Makogan opened this issue Jan 19, 2023 · 4 comments

Comments

@Makogan
Copy link

Makogan commented Jan 19, 2023

I am feeding the algorithm 2 point clouds where all the points are contained in the same plane. FOr example these are a subset of both:

Cloud1:

79.9322  -29.1766         0
  79.0491  -29.9871         0
  77.9883  -30.5455         0
  76.8435   -30.901         0
  75.6688  -31.1422         0
   74.497  -31.3972         0
   73.326  -31.6563         0
  72.1549  -31.9149         0
  70.9831  -32.1699         0
  69.8104   -32.421         0
  68.6367  -32.6678         0
  67.4619  -32.9089         0
  66.2842  -33.1353         0
  65.1034  -33.3449         0

Cloud2:

 -53.1773    -46.1855           0
 -52.0631    -46.0045           0
 -50.9379    -45.8592           0
  -49.806    -45.7634           0
 -48.6745    -45.6633           0
 -47.5434    -45.5648           0
 -46.4184    -45.4074           0
 -45.2863      -45.32           0
 -44.1639    -45.1455           0
 -44.1639    -45.1455           0
 -42.9911    -45.0785           0
 -41.8164    -45.0597           0
 -40.6471    -44.9518           0
 -39.4825    -44.7987           0
  -38.313    -44.6947           0

The icp method for this data is returning the identity matrix, i.e.

Estimated transformation matrix H:
[    1.000000     0.000000     0.000000     0.000000]
[    0.000000     1.000000     0.000000     0.000000]
[    0.000000     0.000000     1.000000     0.000000]
[    0.000000     0.000000     0.000000     1.000000]

With iterations:

Iteration | correspondences | mean(residuals) |  std(residuals)
   orig:0 |            1582 |          0.0000 |          0.0000
        1 |            1582 |          0.0000 |          0.0000
        2 |            1582 |          0.0000 |          0.0000
        3 |            1582 |          0.0000 |          0.0000
        4 |            1582 |          0.0000 |          0.0000
        5 |            1582 |          0.0000 |          0.0000
        6 |            1582 |          0.0000 |          0.0000
        7 |            1582 |          0.0000 |          0.0000
        8 |            1582 |          0.0000 |          0.0000
        9 |            1582 |          0.0000 |          0.0000
       10 |            1582 |          0.0000 |          0.0000
       ```

I tried multiple different parameters and I always get the identity despite the point clouds being clearly different. I was wondering if you could help me identify the issue.
@pglira
Copy link
Owner

pglira commented Jan 20, 2023

Interesting. Are both planes at z=0?

Maybe simpleICP simply fits two identical planes at z=0 and consequently all residuals are equal to 0.

Can you share point clouds and code?

@MeerssemanBastien
Copy link

Hi i'm having the same issues im using two point cloud of 10 points for each but the program give me back identity matrix also, do you have any idea of what could happen ? and if there is a way to help me im a having also for some cloud point an error about an "empty matrix"

@pglira
Copy link
Owner

pglira commented May 5, 2023

Please keep in mind that simpleICP matches planes, not points. Consequently, rather dense point clouds are needed to estimate the planes from a certain number of points (parameter neighbors). Thus, a point cloud consisting of 10 points only is not suitable for this algorithm.

However, if you have such small point clouds and if these points (or at least a subset of them) are identical in both point clouds, a point-to-point matching algorithm would be the right choice. Is that the case?

Can you share your PCs?

@MeerssemanBastien
Copy link

MeerssemanBastien commented May 5, 2023

Thanks for your answer , i think you are right , my points are exactly the same in both of the PCs , so i will try to check for an algorithme that use point to point. my PCs are :
the cloud represent a polygone (trapezium)
the fixed one :
1.000 1.000 0.000
2.500 3.000 0.000
3.500 4.500 0.000
7.000 4.500 0.000
10.000 4.500 0.000
10.500 3.500 0.000
12.000 1.000 0.000
7.000 1.000 0.000
4.500 1.000 0.000
2.000 1.000 0.000

the movable one is the same trapezium but rotated by an angle on the Z axis :
2.500 6.500 0.000
4.850 7.600 0.000
6.400 8.390 0.000
9.400 6.590 0.000
12.000 5.000 0.000
12.000 3.870 0.000
12.000 1.000 0.000
7.700 3.500 0.000
5.500 4.750 0.000
3.400 6.000 0.000

thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants