Input: ImgSobelMorph: ImgSobelMorph is the image, which the source image has been processed by step one to step three and morphology method. r: r is the row of the image. c: c is the column of the image. Algorithm: ImgENP is a two-dimensional array with r rows and c columns, whose value set to be zero. For i set 2 to r-1 For j set 2 to c-1 If the sum of ImgSobelMorph (i-1:i+1, j-1:j+1) is greater than 1 Then ImgENP (i, j) set to be 1 End If End For End For Output: ImgENP: ImgENP is the output image after being processed by ENPM algorithm. |