??? Undefined function or method 'conv2' for input arguments of type 'cell'.

Hi,
I am trying this code but having real frustrating erorr again and again. Could any one please let me know what I am doing wrong.
Here is the code
clear all; clc;
sigma = 1;
radius = 1;
threshold = 1000;
size = 2 *radius +1;
dx= { -1 0 1 ; -1 0 1; -1 0 1};
dy = dx;
g= fspecial ( 'gaussian', max(1, fix(6*sigma)), sigma);
source = imread ('cow2.jpg');
im = source (: , : , 1);
Ix = conv2 (im, dx, 'same');
Iy= conv2 (im, dy, 'same');
Ix2= conv2 (Ix. ^2, g, 'same');
Iy2= conv2 (Iy. ^2, g, 'same');
Ixy = conv2 (Ix. *Iy, g, same');
harris = (Ix2.*Iy2 - I xy.^2)./ (Ix2+Iy2 +eps);
mx = ordfilt2(harris, size. ^2, ones(size));
harris = (harris ==mx) & (harris > threshold);
(rows, cols) =- find(harris);
figure, image(source), axis image, colormap(gray). hold on.
plot(cols, rows, 'ya'), title('corner detected');

Answers (0)

Categories

Asked:

on 27 Apr 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!