1
Python and Java API / How do I convert a camera to ENU?
« on: September 18, 2018, 02:56:45 AM »
Hey Alexey,
I have exported camera positions in an XML file and want to convert a camera to ENU using the transform at the end of the XML file. I read that the transform represents a ECEF -> local transform. So how do you use it to convert the camera transform to ENU?
The reason I want to do this is I want to find the 4 points on the ground (in geodetic coordinates (lon, lat, alt) that correspond to the corner pixels of the image.
I have exported camera positions in an XML file and want to convert a camera to ENU using the transform at the end of the XML file. I read that the transform represents a ECEF -> local transform. So how do you use it to convert the camera transform to ENU?
Code: [Select]
<camera id="0" label="08e99038b0f96f7003556eb23877402a.jpg" sensor_id="0" enabled="true">
<transform>...</transform>
<orientation>1</orientation>
<reference x="-79.153242361111097" y="37.400188583333303" z="208.38200000000001" enabled="true"/>
</camera>
...
<transform>
<rotation>2.5818723527903192e-01 9.5254434818531153e-01 1.6124086417279426e-01 -5.3390401398553078e-01 2.7978097103927702e-01 -7.9791547929242301e-01 -8.0516200567904861e-01 1.1992444698450438e-01 5.8080312639168274e-01</rotation>
<translation>9.5474336100430344e+05 -4.9826859996768227e+06 3.8528608851181311e+06</translation>
<scale>9.1296180142317489e+00</scale>
</transform>
The reason I want to do this is I want to find the 4 points on the ground (in geodetic coordinates (lon, lat, alt) that correspond to the corner pixels of the image.