Page 1 of 4

Automatic Alignment of all Scans!

PostPosted: Tue Feb 12, 2013 7:37 pm
by Lars
Hello DAVID Community,

My name is Lars and I’m actually doing my practical training at DAVID Vision Systems GmbH. I study electrical engineering at the ‘Technische Universität Braunschweig’ and wrote my master thesis at the ‘Institut für Robotik’ with the subject ‘Efficient Calculation of Geometric Similarities for the Multi-Fragment-Matching’. My adviser was Simon Winkelbach.

My task for the practical training is the development of an easy to handle program that matches many scans automatically together (just requiring a few user confirmations).

Now I’m ready with the first version of the program (v.0.1), which works so far. I would be glad if many of you will test my program, so I’ll be able to get feedback and fix bugs for newer versions. In the best-case you’ll save time with this method at the matching stage.

I’m giving you a short introduction for the program in the following section.

multimatch_gui_screen.png
multimatch_gui_screen.png (9.78 KiB) Viewed 6540 times


Add Scans:
Select scans that should be matched together (.obj files)
Parameter (min. overlapping between scans):
Estimate the minimal overlapping between scans in percentage. If this parameter is too low, there could be incorrect matching results. If it's too high, then the scans are not be matched together.
Start:
Starts the multimatching method. Calculates similarities between scans (WARNING: This could take a while!) and matches the scans together. User confirmation is required after each iteration.
Save Meshes:
option to save actual matching results. You can choose a new directory or overwrite the previous .obj files.



Happy matching!
Lars

Edit by Sven: Added ZIP for those who can't open RAR.
Edit2 by Sven: Added 64-bit version. Thanks Lars!
[ i]Edit3 by Sven, 2013-11-25: Latest version here: viewtopic.php?p=28374#p28374[/i]

Re: Automatic Alignment of all Scans!

PostPosted: Tue Feb 12, 2013 7:59 pm
by Alyx
Hello Lars
1. would be cool to see std deviation after result is done.
2. must restart program for each model, no button (New document) is made, that's not a big deal but made me upset

Re: Automatic Alignment of all Scans!

PostPosted: Tue Feb 12, 2013 11:29 pm
by MagWeb
Hi Lars,

tried your stuff :) Nice to see something that might speed up alignment - the most time and patience consuming part of scanning!

I'm not sure how to continue after the first completed matching ( if I´m not satisfied with the matching result).
Means: When I hit "No" in the final dialog box, I fall back to the main form and nothing else happens (here on WIN7 64, CPU 3.4 Ghz Intel Core i7,GPU Radeon HD 6970M 2048MB). If I click on Start once again I´m told that multimatching is already completed.
Also setting a new percentage of overlap does not enable new matching... Should I save and reload the results?
Above you mentioned "a few user confirmations"...

Also with the set LAA flag, I´m running out of memory loading and processing bigger amounts of meshes. What do you think is the max load for your app atm.?

Gunter

Re: Automatic Alignment of all Scans!

PostPosted: Wed Feb 13, 2013 5:08 pm
by MagWeb
RMB on the 3d viewer updates it to show the last step (after clicking No).

As long as you accept the results (and you do not run out of memory) it works fine here with partial scans owning clear topology.

I created 8 faked "scans":
Starting with a highres sphere I added minor arbitrary geometry (looks like a ball with pimples all over). I duplicated this mesh and cut the first into segments of 90°. Same with the second but starting at 45°. This way I got 8 perfect fitting meshes overlapping (almost) exactly 50%.

Multimatch result (at this 50% min overlap) were two quarters of a sphere in the first run. The second gave a single quarter.
Could you add an upper overlap limit or a +/- range? Maybe this would make smaller characteristics more dominant.

Re: Automatic Alignment of all Scans!

PostPosted: Wed Feb 13, 2013 7:05 pm
by spikejr5342
It works surprisingly well. I put in some "un-cleaned" scans that I did a while back and it lined them up almost perfectly. However, when I finished (10 scans total) and clicked the button to save the mesh, it all the sudden crashed. It just was the typical "Sorry, this program has stopped working, windows is trying to find a solution to the problem" before it crashed and restarted. I'm on a Dell Precision M4400, core 2 duo 2.54 GHz, 8 gig ram, 64 bit, Windows 7 if it matters.

I also had an issue when I loaded a few scans, aligned them, and then Hit ok. Once I aligned them, I clicked to add some more scans, but then it said that the scans were already aligned and wouldn't move forward. (I didn't want to load all 30 scans at once because it caused a lot of lag and didn't load after a few minutes so I thought a smaller amount of scans at one time would be easier to do)

Overall, very solid program and worked well to align them.

Josh

Re: Automatic Alignment of all Scans!

PostPosted: Thu Feb 14, 2013 11:21 am
by Lars
Hello Alyx,

1. would be cool to see std deviation after result is done.

which standard deviation do you mean?

2. must restart program for each model, no button (New document) is made, that's not a big deal but made me upset

it is on my todo list. :D

Re: Automatic Alignment of all Scans!

PostPosted: Thu Feb 14, 2013 11:51 am
by Lars
Hello Gunter,

I'm not sure how to continue after the first completed matching ( if I´m not satisfied with the matching result).
Means: When I hit "No" in the final dialog box, I fall back to the main form and nothing else happens (here on WIN7 64, CPU 3.4 Ghz Intel Core i7,GPU Radeon HD 6970M 2048MB). If I click on Start once again I´m told that multimatching is already completed.


The feature that you repeat a multimatch iteration after falling back to a previous state is not implemented yet. You should save the successfull transformed scans and combine them in the DAVID Software. Then you could load the combined scans with the multimatch gui again. (time expensive, sry) I think the next version includes repeating of multimatch iterations after wrong results. :)

Also setting a new percentage of overlap does not enable new matching... Should I save and reload the results?

The overlapping percentage is only loaded the first time you click on "start". Its a great idea to change the percentage between multimatching steps. Another input on my todo list!

Also with the set LAA flag, I´m running out of memory loading and processing bigger amounts of meshes. What do you think is the max load for your app atm.?

I'm working on a 64bit version. With the actual version (32bit) you can only load up to 4gb.

Re: Automatic Alignment of all Scans!

PostPosted: Thu Feb 14, 2013 12:05 pm
by Lars
Could you add an upper overlap limit or a +/- range?

Sure! I will add an upper limit for overlapping.

Re: Automatic Alignment of all Scans!

PostPosted: Thu Feb 14, 2013 12:25 pm
by Lars
Hi Josh,

However, when I finished (10 scans total) and clicked the button to save the mesh, it all the sudden crashed.

Do you see the dialog box for saving the meshes before it crashs? Do someone else have crashes while saving meshes?

I also had an issue when I loaded a few scans, aligned them, and then Hit ok. Once I aligned them, I clicked to add some more scans, but then it said that the scans were already aligned and wouldn't move forward. (I didn't want to load all 30 scans at once because it caused a lot of lag and didn't load after a few minutes so I thought a smaller amount of scans at one time would be easier to do)

At the moment you must load all scans before you click on "start". It needs much time to load many scans.

PostPosted: Thu Feb 14, 2013 12:52 pm
by hal
Hello Lars,

very nice idea. This software could be areal boost if implemented with David ShapeFusion.
I've gave it a try. Unfortunately my tests failed.

I've tried with some scans I'm working on in this period (wooden decorations from an ancient church).
My scans are about little columns, half columns and columns capitals.

MatM_LarsSoftware first test.jpg

MatM_LarsSoftware first test 1.jpg

Probably because my shapes have details and similar fine decorations, your software do a little mess.
I think that a selection tool can be usefull: we should have the chance to select only the elements that we want (object's areas) and align only some pieces at time. Example: if we have big objects, could be nice to align the lower scans, the middle scans and the upper scans. Then we can align the 3 groups.

An other suggestion is to have a feature to create some points of reference on our surfaces. Like the manual alignemnt point by point, but more easy and fast. Just pick up some points on our surfaces, that we know are related between scans (Like A1, A2 A3, B1, B2, B3, ... where letters means same area of the object, and numbers the differnt scans). Then the software can use our customized points as rule of alignment.

Your software is great, but maybe have problems with objects with similar parts. Please look at the pic.

MatM_LarsSoftware first test 2.jpg

Seems it is working (I've reduced the min overlapping % to 10) but still have problems with right alignment.

Keep up your amazing software,
Mattia

Re: Automatic Alignment of all Scans!

PostPosted: Thu Feb 14, 2013 12:58 pm
by MagWeb
Hi Lars,
Lars wrote:I'm working on a 64bit version. With the actual version (32bit) you can only load up to 4gb.

That´s why I checked the flag.

I meant the pure mesh load:
For example:
I play with a set of 26 meshes (total: 617MB)
I have a current basic memory consumption of 2.12GB.

Starting DAVID and loading these meshes I get a memory usage of 2,72GB.

Loading the same meshes to your app I get a much higher memory usage of 4,35GB (nothing else but your app running).
START makes the usage rise up to 5,8GB. First run almost completed (the "grouped" meshes are already colored): At this point I get the not enough memory message.

Re: Automatic Alignment of all Scans!

PostPosted: Thu Feb 14, 2013 6:02 pm
by Alyx
i guess all possible :) min, max, average and standart. e.g. like in Rapidform

Re: Automatic Alignment of all Scans!

PostPosted: Thu Feb 14, 2013 8:12 pm
by Sven
Lars has made a 64-bit version and I have attached it to his first post.

Re: Automatic Alignment of all Scans!

PostPosted: Thu Feb 14, 2013 11:35 pm
by MagWeb
Fine :)

I could load 56 scans (0,99GB) and do the first multimatching without memory issues using the 64bit version.
Also the second step was almost completed (using 10.1 GB at a basic load 0f 2GB - means the process needed about 8GB memory!). At the moment, the (obviously last) alignment was finished and the viewer normally switches to the total result, this did not happen. The viewer stayed showing the current pair (it was not frozen - I could rotate the scene) but no AcceptResult/ContinueMultimatching dialog popped up (maybe that would need more than the remaining 1,9 GB RAM?). MainForm said that multimatching was completed. I could save the result and load it to DAVID. Promissing, no false alignment - would need just one or two further steps... The same issue (no dialog at the end of the second run) happened also reducing the loaded meshes down to 15 meshes. Below that number all works fine until there's a single group (if possible).

We all know about the problems matching scans with poor or similar topology - this will need other tools - but if there are characteristic details your app does a great job of best quality in an user-friendly way. Definitely a time saver! Wish I would have had this December ago processing about 700 partial scans.

Hurry up, and implement this into DAVID. Maybe you can find a way to dim down the memory needs - if not, no problem: Think people will gladly upgrade their RAM.

Well done: 12 points from Bavaria
Gunter

Re: Automatic Alignment of all Scans!

PostPosted: Fri Feb 15, 2013 9:52 am
by Goose
Hello Lars
Your appendix is not started. :(
At start there is a message:
C:\Program Files\Multimatch_GUI.exe is not appendix Win32

PC: Dell Latitude D830, 2.10GHz,2.00GB RAM,32 bit windows XP Professional