fill inside a boundary
Mostra commenti meno recenti
Hello everyone,
i have two frames of images with time delay. i specified a boundary in first frame around an object. So i have the position of the boundary. I want to fill inside the boundary with values from the second frame. any idea?
Risposta accettata
Più risposte (1)
Sean de Wolski
il 8 Giu 2011
M = imfill(BoundaryImage,'holes'); %Assuming boundary is connected. Else use poly2mask
I1(M) = I2(M); %Set mask portion of first image to that of second.
If you don't want to fill the boundary itself:
M = xor(BoundaryImage,imfill(BoundaryImage,'holes'));
Categorie
Scopri di più su Language Support in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!