Return position and size of circular objects in 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
linkinpark2014
Posts: 1
Joined: 2019-11-03T22:47:22-07:00
Authentication code: 1152

Return position and size of circular objects in image

Post by linkinpark2014 » 2019-11-03T23:03:28-07:00

Hello all, I have this image:
https://imgur.com/arGsGJ1

using this command:

Code: Select all

magick model1.png -canny 0x0+1%+10% -negate -blur 3x.7 -solarize 50% -level 50%,0 model_canny.png
it got converted to this :
https://imgur.com/a/GMcrzG4

is it possible to get the position/size of the teeth in the arch? it doesn't have to be perfect. Even if it detects half of the teeth in the arch it would be a great for me to understand how this works. So far I've tried

Code: Select all

connected-components
param and it gives me thousands of results which is obviously incorrect. Here's what I've done so far:

Code: Select all

magick model_canny.png -fuzz 5% -define connected-components:verbose=true -connected-components 4 objects.png
Also is it possible to remove the random black lines inside the teeth? Any help would be appreciated..

Post Reply