Hi, thanks for the code and sorry for the lots of questions. Below is the code I am using to call the reprojection error function error you provided, however, when I run the scripts, it throws an Error: Can't open file: No such file or directory (2). I have checked and the project file is there only hence, I am unable to understand this error.
def main():
doc = PhotoScan.app.document
doc.open("/home/apurv/Desktop/HTCV-PJA/fountain dense_orignal/fountain_dense/pj9.psz")
chunk = doc.chunk
total_error, ind_error = calc_reprojection(chunk)
print('%f'%total_error)
2. The second issue I have having is with camera pose estimation from the Transformation matrix in the camera.xml.
I am using below relation to obtain the camera pose:
C = -(RT)*T
where R and T are the rotational(3x3 matrix) and translation(3x1) vector. But, there is a huge difference in the ground truth and pose esitmation. For instance, Camera 0 has follow ground truth :
[-3.48 -1.196 -9.845]
estimation :
[-1.199 -0.017 0.427]
The difference increases even more for the 10th camera in the reconstruction:
ground truth : [ 19.671 0.222 11.429]
estimation : [ 3.602 0.115 3.388]
My question is if the transformation matrix is represented differently in photscan XML file or I have doing something incorrectly in reconstruction steps.
Best Regards
Apurv.