Skip to main content
. 2011 Aug 22;11(8):8164–8179. doi: 10.3390/s110808164

Algorithm 1.

The proposed integrated segmentation algorithm incorporating the variant moments and the measures of optic flow, flow’s magnitude and phase of each pixel (mij, θij).

1: Function Segmentation(I)
2: {An image I of N × M pixel intensities}
3: fori = 1 to N do
4:   forj = 1 to M do
5:     Obtain a window:
Wij=I[iw2i+w2,jh2j+h2]of w×h neighbours of I[i,j]
6:     Obtain pixel features:
Fij[x(i),y(j),x,ycoordinatesA(Wij),Lx(Wij),Ly(Wij),Px(Wij),Py(Wij),variantmomentsmij,θijopticflow]
7:   end for
8: end for
9: class-id = k-means(F,k,w)
10: returnclass-id