Segmentation of Signature from Image with varying background colour

Viewed 582

I am trying to extract Image from a pan card with is ID card in India. Trying to extract the same with OpenCV and python. I have tried out the same using connected components background is interfering with it too much.

This is the sample input

enter image description here

This is the required output

enter image description here

I have followed this project as initial starting pointing, but not able to extract the same properly because of the gradient in the background. Thanks in advance for your time – if I’ve missed out anything, over- or under-emphasized a specific point let me know in the comments.

1 Answers

Adaptive thresholding on the blue component seems to do the job easily.enter image description here

Related