Well, you can kind of know it from the docs. For example looking up findContours in the docs gives you a link that clearly states the function is inside the imgproc module, which can also be found at the top of the page.