RealSense D435 のMATLABへの接続について

Intel RealSense D435 を用いてMATLABでRGB画像と距離画像を取得したいのですが、具体的な手順が分からず、接続できずに困っております。
Intel RealSense SDK for Windows10 を以下のURLからダウンロード、インストールした後
コマンドウィンドウにて
>> pipe = realsense.pipeline();
変数 "realsense" またはクラス "realsense.pipeline" は未定義です。
と、表示され動作しません。
RealSense Viewer からはカメラの接続ができています。
詳しい手順が分かる方いらっしゃいましたら、ご教授よろしくお願い致します。
SDKダウンロード
その他、参考にしたURL
環境
Windows10
MATLAB 2019a

 Accepted Answer

Yoshio
Yoshio on 17 Jun 2019
のWindows Installerの
3. The package will be installed to C:\Program Files (x86)\Intel RealSense SDK 2.0\matlab\+realsense\. You can copy it from here to a place where Matlab can find it or add it to Matlab's path
を実行する必要があります。インストールしても、MATLABのシステムから見て、SDKがどこにあるか、分からないからです。
まずこの3を実行した上で、以下試してください。
which depth_example
で関数が見つかれば成功です。見つからなければpathが通っていません。

4 Comments

TY
TY on 18 Jun 2019
which depth_example を実行しました。
userpath と同じフォルダの depth_example.m を認識しているように思いますが、エラーの内容に変化はありませんでした。
の Building from Source を実行できていないためでしょうか?
<実行結果>
>> userpath
ans =
'C:\Users\yoshinori.tsujino\Documents\matlab\19年度\RealSence'
>> which depth_example
C:\Users\yoshinori.tsujino\Documents\matlab\19年度\RealSence\depth_example.m
>> depth_example
変数 "realsense" またはクラス "realsense.pipeline" は未定義です。
エラー: depth_example (line 3)
pipe = realsense.pipeline();
Yoshio
Yoshio on 19 Jun 2019
pathは通っているように見えます。
Building from Sourceではなく、Windows Installerを使ってSDK以外に、Matlab Developer Packageもインストールされているのでしたら、通常は、問題ないはずです。
確認の方法として、
Start exploring with Realsense devices by typing at the Matlab prompt:
とありますので、こちらを試してみてください。
それでもエラーが発生する場合は、こちら
に質問して頂くのが良いかと思います。
TY
TY on 29 Aug 2019
その後について追記します。
上記コメントのように「depth_example.m」 の格納フォルダ名を「RealSence」とデフォルトから変更していましたが、「+realsense」に戻したところ動作しました。
Yoshio
Yoshio on 29 Aug 2019
ご報告ありがとうございます。
無事動作できたようで良かったです。

Sign in to comment.

More Answers (1)

Yoshio
Yoshio on 15 Jun 2019

0 votes

SDKのインストールの後、pathを通しましたか?

1 Comment

TY
TY on 17 Jun 2019
Edited: TY on 17 Jun 2019
お世話になります。
ご回答ありがとうございます。
「pathを通す」?という作業は特に実施しておりませんでした。
これは userpath に現在のフォルダを設定するという意味でしょうか?
(コマンドウィンドウにて、 >userpath と >pwd の出力が同じフォルダとなるように設定する?)
userpath(newpath) コマンドにて現在のフォルダを設定しましたが、エラー内容に変化はありませんでした。

Sign in to comment.

Products

Release

R2019a

Tags

Asked:

TY
on 12 Jun 2019

Commented:

on 29 Aug 2019

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!