impoly

To apply a function through a mask on an image

自作多情 提交于 2019-12-13 22:54:51
问题 I create a closed region on a picture by impoly('Closed', true) and lastly after marking the area for the mask BW = createMask(h) in Matlab commandline. Initial commands before marking points for the mask in the figure imshow('contour.png'); h = impoly('Closed',true); Here, I used nkjt's answer below. The picture to be filtered by the function conditionalRemoval(image, area) Then, I run image = imread('contour.png'); areaLazyRemoval = BW; image = conditional_removal(image, areaLazyRemoval); I