Ask Your Question

Extract writing from colorful background

asked 2017-01-18 07:20:37 -0500

Atado gravatar image

updated 2017-01-18 07:29:34 -0500

Hey, im trying to extract a handwritten sum from a colorful background. So as a result i'd like to have a binary image with the sum black and the colorful background should be all filtered out and set to white.

The image looks like this: image description

I tried various treshholds, grabcut, color filters and morphologic operations to improve quality but i cant get a decent result.

I could maybe filter for "only" black in HSV color space, but in other images the sum might be written in blue. Maybe someone knows how to get the best possible result here.

Best regards

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-01-18 15:35:46 -0500

LBerger gravatar image

3 steps :

  1. Gaussian blur(11,11) with sigma=5
  2. convert to gray
  3. Automatic threshold using OTSU

results are :

image description

edit flag offensive delete link more


Thats a nice result, thank you!

Atado gravatar imageAtado ( 2017-01-19 01:15:27 -0500 )edit
Login/Signup to Answer

Question Tools



Asked: 2017-01-18 07:20:37 -0500

Seen: 160 times

Last updated: Jan 18 '17