Original Post
Hello everybody As a part of a project I need to code the following : If we Consider the following 8-neighborhood of a pixel p1[j] with value either 0 or 1 and which is a part of bigger array, say, image [j] http://cgm.cs.mcgill.ca/~godfried/teaching/projects97/azar/grid.gif A(p1) = number of 0,1 patterns in the sequence p2,p3,p4,p5,p6,p7,p8,p9,p2 For example : http://cgm.cs.mcgill.ca/~godfried/teaching/projects97/azar/grid2.gif has A(p1) = 1 and http://cgm.cs.mcgill.ca/~godfried/teaching/projects97/azar/grid3.gif has A(p1) = 2 I want to code this function , Any help please? btwn: I try to view the images using [img][/img] in my post but it seemed that it doesn't work !