COMP/ENGN4528 Computer Vision
Computer Vision
项目类别:计算机

Hello, dear friend, you can consult us at any time if you have any questions, add  WeChat:  zz-x2580


COMP/ENGN4528 Computer Vision

Computer Lab 3 (CLab-3)

Objectives:
This is CLab-3 for COMP/ENGN4528. The goal of this lab is to help you familiarize
yourself with, and practice:
• Basic multi-view camera geometry, camera calibration. They are the basic
building blocks for 3D visual reconstruction systems.
• The DLT method for two-view homography estimation.
You are free to choose Python or Matlab to complete this assignment.
Special Notes:
1. Each computer lab has three weeks. For the first week, students are expected
to work on the lab assignment by yourselves. Tutors/Lab instructors will
provide basic supervision in the following two weeks when students can
discuss the potential questions with tutors.
2. Your Lab assignment will be marked based on the overall quality of your Lab
Report in PDF format. The report is to be uploaded to Wattle site before the
due time, which is usually on the Sunday evening of Week-3 session of your
lab (22nd May, 2022). Please note that you must report on what you have done.
Only submitting code will get a low mark.
3. It is normal if you cannot finish all the tasks within the two 2-hour sessions —
these tasks are designed so that you will have to spend more time in order to
finish all the tasks including finishing your Lab report. This suggests that,
before attending the third lab session (in Week-3 session of each CLab), you
must make sure that you have almost complete 80% of the assignment.
Academic Integrity
You are expected to comply with the University Policy on Academic Integrity and
Plagiarism. You are allowed to talk with / work with other students on lab and project
assignments. You can share ideas but not code, you should submit your own work.
Your course instructors reserve the right to determine an appropriate penalty based on
the violation of academic dishonesty that occurs. Violations of the university policy
can result in severe penalties.


Task-1: 3D-2D Camera Calibration (17 marks)

Camera calibration involves finding the geometric relationship between 3D world
coordinates and their 2D projected positions in the image.
Four images, stereo2012a.jpg, stereo2012b.jpg, stereo2012c.jpg, and
stereo2012d.jpg, are given for this CLab-3. These images are different views of a
calibration target and some objects. For example, the diagram below is
stereo2012a.jpg with some text superimposed onto it:

(Do not directly use the above image for your camera calibration work
as it has been scaled for illustration. Use the original (unlabelled) image files provided.)

On the calibration target there are 3 mutually orthogonal faces. The points marked on
each face form a regular grid. They are all 7cm apart.
Write a Matlab function with the following specification
Function to perform camera calibration
Function C = calibrate(im, XYZ, uv)
Input: im: is the image of the calibration target.
XYZ: is a Nx3 array of XYZ coordinates of the calibration target points.
uv: is a N x 2 array of the image coordinates of the calibration target
points.
Outputs: C: is the 3 x 4 camera calibration matrix.

The variable N should be an integer greater than or equal to 6.
This function should also plot the uv coordinates onto the image of the calibration target.
It also projects the XYZ coordinates back into image coordinates using the calibration
matrix and plots these points too as a visual check on the accuracy of the calibration
process.
Lines from the origin to the vanishing points (namely, world coordinate system) in the X,
Y and Z directions are overlaid on the image.
The mean squared error between the positions of the uv coordinates and the projected
XYZ coordinates is also reported.


Generally, we ask you to implement a function:
MATLAB user:
function C = calibrate(im, XYZ, uv)
Python user:
def calibrate(im, XYZ, uv)
return C
From the 4 supplied images (stereo2012a.jpg, stereo2012b.jpg,
stereo2012c.jpg, and stereo2012d.jpg), choose any image to work on. Use the
suggested right-hand coordinate system shown in the diagram above and choose a
sufficient number of calibration points on the calibration target.
Store the XYZ coordinates in a file so that you can load the data into Matlab and
Python (You can choose your preferred datatype, for instances, mat in MATLAB and
numpy array in Python) and use them again and again. Note that each image can be
calibrated independently, so you can choose different calibration points to calibrate
each image. Neither do the numbers of calibration points need to be the same for
your chosen images.
The uv coordinates can be obtained using the MATLAB function ginput. If one
invokes ginput as follows:
>> uv = ginput(12) % e.g., to digitise 12 points in the image
and digitises a series of points by clicking with the left mouse button, then uv will be
a matrix containing the column and row coordinates of the points that you digitised.

留学ICU™️ 留学生辅助指导品牌
在线客服 7*24 全天为您提供咨询服务
咨询电话(全球): +86 17530857517
客服QQ:2405269519
微信咨询:zz-x2580
关于我们
微信订阅号
© 2012-2021 ABC网站 站点地图:Google Sitemap | 服务条款 | 隐私政策
提示:ABC网站所开展服务及提供的文稿基于客户所提供资料,客户可用于研究目的等方面,本机构不鼓励、不提倡任何学术欺诈行为。