Assignment 1 CS4186 computer Vision and Image processing

$30.00

Category: Tags: , , , , , You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (4 votes)

Pyhthon Programming
You are required to complete both programming tasks in this assignment:
Show the image responses by performing convolution between images and a filter bank.
Perform feature extraction for ranking of images based on their similarity.
Part-1: Convolution
Following below to generate a filter bank of 48 image filters, each with size 31×31 pixels:
4 Gaussian filters with σ={1,√2,2,2√2}.
8 LOG (Laplacian of Gaussian) filters with σ={√2,2,2√2,4,3√2,6,6√2,12}.
18 x-directional first derivation of Gaussian filters with σ_x=σ and σ_y=3σ in three different scales σ={1,√2,2,2} and six different orientations θ={0,π/6,π/3,π/2,2π/3,5π/6 }.
18 x-directional second derivation of Gaussian filters with σ_x=σ and σ_y=3σ in three different scales σ={1,√2,2,2} and six different orientations θ={0,π/6,π/3,π/2,2π/3,5π/6 }.

Display the 48 image filters in the report. (15%)
Display the 48 image responses of colosseum.jpg and panda.jpg after performing convolution with the filter bank. (15%)
Compute the mean and variance of each image response to form a vector of length 96 elements. Write down the filter that gives the largest value of mean and the filter that gives the largest value of variance for colosseum.jpg and panda.jpg in the report. (10%)

The equations of different filters are given as below:
Gaussian filter:
G_σ (x,y)= 1/(2πσ^2 ) e^(-(x^2+y^2)/(2σ^2 ))
1st derivative of Gaussian filter:
∂/∂x G(x,y)=-1/(2π〖σ_x〗^2 〖σ_y〗^2 ) x e^(-(x^2+y^2)/(2σ_x σ_y ))

2nd derivative of Gaussian filter:
∂^2/(∂x^2 ) G(u,v)=1/(2π〖σ_x〗^3 〖σ_y〗^3 ) (x^2-〖σ_x〗^2 ) e^(-(x^2+y^2)/(2σ_x σ_y ))

Laplacian of Gaussian (LoG):
LoG_σ (x,y)=-1/(πσ^4 )(1-(x^2+y^2)/(2σ^2 ))e^(-(x^2+y^2)/(2σ^2 ))
Part-2: IMage ranking
You are given a collection of 20 images and 2 query images (in the canvas). Your need to extract visual feature from these images by performance convolution with the 48 filters in PART-A, and complete the following:
For each query, retrieve the five most similar images from the collection of 20 images, show them in descending order of similarity score in the report. Compute the similarity score by using Euclidean distance for query 1 (panda.jpg) and Cosine similarity for query 2 (colosseum.jpg).
Euclidean distance between query Q=[q_1,q_2⋯q_n] and image F=[f_1,f_2⋯f_n]:
Distance(Q,F)=√(∑_(i=1)^n▒〖(q_i-f_i)〗^2 )
Cosine similarity between query Q=[q_1,q_2⋯q_n] and image F=[f_1,f_2⋯f_n]:
Similarity(Q,F)=(∑_(i=1)^n▒〖q_i f_i 〗)/(√(∑_(i=1)^n▒q_i^2 ) √(∑_(i=1)^n▒f_i^2 ))
(20%)
Implement color histogram and repeat (A) to show the five most similar images of each query. (30%)
Submission
Report itself will carry 10% marks. Please zip the followings and submit to Canvas:
Computer program: You can use any versions of Python 2 or Python 3.
Report
Deadline
The submission should be done before 25-Feb, 11:59pm.
Penalty on late submission: 20% of marks will be deducted per day. No submission will be allowed after five days from the deadline. Do NOT copy code from the internet and do not borrow other people’s code. Remember than PLAGIARISM is a serious offense for which you may fail the class or even be expelled from the university.
Contact person
Please email Teaching Assistant Alan (Email: tnguyenhu2-c@my.cityu.edu.hk) for technical question.