How to remove black stamp from an image

asked 2020-10-25 03:48:29 -0600

updated 2020-10-25 05:43:40 -0600

I have some stamped images (black) and I want to remove these stamps to get better similarity scores when comparing a non-stamped and stamped images.

With Stamp With Stamp Without Stamp

Any trick to do so? I have tired many things to get it done but failed!

edit retag flag offensive close merge delete

Comments

what have you tried, so far ?

berak gravatar imageberak ( 2020-10-25 06:13:08 -0600 )edit

ssim, nrmse, rmse and this https://github.com/EdjoLabs/image-match for similarity measures. I have also written a script that would remove black borders. I also tried converting to grayscale and tried above measures but got subtle improvement not satisfactory though.

ItsYasirrr gravatar imageItsYasirrr ( 2020-10-25 07:27:27 -0600 )edit
1

I think the problem with these stamps is that the degraded image differs a lot from the original. The original can contain black/white stripes, but if it's degraded it becomes gray. Visually it's similar, but very different from a computer vision perspective.

A good matching algorithm should be able to match the images even with the black stamps on them.

To remove the black stamps, you could use inpainting methods (like Perona-Malik). But they need the mask of the area to reconstruct, which can be difficult to determine, as the original images also contain black lines.

So my advice is to concentrate on the matching algorithm instead of removing the stamps.

kbarni gravatar imagekbarni ( 2020-10-26 12:29:32 -0600 )edit

So I have tried image-matching algos first such as mre, nrmse, ssim and image-match algo EdjoLabs. They all give low score for similarity.

ItsYasirrr gravatar imageItsYasirrr ( 2020-10-27 00:45:09 -0600 )edit