Getting blobs from similarly colored contours in grayscale image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
galv
Posts: 62
Joined: 2010-05-23T17:35:59-07:00
Authentication code: 8675308

Getting blobs from similarly colored contours in grayscale image

Post by galv »

I want to get the staff lines position as individual blobs in either of these images:

http://i.stack.imgur.com/7LJ25.png
http://i.stack.imgur.com/V95Le.png

Is this possible?

Edit:
The regions that I want to select are shown in this image (roughly, I selected them manually): http://i.imgur.com/4bpZLNJ.png It's ok if other blobs are getting selected too (I can filter them by their area afterwards).
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Getting blobs from similarly colored contours in grayscale image

Post by fmw42 »

Best I can do is

Code: Select all

convert V95Le.png -negate -lat 200x200+0.1% -negate result.png

Also see connected components processing for binary images at: http://magick.imagemagick.org/script/co ... onents.php
Post Reply