i have an image and for each pixel i want sum the neighbours of the pixel in the following way:
suppose that P is the pixel:
N1 N2 N3
N8 P N4
N7 N6 N5
the part of the algorithm that i don't understand is d_8(h,p) = 1:
for each neighbor h of P / d_8(h,p) = 1 do
S = S + S0(h)
S = S/8;
does that mean that the sum must be equal to 1? can i force it to be equal to 1 whatever the value of the neighbours? i didn't understand it. can u give me an example please???
%Is there something missing for the condition d_8(h,p) = 1???
Dx1 = (Dx(x1,y1) + Dx(x2,y2)+ Dx(x3,y3) + Dx(x4,y4)...
+ Dx(x5,y5)+ Dx(x6,y6)+ Dx(x7,y7)+ Dx(x8,y8));
Dx1 = Dx1 / 8;