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

 Réponse acceptée

Yoshio
Yoshio le 17 Juin 2019

0 votes

の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 commentaires

TY
TY le 18 Juin 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 le 19 Juin 2019
pathは通っているように見えます。
Building from Sourceではなく、Windows Installerを使ってSDK以外に、Matlab Developer Packageもインストールされているのでしたら、通常は、問題ないはずです。
確認の方法として、
Start exploring with Realsense devices by typing at the Matlab prompt:
とありますので、こちらを試してみてください。
それでもエラーが発生する場合は、こちら
に質問して頂くのが良いかと思います。
TY
TY le 29 Août 2019
その後について追記します。
上記コメントのように「depth_example.m」 の格納フォルダ名を「RealSence」とデフォルトから変更していましたが、「+realsense」に戻したところ動作しました。
Yoshio
Yoshio le 29 Août 2019
ご報告ありがとうございます。
無事動作できたようで良かったです。

Connectez-vous pour commenter.

Plus de réponses (1)

Yoshio
Yoshio le 15 Juin 2019

0 votes

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

1 commentaire

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

Connectez-vous pour commenter.

Produits

Version

R2019a

Tags

Question posée :

TY
le 12 Juin 2019

Commenté :

le 29 Août 2019

Community Treasure Hunt

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

Start Hunting!