fill the image from the boundary of the mask

조회 수: 9 (최근 30일)
gayathri sankaran
gayathri sankaran 2023년 5월 5일
답변: Image Analyst 2023년 5월 5일
Hi all
I need to do inpainting for a image in matlab. Opencv is having the function for image inpainting where the mask region is created for the zero pixel of the input image,the mask region is filled from its outer boundary to inner side. So my process would be iterative for filling the image from outside boundary of mask region to the inner side. I need to fill the region with the maximum value of the neighbourhood for the boundaries of the mask. After filling the region the filled region should contribute to the next maximum calculation.
I have tried using dilate operation on the mask and subtract that from the mask to find the boundary of the image. Used that to fill that region from the neighbourhood max values.
I have attached the input file here. I tried to do dilation and fill the region.

답변 (1개)

Image Analyst
Image Analyst 2023년 5월 5일
Try bwboundaries followed by regionfill

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by