zerocross(F, ukuran, sigma)
Unrecognized function or variable 'ukuran'.
i got that message here's my code
function [K] = zerocross(F,ukuran,sigma)
% ZEROCROSS Pemerolehan tepi objek pada citra F
% melalui operator Marr-Hildreth
% Hasil: citra K
H = cadarLoG(ukuran,sigma);
pembulatan = false;
potong = true;
G = deteksi(F, H, potong, pembulatan);
% Proses zero crossing
K = zeros(size(G));
[m, n] = size(K);
for y=2 : m-1
for x=2: n-1
jum = 0;
for p = x-1 : x
for q = y-1 : y
jum = jum + G(q,p);
end
end
rerata0 = jum / 4;
jum = 0;
for p = x-1 : x
for q = y : y+1
jum = jum + G(q,p);
end
end
rerata1 = jum / 4;
jum = 0;
for p = x : x+1
for q = y-1 : y
jum = jum + G(q,p);
end
end
rerata2 = jum / 4;
jum = 0;
for p = x : x+1
for q = y : y+1
jum = jum + G(q,p);
end
end
rerata3 = jum / 4;
terbesar = max([rerata0 rerata1 rerata2 rerata3]);
terkecil = min([rerata0 rerata1 rerata2 rerata3]);
if (terbesar > 0) && (terkecil < 0)
K(y,x) = 255;
end
end
end
return

댓글 수: 5

DGM
DGM 2022년 5월 24일
How are you calling the function?
al rezi
al rezi 2022년 5월 24일
zerocrossing
Torsten
Torsten 2022년 5월 24일
편집: Torsten 2022년 5월 24일
You didn't supply values for F, ukuran and sigma when calling
K = zerocross(F, ukuran, sigma)
al rezi
al rezi 2022년 5월 24일
i still dont gei it
If you were calling the function without any arguments, that's not the error you would be getting.
% these variables exist in a different scope
% they have nothing to do with the A,B,and C which are local to myfunct
A = 1;
B = 2;
C = 3;
myfunct % improperly calling the function without any inputs or outputs
Not enough input arguments.

Error in solution>myfunct (line 10)
x = A; % error occurs when you try to use a missing argument
function out = myfunct(A,B,C) % requires 3 input arguments
x = A; % error occurs when you try to use a missing argument
y = B;
z = C;
out = x + y + z;
end

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2022년 5월 24일

0 개 추천

zerocross(F, ukuran, sigma)
at the time you invoked zerocross with that line, you had not defined ukuran. Possibly you had not defined sigma either, but you had defined F

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

릴리스

R2022a

태그

질문:

2022년 5월 24일

댓글:

DGM
2022년 5월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by