Is this going to work on Windows? Also, I'd use `rindex` instead of `find` here - `r` because the OpenCV source might itself be inside a directory named `opencv2`, and `index` so that we don't try to read `hdr[-1:]` in case of failure.