Assignment title: Information
FACULTY OF COMPUTING,
ENGINEERING and SCIENCE
Final mark awarded:_____
Assessment Cover Sheet and Feedback Form 2016/17
Module Code:
CS3S601
Module Title:
Concurrent and Parallel
Programming
Module Lecturer:
Marius Miknis
Assessment Title and Tasks:
Image Processing in TBB
Assessment No.
2 of 2
No. of pages submitted in total including this page: Word Count of submission:
Date Set:
9/02/17
Submission Date:
17/03/17
Return Date:
14/04/17
Part A: Record of Submission (to be completed by Student)
Extenuating Circumstances
If there are any exceptional circumstances that may have affected your ability to
undertake or submit this assignment, make sure you contact the Advice Zone on your
campus prior to your submission deadline.
Fit to sit policy:
The University operates a fit to sit policy whereby you, in submitting or presenting
yourself for an assessment, are declaring that you are fit to sit the assessment. You
cannot subsequently claim that your performance in this assessment was affected by
extenuating factors.
Plagiarism and Unfair Practice Declaration:
By submitting this assessment, you declare that it is your own work and that the sources
of information and material you have used (including the internet) have been fully
identified and properly acknowledged as required1. Additionally, the work presented has
not been submitted for any other assessment. You also understand that the Faculty
reserves the right to investigate allegations of plagiarism or unfair practice which, if
proven, could result in a fail in this assessment and may affect your progress.
Details of Submission:
Note that all work handed in after the submission date and within 5 working days will be
capped at 40%2. No marks will be awarded if the assessment is submitted after the late
submission date unless extenuating circumstances are applied for and accepted (Advice
Zone to be consulted).
Work should be submitted as detailed in your student handbook. You are responsible for
checking the method of submission.
You are required to acknowledge that
you have read the above statements
by writing your student number (s) in
the box:
Student Number(s):
1 University Academic Integrity Regulations
2 Information on exclusions to this rule is available from Campus Advice ShopsIT IS YOUR RESPONSIBILITY TO KEEP A RECORD OF ALL WORK
SUBMITTED
Part B: Marking and Assessment
(to be completed by Module Lecturer)
This assignment will be marked out of 100%
This assignment contributes to 35% of the total module marks.
This assignment is bonded
Assessment Task:
You are required to apply the techniques discussed in lectures and tutorials to implement
several image processing operations using Intel's Threading Building Blocks (TBB)
library. Use RGB_Processing.zip provided project as a starting point. The tasks are
broken down as follows:
1) Part1: Using the stencil pattern, implement a TBB kernel to blur an image using a
Gaussian kernel. Note: You can use the example load function given in lectures
and tutorials to load images (greyscale):
a. The code should be written both in a sequential and parallel approach.
Code should be made parallel using the TBB parallel_for structure.
b. The speed differences between the sequential and parallel approaches
should be investigated and documented, this should also include
comparisons to investigate whether different step sizes in the parallel_for
make a difference to performance.
c. Blurred image should be saved (grey_blurred.png).
2) Part 2: Update the current image loading code from splitting the RGB values in a
sequential approach to a parallel method:
a. The code needs to load two colour images and compute an image with
the values of the absolute differences between the two input images
�(�, �) = |�1(�, �) − �2(�, �)|
b. With an image of absolute differences computed a binary threshold
operation should be applied to the image that makes any pixels that are
not black into white.
c. The resulting thresholded image of absolute differences should be saved
(RGB_processed.png).
3) You will need to write a short section (500 words) in your report of how the image
blurring code in Part 1 could be implemented using OpenCL. (A full OpenCL
implementation is not required but code snippets could be included to aid your
discussion)
4) You will also be required to explain your implementation in a short 5-minute code
demo which will take place in the tutorial sessions after the assignment has been
submitted. As part of the code demo you will be required to discuss the
techniques used to implement your TBB solution and the results you obtained.
The code demo is mandatory. The above sections will also be marked
according to how well you demonstrate your understanding of them in the
code demo. If you fail to do code demo this will result if failed coursework
submission.
You may use the tutorial or lecture demo code as a starting point for your implementation.
If you wish, you can also implement your solution in the OS of your choice (OS X or
Windows) if you don't want to use Linux. If you choose not to implement the assignment
in Linux please be aware that it is your responsibility to demonstrate the code in the code
demo sessions (on your own laptop for example) and it is your responsibility to make sure
that the TBB and OpenCL support is present. Also be aware of version differences as the
examples discussed in lectures may be based on a different version of OpenCL (we're
using version 1.1) than on the platform you choose for the assignment.Deliverables
1) A zip file containing the source code and executable of your implementation. This
is to be submitted to Blackboard no later than the submission date shown on the
assignment front sheet. Please name your zip file
CS3S601_CW2_EnrolmentNumber_FirstName_LastName.zip
(replace the placeholders with your enrolment number, first and last name respectively)
2) A word processed report documenting your test plan, results and discussion. This
is to be included in your zip file.
3) A copy of this document is to be included in your zip file, with your Student
Enrolment Number filled in on the front sheet and the optional Reflection sheet (see
Part C below) filled in accordingly.
4) A 5-minute code demo discussing your implementation, the results obtained and
the problems you faced in implementing the assignment.
Learning Outcomes to be assessed (as specified in the validated module
descriptor https://icis.southwales.ac.uk/):
LO1. To critically analyse the advantages and problems inherent in concurrent and parallel
programming.
LO2. To be able to implement and evaluate the performance of an application using concurrent
and parallel programming techniques.Part C: Reflections on Assessment
(to be completed by student – optional)
Use of previous feedback:
In this assessment, I have taken/took note of the following points in feedback on
previous work:
Please indicate which of the following you feel/felt applies/applied to your
submitted work
A reasonable attempt. I could have developed some of the
sections further.
A good attempt, displaying my understanding and learning, with
analysis in some parts.
A very good attempt. The work demonstrates my clear
understanding of the learning supported by relevant literature and scholarly
work with good analysis and evaluation.
An excellent attempt, with clear application of literature and
scholarly work, demonstrating significant analysis and evaluation.
What I found most
difficult about this
assessment:
The areas where I
would value/would
have valued feedback:Marking grid:
Fail Narrow Fail 3rd Class / Pass Lower 2nd Class / Pass Upper 2nd Class / Merit 1st Class / Distinction
Gaussian Kernel
Blur 10%
Gaussian blur not
implemented
Blur computed
incorrectly or not using
Gaussian kernel
Gaussian blur implemented
but with minor issues or
artefacts
Good implementation
Gaussian blur
Gaussian blur implemented well
with a small kernel
Gaussian blur implemented
excellently with a large kernel
Image subtraction
10%
Image subtraction not
performed
Incorrect absolute
difference formula was
implemented
Image subtraction
performed incorrectly
Image subtraction was
performed with minor issues
Image subtraction was
performed well
Image subtraction was performed
very well
Image subtraction was
performed excellently
Correct absolute difference
formula was implemented
Binary threshold
5%
Binary threshold not
performed
Poor binary threshold Binary threshold was
performed with minor issues
Binary threshold was
performed well
Binary threshold was performed
very well
Binary threshold was performed
excellently with a well-adjusted
threshold value
Final processed
colour image 10%
Processed colour image
was not generated
Processed colour image
was generated
incorrectly
Processed colour image was
generated with significant
artefacts
Processed colour image was
generated with some artefacts
Processed colour image was
generated without artefacts
Processed colour image was
generated with clear object areas
TBB and
parallelisation
25%
Code was not
parallelised
No lambda functions
used
Incorrect use of code
parallelisation
Incorrect use of lambda
functions
Some parts of the code were
parallelised
Some lambdas implemented
with minor issues
Most parts of the code were
parallelised well
Code correctly implements
each lambda
All parts of the code were
parallelised well
Code correctly implements each
lambda and correctly separates
lambda parameters from captured
variables
All possible parts of the code
were parallelised very well
Excellent use of lambda functions
with correctly separated lambda
parameters from captured
variables
Report 20% Very poor Report
Possible OpenCL
implementation not
mentioned
Poor Report
Possible OpenCL
implementation
mentioned poorly
Report is satisfactory with
basic comparison of
sequential and parallel code
performance
Possible OpenCL
implementation discussed
Report is good with a
satisfactory comparison of
sequential and parallel code
performance
Possible OpenCL
implementation discussed in
detail
Very good report that provides a
good comparison of sequential
and parallel code performance
Possible OpenCL implementation
discussed in good detail but no
examples provided
Very detailed report that showed
a great comparison of sequential
and parallel code performance
Possible OpenCL implementation
discussed in high detail and
examples provided
Demonstration
20%
No Demonstration Does not understand
the code
Has a simple knowledge of the
code
Has a reasonable knowledge of
the code
Has a good understanding of the
code
Has an excellent understanding
of the code