Author Topic: Metashape.Chunk' object has no attribute 'camera'  (Read 2022 times)


  • Newbie
  • *
  • Posts: 5
    • View Profile
Metashape.Chunk' object has no attribute 'camera'
« on: December 15, 2019, 02:51:32 PM »

i am trying to for the rotation matrix from the camera center and the camera position input and i am getting the below error

 <Chunk 'Chunk 3'>
2019-12-15 12:44:51 Traceback (most recent call last):
2019-12-15 12:44:51   File "C:/Users/Darshan Savanur/Downloads/project/py files/", line 13, in <module>
2019-12-15 12:44:51     for camera in
2019-12-15 12:44:51 AttributeError: 'Metashape.Chunk' object has no attribute 'camera'
2019-12-15 12:44:51 Error: 'Metashape.Chunk' object has no attribute 'camera'

please help me on this .. I think there is something wrong with my labels in my other code which generates csv with camera co-ordinates and camera center ...please check the attached file which generates this csv

import Metashape
import numpy

doc = ch_flir

ch_flir = doc.chunks[2]
cameracenter= numpy.loadtxt(open(r"C:\Users\Darshan Savanur\Downloads\project\py files\cameracenttermal.csv","rb"), delimiter=",")

R = []

for camera in
    d =
    T = ch_flir.transform.matrix
    print (T)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14888
    • View Profile
Re: Metashape.Chunk' object has no attribute 'camera'
« Reply #1 on: December 15, 2019, 03:57:36 PM »
Hello Darshan,

I think it should be:
Code: [Select]
for camera in ch_flir.cameras:
Best regards,
Alexey Pasumansky,
Agisoft LLC