CSC205 Assignments 1 to 8 solutions

$160.00

Original Work ?

Download Details:

  • Name: assignments-xzvg6k.zip
  • Type: zip
  • Size: 15.49 MB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

CSC205 Assignment 1: Python Basics

2D Computer Graphics and Image Processing
This assignment is an exercise focusing on the basic functionalities of Python. Throughout the course of four assignments, students will learn to implement parts of the bouncing
ball example shown in class. This assignment, however, may seem disconnect from the rest,
as it is intended to allow students to learn what it is like to do some basic programming in
Python, where all or most of the low-level operations are already packaged as open source
libraries for you.
Instructions are provided first for a reason.
Please read the instructions carefully.
1
2D Computer Graphics and Image Processing Assignment 1: Python Basics
1 Instructions
1.1 Submission package
Within the homework assignment package, there should be a submission-package.zip,
which contains the directory structure and empty files for you to get started. Please edit
the contents within the file for code, and then create a zip archive with the file name
submission-package.zip, and submit it. Do not use other archive formats such
as rar or tar.gz.
All assignments should be submitted electronically. Hand written reports are not accepted. You can, however, include scanned pages in your report. For example, if you are not
comfortable with writing equations, you can include a scanned copy.
1.2 Code
All assignments should be in Python 3. Codes that fail to run on Python 3 will receive 20%
deduction on the final score. In other words, do not use Python 2.7.
For this assignment, you should not need to create additional files. Fill in the skeleton
files in the submission package. Do not change the name of these scripts. We will run, for
example,
python solution.py
to test if your code runs as the assignment specifications.
It is strongly encouraged to follow PEP8. It makes your code much more readable, and
less room for mistakes. There are many open source tools available to automatically do this
for you.
1.3 Delayed submission
In case you think you will not meet the deadline due to network speed or any other reasons,
you can send an email with the SHA-256 hash of your .zip archive first, and then submit
your assignment through email later on. This will not be considered as a delay.
Delayed submissions are subject to 20% degradation per day. For example, an assignment
submitted 1 minute after the deadline will receive 80% of the entire mark, even if it was
perfect. Likewise, an assignment that was submitted one day and 1 minute after the deadline
will receive 60%.
1.4 Use of open source code
Any library under any type of open source license is allowed for use, given full attribution.
This attribution should include the name of the original author, the source from which the
code was obtained, and indicate terms of the license. Note that using copyrighted material
without an appropriate license is not permitted. Short snippets of code on public websites
such as StackOverflow may be used without an explicit license, but proper attribution should
be given even in such case. This means that if you embed a snippet into your own code,
you should properly cite it through the comments, and also embed the full citation in a
LICENSES file. However, if you include a full, unmodified source, which already contains the
license within the source file, this is unnecessary. Please note that without proper attribution,
it will be considered plagiarism.
2
2D Computer Graphics and Image Processing Assignment 1: Python Basics
In addition, as the assignments are intended for you to learn, (1) if the external code
implements the core objective of the task, no points will be given; (2) code from other
CSC205 students will count as plagiarism.
2 Loading a text file (1 mark)
Read file input.txt and put each line of text into a Python list.
3 Parsing and printing output (4 marks)
Implement print info function. The output should be looking something like the following:
Canvas size is 100 x 100
Circle of thickness 3 and radius 10 at (50, 50)
Line of thickness 2 from (20, 20) to (80, 43)
Polygon Line of thickness 1 passing through, (30, 30), (50, 40), (80, 20)
Polygon Fill for lines passing through, (10, 10), (50, 90), (90, 10), (10, 10)
We will test with a different input file, so don’t just print the above! You’ll need to be able
to parse: circle, line, polyline, polyfill. Each will contribute to one mark.
4 Writing to text file (2 marks)
Add an additional line that would be interpreted as
Circle of thickness 5 and radius 20 at (50, 50)
at the end, and write to output.txt. In other words, if you use output.txt as input to
your solution, it should print
Canvas size is 100 x 100
Circle of thickness 3 and radius 10 at (50, 50)
Line of thickness 2 from (20, 20) to (80, 43)
Polygon Line of thickness 1 passing through, (30, 30), (50, 40), (80, 20)
Polygon Fill for lines passing through, (10, 10), (50, 90), (90, 10), (10, 10)
Circle of thickness 5 and radius 20 at (50, 50)
Adding a line would be one mark, and successful writing to a file would be the other.
3

CSC205 Assignment 2: Drawing with OpenCV

This assignment is an extension from assignment 1. We will modify the print info
function we implemented to also draw the parsed text on screen. Unfortunately, the submission for assignment 1 is still open, thus the solution for the assignment 1 will be released only
a week after the initial announcement.
Instructions are provided first for a reason.
Please read the instructions carefully.
1
2D Computer Graphics and Image Processing Assignment 2: Drawing with OpenCV
1 Instructions
1.1 Submission package
Within the homework assignment package, there should be a submission-package.zip,
which contains the directory structure and empty files for you to get started. Please edit
the contents within the file for code, and then create a zip archive with the file name
submission-package.zip, and submit it. Do not use other archive formats such
as rar or tar.gz.
All assignments should be submitted electronically. Hand written reports are not accepted. You can, however, include scanned pages in your report. For example, if you are not
comfortable with writing equations, you can include a scanned copy.
1.2 Code
All assignments should be in Python 3. Codes that fail to run on Python 3 will receive 20%
deduction on the final score. In other words, do not use Python 2.7.
For this assignment, you should not need to create additional files. Fill in the skeleton
files in the submission package. Do not change the name of these scripts. We will run, for
example,
python solution.py
to test if your code runs as the assignment specifications.
It is strongly encouraged to follow PEP8. It makes your code much more readable, and
less room for mistakes. There are many open source tools available to automatically do this
for you.
1.3 Delayed submission
In case you think you will not meet the deadline due to network speed or any other reasons,
you can send an email with the SHA-256 hash of your .zip archive first, and then submit
your assignment through email later on. This will not be considered as a delay.
Delayed submissions are subject to 20% degradation per day. For example, an assignment
submitted 1 minute after the deadline will receive 80% of the entire mark, even if it was
perfect. Likewise, an assignment that was submitted one day and 1 minute after the deadline
will receive 60%.
1.4 Use of open source code
Any library under any type of open source license is allowed for use, given full attribution.
This attribution should include the name of the original author, the source from which the
code was obtained, and indicate terms of the license. Note that using copyrighted material
without an appropriate license is not permitted. Short snippets of code on public websites
such as StackOverflow may be used without an explicit license, but proper attribution should
be given even in such case. This means that if you embed a snippet into your own code,
you should properly cite it through the comments, and also embed the full citation in a
LICENSES file. However, if you include a full, unmodified source, which already contains the
license within the source file, this is unnecessary. Please note that without proper attribution,
it will be considered plagiarism.
2
2D Computer Graphics and Image Processing Assignment 2: Drawing with OpenCV
In addition, as the assignments are intended for you to learn, (1) if the external code
implements the core objective of the task, no points will be given; (2) code from other
CSC205 students will count as plagiarism.
2 Implement parse and draw (5 marks)
Modify your implementation for print info in assignment 1 to also draw the object you
parsed. We did not have a field for colour, thus we will simply use black (0.0) to draw. The
canvas we create will be white (1.0). Note that, unlike in the previous print info case, our
function now returns the updated canvas.
3 Display figure (2 marks)
With the final updated canvas from parse and draw, use cv2.imshow to show the drawing
result in a window named canvas. Note that input.txt for assignment 2 is different from
assignment 1. Also use cv2.waitKey to wait for a keyboard input before closing.
Figure 1: Example output.
3

CSC205 Assignment 3: Interactive Polygon Fill

2D Computer Graphics and Image Processing
Abstract
This assignment is a simple interactive polygon demo with OpenCV.
Instructions are provided first for a reason.
Please read the instructions carefully.
1
2D Computer Graphics and Image Processing Assignment 3: Interactive Polygon Fill
1 Instructions
1.1 Submission package
Within the homework assignment package, there should be a submission-package.zip,
which contains the directory structure and empty files for you to get started. Please edit
the contents within the file for code, and then create a zip archive with the file name
submission-package.zip, and submit it. Do not use other archive formats such
as rar or tar.gz.
All assignments should be submitted electronically. Hand written reports are not accepted. You can, however, include scanned pages in your report. For example, if you are not
comfortable with writing equations, you can include a scanned copy.
1.2 Code
All assignments should be in Python 3. Codes that fail to run on Python 3 will receive 20%
deduction on the final score. In other words, do not use Python 2.7.
For this assignment, you should not need to create additional files. Fill in the skeleton
files in the submission package. Do not change the name of these scripts. We will run, for
example,
python solution.py
to test if your code runs as the assignment specifications.
It is strongly encouraged to follow PEP8. It makes your code much more readable, and
less room for mistakes. There are many open source tools available to automatically do this
for you.
1.3 Delayed submission
In case you think you will not meet the deadline due to network speed or any other reasons,
you can send an email with the SHA-256 hash of your .zip archive first, and then submit
your assignment through email later on. This will not be considered as a delay.
Delayed submissions are subject to 20% degradation per day. For example, an assignment
submitted 1 minute after the deadline will receive 80% of the entire mark, even if it was
perfect. Likewise, an assignment that was submitted one day and 1 minute after the deadline
will receive 60%.
1.4 Use of open source code
Any library under any type of open source license is allowed for use, given full attribution.
This attribution should include the name of the original author, the source from which the
code was obtained, and indicate terms of the license. Note that using copyrighted material
without an appropriate license is not permitted. Short snippets of code on public websites
such as StackOverflow may be used without an explicit license, but proper attribution should
be given even in such case. This means that if you embed a snippet into your own code,
you should properly cite it through the comments, and also embed the full citation in a
LICENSES file. However, if you include a full, unmodified source, which already contains the
license within the source file, this is unnecessary. Please note that without proper attribution,
it will be considered plagiarism.
2
2D Computer Graphics and Image Processing Assignment 3: Interactive Polygon Fill
In addition, as the assignments are intended for you to learn, (1) if the external code
implements the core objective of the task, no points will be given; (2) code from other
CSC205 students will count as plagiarism.
2 Implement the polygon fill software (5 marks)
Please first see the accompanied example.mov that demonstrates how the final python
script should behave. Implement to achieve the same functionality as in the demo video.
Specifically, a single click should add a new point to the polygon, and whenever the mouse
moves, the polygon shape should change following the mouse. In other words, the new pointto-be-added should already move following the mouse movement. When double clicked, the
program should move onto the next polygon.
Note that the starter code has many parts already implemented for you, and you only
need to implement the TODOs.
3

CSC205 Assignment 4: Bouncing a Ball

This assignment is the last assignment for the Graphics part. We’ll implement an interactive program that bounces a ball on screen.
Instructions are provided first for a reason.
Please read the instructions carefully.
1
2D Computer Graphics and Image Processing Assignment 4: Bouncing a Ball
1 Instructions
1.1 Submission package
Within the homework assignment package, there should be a submission-package.zip,
which contains the directory structure and empty files for you to get started. Please edit
the contents within the file for code, and then create a zip archive with the file name
submission-package.zip, and submit it. Do not use other archive formats such
as rar or tar.gz.
All assignments should be submitted electronically. Hand written reports are not accepted. You can, however, include scanned pages in your report. For example, if you are not
comfortable with writing equations, you can include a scanned copy.
1.2 Code
All assignments should be in Python 3. Codes that fail to run on Python 3 will receive 20%
deduction on the final score. In other words, do not use Python 2.7.
For this assignment, you should not need to create additional files. Fill in the skeleton
files in the submission package. Do not change the name of these scripts. We will run, for
example,
python solution.py
to test if your code runs as the assignment specifications.
It is strongly encouraged to follow PEP8. It makes your code much more readable, and
less room for mistakes. There are many open source tools available to automatically do this
for you.
1.3 Delayed submission
In case you think you will not meet the deadline due to network speed or any other reasons,
you can send an email with the SHA-256 hash of your .zip archive first, and then submit
your assignment through email later on. This will not be considered as a delay.
Delayed submissions are subject to 20% degradation per day. For example, an assignment
submitted 1 minute after the deadline will receive 80% of the entire mark, even if it was
perfect. Likewise, an assignment that was submitted one day and 1 minute after the deadline
will receive 60%.
1.4 Use of open source code
Any library under any type of open source license is allowed for use, given full attribution.
This attribution should include the name of the original author, the source from which the
code was obtained, and indicate terms of the license. Note that using copyrighted material
without an appropriate license is not permitted. Short snippets of code on public websites
such as StackOverflow may be used without an explicit license, but proper attribution should
be given even in such case. This means that if you embed a snippet into your own code,
you should properly cite it through the comments, and also embed the full citation in a
LICENSES file. However, if you include a full, unmodified source, which already contains the
license within the source file, this is unnecessary. Please note that without proper attribution,
it will be considered plagiarism.
2
2D Computer Graphics and Image Processing Assignment 4: Bouncing a Ball
In addition, as the assignments are intended for you to learn, (1) if the external code
implements the core objective of the task, no points will be given; (2) code from other
CSC205 students will count as plagiarism.
2 Implement the polygon fill software (8 marks)
Please first see the accompanied example.mov that demonstrates how the final python
script should behave. Implement to achieve the same functionality as in the demo video.
Note that a lot of the starter code is already done for you. Places that you will have to
implement yourself is marked as TODO. Implement the TODOs. Detailed instructions on the
implementation specifications are provided as comments in the starter file.
3

CSC205 Assignment 5: Image Filtering

Abstract
This assignment is focusing on image filtering. We will perform a simple sharpening filter
with both OpenCV and the Fourier Transform. Please note that Section 1.2 of the instruction
has been updated.
Instructions are provided first for a reason.
Please read the instructions carefully.
1
2D Computer Graphics and Image Processing Assignment 5: Image Filtering
1 Instructions
1.1 Submission package
Within the homework assignment package, there should be a submission-package.zip,
which contains the directory structure and empty files for you to get started. Please edit
the contents within the file for code, and then create a zip archive with the file name
submission-package.zip, and submit it. Do not use other archive formats such
as rar or tar.gz.
All assignments should be submitted electronically. Hand written reports are not accepted. You can, however, include scanned pages in your report. For example, if you are not
comfortable with writing equations, you can include a scanned copy.
1.2 Code
All assignments should be in Python 3. Codes that fail to run on Python 3 will receive 20%
deduction on the final score. In other words, do not use Python 2.7.
For this assignment, you should not need to create additional files. Fill in the skeleton
files in the submission package. Do not change the name of these scripts. Your code should
run as specified by the assignment specs by simply doing
python solution.py
in the command line. Do not expect additional command line arguments as input.
It is strongly encouraged to follow PEP8. It makes your code much more readable, and
less room for mistakes. There are many open source tools available to automatically do this
for you.
1.3 Delayed submission
In case you think you will not meet the deadline due to network speed or any other reasons,
you can send an email with the SHA-256 hash of your .zip archive first, and then submit
your assignment through email later on. This will not be considered as a delay.
Delayed submissions are subject to 20% degradation per day. For example, an assignment
submitted 1 minute after the deadline will receive 80% of the entire mark, even if it was
perfect. Likewise, an assignment that was submitted one day and 1 minute after the deadline
will receive 60%.
1.4 Use of open source code
Any library under any type of open source license is allowed for use, given full attribution.
This attribution should include the name of the original author, the source from which the
code was obtained, and indicate terms of the license. Note that using copyrighted material
without an appropriate license is not permitted. Short snippets of code on public websites
such as StackOverflow may be used without an explicit license, but proper attribution should
be given even in such case. This means that if you embed a snippet into your own code,
you should properly cite it through the comments, and also embed the full citation in a
LICENSES file. However, if you include a full, unmodified source, which already contains the
license within the source file, this is unnecessary. Please note that without proper attribution,
it will be considered plagiarism.
2
2D Computer Graphics and Image Processing Assignment 5: Image Filtering
In addition, as the assignments are intended for you to learn, (1) if the external code
implements the core objective of the task, no points will be given; (2) code from other
CSC205 students will count as plagiarism.
2 Image sharpening (12 marks)
Implement solution.py according to the specification in the comments. Note that a lot
of the starter code is already done for you. Places that you will have to implement yourself
is marked as TODO. Implement the TODOs. Detailed instructions on the implementation
specifications are provided as comments in the starter file. Examples in the jupyter notebooks
for the lecture should help you a lot.
The five imwrite calls should generate the following images, respectively, in the order of
occurrence from left-to-right and top-to-bottom:
These image are also present in your package file for you to compare against.
3

CSC205 Assignment 6: Color Quantization

Abstract
In this assignment we will implement two colour quantization methods. One is the populousity algorithm, and the other is the median cut method. We will see how these methods
are realized in practice.
Instructions are provided first for a reason.
Please read the instructions carefully.
1
2D Computer Graphics and Image Processing Assignment 6: Color Quantization
1 Instructions
1.1 Submission package
Within the homework assignment package, there should be a submission-package.zip,
which contains the directory structure and empty files for you to get started. Please edit
the contents within the file for code, and then create a zip archive with the file name
submission-package.zip, and submit it. Do not use other archive formats such
as rar or tar.gz.
All assignments should be submitted electronically. Hand written reports are not accepted. You can, however, include scanned pages in your report. For example, if you are not
comfortable with writing equations, you can include a scanned copy.
1.2 Code
All assignments should be in Python 3. Codes that fail to run on Python 3 will receive 20%
deduction on the final score. In other words, do not use Python 2.7.
For this assignment, you should not need to create additional files. Fill in the skeleton
files in the submission package. Do not change the name of these scripts. Your code should
run as specified by the assignment specs by simply doing
python solution.py
in the command line. Do not expect additional command line arguments as input.
It is strongly encouraged to follow PEP8. It makes your code much more readable, and
less room for mistakes. There are many open source tools available to automatically do this
for you.
1.3 Delayed submission
In case you think you will not meet the deadline due to network speed or any other reasons,
you can send an email with the SHA-256 hash of your .zip archive first, and then submit
your assignment through email later on. This will not be considered as a delay.
Delayed submissions are subject to 20% degradation per day. For example, an assignment
submitted 1 minute after the deadline will receive 80% of the entire mark, even if it was
perfect. Likewise, an assignment that was submitted one day and 1 minute after the deadline
will receive 60%.
1.4 Use of open source code
Any library under any type of open source license is allowed for use, given full attribution.
This attribution should include the name of the original author, the source from which the
code was obtained, and indicate terms of the license. Note that using copyrighted material
without an appropriate license is not permitted. Short snippets of code on public websites
such as StackOverflow may be used without an explicit license, but proper attribution should
be given even in such case. This means that if you embed a snippet into your own code,
you should properly cite it through the comments, and also embed the full citation in a
LICENSES file. However, if you include a full, unmodified source, which already contains the
license within the source file, this is unnecessary. Please note that without proper attribution,
it will be considered plagiarism.
2
2D Computer Graphics and Image Processing Assignment 6: Color Quantization
In addition, as the assignments are intended for you to learn, (1) if the external code
implements the core objective of the task, no points will be given; (2) code from other
CSC205 students will count as plagiarism.
2 Color Quantization (7 marks)
Implement solution.py according to the specification in the comments. Note that a lot
of the starter code is already done for you. Places that you will have to implement yourself
is marked as TODO. Implement the TODOs. Detailed instructions on the implementation
specifications are provided as comments in the starter file. This assignment is heavily tied
with lecture 25.
The two imwrite calls should generate the following images. They are also included in
the package file for you to compare against.
Figure 1: Reference results. (Left) Populousity algorithm. (Right) Median Cut results.
3

CSC205 Assignment 7: Hough Transform

Abstract
In this assignment we will implement the Hough Transform to detect lines.
Instructions are provided first for a reason.
Please read the instructions carefully.
1
2D Computer Graphics and Image Processing Assignment 7: Hough Transform
1 Instructions
1.1 Submission package
Within the homework assignment package, there should be a submission-package.zip,
which contains the directory structure and empty files for you to get started. Please edit
the contents within the file for code, and then create a zip archive with the file name
submission-package.zip, and submit it. Do not use other archive formats such
as rar or tar.gz.
All assignments should be submitted electronically. Hand written reports are not accepted. You can, however, include scanned pages in your report. For example, if you are not
comfortable with writing equations, you can include a scanned copy.
1.2 Code
All assignments should be in Python 3. Codes that fail to run on Python 3 will receive 20%
deduction on the final score. In other words, do not use Python 2.7.
For this assignment, you should not need to create additional files. Fill in the skeleton
files in the submission package. Do not change the name of these scripts. Your code should
run as specified by the assignment specs by simply doing
python solution.py
in the command line. Do not expect additional command line arguments as input.
It is strongly encouraged to follow PEP8. It makes your code much more readable, and
less room for mistakes. There are many open source tools available to automatically do this
for you.
1.3 Delayed submission
In case you think you will not meet the deadline due to network speed or any other reasons,
you can send an email with the SHA-256 hash of your .zip archive first, and then submit
your assignment through email later on. This will not be considered as a delay.
Delayed submissions are subject to 20% degradation per day. For example, an assignment
submitted 1 minute after the deadline will receive 80% of the entire mark, even if it was
perfect. Likewise, an assignment that was submitted one day and 1 minute after the deadline
will receive 60%.
1.4 Use of open source code
Any library under any type of open source license is allowed for use, given full attribution.
This attribution should include the name of the original author, the source from which the
code was obtained, and indicate terms of the license. Note that using copyrighted material
without an appropriate license is not permitted. Short snippets of code on public websites
such as StackOverflow may be used without an explicit license, but proper attribution should
be given even in such case. This means that if you embed a snippet into your own code,
you should properly cite it through the comments, and also embed the full citation in a
LICENSES file. However, if you include a full, unmodified source, which already contains the
license within the source file, this is unnecessary. Please note that without proper attribution,
it will be considered plagiarism.
2
2D Computer Graphics and Image Processing Assignment 7: Hough Transform
In addition, as the assignments are intended for you to learn, (1) if the external code
implements the core objective of the task, no points will be given; (2) code from other
CSC205 students will count as plagiarism.
2 Hough Transform to detect lines (10 marks)
Implement solution.py according to the specification in the comments. Note that a lot
of the starter code is already done for you. Places that you will have to implement yourself
is marked as TODO. Implement the TODOs. Detailed instructions on the implementation
specifications are provided as comments in the starter file. This assignment is heavily tied
with lecture 29 and lecture 30.
This time, the there is a two-tier system for the marks. Even when your implementation
is correct, it will run painfully slow if implemented using for loops. To get full marks, you
should not use any loops when implementing the TODOs.
The multiple imwrite calls should generate the following images. They are also included
in the package file for you to compare against.
(a) Edges (b) Result
(c) Accumulator (d) Non-Maximum Suppresion result
(e) Top selected points
Figure 1: Reference results.
3

CSC205 Assignment 8: Matching Images

2D Computer Graphics and Image Processing
Thank you for surviving the term. This assignment is a bonus, and should be the easiest
of them all. You simply need to use numpy.nanmean and numpy.nanmedian. You can
also try some other methods if you want, in making the image even look better. PLEASE
ALSO DO THIS ASAP. IT SHOULD ONLY TAKE 30 MIN TOPS.
Instructions are provided first for a reason.
Please read the instructions carefully.
1
2D Computer Graphics and Image Processing Assignment 8: Matching Images
1 Instructions
1.1 Submission package
Within the homework assignment package, there should be a submission-package.zip,
which contains the directory structure and empty files for you to get started. Please edit
the contents within the file for code, and then create a zip archive with the file name
submission-package.zip, and submit it. Do not use other archive formats such
as rar or tar.gz.
All assignments should be submitted electronically. Hand written reports are not accepted. You can, however, include scanned pages in your report. For example, if you are not
comfortable with writing equations, you can include a scanned copy.
1.2 Code
All assignments should be in Python 3. Codes that fail to run on Python 3 will receive 20%
deduction on the final score. In other words, do not use Python 2.7.
For this assignment, you should not need to create additional files. Fill in the skeleton
files in the submission package. Do not change the name of these scripts. Your code should
run as specified by the assignment specs by simply doing
python solution.py
in the command line. Do not expect additional command line arguments as input.
It is strongly encouraged to follow PEP8. It makes your code much more readable, and
less room for mistakes. There are many open source tools available to automatically do this
for you.
1.3 Delayed submission
In case you think you will not meet the deadline due to network speed or any other reasons,
you can send an email with the SHA-256 hash of your .zip archive first, and then submit
your assignment through email later on. This will not be considered as a delay.
Delayed submissions are subject to 20% degradation per day. For example, an assignment
submitted 1 minute after the deadline will receive 80% of the entire mark, even if it was
perfect. Likewise, an assignment that was submitted one day and 1 minute after the deadline
will receive 60%.
1.4 Use of open source code
Any library under any type of open source license is allowed for use, given full attribution.
This attribution should include the name of the original author, the source from which the
code was obtained, and indicate terms of the license. Note that using copyrighted material
without an appropriate license is not permitted. Short snippets of code on public websites
such as StackOverflow may be used without an explicit license, but proper attribution should
be given even in such case. This means that if you embed a snippet into your own code,
you should properly cite it through the comments, and also embed the full citation in a
LICENSES file. However, if you include a full, unmodified source, which already contains the
license within the source file, this is unnecessary. Please note that without proper attribution,
it will be considered plagiarism.
2
2D Computer Graphics and Image Processing Assignment 8: Matching Images
In addition, as the assignments are intended for you to learn, (1) if the external code
implements the core objective of the task, no points will be given; (2) code from other
CSC205 students will count as plagiarism.
2 Aggregating multiple images to remove artifacts
(2 marks)
Implement solution.py, specifically the TODO parts in merge images. You only have to
use np.nanmean and np.nanmedian to do each task. You can also test to run the mean
version by doing python solution.py –method mean.
Here are some example outputs that opencv should give you. Simply press a key to keep
on running the stitching process.
(a) Example matches (b) Example stitch
(c) Example matches (d) Example stitch
Figure 1: Reference results.
3