Forum

Author Topic: Cameras not aligning  (Read 5538 times)

nwilson

  • Newbie
  • *
  • Posts: 6
    • View Profile
Cameras not aligning
« on: April 21, 2020, 06:32:01 AM »
Hi, I have been trying to teach myself Photogrammetry of 3D objects and it's fair to say it's driving me a bit mad!  My attempts have generally been sort of ok, but with quite a few holes and sections that haven't resolved very well.  I'm keeping the camera stationary and rotating the object.  For each different camera view I'm taking a shot without the object to then create a mask with.  I have Apply masks to Tie Points selected when aligning photos.
Suddenly yesterday I developed a new issue where large numbers of photos aren't aligning.  I'm selecting them, resetting alignment and then aligning selected cameras.  I've tried this as a group and individually but it's not working.  I have no idea what I'm doing wrong, especially as this is a new issue that I wasn't having before.
I've attached 2 screenshots.  Any help gratefully appreciated! 

bestable

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Cameras not aligning
« Reply #1 on: April 21, 2020, 07:10:38 AM »
Would you please attach your dataset?

nwilson

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Cameras not aligning
« Reply #2 on: April 21, 2020, 07:55:54 AM »
Hopefully I've done this right - you should be able to view them here - https://ibb.co/album/5T8rWr

bestable

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Cameras not aligning
« Reply #3 on: April 21, 2020, 06:48:24 PM »
I have simplified download process for everyone to try.
Let me know if You want me to delete Your photos:
https://drive.google.com/file/d/1Fbs9vyyYDwQx3io0OL1lRGQQhRPKvYlo/view?usp=drivesdk

I have aligned photos using multiple chunks, but I would like to know how to make it in one go as well.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13210
    • View Profile
Re: Cameras not aligning
« Reply #4 on: April 21, 2020, 08:44:29 PM »
Hello bestable,

Thank you for re-sharing the dataset as an archive.

I've used a different processing approach, however, generated the masks from background for each sub-set of images (all images loaded to the single chunk) and then ran Align Photos operation using Apply Masks to Key Points. All the images except for the background photos were aligned.

I can share the project with the alignment results, if it is OK for nwilson.
Best regards,
Alexey Pasumansky,
Agisoft LLC

bestable

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Cameras not aligning
« Reply #5 on: April 21, 2020, 08:59:53 PM »
How do You generate masks ?

PolarNick

  • Newbie
  • *
  • Posts: 45
    • View Profile
Re: Cameras not aligning
« Reply #6 on: April 21, 2020, 09:44:26 PM »
Hello,

I also used another way:

1) Masked all 7 background images using a rectangle mask (each image fully masked out).
2) Tools->Preferences->Advanced->Keep key points->Enable
3) Disabled all images.
4) Enabled second ring (O6Y9730-O6Y9762). Aligned photos (100K keypoints, 10K tie points, apply masks to tie points - see attached screenshot).
5) Enabled third ring (O6Y9763-O6Y9794). Aligned photos (the same parameters, just don't click "reset current alignment" - because we want to add new photos to the current alignment).
6) Do the same thing for 4th, 5th, 6th and 7th ring, after that align 1st ring (O6Y9696-O6Y9729).

The order of rings alignment can be different (they just should be adjacent), but this order worked for me.

Also, better pixels usage should help (the bigger object on image - the better).

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 13210
    • View Profile
Re: Cameras not aligning
« Reply #7 on: April 21, 2020, 09:51:09 PM »
How do You generate masks ?
My approach was the following:
 - add all images to the single chunk,
 - copy to the clipboard the label of the first background image,
 - select in the Photos pane all the images which correspond to the given background,
 - right-click on selection, then Import Masks -> From Background -> Filename = background image filename,
- then repeat the steps for each sub-set of images.
Best regards,
Alexey Pasumansky,
Agisoft LLC

bestable

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: Cameras not aligning
« Reply #8 on: April 21, 2020, 10:14:29 PM »
Great topic. I learned few valuable lessons.
Thanks for everyone's input and nwilson for sharing the dataset.


Paulo

  • Hero Member
  • *****
  • Posts: 776
    • View Profile
Re: Cameras not aligning
« Reply #9 on: April 22, 2020, 04:31:48 AM »
I followed background masking each series  (7) of turntable shots as defined by Alexey and got good results:
Code: [Select]
Processing Parameters
General
Cameras 201
Aligned cameras 201
Coordinate system Local Coordinates (m)
Rotation angles Yaw, Pitch, Roll
Point Cloud
Points 20,837 of 35,980
RMS reprojection error 0.085551 (0.232679 pix)
Max reprojection error 0.250751 (1.37016 pix)
Mean key point size 2.60344 pix
Point colors 3 bands, uint8
Key points 63.96 MB
Average tie point multiplicity 6.71643
Alignment parameters
Accuracy High
Generic preselection Yes
Reference preselection No
Key point limit 10,000
Tie point limit 5,000
Filter points by mask Yes
Mask tie points No
Guided image matching No
Adaptive camera model fitting Yes
Matching time 1 minutes 19 seconds
Matching memory usage 250.46 MB
Alignment time 2 minutes 51 seconds
Alignment memory usage 72.48 MB
Optimization parameters
Parameters f, b1, k1, p1, p2
Adaptive camera model fitting No
Optimization time 1 seconds
Software version 1.6.2.10247
Depth Maps
Count 201
Depth maps generation parameters
Quality High
Filtering mode Mild
Processing time 31 minutes 57 seconds
Model
Faces 29,066
Vertices 14,533
Vertex colors 3 bands, uint8
Texture 8,196 x 8,196, 4 bands, uint8
Depth maps generation parameters
Quality High
Filtering mode Mild
Processing time 31 minutes 57 seconds
Reconstruction parameters
Surface type Arbitrary
Source data Depth maps
Interpolation Enabled
Best Regards,

Paul Pelletier

nwilson

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Cameras not aligning
« Reply #10 on: April 22, 2020, 06:48:19 AM »
Wow thanks everyone!  That’s all extremely helpful and although I know the photography isn’t perfect, I was pretty sure that it still should have worked. 

I’ve followed the steps that Polar Nick suggested and it’s worked well.

Alexey yes it’s ok to share the alignment results.  It sounds like your approach is similar to what I tried but your way of creating masks is different.  Is that correct?  With your method, when I go to Import Masks, and put in Method – From Background and Filename template – the background image file name, and press ok, it wants me to open something.  I’m not sure what to do at this point?


Paulo

  • Hero Member
  • *****
  • Posts: 776
    • View Profile
Re: Cameras not aligning
« Reply #11 on: April 22, 2020, 06:54:47 AM »
Just select the folder where your background images are....
Best Regards,

Paul Pelletier

nwilson

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Cameras not aligning
« Reply #12 on: April 22, 2020, 09:02:16 AM »
Ahh I see.  I had left off the .jpg from the file name which is why it wasn't working.  Thanks Paul.
« Last Edit: April 22, 2020, 10:15:04 AM by nwilson »

Superxiong

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: Cameras not aligning
« Reply #13 on: April 23, 2020, 06:37:34 PM »
How do You generate masks ?
My approach was the following:
 - add all images to the single chunk,
 - copy to the clipboard the label of the first background image,
 - select in the Photos pane all the images which correspond to the given background,
 - right-click on selection, then Import Masks -> From Background -> Filename = background image filename,
- then repeat the steps for each sub-set of images.

Somehow I dont quite understand this - I try to do the same for my model (also opened a post here -https://www.agisoft.com/forum/index.php?topic=12115.0. I only have one background picture.

Questions:
-Do I select the background image, and Ctrl+C?
-My background image is called bg.jpg, do I put it as "file name template"? Afterwards there is a window which prompt me to select a folder, does it mean I did the step wrongly?