How can I compute the gradient of image function of an noise-less image?

60 Views Asked by At

I have an $11\times11$ image having in its center a $5\times5$ square, image it's noiseless and I don't know how to compute the intensity of contour for this image. If I remember correctly, I should use a derivative, but I don't know exactly what and how can I use it.