Starting from:

$30

ENPM673- Perception for Autonomous Robots: Homework 1 Solved

Please provide detailed instructions on how to run your code in the README.md file.
For each section of the homework, explain briefly what you did, and describe any interesting problems you encountered and/or solutions you implemented.
For Problem 4, you are not allowed to use built in functions for computing Singular Value Decomposition(SVD) and pseudoinverse directly. However, use of low-level inbuilt functions like functions for computing eigenvectors and transpose are allowed.
Problem 1
Assume that you have a camera with a resolution of 5MP where the camera sensor is square shaped with a width of 14mm. It is also given that the focal length of the camera is 25mm.

Compute the Field of View of the camera in the horizontal and vertical direction.
Assuming you are detecting a square shaped object with width 5cm, placed at a distance of 20 meters from the camera, compute the minimum number of pixels that the object will occupy in the image.
Problem 2
A ball is thrown against a white background and a camera sensor is used to track its trajectory. We have a near perfect sensor tracking the ball in video1 and the second sensor is faulty and tracks the ball as shown in video2. Clearly, there is no noise added to the first video whereas there is significant noise in the second video. Assuming that the trajectory of the ball follows the equation of a parabola:

Use Standard Least Squares to fit curves to the given videos in each case. You have to plot the data and your best fit curve for each case. Submit your code along with the instructions to run it.
(Hint: Read the video frame by frame using OpenCV’s inbuilt function. For each frame, filter the red channel for the ball and detect the topmost and bottom most colored pixel and store it as X and Y coordinates. Use this information to plot curves.)

Problem 3
In the above problem, we used the least squares method to fit a curve. However, if the data is scattered, this might not be the best choice for curve fitting. In this problem, you are given data for health insurance costs based on the person’s age. There are other fields as well, but you have to fit a line only for age and insurance cost data. The data is given in .csv file format and can be downloaded from here.

Compute the covariance matrix (from scratch) and find its eigenvalues and eigenvectors. Plot the eigenvectors on the same graph as the data. Refer to this article for better understanding.
Fit a line to the data using linear least square method, total least square method and RANSAC. Plot the result for each method and explain drawbacks/advantages for each.
Briefly explain all the steps of your solution and discuss which would be a better choice of outlier rejection technique for each case.
The original dataset is provided by kaggle.

Problem 4
The concept of homography in Computer Vision is used to understand, explain and study visual perspective, and specifically, the difference in appearance of two plane objects viewed from different points of view. This concept will be taught in more detail in the coming lectures. For now, you just need to know that given 4 corresponding points on the two different planes, the homography between them is computed using the

following system of equations Ax = 0, where A is given by

For the given point correspondences,

Find the homography matrix:

Show mathematically how you will compute the Singular Value Decomposition (SVD) for the matrix A. [10]
Write python code to compute the SVD. [10]

More products