Ask Your Question

Skittles counter and classifier

asked 2014-12-03 14:45:30 -0500

el_pablo gravatar image

updated 2014-12-08 09:39:02 -0500

Hi there,

For fun, I have been trying to do a skittles counter. I am almost there except for a few candies which are to close together to make them easily separated for the program.

I mostly followed this website to create the program.

The program does not use hough circle to detect the candies, but peaks using distance transform.

The program and an example file is attached here.

So the question is : How can I get all the skittles and exclude false positive?

Follow up

Here's the hue channel from one experiment. How can I manage to limit the noise on certain colour? image description


image description

Thanks for helping

edit retag flag offensive close merge delete


My question seems to have 2 answers, but I can't see them. How can I read the answers?

el_pablo gravatar imageel_pablo ( 2014-12-08 18:20:40 -0500 )edit

you forgot to explain what stage are you now? What have you tried? where is the problem? Show your current stage output!

Balaji R gravatar imageBalaji R ( 2014-12-09 04:29:09 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2014-12-08 09:59:09 -0500

Goosebumps gravatar image

Have a look at watershed segmentation in combination with distance transform. There are many examples on the interwebz. Here is one in OpenCV and python: watershed

Most common steps: - Use automatic global thresholding such as Otsu - Erode this, distance transform and threshold it to get sure foreground - Dilate it to get sure background - Do watershed segmentation using the sure fore- and background

edit flag offensive delete link more

answered 2014-12-04 07:14:21 -0500

And what is your question?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools


Asked: 2014-12-03 14:45:30 -0500

Seen: 188 times

Last updated: Dec 08 '14