fix the error? ??? Undefined function or method 'conv2' for input arguments of type 'double' and attributes 'full 3d complex'.
Afficher commentaires plus anciens
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));
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Video Formats and Interfaces dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!