Forum

Author Topic: Chunk transform changing after alignPhotos sometimes  (Read 5819 times)

Rafes

  • Newbie
  • *
  • Posts: 8
    • View Profile
Chunk transform changing after alignPhotos sometimes
« on: July 02, 2024, 02:02:54 AM »
Hi,

(I'm not sure how many variables to explain here, so please let me know if there are any ideas that I can follow up on for more information.)

The basic setup:
  • I have a lot of cameras in a chunk. Some are already aligned by importing cameras .xml.
  • The cameras that are not aligned all have very accurate reference data for the location
  • I used the python API to matchPhotos

I reset the transform for this chunk and duplicated it twice before continuing, we'll call them "A" and "B"

In chunk A...
I run "Workflow > Align Photos..." 
The chunk transform changes!

In Chunk B...
I clear all reference data
I run "Workflow > Align Photos..." 
The chunk transform does not change!

I then reset chunk B and it essentially aligned back to what chunk A looks like (not exactly because they are 2 different solves, but obviously correct anyway.)


My question is why is the chunk transform changing only when reference data is being used?




Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15236
    • View Profile
Re: Chunk transform changing after alignPhotos sometimes
« Reply #1 on: July 02, 2024, 12:28:48 PM »
Hello Rafes,

If geographic/projected coordinate system is used in the chunk, then chunk.transform.matrix defines the transformation from the internal coordinate system used in the chunk to geocentric coordinate system.

I would expect to have different chunk.transform matrix when alignment is reset and performed from scratch. But does it bring any inconvenience on your side?
Best regards,
Alexey Pasumansky,
Agisoft LLC

Rafes

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Chunk transform changing after alignPhotos sometimes
« Reply #2 on: July 02, 2024, 06:44:00 PM »

Quote
But does it bring any inconvenience on your side?

It feels non-deterministic If we remove a camera, or do more solves of the content over time, where cameras can shift or fail to align for some reason, then the resulting reconstruction shifts in "world space". It is possible I am misunderstanding a concept or misusing the resulting data. I will send you a DM

Rafes

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Chunk transform changing after alignPhotos sometimes
« Reply #3 on: July 04, 2024, 02:36:28 AM »
Note the cameras no longer match the reference data when this happens. The whole chunk changes and if I reset the camera, the reference data is in the original place/space. It isn't clear to us how reference data is used during alignment, especially in this case. I would really love to have Metashape obey the reference data as a hard constraint (or at least have deterministic control). If I say a camera location is accurate to 1mm, it really should not be moved more than 1mm.