フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

roipoly with a specified area

2 ビュー (過去 30 日間)
alessio
alessio 2011 年 7 月 18 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi there, I am interested in specifiying a region of interest in an image, with a specified area A. A possibility is maybe to modify the roipoly function, but I don't know how to do it quickly.
I am quite new and I don't know if in matlab there are similar functionalities...
Thanks to all
Alessio

回答 (2 件)

Nuno
Nuno 2011 年 7 月 18 日
You can use this sintaxe:
frame(y1(1):y1(2),x1(1):x1(2),:);
With this, you specify 4 points...
  1 件のコメント
alessio
alessio 2011 年 7 月 19 日
Thank you very much for your reply Nuno, but I was interested in something more interactive, without having to specify in advance the coordinates... Like a roipoly with a forcing on the spanned area
Alessio

Sean de Wolski
Sean de Wolski 2011 年 7 月 18 日
How about poly2mask?
doc poly2mask
  2 件のコメント
alessio
alessio 2011 年 7 月 19 日
Thank you Sean de, I tried with poly2mask but what I need is an interactive way to specify the roi like polyroi, that at the same time force the area to a fixed value... I'm not sure if it is possible without rewriting some code...
Alessio
Sean de Wolski
Sean de Wolski 2011 年 7 月 19 日
Well, yes you'll probably have to write some code. But you can easily and quickly generate masks of a non-convex area with poly2mask, and then sum it or use bwarea to get its area, and then dilate it or erode it automatically if too big or too small.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by