How to change the homography with the scale of the image?

The two answers are wrong! Sorry!

The right answer with proof is:

enter image description here


I think you can modify the homography for the correct scale. Let's assume correspondences are denoted with x and y and the homography maps x to y. If we consider scaled points

enter image description here

we can try to factor s out of the transformation involving the homography matrix like so:

enter image description here

Where capital pi (Π) denotes the perspective transformation (simply dividing x and y component of a 3D vector with its z component). When cancelling s, we would have the equation necessary to apply the homography in a different scale. Here H_s can be read off the previous equation as:

enter image description here

If you compute a homography on a scale different from your "application scale" (e.g. visualization), you should be fine to just compute H_s where s is the relative factor from new scale (denoted with prime) to old scale. For instance, if a visualization is twice as large as the computation choose s = 0.5.