Forum

Author Topic: Aligning huge projects  (Read 6985 times)

igor73

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Aligning huge projects
« on: July 25, 2015, 12:10:18 AM »
I have a huge project on my hands  with more than 14 000 images arbitrary.  I am currently  aligning in chunks of around 2500 images. Processing time for each chunk is around 130 hours.  To process all images in a single chunk would take around  700 hours  or 30 days if i wouldn't  run out of RAM.  Aligning is not that RAM hungry so might be possible on my 64GB system. 

I do not want to try a 30 day processing job and find out that Agisoft got confused and messed the alignment up. 
I have tried in the past aligning several thousand images in a single chunk and got bad results.

 I have the latest version installed.  Have there been improvements?  Should i give it a try or would you recommend processing in chunks anyway? 
One advantage of running all images at once might be that overlapping images from neighboring chunk might help alignment i am thinking.   Also it would be quite convenient to just hit start and check back next month.  Go on a holiday or something  ;D

How would you plan/align a huge arbitrary project like this? 

tutoss

  • Newbie
  • *
  • Posts: 49
    • View Profile
Re: Aligning huge projects
« Reply #1 on: July 25, 2015, 09:57:27 AM »
Is an aerial Project?

akemono

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Aligning huge projects
« Reply #2 on: July 29, 2015, 04:39:43 PM »
We actually had a similar problem. We had a project for aerial visualization. We ended up taking 15.000 pictures. And we also tried to align them all in one big chunck, wich failed because we ran into a shortage of RAM.(i use a pc with 64GB of RAM)

Luckely we could use every second image cutting the total aligned images in half. This did fit in the RAM.

To dramatically speed up the alignment process turn on "pair preselection". This feature enables Photoscan to generate a low resolution version of your image and pre compare these for matches. If those are calculated Photoscan continues on to compare only those images that are in the vicinity.

Hopes this helps a bit.
Best mike

SimonBrown

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
    • AccuPixel Ltd - Dealer and Training Centre
Re: Aligning huge projects
« Reply #3 on: July 30, 2015, 12:18:37 PM »
I have just finished a 900+ camera model of an underwater wreck.

A certain section of the wreck would align but not include the dense cloud to cover that area, so in the end I used two separate chunks and merged them.

But its worth noting that both chunks needed manual trimming of faces/polygons to tidy up the joining surfaces before merging the models. Use the Rectangle/Circle/Free-Form selection tools and then delete the polygons.

Result is here:-

https://sketchfab.com/models/38186280bc5c4f97be6255ce82deb1bb
Agisoft endorsed online Metashape training - see: https://accupixel.co.uk/metashape-training-courses

igor73

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: Aligning huge projects
« Reply #4 on: August 01, 2015, 02:52:18 AM »
Akemono , with "To dramatically speed up the alignment process turn on "pair preselection".

you meen  using pair pre selection generic right?  There is only the option of default an generic on my version of Agisoft ( 1.1.6 build 2038 latest version)  .  I have tried this in the past and it seemd like alignemnt was not as good as when on default.  My project is Under water images, 36 mpix images.  Good quality but the fact that they are under water still effects IQ a lot.  I run  alignment on High - default image pair selection - key point limit 40 000 and tie poit limit 0 (unlimited) .   I am sure i really need to run it at tie point 0.   Running at 1000 gives much worse alignment. 

Will try pair pre selection generic and see if i can get good results with better speed.  Is your experience that it does not effect alignment accuracy much?  How mouch faster is it?  2x?

akemono

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Aligning huge projects
« Reply #5 on: August 03, 2015, 11:43:51 AM »
Hi Igor,

Yes i meant using the Pair pre selection Generic. Sorry i should have clarified this. In my experience the alligenment is not worse or better if using the pair pre selection. This does however applies to a aerial data set with plenty of overlap.

I did notice however with some data sets that have less ideal overlap or difficult geometry that disabling the pre pair selection helped in getting more images aligned. But this is more a sign of that either need to add more pictures, get more overlap or re-shoot it entirely.

Conserning the speed increase, it can be pretty drastic, 10x or more is possible (i think). Also depends on your dataset. It takes relatively long to compute the pre selection but after that the actual alignment is really quick. Have a look below at the results i got using a aerial dataset.

Total cameras: 4.000
Effective overlap: 6.7
Reprojection error: 1.4

Alignment paramters:
Accuracy: Medium
Pair preselection: Generic
Key points: 40.000
Tie point: 1.000
Matching time: 14 hours 40 minutes
Alignment time: 9 minutes 37 seconds

I'll do a quick test with a smaller datset to give your a idea of the time savings that can be had using the prepair selection. I will update this post with the results of that test.

Update

Dataset with 38 35Mpx images

Pre pair selection disabled:
Camera's matched 38/38
Effective overlap: 5.46
Reprojection error: 0.96

Alignment paramters:
Accuracy: Medium
Pair preselection: disabled
Key points: 40.000
Tie point: 1.000
Matching time: 3 minutes 4 seconds
Alignment time: 1 seconds

Pre pair selection enabled:
Camera's matched 38/38
Effective overlap: 4.5
Reprojection error: 0.84

Alignment paramters:
Accuracy: Medium
Pair preselection: Generic
Key points: 40.000
Tie point: 1.000
Matching time: 1minutes 30 seconds
Alignment time: 1 seconds


New dataset with 301 Camera's

Pre pair selection disabled:
Camera's matched 301/301
Effective overlap: 8.98
Reprojection error: 1.28

Alignment paramters:
Accuracy: Medium
Pair preselection: disabled
Key points: 40.000
Tie point: 1.000
Matching time: 2 hours 26 minutes
Alignment time: 27 seconds

Pre pair selection enabled:
Camera's matched 240/301
Effective overlap: 5.94
Reprojection error: 1.1

Alignment paramters:
Accuracy: Medium
Pair preselection: Generic
Key points: 40.000
Tie point: 1.000
Matching time: 19 minutes 25 seconds
Alignment time: 31 seconds


Oke so with Pre pair selection enabled it's a lot quicker! Using the same data and the same parameters, it's 7.3 time quicker then disabled (2 hours 26 minutes = 146 minutes -- 146/20=7.3)
There is only one drawback i found, using the pre pair selection enabled it would match 240 camera out of the 301. And disabeling the pre pair selection it would match all of the cameras. This is probably due to the outer camera's not having enough overlap with the rest of the camera's.

So there you have it, it's clear that it is a lot faster but it might not solve all of your camera's. (because of insufficient camera overlap at the edge of the model.)
« Last Edit: August 04, 2015, 01:22:15 PM by akemono »

igor73

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: Aligning huge projects
« Reply #6 on: August 05, 2015, 01:03:29 PM »
Thanks for testing this!  Much appreciated.  As you have found out i think generic Pair pre selection needs good images and lots of overlap.  I will try this on land projects.   My project is actually under water and the overlap is OK but IQ suffers from underwater conditions even though its D810 images.  I think i have to use disabled and unlimited tie points unfortunately.  Painfully slow though...