Forum

Author Topic: Python API Chunk.exportCameras inconsistent default projection  (Read 4260 times)

Gall

  • Jr. Member
  • **
  • Posts: 85
    • View Profile
exportCameras() does not seem to default to the chunk crs when exporting in OPK format (haven't tested the other formats though).

Here's a small example on a project in WGS84:
Code: [Select]
# Default projection
chunk.exportCameras(path, format=PhotoScan.CamerasFormatOPK)
produces
Code: [Select]
# Cameras (788)
# PhotoID, X, Y, Z, Omega, Phi, Kappa, r11, r12, r13, r21, r22, r23, r31, r32, r33
0150_530nm.tif 67.7274358037419120 -48.1576494834498305 174.9012951258622763 0.4840078980142850 -9.2832160972426454 -100.7925499560861482 -0.1848011306143397 -0.9820213886105380 -0.0385036937850455 0.9694462852253063 -0.1885854982745571 0.1568738662218514 -0.1613147302217500 -0.0083367950657243 0.9868678004988898
0151_530nm.tif 62.3380782906425210 -46.9575464451915039 175.2130322240972475 0.6908263376255074 -8.3691433348896744 -101.1224507389953686 -0.1908521733696799 -0.9808073005336287 -0.0399059787501298 0.9707680346967246 -0.1946143621493194 0.1404801511113671 -0.1455502343904970 -0.0119285064090072 0.9892789495403823
0152_530nm.tif 56.6615589174082501 -45.8102605583421294 175.6731439080446364 1.8430815242583256 -4.6073431256402895 -99.3065186929488277 -0.1611935265354484 -0.9859090012004662 -0.0447223473776283 0.9836484497408970 -0.1641819193647491 0.0740271887622177 -0.0803266725651923 -0.0320583640506908 0.9962529231921973
0153_530nm.tif 51.3537190435335162 -44.5989861775561707 176.1177954663481842 3.1369944021207945 -0.8980827195184733 -98.7285768762521059 -0.1517351813837043 -0.9868070568120064 -0.0564647443674392 0.9882969011829651 -0.1523742218509173 0.0071646093736062 -0.0156738585741755 -0.0547168085815809 0.9983788865035377

while specifying the projection:
Code: [Select]
chunk.exportCameras(path, format=PhotoScan.CamerasFormatOPK, projection=chunk.crs)
produces
Code: [Select]
# Cameras (788)
# PhotoID, X, Y, Z, Omega, Phi, Kappa, r11, r12, r13, r21, r22, r23, r31, r32, r33
0150_530nm.tif 0.1240930371033702 44.3175085612113122 174.9018362440360477 0.4834784101344093 -9.2838284752460627 -100.7931457061247755 -0.1848108878342219 -0.9820197668131644 -0.0384982249739585 0.9694426699590626 -0.1885943468338339 0.1568855697792619 -0.1613252782442067 -0.0083276605681559 0.9868661533708059
0151_530nm.tif 0.1240254839732798 44.3175193616320655 175.2135095180995847 0.6903244396727838 -8.3697089332840076 -101.1229956658497713 -0.1908611289183387 -0.9808057763987279 -0.0399006071495888 0.9707648096377509 -0.1946225752497196 0.1404910586911091 -0.1455600008140926 -0.0119198232392837 0.9892776172424735
0152_530nm.tif 0.1239543313536925 44.3175296867339483 175.6735599778699566 1.8426306170565241 -4.6078669709574429 -99.3069998413609483 -0.1612016680603882 -0.9859079269681957 -0.0447166831934479 0.9836463712775572 -0.1641899052443549 0.0740370940025618 -0.0803357858431893 -0.0320505001072466 0.9962524413801114
0153_530nm.tif 0.1238877999648306 44.3175405876056061 176.1181580660826569 3.1365864012938212 -0.8985671873743225 -98.7290007634679938 -0.1517424729064216 -0.9868062613393860 -0.0564590515119400 0.9882956475530297 -0.1523819286930088 0.0071736208107785 -0.0156823130941179 -0.0547096919127021 0.9983791437459195

Aren't all methods taking a projection parameter supposed to default to the chunk crs?