how should I create ring(circular) shaped structuring element?

5 ビュー (過去 30 日間)
Ravi Dange
Ravi Dange 2017 年 8 月 14 日
コメント済み: Ravi Dange 2017 年 8 月 14 日
I am working on a project related to malaria detection and severity from infected red blood cells for that i need ring shaped structural element to do morphological operation.

採用された回答

Guillaume
Guillaume 2017 年 8 月 14 日
You can specify any arbitrary neighbourhood matrix to strel. You could generate that ring matrix by subtracting two disk structural elements of different radii, e.g.:
outerradius = 6;
innerradius = 4;
outerdisk = strel('disk', outerradius);
innerdisk = strel('disk', innerradius);
ringmatrix = outerdisk.Neighborhood - padarray(innerdisk.Neighborhood, repmat(outerradius - innerradius, 1, 2));
ringelement = strel(ringmatrix);
  1 件のコメント
Ravi Dange
Ravi Dange 2017 年 8 月 14 日
thank you very much Guillaume

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by