for (int i = w/2; i < H - w/2; i++) {
for (int j = w/2; j < W - w/2; j++) {
sum = 0;
for (int k = -w/2; k <= w/2; k++)
for (int l = -w/2; l <= w/2; l++)
sum += inImg[i+k][j+l];
ent = 0;
for (int k = -w/2; k <= w/2; k++)
for (int l = -w/2; l <= w/2; l++)
ent -= (inImg[i+k][j+l]/sum) * log10 (inImg[i+k][j+l])/log10 2);
}
}
window 주소 3x3
entropy는 값이 작을수록 edge에 가까움
gradient-> 여러가지 형태로 표현 가능
laplacian -> 0 ~ 255