Forum

Author Topic: Splitting up a multicam rig after the alignment process?  (Read 5041 times)

HaydenMartin

  • Newbie
  • *
  • Posts: 23
    • View Profile
Splitting up a multicam rig after the alignment process?
« on: April 17, 2024, 01:58:03 AM »
Hey guys

Question here regarding multicam rigs

When a multicam rig is loaded in, with master/slave cameras, is there a way to “break apart” the slave cameras from the master after the alignment process so they are classed as seperate again?

The reason I’m hoping to find out the approach for this is because I’m using Postshot, a Gaussian Splat platform which requires exports of all the cameras from Metashape, rather than just the masters

Would be great to know if this is possible and how to do it!

Thanks

Paulo

  • Hero Member
  • *****
  • Posts: 1384
    • View Profile
Re: Splitting up a multicam rig after the alignment process?
« Reply #1 on: April 17, 2024, 02:16:11 AM »
Hi Martin,

you can certainly access and export the slave cameras along with master. If you have a 5 camera rig with 1 master and 4 slaves, then chunk.cmeras[0] is master and chunk.cameras[n] with n = 1 to 4 are slaves....etc...
« Last Edit: April 17, 2024, 07:53:22 AM by Paulo »
Best Regards,
Paul Pelletier,
Surveyor

HaydenMartin

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Splitting up a multicam rig after the alignment process?
« Reply #2 on: April 17, 2024, 09:59:59 AM »
Hey Paul

Thanks for this

As great as it is to have a response so soon, I’d really appreciate if you could provide a bit more context regarding:

“ then chunk.cmeras[0] is master and chunk.cameras[n] with n = 1 to 4 are slaves....etc... “

Are these export commands? If so where to a place then?

To clarify, I simply want to be able to access ALL cameras from the lefthand side cameras tab.

Right now I have 700 Master cams, each with 5 Slave cams, so in total I want to have access to 3500 cams… I hope that makes sense

Here’s the script I’m using:
https://github.com/agisoft-llc/metashape-scripts/blob/master/src/export_for_gaussian_splatting.py

Looking at the scripting documentation here:
http://download.agisoft.com/metashape-java-api/latest/com/agisoft/metashape/Chunk.html

Seems like I need to do something like this, but unsure how exactly, as  I’m a total Python noob:

To export the slave/secondary cameras, I’ll need to modify the parts of the script that iterate over the cameras in each chunk/frame. Specifically, in the functions “get_filtered_track_structure”, “save_undistorted_images”, and “save_images”, i’lll need to iterate over not just “frame.cameras” but also “frame.camericaclusters” which contains the slave camera clusters.

For each slave camera cluster, I’ll need to extract the individual slave cameras using “cluster.cameras” and process them similar to how the primary cameras are processed.

« Last Edit: April 17, 2024, 10:25:55 AM by HaydenMartin »

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15246
    • View Profile
Re: Splitting up a multicam rig after the alignment process?
« Reply #3 on: April 17, 2024, 12:00:48 PM »
Hello HaydenMartin,

Do you actually need to "split" master+slave systems into independent calibration groups, or whether you require any modification to Gaussian splatting script so that it could work with multi-camera systems?
Best regards,
Alexey Pasumansky,
Agisoft LLC

HaydenMartin

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Splitting up a multicam rig after the alignment process?
« Reply #4 on: April 17, 2024, 01:48:30 PM »
Well ideally both! Haha

Would be awesome to know how to split up the master/slave cameras after alignment

And would also be awesome to edit the script so it works with multicams

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15246
    • View Profile
Re: Splitting up a multicam rig after the alignment process?
« Reply #5 on: April 22, 2024, 12:26:20 PM »
Hello HaydenMartin,

Would it be possible to share a small example of the project that you have problems with?
Best regards,
Alexey Pasumansky,
Agisoft LLC

3create

  • Newbie
  • *
  • Posts: 36
    • View Profile
    • 3create
Re: Splitting up a multicam rig after the alignment process?
« Reply #6 on: September 19, 2024, 09:23:50 PM »
Yes, being able to "break apart" the master slave structure after successful alignment would be really useful!
This should by default then be compatible with the colmap export, without any changes needed for that?!
@ Alexey, I can send you an example if required.