Highlighted

## Get camera position from image?

Community Beginner ,
Sep 18, 2020

Copied

Can you get a camera position from the perspective of a still image in After Effects? I know you can track the camera motion in video clips , but it doesn't work for images or footage shot on a tripod (where there are no camera movements).

I know that one could use the corner pin effect and pin whatever you like on a wall for instance according to the perspective. That is not what I'm after here. I want to get a camera position or a 3D plane from the perspective of the still image/video. Do anyone know how to achieve that?

Thanks

TOPICS
FAQ, How to, Performance

Views

74

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

## Get camera position from image?

Community Beginner ,
Sep 18, 2020

Copied

Can you get a camera position from the perspective of a still image in After Effects? I know you can track the camera motion in video clips , but it doesn't work for images or footage shot on a tripod (where there are no camera movements).

I know that one could use the corner pin effect and pin whatever you like on a wall for instance according to the perspective. That is not what I'm after here. I want to get a camera position or a 3D plane from the perspective of the still image/video. Do anyone know how to achieve that?

Thanks

TOPICS
FAQ, How to, Performance

Views

75

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 18, 2020 0
5 Replies 5
Sep 18, 2020

Copied

You cannot get the camera position, focal length, and angle, but you can make a very good educated guess. Perspective is controlled by position, framing is controlled by focal length. Here is the workflow:

• Add a comp sized solid with grid applied
• Set the anchor point at the top of the frame (snapping helps)
• Duplicate the solid 3 times and move the anchor point to the left, right, and bottom of the solid
• Make the layers 3D then rotate each layer in X or Y + or - 90º to create a box with grid lines
• Scale the layers in X or Y until you get a nice long box
• Add a 2 node camera
• Press aa and set a keyframe for zoom (to make it easy to find
• Press alt/option + p to set a keyframe for position
• Press U to reveal camera position and zoom
• Adjust the Y and Z values of the camera to set the tilt angle of the camera so that the geometry in the scene starts to line up with the reference grid
• Adjust the Zoom value so you can see the edges of the grid layers at the edge of the frame
• Keep fiddling until the perspective looks pretty close

If the geometry in the scene is at an angle you may need to also adjust the X position of the camera. If there is little or no geometry in the scene then it becomes a lot harder to make an educated guess of the camera position and zoom value. This shot is fairly easy to figure out. You can test the shot by adding a small 3D layer to the scene and moving it along the Z-axis.

There is no software that I am aware of that can guess the camera position because you would need to know the position and rotation of the geometry in the scene to make it work. The camera tracker works because it identifies surfaces and calculates the perspective change.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 18, 2020 1
Community Beginner ,
Sep 19, 2020

Copied

I tried your way and it seems to a bit time-consuming and hard to get a precise perspective. I was look for a more sleek and faster way. The shot that I'm working with has a perspective that is hard to recreate. For example, I would like to make a 3D plane underneath the feet in this shot. Ignore the grid since its the corner pin effect and is not in a 3D space.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 19, 2020 0
Sep 18, 2020

Copied

You can do it in Cinema 4D, but (as Rick says), I don't know of a way to do it in After Effects.

You can do some stuff with the Vanishing Point feature in Photoshop, but it might not be helpful here. Knowing what, exactly, you're trying to do would be helpful.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 18, 2020 0
Sep 19, 2020

Copied

Working with that image is going to be pretty easy. I downloaded it, used Change Color to hide the grid you made to make it easier to see what I was doing, then added a solid + Grid, made it a 3D layer, rotated the layer -90º in X, added a camera with a 35 mm lens because the shot looks a little wider than a normal lens, then used the Camera tool (c) to get close, adjusted the position and zoom value of the camera, and was lined up in about 3 minutes. When you have a flat surface like that with parallel sides it is pretty easy to line things up.  I'm not going to post the screen capture video on YouTube, but you can watch it on Dropbox. I apologize for the low audio.

Likes

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 19, 2020 0
LATEST
Sep 19, 2020