Ask Your Question
0

Skittles counter and classifier

asked Dec 3 '14

el_pablo gravatar image

updated Dec 8 '14

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

Original

image description

Thanks for helping

Preview: (hide)

Comments

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

el_pablo gravatar imageel_pablo (Dec 9 '14)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 (Dec 9 '14)edit

2 answers

Sort by » oldest newest most voted
0

answered Dec 8 '14

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

Preview: (hide)
0

answered Dec 4 '14

And what is your question?

Preview: (hide)

Question Tools

Stats

Asked: Dec 3 '14

Seen: 644 times

Last updated: Dec 08 '14