That method however does not include the FFMPEG codec – i.e. you may be able to use OpenCV but you won’t be able to process videos. The following instruction works for me is inspired by this OpenCV Youtub video. So far I have got it working on both my Desktop and Laptop. Download OpenCV Packageįirstly, go to the official OpenCV site to download the complete OpenCV package. I am on Python 2.x and OpenCV 3.x – mainly because this is how the OpenCV-Python Tutorials are setup/based on. In my case, I’ve extracted the package (essentially a folder) straight to my C drive. The Anaconda Site-packages directory (e.g. Our goal is to copy and paste the cv2.pyd file to this directory (so that we can use the import cv2 in our Python codes.).įrom this OpenCV directory (the beginning part might be slightly different on your machine): # Python 2.7 and 32-bit machine: C:\Users\Johnny\Anaconda\Lib\site-packages in my case) contains the Python packages that you may import. BUT, we still need to do a little bit more work to get FFMPEG (video codec) to work (to enable us to do things like processing videos.) Set Enviromental Variables To this Anaconda directory (the beginning part might be slightly different on your machine): C:\Users\Johnny\Anaconda\Lib\site-packagesĪfter performing this step we shall now be able to use import cv2 in Python code. | 32-bit or 64 bit machine? | Variable | Value | Right-click on “My Computer” (or “This PC” on Windows 8.1) -> left-click Properties -> left-click “Advanced” tab -> left-click “Environment Variables…” button.Īdd a new User Variable to point to the OpenCV (either x86 for 32-bit system or 圆4 for 64-bit system.) I am currently on a 64-bit machine. #Conda install opencv python 3.5 64 Bit#.#Conda install opencv python 3.5 install#.#Conda install opencv python 3.5 how to#.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |