In the real world

f(x)
d/dx*f(x)

Finite differences responding to noise
Increasing noise

Solution: smooth first
f, h, h*f, α/αx*(h*f)
where is the edge?

1
2
3
4
5
6
for sigma = 1:3:10
    h = fspecial('gaussian', fsize, sigma);
    out = imfilter(im, h);
    imshow(out);
    pause;
end