Apply Perspective using vanishing points

I have a background image (a room) and a foregraund image (a rug). Also i have 3 vanishing points for the room image. I want set the camera (or OrbitControls) x, y, z for rug spread on the floor. How i can do it?

my result for now:

my goal:

We need to get the vertical fov value of the camera and the tilt angle of the camera using vanishing points

I think that you need to know camera fov, position and rotation. Ie, you need to know that and then apply it to your camera in threejs. If you can’t get that information, I would suggest building very basic scene from boxes ( box matching bed, floor, walls etc ) that looks exactly like this and then try to setup your camera so that the scene you built matches the one in the background image. I would still probably do this in 3ds max/blender etc as it would be much easier and faster to find correct values for the camera ( if you don’t have them ).