I have a single image (actually a Metashape Orthophoto) which has some markers that I can run marker detection on. All I want are the pixel coordinates of these markers, but I cannot use the markers.projections approach because there is no alignment to speak of here and projections returns None.
I tried to export the markers to an XML file (below) and sure enough, I can see the locations of two markers in pixel coordinates towards the end of the file. How do I recover these using the Python API?
Thank you.
---------------------
<?xml version="1.0" encoding="UTF-8"?>
<document version="1.5.0">
<chunk label="Chunk 1" enabled="true">
<sensors next_id="1">
<sensor id="0" label="unknown" type="frame">
<resolution width="3038" height="3561"/>
<property name="layer_index" value="0"/>
<bands>
<band label="Red"/>
<band label="Green"/>
<band label="Blue"/>
</bands>
<data_type>uint16</data_type>
</sensor>
</sensors>
<components next_id="0"/>
<cameras next_id="1" next_group_id="0">
<camera id="0" sensor_id="0" label="Austin_6_24_2_test_pib-bchudzsz"/>
</cameras>
<markers next_id="2" next_group_id="0">
<marker id="0" label="target 116"/>
<marker id="1" label="target 117"/>
</markers>
<reference>LOCAL_CS["Local Coordinates (m)",LOCAL_DATUM["Local Datum",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]]]</reference>
<settings>
<property name="accuracy_tiepoints" value="1"/>
<property name="accuracy_cameras" value="10"/>
<property name="accuracy_cameras_ypr" value="10"/>
<property name="accuracy_markers" value="0.0050000000000000001"/>
<property name="accuracy_scalebars" value="0.001"/>
<property name="accuracy_projections" value="0.5"/>
</settings>
<frames next_id="1">
<frame id="0">
<markers>
<marker marker_id="0">
<location camera_id="0" pinned="true" x="2619.54663" y="1992.58142"/>
</marker>
<marker marker_id="1">
<location camera_id="0" pinned="true" x="2820.41455" y="2001.7561"/>
</marker>
</markers>
</frame>
</frames>
</chunk>
</document>