Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> 電腦軟體教學 >> 電腦軟體介紹

Ubuntu 環境下 Matlab 調用攝像頭完整配置指南:安裝 OS Generic Video Interface、設置 Path、更新 Toolbox 快取

編輯:電腦軟體介紹

Ubuntu 14.04 + Matlab R2014a 調用筆記本內置攝像頭步驟詳解

參考百度文檔鏈接,核心難點在於安裝「OS Generic Video Interface」硬體支持包並正確配置路徑與快取。

前置條件

  • Matlab 必須在 root 權限下啟動(終端進入 Matlab 可執行目錄執行 ./matlab)。

配置步驟

  1. 點擊警告中的 Support Package Installer 鏈接,或依次選擇 HOME → Add-Ons → Get Hardware Support Packages,在線安裝 OS Generic Video Interface,安裝目錄設為 /usr/local/MATLAB/R2014a/toolbox(需 root 權限)。
  2. Set Path → Add Folder,添加 /usr/local/MATLAB/R2014a/toolbox/genericvideo,保存 Path。
  3. HOME → Preferences → General,勾選「Enable toolbox path cache」,點擊「Update Toolbox Path Cache」,Apply → OK。
  4. 命令窗輸入 imaqhwinfo 驗證,顯示 InstalledAdaptors: {'linuxvideo'} 即成功。
  5. 若仍顯示空适配器,在命令窗執行 rehash toolboxcache 強制刷新快取。

常見問題排查

  • 權限不足導致安裝目錄寫入失敗 → 確保 Matlab 以 root 運行。
  • Path 未生效 → 執行 rehash toolboxcache。

官方下載

最新版 Matlab 下載

花費大量時間摸索整理,希望能幫助遇到相同問題的開發者!

Copyright © Windows教程網 All Rights Reserved