In order to load these images from disk, OpenCV actually calls other image I/O libraries that actually facilitate the loading and decoding process. Therefore, OpenCV needs to be able to load various image file formats from disk such as JPEG, PNG, TIFF, etc. OpenCV is an image processing and computer vision library. The cmake program is used to automatically configure our OpenCV build. The pkg-config package is (very likely) already installed on your system, but be sure to include it in the above apt-get command just in case. Next, let’s install some developer tools: $ sudo apt-get install build-essential cmake pkg-config To start, open up your command line and update the apt-get package manager to refresh and upgrade and pre-installed packages/libraries: $ sudo apt-get update Most (in fact, all) steps in this tutorial will be accomplished by using your terminal. Step #1: Install OpenCV dependencies on Ubuntu 16.04 And as far as OpenCV goes, OpenCV 3 doesn’t care which version of Python you’re using: the bindings will work just the same.Īll that said, let’s get started installing OpenCV with Python bindings on Ubuntu 16.04. Keep in mind that Python 3 is the future - but also keep in mind that porting Python 2.7 code to Python 3 isn’t terribly challenging either once you understand the differences between the Python versions. I’ll simply say that you should use whichever version of Python you are comfortable with and use on a daily basis. Regarding which Python version you should use… I’m not getting into that argument. Make sure you are consistent with your decision, otherwise you will inevitably run into compile, linking, and import errors. I’ve highlighted the steps that require you to make a decision regarding which version of Python you would like to use. In either case, this tutorial will support both Python 2.7 and Python 3. There are plans to migrate to Python 3 and use Python 3 by default however, as far as I can tell, we are still a long way from that actually becoming a reality.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |