Forum

Author Topic: Coded Marker and local coordinate  (Read 1278 times)

ppant

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
Coded Marker and local coordinate
« on: December 10, 2020, 10:03:53 PM »
I am mosaicing a 360 image of an object . I place a 12bit  coded marker on the ground.  I wrote a python script routine to load images, detect makers add scalebar, align image, and generate a point cloud model.  That works fine. Now I have a question I want to set the coded marker 'target_1', as my (0,0,0) coordinate. If possible How I can adjust the coordinate system.  Such that target 1 will be my 0,0,0  coodiante point in a point cloud.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Coded Marker and local coordinate
« Reply #1 on: December 10, 2020, 11:09:30 PM »
Hello ppant,

If marker is your "target_1", can you please check, if the following code solves the required task:
Code: [Select]
T = chunk.transform.matrix
M = T.scale() * Metashape.Matrix.Rotation(T.rotation())
chunk.transform.matrix = Metashape.Matrix().Translation(M.mulp((-1) * T.mulp(marker.position))) * M
Best regards,
Alexey Pasumansky,
Agisoft LLC