Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

How to access OpenCV data root directory?

$
0
0
I would like to access /usr/local/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml from OpenCV distribution, but in a platform-independent way, e.g. in Python os.path.join(cv2.OPENCV_DATA_DIR, "haarcascades", "haarcascade_frontalface_default.xml") Can I? How do I get a reliable `OPENCV_DATA_DIR` equivalent? My question is basically the same to [what this StackOverflow user is asking](https://stackoverflow.com/questions/15227532/python-opencv-root-directory). For example, Qt has [QCoreApplication::libraryPaths()](https://doc.qt.io/qt-5/qcoreapplication.html#libraryPaths). The correct paths are determined at compile / install time, so it should be possible to make them available to the user.

Viewing all articles
Browse latest Browse all 19555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>