First of all, thanks for your time reading my question :-)
I have the original image (w ': 2124, h': 3204) and the same image is scaled (w: 512, h: 768). The ratio for the width is 4.14 (rw), and the height ratio is 4.17 (rh).
I am trying to find out the coordinates (x ', y') in the original image when I get the coordinates in the scaled image (x, y). I use the formula: x '= x * rw and y' = y * rh . But when I draw a line, or a rectangle there is always a shift that increases when x or y is higher.
Please, does anyone know how to convert coordinates without losing accuracy?
Thanks in advance! Oscar.
c ++ math qt image coordinates
ocell
source share