Hello,
I have images of documents that contain circle stamps (seals) on them.
Example: http://data28.i.gallery.ru/albums/smsdo ... d0b2ce.jpg
Documents can be of different sizes and colours. Stamps can be different colours and in different positions (but only 1 stamp per page)
Is it possible to detect the stamp and save it in another image?
Thank you.
Find & extract circle (stamp or seal) from image
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Find & extract circle (stamp or seal) from image
What visually defines the stamp? In this case, the stamp has high colour saturation.
The result is:
Using that result:
Code: Select all
convert stampdoc.jpg -colorspace HCL -channel G -separate +channel
-threshold 50% -format %@ info:
Code: Select all
436x439+189+2141
Code: Select all
convert stampdoc.jpg -crop 436x439+189+2141 +repage sd_stamp.png
snibgo's IM pages: im.snibgo.com
Re: Find & extract circle (stamp or seal) from image
This works for high-contrast, but what about softer or black&white images, etc...?
Thank you for the quick reply. I would like to chip in $50 for beer if this is a easy problem to solve.
http://data26.i.gallery.ru/albums/smsdo ... 960bf2.jpg (soft)
http://data27.i.gallery.ru/albums/smsdo ... 46fd59.jpg (photo)
http://data26.i.gallery.ru/albums/smsdo ... b374d9.jpg (photo)
http://data27.i.gallery.ru/albums/smsdo ... 50bbdd.jpg (positioned incorrectly)
http://data27.i.gallery.ru/albums/smsdo ... 934d43.jpg (flares)
http://data27.i.gallery.ru/albums/smsdo ... cf5ee3.jpg (scan marks)
Thank you for the quick reply. I would like to chip in $50 for beer if this is a easy problem to solve.
http://data26.i.gallery.ru/albums/smsdo ... 960bf2.jpg (soft)
http://data27.i.gallery.ru/albums/smsdo ... 46fd59.jpg (photo)
http://data26.i.gallery.ru/albums/smsdo ... b374d9.jpg (photo)
http://data27.i.gallery.ru/albums/smsdo ... 50bbdd.jpg (positioned incorrectly)
http://data27.i.gallery.ru/albums/smsdo ... 934d43.jpg (flares)
http://data27.i.gallery.ru/albums/smsdo ... cf5ee3.jpg (scan marks)