Finding the angle of a perspective image
<p>I'm working on a floor design app that allows the user to pick preset floor images and view them within a preset room image.
<a href="https://i.stack.imgur.com/bwehR.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bwehR.jpg" alt="enter image description here"></a>
<a href="https://i.stack.imgur.com/jukbi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jukbi.jpg" alt="enter image description here"></a>
My problem is I'm struggling to get the perspective of the floor image to match the room image properly.  I have played around with setting the height of the viewpoint and the tilt but is there a way to calculate what these should be by using the real world measurements of the floor and room image?  My knowledge in perspective drawing is very limited so I apologise if I'm using the wrong terminology.
Any help or advice would be appreciated.</p>

<p>Thanks     </p>