Fill and image using the border color of the selected region
result = imroifill(imin,mask)
Input Image
Input mask
Output Image
This function is to fill the selected region with the borders' value, which would remove an object from an image/
S = imread(fullpath(getIPCVpath() + "/images/coins_gray.jpg")); mask = imroi(S); imout = imroifill(S,mask); imshow(S); scf; imshow(imout);