The XML you get is synthesised according to this schema.
For each recognized character it will contain an instance of charParams
element as shown in the answer you linked to. The element will contain the coordinates in page pixels - the same XML also contains a page
element:
<page width="..." height="..." resolution="..." originalCoords="...">
where the image width and height are stored. So l
and r
for each charParams
element is in range 0..width-1
of the corresponding page and t
and b
for each charParams
element is in range 0..height-1
of the corresponding page.
Also it's worth mentioning explicitly that all coordinates are in pixels - they are completely resolution-agnostic. This is why whenever you try to highlight anything on an image you have to take zoom into account - the image will likely not be always displayed as is by your device software, but will be downscaled and so you have to map page coordinates onto your zoomed-out image coordinates and highlight appropriately.