fix the error? ??? Undefined function or method 'conv2' for input arguments of type 'double' and attributes 'full 3d complex'.
Mostrar comentarios más antiguos
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));
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Video Formats and Interfaces en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!