How to fill the interior of the boundary surface of the object?

Hi dear community members,
i have an object whose boundary surface is filled as 1s and 3s. i want to fill the interior. using imfill() function, it filled the interior but it fills extra regions as well.
The file is attanced for the points of the objects. Thanks in advance for cooperation.

Antworten (1)

darova
darova am 14 Mär. 2021

1 Stimme

use bwselect

7 Kommentare

This function doesnt work properly. i have applied it.
Did you use row and column properly? Can you show the code?
i have used the following code but its not giving me the result. Please guide.
A = load(Boundary_closed_1s_3s.txt)
[r,c]= size(A)
B = bwselect(A,c,r,4)
You should pass r and c coordinates you want to pick
B = bwselect(A,round(c/2),round(r/2),4)
B contains all zeros. can bwselect() function be used to fill the interior.
Hi dear darova, after using bwselect(), B only shows zeros. Could you share your expert opinion? Regards!
bwselect() allows you to manually, or by code, select a particular blob(s) that you want to extract into a new image. It does not fill shapes.

Melden Sie sich an, um zu kommentieren.

Produkte

Version

R2020a

Gefragt:

am 14 Mär. 2021

Kommentiert:

am 19 Mär. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by