fill inside a boundary
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Sean de Wolski
el 8 de Jun. de 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'));
Categorías
Más información sobre Language Support en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!