Project photo onto mesh UV texture I am trying to project an image, taken from a certain angle, onto a mesh.
For the experiment I have a simple box. I was hoping I could use this for more complex geometry, like a 3D scanned room for instance. But first, I would like to make it work with something simple. I'm looking into this because the structore core depth sensors RGB camera is pretty vague and does not provide nice textures. 

See the picture below.


And it should be project onto this mesh


I am trying with the UV project modifier on the box, a spot light lamp with an emtpy as its parent. (Like in this example from Blender docs itself.)

I am hoping to get results similar to what is shown in this video on YouTube.

I have been fiddling for quiet some time now, but I cannot seem to get it right. See my attempt below. Then I thought, I am probably not doing it right. 

It is possible (doable), if yes, how could I do this?

Thanks so much.



EDIT

So I first wanted to have something simple to experiment with. I made it more simple. I took the variables of the camera. I took a cube, painted something on it and rendered it. Next I tried projecting this exactly on the cube again. It worked! Here is the result. But it took me like 20 minutes or so to align it!



And this was the rendered image.
For your workflow to work, you need the exact match for the camera, both in placement, rotation and perspective. Not a trivial thing to do, and hard and time consuming to do manually.

You can try (Fspy)(https://fspy.io/)
Fspy is an app to match the perspective of a camera in 3d space to a photograph.

Open the Fspy app. and import the image. Set the lines so that you match parallel lines and set the origin where you want it and save the fspy project.



Install the fspy importer addon and then import the fspy project into blender 2.8

Once you open the fspy project, blender will create an active camera that matches the lens and placement of the original camera, and uses an the image as background for reference.

It is then quite easy to create a box that matches your original object.



Then you can unwrap the UV using Project from View.





Create a material that uses the UV map as coordinates for the texture, and the image as color for the shader.



Done. Over and Out.