Image Acquisition Toolboxを利用して、Windows Video CameraからMATLAB上へ画像を取り込むと、DeviceIDsおよびDeviceInfoが空配列となりデバイスが認識できないのはなぜですか?
7 views (last 30 days)
Show older comments
MathWorks Support Team
on 25 Oct 2013
Edited: MathWorks Support Team
on 18 Feb 2021
Image Acquisition Toolboxを利用して、Windows Video CameraからMATLAB上へ画像を取り込もうとすると、下記出力結果のように、DeviceIDsおよびDeviceInfoが空配列となり、デバイスが認識できません。
>> imaqhwinfo('winvideo')
ans =
AdaptorDllName: [1x63 char]
AdaptorDllVersion: '1.8 (R14SP2)'
AdaptorName: 'winvideo'
DeviceIDs: {1x0 cell}
DeviceInfo: [1x0 struct]
Accepted Answer
MathWorks Support Team
on 16 Feb 2021
Edited: MathWorks Support Team
on 18 Feb 2021
まず、ご利用のWindows Video CameraがVFW(Video For Windows)または、WDM(Windows Driver Model)に準拠していることが前提条件となります。
実際にデバイスが利用できる環境にある場合には、下記フォルダにある"AMCap.exe"を使用して、Toolboxに対応しているかどうかを確認可能です。
AMCap.exeで、正常に動作していれば、Image Acquisition Toolboxに対応しているものと考えられます。
$MATLAB\toolbox\imaq\imaq\AMCap.exe
($MATLABは、MATLABインストールフォルダの意)
上記で問題が解決されない場合、次の3つの事項をご確認ください。
(1)ご利用のOSにインストールされる DirectX のバージョン
Image Acquisition Toolbox で要求されるDirectXのバージョンは、9.0以上となります。該当のバージョンがインストールされていないようでしたら、下記Microsoftホームページより、DirectXの最新バージョンをダウンロードした後、デバイスが認識されるかご確認ください。
なお、DirectX のバージョンの確認方法は、MATLAB Command Window上で、次のコマンドを実行すると、DirectX診断ツールが起動し、DirectXのバージョンを確認することができます。
>> !dxdiag
(2)MATLAB以外にカメラにアクセスするアプリケーション
MATLAB以外にカメラにアクセスするアプリケーションが実行中の場合、MATLAB上にデバイスが認識されません。
上記に該当するアプリケーションを終了し、MATLAB Command Window上で、次のコマンドを実行し、デバイスが認識されるかご確認ください。
>> imaqreset
>> imaqhwinfo('winvideo')
(3)USBまたはFirewireポートへの接続のタイミング
MATLAB起動後、USBまたはFirewireポートへ接続すると、正常にデバイスが認識されません。MATLAB Command Window上で、次のコマンドを実行し、再度、デバイスが認識されるかご確認ください。
>> imaqreset
>> imaqhwinfo('winvideo')
0 Comments
More Answers (0)
See Also
Categories
Find more on Image Acquisition Support Packages for Hardware Adaptors (Generic Video Interface) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!