Image gradient
imout = imgradient(imin,se)
Input image
Structure element
Output image
This operation is the difference between the dilation and the erosion of an image. It is useful for finding the outline of an object .(it is assumed that the objects are bright on a dark foreground)
S = imread(fullpath(getIPCVpath() + "/images/morpex.png")); se = imcreatese('ellipse',3,3); S2 = imgradient(S,se); imshow(S2); | ![]() | ![]() |