Why do I get this error?

1 回表示 (過去 30 日間)
Ouael Chkoundali
Ouael Chkoundali 2019 年 5 月 12 日
編集済み: Ouael Chkoundali 2019 年 5 月 12 日
Hi,
I am using this code to select an area from an image on an axes using the mouse.
r = imrect; % choose the area by drawing a rectangle
fcn = makeConstrainToRectFcn('imrect',get(ax1,'XLim'),get(ax1,'YLim'));
setPositionConstraintFcn(r,fcn);
setResizable(r,false);
rectangle_position = getPosition(r);
rectangle_position = uint8(rectangle_position);
It works but I am getting this error at the end:
"Expected one output from a curly brace or dot indexing expression, but there were 0 results.
Error in imroi/setPositionConstraintFcn (line 210)
obj.api.setPositionConstraintFcn(fcn);
Error in select_area (line 10)
r.setPositionConstraintFcn(fcn);"
Can someone help me please?

回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by