I am experiencing some shifting polygon that I obtain via pixel to lat lon conversion. I have a program to do image processing in opencv that uses pixel coordinates and once I had obtain my contours, I would convert these into polygon by transforming the pixel points in the polygon to lat Lon and visualized on QGIS.
I am stuck now because I keep experiencing a shift in the polygon when plotted on lat Lon epsg 4326 when I plot the polygon on my original georeference image geotiff.
I suspect it may be a precision issue but seeing that the shift is 10-9 pixel in x and y direction which translate to about 0.1 - 0.2 m error on the geotiff file, I don’t think that’s the case.
- Geotiff image
- gdaltranslate to generate jgw, prj, jpg.
- process jpg
- Read prj and jgw for georeferencing and transformation between pixel to lat lon and vice versa.
- obtain contours
- transform polygon
- convert from pixel to lat Lon
- overlay polygon on geotiff to visualize