I have source code that can recognize the position of a character in an image. but there is a line of code that I cannot understand, WHY?
[r c]=size(mainImage);
% Why rotate 90 degree? why multyply? why??? :-??
splash = real(ifft2(fft2(mainImage) .* fft2(rot90(object, 2), r, c)));
thresh = max(splash(:))-10;
for i=1:r
for j=1:c
if splash(i,j)>=thresh
splash(i,j)=1;
else
splash(i,j)=0;
end
end
end
source
share