fix the error? ??? Undefined function or method 'conv2' for input arguments of type 'double' and attributes 'full 3d complex'.
이전 댓글 표시
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));
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Images에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!