How to detect coin and pills using opencv android ?
I am not understanding how to detect coin and pills in android using opencv.
If anyone know hten help me or give link or give code so i understand and work on it. Thank You
Please upload some example images.
Thank You for feedback and please check images give solution.
You have to be more specific, What is your app goal? do you care if it is a coins or pills or you just want to recognize this objects in image that include more objects?
my app goal is if i press on count coin button then they count number coin and second time i press pills button they count number of pills.
do you know the type of the coins and pills? or is it a unknown type?
its unknown type (coin means count circle) and (pills means capsules).
To find and count coins you can start with a derivative filter to remove the background and find the edges after it you can fill the contour(use black and white image), then count the objects (look at Component labeling algorithms), if it is possible that the coins are find near to each other you have to use"Erosion" (shrinking) algorithm. This is my suggest, I didn't try it. but I believe that this is a direction. You can look at this guide : http://www.cs.rutgers.edu/~elgammal/classes/cs334/BinaryImageAnalysis.pdf
Thank you itay. i will check and post result..