ubuntu16.04安装opencv2.4.9
时间: 2023-10-11 21:04:41 浏览: 152
ubuntu16.04安装opencv教程
3星 · 编辑精心推荐
安装OpenCV 2.4.9在ubuntu16.04上需要以下步骤:
1. 首先,从以下链接下载OpenCV源码文件:。
2. 安装必要的环境:使用以下命令安装必要的依赖项:
```
sudo apt-get install build-essential cmake libgtk2.0-dev pkg-config python-dev python-numpy libavcodec-dev libavformat-dev libswscale-dev
```
3. 解压下载的OpenCV源码文件并进入源码目录。在终端中使用以下命令进行解压:
```
unzip opencv-2.4.9.zip
cd opencv-2.4.9
```
4. 创建一个release目录,并进入该目录:
```
mkdir release
cd release
```
5. 使用cmake编译OpenCV源码,并将所有的库文件安装到/usr/local目录下:
```
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
```
6. 返回到opencv-2.4.9目录:
```
cd ..
```
7. 安装OpenCV库文件:
```
sudo make install
```
这样,你就成功地在ubuntu16.04上安装了OpenCV 2.4.9。请注意,这个过程可能需要一些时间,具体取决于你的系统和网络速度。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Ubuntu16.04下安装opencv2.4.9及若干问题解决方法](https://blog.csdn.net/weixin_39513374/article/details/80190487)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [ubuntu16.04 下安装opencv2.4.9](https://blog.csdn.net/weixin_34250434/article/details/94706217)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [matlab的冲击信号图代码-Start-Zero-Ubuntu16.04-install-caffe-cuda9.1-cndnn9.1-Op](https://download.csdn.net/download/weixin_38688145/18892111)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文