100% Guaranteed Results


Exercises – 1
$ 29.99
Category:

Description

5/5 – (1 vote)

In this programming assignment, we will implement Dolly Zoom effect used by filmmakers to create a sensation of vertigo, a “falling-away-from-oneself feeling”. It keeps the size of an object of interests constant in the image, while making the foreground and background objects appear larger or smaller by adjusting focal length and moving the camera. You will simulate the Dolly Zoom effect with a synthetic scene as shown in Figure 1, which illustrates two cubes and one pyramid seen from the top view. Please find an example of the Dolly Zoom simulation from here: http:
//cis.upenn.edu/~cis580/Spring2016/Projects/output.avi

Figure 1: Top view of the synthetic scene.
2 Technical Details
The MATLAB script run dolly zoom.m will be the main script to run this assignment. Given 3D coordinates of vertices, we will complete two functions: compute focal length and compute f pos. compute focal length finds focal length such that the height of the object A remains constant while the camera moves along with Z axis. The reference depth, reference focal length and height of the object A and the camera movement will be given. compute f pos computes the focal length and the camera movement such that the height of the background object C becomes twice smaller than the foreground object A (while the height of the object A remains constant) as shown in Figure 4. We will use this function to visualize the Dolly Zoom effect using project objects.
3 Dolly Zoom

Figure 2: Image projection
A point in 3D is projected onto the image plane through the pinhole (COP) as shown in Figure 2:
, (1)
where (u,v) is the image coordinate of the projection, (X,Y,Z) is the 3D point, and f is the focal length of the camera.
When the camera moves along with its Z-axis, the depth, Z, changes and therefore, the projection, (u,v), changes. This projection change produced by the depth change can be compensated by adjusting focal length:
u = fref , (2)
where ∆C is the movement of the camera along its Z axis (+ direction indicates approaching to objects) and f0 is the modified focal length. fref and Zref are the focal length and depth of an object in the original image, respectively. Dolly zoom effect exploits the compensation between depth and focal length, which produces depth sensation.

0 200 400 600 800 1000 1200 1400 1600 1800
Figure 4: compute f pos
4 Visualizing Results
We can visualize the Dolly zoom effect using project objects(f, pos, points, fid) where f is the focal length, pos is the camera position, points is 3D coordinates for vertice on polygons, and fid is the figure display ID.
5 Submitting
To submit your results, run the submit script, which will test your compute focal length and compute f pos functions. This script will generate a mat file called RoboticsPerceptionWeek1Submission.mat. Upload this file onto the assignment page, and you should receive your score immediately.

Reviews

There are no reviews yet.

Be the first to review “Exercises – 1”

Your email address will not be published. Required fields are marked *

Related products