Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need the code in Matlab please. I've done part a The code should follow the steps in the powerpoint so if there is a

I need the code in Matlab please. I've done part a

The code should follow the steps in the powerpoint so if there is a matlab code that does it all in one line I can't use it.

Also explanation of the code would be extremely helpful so that I can understand what is going on.Thanks!

1)

a)First, apply Gaussian smoothing (with standard deviation ) to an input image I, to obtain Is,

b)Implement the corner detection algorithm (CORNERS), by using Is as input, as described in class and also in the textbook,

Hints:

- For eigenvalue computation: help eig

- For sorting: help sort, help sortrows

image text in transcribedimage text in transcribed

What I have so far:

clear all; clc;

%Input image %img = imread ('Flowers.jpg'); %img = imread ('Syracuse_01.jpg'); %img = imread ('Syracuse_02.jpg'); img = imread ('kobe.jpg');

%Show input image figure, imshow(img); img = rgb2gray(img); img = double (img);

%Value for Thresholding T_Low = 0.075; T_High = 0.175;

%Gaussian Filter Coefficient sigma=1; f=[]; for i = 1:5 f(i)= (1/(2*pi()*sigma^2)^0.5)*exp((-(i)^2)/2*sigma^2); end f=f/sum(f);

%Convolution of image by Gaussian Coefficient A=conv2(img, f, 'same');

Algorithm CORNERS The input is formed by an image, I, and two parameters: the threshold on 12, t, and the linear size of a square window (neighbourhood), say 2N + 1 pixels. 1. Compute the image gradient over the entire image 1; 2. For each image point p: (a) form the matrix C of (4.9) over a (2N + 1) (2N + 1) neighbourhood Q of p; (b) compute 12, the smaller eigenvalue of C; (c) if 12 > t, save the coordinates of p into a list, L. 3. Sort L in decreasing order of 12. 4. Scanning the sorted list top to bottom: for each current point, p, delete all points appearing further on in the list which belong to the neighbourhood of p. The output is a list of feature points for which 12 > I and whose neighbourhoods do not overlap. The algorithm has two main parameters: The threshold, I and the size of the neighborhood, (2N+1) The threshold can be estimated from the histogram of 12 Yet, no simple criterion for the estimation of the optimal size of the neighborhood. Experimentally, the choices of N between 2 and 10 are adequate in most practical cases. For relatively large values of N, the corner tends to move away from the neighborhood center. Algorithm CORNERS The input is formed by an image, I, and two parameters: the threshold on 12, t, and the linear size of a square window (neighbourhood), say 2N + 1 pixels. 1. Compute the image gradient over the entire image 1; 2. For each image point p: (a) form the matrix C of (4.9) over a (2N + 1) (2N + 1) neighbourhood Q of p; (b) compute 12, the smaller eigenvalue of C; (c) if 12 > t, save the coordinates of p into a list, L. 3. Sort L in decreasing order of 12. 4. Scanning the sorted list top to bottom: for each current point, p, delete all points appearing further on in the list which belong to the neighbourhood of p. The output is a list of feature points for which 12 > I and whose neighbourhoods do not overlap. The algorithm has two main parameters: The threshold, I and the size of the neighborhood, (2N+1) The threshold can be estimated from the histogram of 12 Yet, no simple criterion for the estimation of the optimal size of the neighborhood. Experimentally, the choices of N between 2 and 10 are adequate in most practical cases. For relatively large values of N, the corner tends to move away from the neighborhood center

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Students also viewed these Databases questions