I aim is to contruct a training region, gaurd region around a cell under test in the image. The mean and standard deviation of the training region are to be compared to the cell under test.
B= training band
G= guard band
P= cell under test
k=threshold.
for i = Tr-Gr:Tr-Gr for j =Td-Gd: Td-Gd for p = i-14 : i-14 for q = j-12 : j-12 CUT=I(p,q); target=I(i,j); mt=mean(target(:)); stdt=std(target(:)); test=(abs(CUT-mt)/stdt); if (test < K) CUT = 0; else CUT = 1; end end end endend
In the output I'm expecting a binary image with detected ship, but im unable to obatin the output.
Best Answer