Remove watermark and background

Questions and postings pertaining to the development of ImageMagick, feature enhancements, and ImageMagick internals. ImageMagick source code and algorithms are discussed here. Usage questions which are too arcane for the normal user list should also be posted here.
Post Reply
spborikar
Posts: 1
Joined: 2017-03-16T21:40:01-07:00
Authentication code: 1151

Remove watermark and background

Post by spborikar »

Hello

What could be efficient method to remove background and watermark in the image below?
I want to make it friendly for OCR to extract maximum text

https://image.yayimages.com/1600/photo/ ... 347125.jpg

Your help is appreciated.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Remove watermark and background

Post by snibgo »

I don't know what you mean by "background" and "watermark".

But you could easily:

1. Turn pixels that are nearly white into white.

2. Turn pixels that have high saturation (eg blue and cyan) into white.

3. Turn pixels that have low saturation (eg black or gray) into black.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Remove watermark and background

Post by fmw42 »

try

Code: Select all

convert french-national-identity-card-male-8347125.jpg -contrast-stretch 10,0% -fill white +opaque black id_proc.png
Post Reply