ROS Gazebo vision.BlobAnalysis Error

Hi all,
I am facing the problem with the vision.BlobAnalysis class for ROS beginner tutorial.
Following is the error:
Array formation and parentheses-style indexing with
objects of class 'vision.BlobAnalysis' is not allowed.
Use objects of class 'vision.BlobAnalysis' only as
scalars or use a cell array.
Error in detectCircle (line 37)
[centroids,majorAxes] = detector(imgBW);
Error in gazeboExampleMATLAB (line 29)
[centerX,centerY,circleSize] =
detectCircle(img,resizeScale);
please suggest, how can I resolve the error. Thank you very much in advance.

 採用された回答

Sebastian Castro
Sebastian Castro 2018 年 9 月 13 日

1 投票

Are you trying this in a version earlier than R2016b, by any chance?
If so, replace the problematic line with:
[centroids,majorAxes] = step(detector,imgBW);
- Sebastian

その他の回答 (1 件)

Ravindra
Ravindra 2018 年 9 月 14 日

0 投票

Thank you very much Sebastian!! Works perfectly.

カテゴリ

ヘルプ センター および File ExchangeNetwork Connection and Exploration についてさらに検索

質問済み:

2018 年 9 月 13 日

回答済み:

2018 年 9 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by