Forum

Author Topic: How to center and straighten up rotational models?  (Read 3031 times)

Kabe

  • Newbie
  • *
  • Posts: 9
    • View Profile
How to center and straighten up rotational models?
« on: April 21, 2022, 04:09:10 PM »
I'm sampling the pieces of a historic chess game, which I photographed on a turn table.

After some initial struggles with the automatic camera calibration [do not try this with pawns or bishops... import the calibration from other pieces like the knight], this worked out quite well for my purposes.

The camera was on a tripod, so all the source images should have the same y coordinate. Though the cameras are correctly aligned with respect to each other, they and the reconstruction volume are rotated along the x axis by about 30°.

The only remaining issue I have is to orient the pieces along their rotational axis.

Any tips on how to do that?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14840
    • View Profile
Re: How to center and straighten up rotational models?
« Reply #1 on: April 21, 2022, 06:14:29 PM »
Hello Kabe,

If you place a reference pattern on the background (under the object) which has some distinguishable spots that can be easily marked on the photos, you can use that information to reference all the scanned objects in the same coordinate system space, providing that the reference pattern is the same (for example, a piece of paper with 4-6 printed coded targets - you may need to experiment with the proper size of the targets to allow their automatic detection).

In case you need to fix the issue in the already processed projects, you can use Rotate Object instrument for orienting the object manually in the coordinate system. Another option is to input the coordinates of the camera locations (at least approximate) to the Reference pane -> Source values tab. For this purpose you can use Python script to "calculate" the required XY value for the cameras based on the known rotation step in degrees, or calculate it externally and import to Metashape from CSV file, where each line contains the camera label (with the image file extension) and XYZ coordinates.

Note that from all the suggested options only manual approach is available in Standard edition of Metashape.
Best regards,
Alexey Pasumansky,
Agisoft LLC

Kabe

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: How to center and straighten up rotational models?
« Reply #2 on: April 21, 2022, 07:29:09 PM »
Ok, thanks for your answer, at least I don't have to spend time looking for options that I don't have in the Standard version.

Best regards

Klaus

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14840
    • View Profile
Re: How to center and straighten up rotational models?
« Reply #3 on: April 21, 2022, 08:42:59 PM »
Hello Klaus,

Possible workaround could be manual fix of the object orientation in the reference chunk/project, and then aligning new projects as chunks to the reference chunk. However, it assumes that there are matching camera labels in both chunks being aligned, which means that you may need to manually modify camera labels (for at least 4-8 cameras) to fit the reference chunk.
Best regards,
Alexey Pasumansky,
Agisoft LLC

CheeseAndJamSandwich

  • Full Member
  • ***
  • Posts: 153
    • View Profile
    • Sketchfab Models
Re: How to center and straighten up rotational models?
« Reply #4 on: April 22, 2022, 04:35:24 PM »
Could MS (Std & Pro) just have a 'Turntable' setting in the align dialog?  Or even a bit auto-detection?

Turntable scans are 'always' vertical (unless you're scanning on a lathe! lol)... which means the axis of every scan level should be vertical too, and should also be coincident (unless handheld)...  Which gives you the axis of the turntable itself.
Surely ms can calculate this axis of any level of aligned cameras, and then, as the 'Turntable' setting is checked, it would correctly orientate the scan vertically, and the right way up... ...using the assumption that most scans will be 'looking down' on the object...  but perhaps with an 'inverted' checkbox or tool, if the scan is say of a monument, scanned by hand, whereby all levels may be lower than the object.

MS should be able to correctly orientate almost every single turntable scan.  With the axis on the z axis.
There should be no need for any markers or any extra work to have these correctly orientated.

But again, IF we could have a subset of the reference system, with a few markers available in the Standard version, it would be so, so useful!!!
« Last Edit: April 22, 2022, 04:45:56 PM by CheeseAndJamSandwich »

Kabe

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: How to center and straighten up rotational models?
« Reply #5 on: April 22, 2022, 05:30:00 PM »
Yep, a turntable setting in the alignment dialog could easily allow to create the model upright in the first place.

IMO, this doesn't even need to know if the camera points up- or downward. Basically the positions of each row of frames in a turntable describes a circle, which could be rotated to lie in the x-y plane.

In my case, the orthogonal views of blender were fine to align the models.