I'm trying to automate the actual geo-referencing in PyQgis/PyQt5. I went manually over the built-in GDAL Georeferencer in QGIS and saved a GCP-file. Also, the actual commands used for the conversion are available:
gdal_translate -of GTiff <gcpString> <inputFile> <tempFile> gdalwarp -r cubic -order 2 -co COMPRESS=NONE <tempFile> <outputFile>
I tried to 'copy' this behaviour in PyQt5 using
subprocess.Popen() but it seems from PyQgis I do not have permissions or access to the gdal cmd-tools.
Then, I stumbled upon the Python GDAL library which is (I think) built-in with QGIS, and seems a good option. However, I cannot get this to work with the given options as above and documentation is not very easy.
What would be the best approach for referencing the image with a given GCP-file and options?