Pattern recognition multiobject

2 次查看(过去 30 天)
nomad nomad
nomad nomad 2011-5-16
Hello,
In Matrix, I should work with the Fourier transform of the max and min, I blocked out that how after every time I put a zero, check whether the max and min max and min are still, otherwise I have to look the new max and min.
I made the following attempt:
epse=0.01;
epsilon = 0.01;
MASQUE=ones(256,256);
somme = sum(MASQUE(:));
while(abs(somme)>epsilon)
Auto_Cor1=Auto_Cor1.*MASQUE;
G1=abs(Auto_Cor1).^2;
Auto_Cor2=Auto_Cor2.*MASQUE;
G2=abs(Auto_Cor2).^2;
Auto_Cor3=Auto_Cor3.*MASQUE;
G3=abs(Auto_Cor3).^2;
XCor1=XCor1.*MASQUE;
G4=abs(XCor1).^2;
XCor2=XCor2.*MASQUE;
G5=abs(XCor2).^2;
XCor3=XCor3.*MASQUE;
G6=abs(XCor3).^2;
[A1 ID1] = max(Auto_Cor1(:));
[A2 ID2] = max(Auto_Cor2(:));
[A3 ID3] = max(Auto_Cor3(:));
[M1 id1] = max(XCor1(:));
[M2 id2] = max(XCor2(:));
[M3 id3] = max(XCor3(:));
M123=[M1 M2 M3];
A123=[A1 A2 A3];
MAXC=max(M123)
MINA=min(A123)
if MAXC==M1
trans_four_C=TF7;
elseif MAXC==M2
trans_four_C=TF8;
else
trans_four_C=TF9;
end
if MINA==A1
trans_four_A=TF1;
elseif MINA==A2
trans_four_A=TF2;
else
trans_four_A=TF3;
end
%%DC
Matrice=abs(trans_four_C).*cos(angle(trans_four_C) - angle(trans_four_A))-epse*abs(trans_four_A);
somme = sum(Matrice(:))
if (abs(somme)<epsilon),break,end
if somme>0
[maximum indice] = max(Matrice(:));
Matrice(indice) = 0;
MASQUE(indice) = 0;
else
[minimum indice] = min(Matrice(:));
Matrice(indice) = 0;
MASQUE(indice) = 0;
end
somme = sum(Matrice(:));
end
The program remains stuck in the execution, and when I check with Debug index MASK, I think every time he does not change.
Thank you

回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by