# Revision history [back]

That's because of camera noise. Depending on what you are doing bluring image slightly (GaussianBlur or boxBlur, medianBlur) can help. Contour calculation is always the same.

That's because of camera noise. Depending on what you are doing bluring image slightly (GaussianBlur or boxBlur, medianBlur) can help. Contour calculation is always the same.

EDIT: medianBlur with kernel size 3 works good for salt-and-pepper noise

That's because of camera noise. Depending on what you are doing bluring image slightly (GaussianBlur or boxBlur, medianBlur) (GaussianBlur, boxBlur, medianBlur) can help. Contour calculation is always the same.

EDIT: medianBlur medianBlur with kernel size 3 works good for salt-and-pepper noise.

EDIT2: Canny edge detection can jump between two pixels if the edge is very sharp in this case GaussianBlur might help.