Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a frame which consist of many tablets. There are spots on the tablets. I want to detect those spots which are on tablet. The spots are of random color, random shape and random size. How can i detect these spots using image processing?

What I have tried:

I have tried edge detection, histogram analysis method, blob detection method. I am not able to get accurate results.
Posted

I'm going to have to make assumptions that you have circular tablets with circular spots. Off the top of my head, you would use something like HoughCircles to detect all circles in the image; once you have the list of all circles, you would look for circles inside circles; these should be your spots. If there are any circles without a containing circle, this means that either the tablet is not a circle, or the circle is a tablet without a spot. Unfortunately, you're going to have to decide which of these is the case.

Note that you could end up with situations with spots so very close together that they get missed because the minimum distance would be too small. This approach also assumes that you don't get spots inside spots inside the tablet.
 
Share this answer
 
Comments
01fe20bec297 26-Apr-24 5:16am    
So most of the tablets are ovel and some are square as well as circle.
Looks like you should use Particle analysis/detection within each of those tablets. Firstly, to identify the tablets, you should again use particle analysis/detection.

The open source software ImageJ has code for this - see Particle Analysis[^]

You can find source code for ImageJ (is in Java) at their site, or on Github. You'll need to examine the code which does this, and port it to the language you need.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900