Camera matching

When it comes to AR, there are multiple ways to align the 3d-camera to match the camerafeed’s perspecive, position and rotation. QR-Markers, image tracing etc.

How would you go about to automate the same thing with an image asset placed as a 2d-screen? The goal is to have a 2d-background layer with the 3d-layer “above”, matched to the photo (or maybe video).

Of course it can be done manually in editor, but this is time consuming and not available for the users.

Would it be possible to automate this, and match the plane of the 3d-scene - to the floor/ground of the current 2d-asset?