Hey,
I found something weird on the opencv 2.4 documentation. http://docs.opencv.org/2.4/doc/tutorials/imgproc/erosion_dilatation/erosion_dilatation.html It looks like dilate and erode title have been inversed. Let me know if i´m wrong. I will create a new issue on git.