fix the error? ??? Undefined function or method 'conv2' for input arguments of type 'double' and attributes 'full 3d complex'.
Show older comments
clear all;
close all;
clc;
I=imread('pic.jpg');
imshow(I);
%%Gabor
phi = 6*pi/8;
theta = 2;
sigma = 0.65*theta;
filterSize = 5;
G = zeros(filterSize);
for i=(0:filterSize-1)/filterSize
for j=(0:filterSize-1)/filterSize
xprime= j*cos(phi);
yprime= i*sin(phi);
K = exp(2*pi*theta*sqrt(-1)*(xprime+ yprime));
G(round((i+1)*filterSize),round((j+1)*filterSize)) = exp(-(i^2+j^2)/(sigma^2))*K;
end
end
%%Convolve
J = conv2(I,G);
figure, imshow(imag(J));
Accepted Answer
More Answers (0)
Categories
Find more on Video Formats and Interfaces in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!