Where can I find the source code for the erode and canny methods

I’m trying to learn the underlying implementations of the cv2.erode and the cv2.canny methods. But I cannot seem to find where the source code for those methods are lurking. Can someone please point to the source code for these? It is okay even if they are not written in python and some other language. Thank you!

opencv’s error msgs come with a (c++) file and line reference.
since the python bindings usually dont come with the c++ src code,
you should look it up on github. example: