How to label the interior of region as 2 where as boundary is already labelled as 4 for an object using Matlab coding

I am using grids with width 10. I want the interior to be filled as 2. As shown in attached figure. Than I want to count all filled cells of 4 and 2. Regards for cooperation.

댓글 수: 1

please need help how to fill the interior of the object.
regards

답변 (1개)

AS you have coordinates for the boundary (i.e 4), use inpolygon and get the coordinates lying inside it. Label them or fill the value you want.

이 질문은 마감되었습니다.

제품

태그

질문:

2019년 7월 17일

마감:

2021년 8월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by