Intro to Image Understanding (CSC420) 4R

Java Python Intro to Image Understanding (CSC420)

Assignment 4

Due Date: November 25th , 2024, 10:59 pm

Total:  160 marks

General Instructions:

• You are allowed  (and encouraged) to search the web and use LLMs for learning, as explained in the syllabus.  You are, however, not allowed to ask an LLM to write the answers or code for you!

• You are allowed to work directly with one other person to discuss the questions. How- ever, the implementation and the report should be your own original work; i.e.  you should not submit identical documents or codes.  If you choose to work with someone else, write your teammate’s name on top of the first page of the report.

• Your submission should be in the form. of an electronic report (PDF), with the answers to the specific questions (each question separately), and a presentation and discussion of your results. For this, please submit a file called report.pdf to MarkUs directly.

•  Submit documented codes that you have written to generate your results separately. Please store all of those files in a folder called assignment4, zip the folder, and then submit the file assignment4.zip to MarkUs.  You should include a README.txt file (inside the folder) which details how to run the submitted codes.

•  Do not worry if you realize you made a mistake after submitting your zip file; you can submit multiple times on MarkUs.

• MarkUs has a file size limit. If your pdfor zip file is larger than the limit, you can try resizing or reducing the resolution of images in your report to reduce the file size. If that does not work, you can split your report into multiple files (e.g.  Report part 1 of 3.pdf, Report part 2 of 3.pdf, etc.)

Part I: Theoretical Problems (100 marks)

[Question 1] RANSAC (10 marks)

We have two images of a planar object (e.g. a painting) taken from different viewpoints and we want to align them. We have used SIFT to find a large number of point correspondences between the two images and visually estimate that at least 70% of these matches are correct with only small potential inaccuracies. We want to find the true transformation between the two images with a probability greater than 99.5%.

1. (5 marks) Calculate the number of iterations needed for fitting a homography.

2. (5 marks) Without calculating,  briefly explain whether you think fitting an affine transformation would require fewer or more RANSAC iterations and why.

[Question 2] Single View Metrology (15 marks)

Given the streetcar picture below, calculate the distance between the two tracks. We know that the distance between the rails in each track is (approximately) 1.5 metres.

Hint:  We know ratios  (of lengths or  areas) are not preserved in perspective projection. But cross-ratios are invariant.  But  cross-ratio  is a projective invariant; i.e., it is preserved by the projective transformations.  You can read the formal definition of cross-ratio here: https://en.wikipedia.org/wiki/Cross-ratio. This Numberphile video will also be very helpful in solving this question: https://www.youtube.com/watch?v=ffvojZONF_A.  The figure below illustrates what we know and what we want to measure.

[Question 3] Camera Models (50 marks)

Assume a plane passing through point P0  = [X0 ,  Y0 ,  Z0]T  with normal n.  The corresponding vanishing points for all the lines lying on this plane form. a line called the horizon.  In this question, you are asked to prove the existence of the horizon line by following the steps below:

1. (15 marks) Find the pixel coordinates of the vanishing point corresponding to a line

L, passing point P0  and going along direction d.

Hint: P = P0 +td are the points online L, and(p) = are pixel coordinates of the same line in the image, and where f  is the camera focal length and (px , py ) is the principal point.

Intro to Image Understanding (CSC420) Assignment 4R

2. (15 marks) Prove the vanishing points of all the lines lying on the plane form. a line.

Hint:  all the  lines on the plane are perpendicular to the plane’s normal n;  that is,n .d = 0, or nx dx  + ny dy + nz dz  = 0

3. (10 marks) Prove that oarallel planes in 3D have the same horizon line in the image.

4. (10 marks) In the picture below, which is higher: the camera that took this picture, the parachute, or the parachuter? Clearly explain and justify your answer.

[Question 4] Camera Models (25 marks)

We have taken a picture of a cube and have found the 3 vanishing points associated with the cube edges. Using these vanishing points (let’s call themv1, v2 , and v3 ), find the rotation ma- trix R that relates the 3D camera coordinate frame. with the world coordinate frame. aligned with the edges of the cube. Hint: The world coordinate frame. and a camera coordinate frame. are related through a rotation matrix R and a translation vector t.  That is, if Xw  is a 3D point expressed in the world coordinate system, the same 3D point has coordinates Xc  in the camera frame, where Xc  = R  Xl  +t. Here, we want to find the rotation matrix R. Assume v1  is the vanishing point associated with cube edges in the x direction, v2  the vanishing point associated with the cube edges in the y  direction, and v3  with the edges in the z  direction.

Part II: Implementation Tasks (60 marks)

[Question 5] Homography and Tracking (60 marks)

The goal of this assignment to replace a planar image throughout a video file with another im- age. For this purpose, you can use one of the the attached videos (e.g.  KandinskyBook. mp4 or GalleryGrill . mp4 or HartHousePoster. mp4) and replace one of the images/posters with a headshot of yourself (or any image you would like).   Or,  if you  prefer, you can record your own short video (e.g.  a video showing a billboard) and replace the advertisement in the billboard with a picture of yourself (or any image you would like).   For  example,  if you use KandinskyBook. mp4, then replace the top-left panel with an image of your choos- ing.   If you  use  GalleryGrill. mp4,  replace the poster for  Gallery Grill,  and if you use HartHousePoster. mp4, replace the Hart House poster.

You can use any approach you like to implement this task.  This question gives you an opportunity to use any of the techniques you’ve learned in this class to solve the problem.

For example, you can also take ideas from the SIFT/affine transformation tutorial and modify the tutorial code to achieve the desired objective in this assignment.  Alternatively, the following steps are provided as a suggestion and provide another way of implementing this objective. You are welcome to alter them or use your own innovative ideas; i.e. you can use any method that you wish, as long as it doesn’t require manually annotating anything other than the first frame. of the given video!  As with all the coding assignments, you are allowed to use tutorial code or any code samples you find online as starter code; but make sure you acknowledge all your sources.

1.  Locate the 4 corners of the top-left panel:  you  can  do this however you like, either manually  (mouse  cursor coordinates) or semi-automatically using the Harris corner detector to detect a number of corners and then manually choosing the 4 you need.

2.  Use camshift or meanshift or SIFT or whatever method you like to track the location of each of the 4 corners throughout the video.  Visualize the tracked points to make sure they are correct or to identify the frames at which tracking fails. Make sure your report contains details of which algorithms/methods you used in each step.

3. At each frame, find the homography that maps the 4 corners of your headshot with the 4 corners of the top-left panel. Use this homography to replace the top-left panel with your headshot. This suggested approach will probably not work very well and will only generate mediocre results. So you’ll need to modify it or come up with your own ideas to get good results.

4.  Save and submit the resulting video.

Submit your output video as well as a description of the steps you used in your report. We are not expecting perfect results and will accept cases in which the output is a bit noisy or off a little bit once in a while. If your results are not as good as you were hoping, discuss the failure modes, the challenges in implementing this, and any interesting observation you find         

【电力系统】单机无穷大电力系统短路故障暂态稳定Simulink仿真(带说明文档)内容概要:本文档围绕“单机无穷大电力系统短路故障暂态稳定Simulink仿真”展开,提供了完整的仿真模型与说明文档,重点研究电力系统在发生短路故障后的暂态稳定性问题。通过Simulink搭建单机无穷大系统模型,模拟不同类型的短路故障(如三相短路),分析系统在故障期间及切除后的动态响应,包括发电机转子角度、转速、电压和功率等关键参数的变化,进而评估系统的暂态稳定能力。该仿真有助于理解电力系统稳定性机理,掌握暂态过程分析方法。; 适合人群:电气工程及相关专业的本科生、研究生,以及从事电力系统分析、运行与控制工作的科研人员和工程师。; 使用场景及目标:①学习电力系统暂态稳定的基本概念与分析方法;②掌握利用Simulink进行电力系统建模与仿真的技能;③研究短路故障对系统稳定性的影响及提高稳定性的措施(如故障清除时间优化);④辅助课程设计、毕业设计或科研项目中的系统仿真验证。; 阅读建议:建议结合电力系统稳定性理论知识进行学习,先理解仿真模型各模块的功能与参数设置,再运行仿真并仔细分析输出结果,尝试改变故障类型或系统参数以观察其对稳定性的影响,从而深化对暂态稳定问题的理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值