Forum

Author Topic: Python Multilayer divide to single image Transformation  (Read 915 times)

MartinW

  • Newbie
  • *
  • Posts: 2
    • View Profile
Python Multilayer divide to single image Transformation
« on: November 18, 2021, 02:40:05 PM »
Hallo,
I am able to divide multilayer images back to single layaer by:

for im in cam:
    if im.sensor.master != im.sensor:
        trafo = im.trafo
        im.sensor.master = im.sensor
        im.master = im
        im.transform = trafo  //Here I need somehow apply image.sensor and image.location

But I of course transformation needs to apply sensor.rotation and sensor.locatin as well to get the exact transformation for that single image.
Do you know how and in which order I have to apply sensor.rotation and sensor.location

Greetings


MartinW

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Python Multilayer divide to single image Transformation
« Reply #1 on: November 18, 2021, 03:50:01 PM »
Okay I solved it myself.
You need to first set sensor.roation and location to zero and then apply cam.transform as the previous one, which was for example stored by a loop over chunk.cameras saving all camera transformations