nmellado/Super4PCS

Problem with output files

Closed this issue · 24 comments

Hi,
I don't know if I do something wrong but i always don't have any differences between the output files and one of the 2 input file.
For example, when i try ./run-example.sh , I have the following :

adrien@adrien-VirtualBox:~/Documents/Super4PCS-1.0.0$ ./run-example.sh 
Use Super4PCS
norm_max_dist: 0.010000
Work with 200 points
Initial LCP: 0.010000
Score: 0.01est: 0.010000                  
(Homogeneous) Transformation from hippo2.obj to hippo1.obj:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Exporting Matrix to mat_super4pcs_fast.txt...DONE
Exporting Registered geometry to super4pcs_fast.obj...DONE
real 1.07
user 0.73
sys 0.13
Use old 4PCS
norm_max_dist: 0.010000
Initial LCP: 0.010000
Score: 0.535st: 0.535000                  
(Homogeneous) Transformation from hippo2.obj to hippo1.obj:
  0.780739 -0.0319342   -0.62404 -0.0981111
-0.0509506   0.992114  -0.114514 -0.0217299
  0.622776   0.121201   0.772955 -0.0271737
         0          0          0          1
Exporting Matrix to mat_4pcs_fast.txt...DONE
Exporting Registered geometry to 4pcs_fast.obj...DONE
real 19.02
user 18.14
sys 0.24

and when I open Hippo2.obj and 4pcs_fast.obj , i have exactly the same clouds. I'm on a Kubuntu virtualbox so i tried to change computer. I used another one with ubuntu and i tried your demo packages with bird and office and stuffs, and I have the same problem.
I simply downloaded the latest version, compiled it and ran it, nothing else. Maybe I'm stupid i don't know but...
Thanks for helping me

Maybe you should check this out #36

Of course, I red it just before posting and it seems like it's not the same issue no?
I tried the command :
./build/Super4PCS -i ArmadilloBack_0.ply ArmadilloBack_30.ply -o 0.7 -d 0.01 -t 1000 -n 400 -r super4pcs_fast.obj -m mat_super4pcs_fast.txt
And that's not working at all for me contrary to the guy who posted the previous issue. Or it's working and i don't get it... I just have a very sparse point cloud... and I don't see how it can come from the 2 input files. I could send you screenshot if you want.

Thanks @BallyB for the report.
To summarize:

  • you downloaded the repos, master branch,
  • compiled it,
  • ran demo script, and got:
    • 4pcs_fast.obj, super4pcs_fast.obj and hippo2.objstrictly identical,
    • mat_super4pcs_fast.txtcontains the identity and mat_4pcs_fast.txt the matrix shown in your first post.

Am I right ?
Could you please detail me the ubuntu version + compiler options used ?

Cheers,

Yes I downloaded the latest release you put on github. I unzipped it.
I created a build folder, then cmake and make. No problem.
I ran /run-example.sh like that :

adrien@adrien-VirtualBox:~/Documents/Super4PCS-1.0.0$ ./run-example.sh 
Use Super4PCS
norm_max_dist: 0.010000
Work with 200 points
Initial LCP: 0.010000
Score: 0.01est: 0.010000                  
(Homogeneous) Transformation from hippo2.obj to hippo1.obj:
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
Exporting Matrix to mat_super4pcs_fast.txt...DONE
Exporting Registered geometry to super4pcs_fast.obj...DONE
real 1.02
user 0.71
sys 0.10
Use old 4PCS
norm_max_dist: 0.010000
Initial LCP: 0.010000
Score: 0.535st: 0.535000                  
(Homogeneous) Transformation from hippo2.obj to hippo1.obj:
  0.780739 -0.0319342   -0.62404 -0.0981111
-0.0509506   0.992114  -0.114514 -0.0217299
  0.622776   0.121201   0.772955 -0.0271737
         0          0          0          1
Exporting Matrix to mat_4pcs_fast.txt...DONE
Exporting Registered geometry to 4pcs_fast.obj...DONE
real 18.22
user 17.84
sys 0.12

and i get hippo2.obj totally the same as super4pcs_fast.obj and 4pcs_fast.obj.
hippo1.obj stay unchanged.

My ubuntu version (on the virtual box I use) is : Ubuntu 16.04 x64
and my compiler : gcc version 5.4.0
Edit: I just put cmake -DCMAKE_BUILD_TYPE=Release .. ,no special option when i compiled the sources
Thank you

That's strange, I'm currently testing with the same configuration, and no problem on my side.
Can you please enable testing and run make buildtests && make test from the build directory ?
You will need to install the packages libboost-system-dev and libboost-filesystem-dev.

Thanks
So i did make buildtests and it reached 100% ok. But when i tried make test :

adrien@adrien-VirtualBox:~/Documents/Super4PCS-1.0.0/build$ make test
Running tests...
Test project /home/adrien/Documents/Super4PCS-1.0.0/build
    Start 1: pair_extraction
1/4 Test #1: pair_extraction ..................   Passed   15.05 sec
    Start 2: quad_extraction
2/4 Test #2: quad_extraction ..................***Exception: Other  0.18 sec
    Start 3: matching_0
3/4 Test #3: matching_0 .......................***Exception: Other  2.87 sec
    Start 4: matching_1
4/4 Test #4: matching_1 .......................***Exception: Other  3.41 sec

25% tests passed, 3 tests failed out of 4

Total Test time (real) =  21.52 sec

The following tests FAILED:
          2 - quad_extraction (OTHER_FAULT)
          3 - matching_0 (OTHER_FAULT)
          4 - matching_1 (OTHER_FAULT)
Errors while running CTest
Makefile:83 : la recette pour la cible « test » a échouée
make: *** [test] Erreur 8
adrien@adrien-VirtualBox:~/Documents/Super4PCS-1.0.0/build$

I installed the library before.

So it looks like Super4PCS doesn't work at all, even in the matching test.
So I must have introduced a regression at some point.

If you have a bit of time, could you try to run the test with the source code at commits 279d392 and ad6b25d ?

Thanks, and sorry for the inconvenience.

Thank you,
I don't know if it's what you asked but i clone the repo and I git reset --hard 279d392. I did cmake and it's ok but the make failed :

adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit1/Super4PCS/build$ make
[ 18%] Built target super4pcs_accel
[ 36%] Built target super4pcs_io
[ 63%] Built target super4pcs_algo
[ 81%] Built target chealpix
[ 90%] Linking CXX executable Super4PCS
/usr/bin/ld : ne peut trouver -lANN_DIR-NOTFOUND/lib/libANN.a
collect2: error: ld returned 1 exit status
CMakeFiles/Super4PCS.dir/build.make:101 : la recette pour la cible « Super4PCS » a échouée
make[2]: *** [Super4PCS] Erreur 1
CMakeFiles/Makefile2:70 : la recette pour la cible « CMakeFiles/Super4PCS.dir/all » a échouée
make[1]: *** [CMakeFiles/Super4PCS.dir/all] Erreur 2
Makefile:83 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit1/Super4PCS/build$

I don't knowhow to fix this. I tried to modify the CMakeLists.txt with a path but it didn't work. I have the libann installed.

Anyway i tried with the other one ad6b25d and it worked. make and thenmake buildtests reached 100% but ..... :

adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit2/Super4PCS/build$ make test
Running tests...
Test project /home/adrien/Documents/Super4PCS_commit2/Super4PCS/build
    Start 1: pair_extraction
1/3 Test #1: pair_extraction ..................   Passed   13.55 sec
    Start 2: matching_0
2/3 Test #2: matching_0 .......................***Exception: Other 10.10 sec
    Start 3: matching_1
3/3 Test #3: matching_1 .......................   Passed   12.45 sec

67% tests passed, 1 tests failed out of 3

Total Test time (real) =  36.10 sec

The following tests FAILED:
          2 - matching_0 (OTHER_FAULT)
Errors while running CTest
Makefile:83 : la recette pour la cible « test » a échouée
make: *** [test] Erreur 8
adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit2/Super4PCS/build$

Ok, thanks for the test, you've done what I wanted ;).

Another try, can you run the demo script with the code at version ad6b25d ?

Fine !

Ok i tried this one too and make and make buildtests worked but again make test failed :

adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit3/Super4PCS/build$ make test
Running tests...
Test project /home/adrien/Documents/Super4PCS_commit3/Super4PCS/build
    Start 1: pair_extraction
1/3 Test #1: pair_extraction ..................   Passed   12.03 sec
    Start 2: matching_0
2/3 Test #2: matching_0 .......................***Exception: Other  8.27 sec
    Start 3: matching_1
3/3 Test #3: matching_1 .......................***Exception: Other 11.72 sec

33% tests passed, 2 tests failed out of 3

Total Test time (real) =  32.02 sec

The following tests FAILED:
          2 - matching_0 (OTHER_FAULT)
          3 - matching_1 (OTHER_FAULT)
Errors while running CTest
Makefile:83 : la recette pour la cible « test » a échouée
make: *** [test] Erreur 8
adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit3/Super4PCS/build$

I ran the run-example script and i have the same cloud again between hippo2, 4pcs-fast and super4pcs-fast :

adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit3/Super4PCS$ ./run-example.sh 
Use Super4PCS
norm_max_dist: 0.010000
Work with 200 points
Initial LCP: 0.010000
Score: 0.735st: 0.735000                  
(Homogeneous) Transformation from hippo2.obj to hippo1.obj:
    0.74273   0.0252989   -0.669113   -0.095358
 -0.0545415    0.998251  -0.0227988 -0.00994541
   0.667366   0.0534278    0.742811  -0.0302707
          0           0           0           1
Exporting Matrix to mat_super4pcs_fast.txt...DONE
Exporting Registered geometry to super4pcs_fast.obj...DONE
real 0.77
user 0.38
sys 0.14
Use old 4PCS
norm_max_dist: 0.010000
Initial LCP: 0.010000
Score: 0.685st: 0.685000                  
(Homogeneous) Transformation from hippo2.obj to hippo1.obj:
   0.753068   0.0150788    -0.65777  -0.0986149
 -0.0538027      0.9978  -0.0387239 -0.00343227
   0.655739   0.0645516    0.752223  -0.0266946
          0           0           0           1
Exporting Matrix to mat_4pcs_fast.txt...DONE
Exporting Registered geometry to 4pcs_fast.obj...DONE
real 8.20
user 7.82
sys 0.08
adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit3/Super4PCS$

ok.
Can you remove the files super4pcs_fast.obj and 4pcs_fast.obj before running the test ? Just to check the problem is not coming from an impossibility to overwrite an existing file.

Can you also check the output matrix files are containing the matrices shown in the trace ?

I did remove them. When i cloned the commits, i used a totally different folder and they were not generated yet.
Concerning the files, it contains the good matrices :

adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit3/Super4PCS$ cat mat_4pcs_fast.txt 
VERSION =       1
MATRIX  =
 0.753068   0.015079  -0.657770  -0.098615
-0.053803   0.997800  -0.038724  -0.003432
 0.655739   0.064552   0.752223  -0.026695
 0.000000   0.000000   0.000000   1.000000
adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit3/Super4PCS$ cat mat_super4pcs_fast.txt 
VERSION =       1
MATRIX  =
 0.742730   0.025299  -0.669113  -0.095358
-0.054541   0.998251  -0.022799  -0.009945
 0.667366   0.053428   0.742811  -0.030271
 0.000000   0.000000   0.000000   1.000000
adrien@adrien-VirtualBox:~/Documents/Super4PCS_commit3/Super4PCS$

Ok, so we definitively have something new here, that I cannot reproduce...
You said you have this behaviour when compiling/running on a VM, can you share it ?

Yes but I tried on a real linux OS and it did the same thing. Maybe it could come from an "optional" library I don't have ? Because I just installed it one day ago. I just open files with meshlab so I don't think I do something wrong here.
The fact is that I just need execution screenshot and explanation for my internship report... :')
How do you want me to share it ? I used an iso file of Kubuntu 16.04.2

Ok,
Thank you for your help !
Si ca vous dérange pas, je vais profiter de ce post pour vous demander quelque chose à propos de votre algorithme. Cela me concerne uniquement et donc je vais le faire en français si ca vous dérange pas. J'utilise les critères de classification de Brown et Zitova pour classer des algorithmes de recalage. J'aimerais savoir quelle est la métrique de similarité que vous avez utilisé ainsi que la stratégie de recherche de la solution optimale. J'ai lu que vous parliez de distance euclidienne pour la métrique à propos de ICP évidement mais j'ai pas compris exactement celle que que Super4PCS utilise. J'ai peut etre pas tout compris. Merci.

Please open another issue (in English), or contact me by email directly to discuss on this.
Cheers

I'm sorry but I cannot reproduce your bug.
What I have done:

  • downloaded Kubuntu 16.04 from here,
  • Virtualized Kubuntu with virtualbox 5.1
  • installed basic packages: sudo apt-get install git cmake g++
  • fetched and compiled Super4pcs:
git clone https://github.com/nmellado/Super4PCS.git 
mkdir Super4PCS/build
cd Super4PCS/build
cmake ../ -DCMAKE_BUILD_TYPE=Release -DIO_USE_OPENCV=False
make -j 4
  • ran the demo script run-example.sh and get the usual output, with a correct output file super4pcs_fast.obj.

Alright thank you for your answer. That's what I did too I think. I will try to do exactly the same tonight and see.
Could you send me the super4pcs_fast.obj you've obtained? I will compare with mine.
Thanks

Dear @BallyB ,
Is your problem still occurring with the new release (to test it, just update from the master branch) ?

Cheers,

Hi, sorry for the late of my answer.
So i recompiled with the new release and I have exactly the same probleme (same fly hippo2.obj and super4pcs_fast.obj) BUT I figured out one anormal thing. The file you sent me is exactly the same to mine. So, I guess the file you sent me is good so my question now is what is the software you are using to open that file and how you do that. Because, I just open meshlab and i create a new empty project and then i import the mesh. Here is what I obtain :
image

File on the left is yours and on the right is the Hippo2.obj file...

Ok, I think I got it.
The file generated by Super4PCS is just the rotated+translated version of the 2d input file.

Try to open hippo1.obj and super4pcs_fast.obj in the same meshlab project.
Please confirm this is working so I can close the issue.

Alright ! it worked.... Finally. I've got a beautiful registrated hippo :)
Sorry i thought that the super4pcs_fast.obj file should be like hippo1+super4pcs_fast that's why i didn't get where was the registration.
Thank you a lot for everything !

Ok great.