Author Topic: region box translation after re-oriented  (Read 2523 times)


  • Newbie
  • *
  • Posts: 23
    • View Profile
region box translation after re-oriented
« on: July 15, 2015, 06:17:20 PM »
i'm confused about the local and re-oriented coordinates math

my body scanning workflow detect markers on ground and then update the transform. This makes a [R] on the chunk name and result in correct alignment, orientation and scale of scene.

however, now i want to move the center of region box to [0,100,0] (by script)   (100cm above the ground). when i do, it still works on a local coordinates, instead of the new re-oriented coordinates.

any help on the correct code is appreciated.

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14943
    • View Profile
Re: region box translation after re-oriented
« Reply #1 on: July 16, 2015, 12:02:14 PM »
Hello viper_0711,

Region box center is specified in the internal coordinates, so you need to convert real world position to this system using transformation matrix. Please check the following code (it will work for local coordinate system):

Code: [Select]
pos_int = chunk.transform.matrix.inv().mulp(pos_world)
Best regards,
Alexey Pasumansky,
Agisoft LLC