Closed ufukcbicici closed 1 year ago
First off, phantastic plugin - exactly what I was searching for.
I also wondered why the image centres were not exactly aligned with the GPS coordinates. With the code changes above, the images definitely fit better. However, this does not seem to apply if the photos are strongly rotated (nearly 90 degree). But generally an absolute improvement.
that's correct! I updated the program and will update to the plugin hub.
Hello,
While trying to understand how the world files are generated from the camera metadata directly, I came to inspect the algorithm in the method
createSingleWorldfile
. Basically, it consists of converting the sensor dimensions into longitude, latitude values, projecting them into the ground plane by using the sensor focal length and the estimated ground altitude and then applying rotation such that the image is oriented towards the heading value. What I am not sure about is in the upper left coordinate calculation for the world file:My concern is in the line
invar_angle = math.degrees(math.atan(iw / ih))
. This angle, arctangent of the image width divided by the image height, is directly used for calculating the upper left coordinate, in longitude and latitude space. However we are using the image width and height in pixels for calculating the angle, which are in the original image space. I think we should use the arctangent between the image width and height in degrees like:Am I missing something here or is there really a small glitch in the code?