asaf
asaf

Reputation: 35

How to remove reflection from image with with image-processing

I'm looking for the right filter to remove reflection. In my specific case, I want to use it on a whiteboard, for example:

Before

After

Upvotes: 1

Views: 1176

Answers (1)

user2999345
user2999345

Reputation: 4195

dilation is a very simple (while not perfect) way to do that:

im = im2double(rgb2gray(imread('board.png')));
imd = imdilate(im,strel('diamond',1));
res = im - imd;
res = res - min(res(:)); res = res./max(res);
imshow(res)

enter image description here you may also apply some thresholding afterwards.

Upvotes: 1

Related Questions